def _unpack(self): self.victim_id = Packet.unpack_uint8(self.buffer) self.killer_id = Packet.unpack_uint8(self.buffer) self.reason = Packet.unpack_uint16(self.buffer) self.shot_id = Packet.unpack_uint16(self.buffer) self.flag = Packet.unpack_flag(self.buffer) if self.reason == code_from_chars('pd'): self.physics_driver_id = Packet.unpack_uint32(self.buffer)
def _unpack(self): self.player_index = Packet.unpack_uint8(self.buffer) self.player_type = Packet.unpack_uint16(self.buffer) self.team_value = Packet.unpack_uint16(self.buffer) self.score.wins = Packet.unpack_uint16(self.buffer) self.score.losses = Packet.unpack_uint16(self.buffer) self.score.team_kills = Packet.unpack_uint16(self.buffer) self.callsign = Packet.unpack_string(self.buffer, NetworkProtocol.CALLSIGN_LEN) self.motto = Packet.unpack_string(self.buffer, NetworkProtocol.MOTTO_LEN)
def _unpack(self): count: int = Packet.unpack_uint8(self.buffer) for i in range(0, count): data: ScoreData = ScoreData() data.player_id = Packet.unpack_uint8(self.buffer) data.wins = Packet.unpack_uint16(self.buffer) data.losses = Packet.unpack_uint16(self.buffer) data.team_kills = Packet.unpack_uint16(self.buffer) self.scores.append(data)
def _unpack(self): count: int = Packet.unpack_uint8(self.buffer) for i in range(0, count): data: TeamData = TeamData() data.team = Packet.unpack_uint16(self.buffer) data.size = Packet.unpack_uint16(self.buffer) data.wins = Packet.unpack_uint16(self.buffer) data.losses = Packet.unpack_uint16(self.buffer) self.teams.append(data)
def _unpack(self): count: int = Packet.unpack_uint16(self.buffer) for i in range(0, count): setting: BZDBSetting = BZDBSetting() name_len: int = Packet.unpack_uint8(self.buffer) setting.name = Packet.unpack_string(self.buffer, name_len) value_len: int = Packet.unpack_uint8(self.buffer) setting.value = Packet.unpack_string(self.buffer, value_len) self.settings.append(setting)
def _unpack(self): self.player_id = Packet.unpack_uint8(self.buffer) self.from_ = Packet.unpack_uint16(self.buffer) self.to = Packet.unpack_uint16(self.buffer)
def _unpack(self): self.player_id = Packet.unpack_uint8(self.buffer) self.flag_id = Packet.unpack_uint16(self.buffer) self.team = Packet.unpack_uint16(self.buffer)