Esempio n. 1
0
    def to_data(self):
        packet = PacketWriter(0x8C, self.packet_length)
        packet.ipv4(self.relay.ip)
        packet.ushort(self.relay.port)
        packet.uint(self.relay.auth_id)

        return packet.finish()
Esempio n. 2
0
    def to_data(self):
        packet = PacketWriter(0xA8, self.packet_length)
        packet.byte(self.server_list.sys_info_flag)
        packet.ushort(self.server_list.count)

        for server in self.server_list.servers:
            packet.ushort(server.index)
            packet.fixstring(server.name, 32)
            packet.byte(server.percent_full)
            packet.byte(server.timezone)
            packet.ipv4(server.ip, True)

        return packet.finish()