Exemplo n.º 1
0
 def read(self, reader):
     if reader.read_uint32() != 0:
         raise NotImplementedError()
         return
     self.entity_id = reader.read_uint64()  # must be > 1 and < 10
     self.data = EntityData()
     self.data.read(reader)
Exemplo n.º 2
0
def create_entity_data():
    data = EntityData()
    data.appearance = AppearanceData()
    data.item_data = ItemData()
    data.equipment = []
    for _ in xrange(13):
        data.equipment.append(ItemData())
    return data
Exemplo n.º 3
0
def create_entity_data():
    data = EntityData()
    data.appearance = AppearanceData()
    data.consumable = ItemData()
    data.equipment = []
    for _ in xrange(13):
        data.equipment.append(ItemData())
    return data
Exemplo n.º 4
0
def create_entity_data():
    data = EntityData()
    data.appearance = AppearanceData()
    data.equipment_1 = EquipmentData()
    data.equipment = []
    for _ in xrange(13):
        data.equipment.append(EquipmentData())
    return data
Exemplo n.º 5
0
 def read(self, reader):
     if reader.read_uint32() != 0:
         raise NotImplementedError()
         return
     self.entity_id = reader.read_uint64() # must be > 1 and < 10
     self.data = EntityData()
     self.data.read(reader)
Exemplo n.º 6
0
class JoinPacket(Packet):
    data = None
    def read(self, reader):
        if reader.read_uint32() != 0:
            raise NotImplementedError()
            return
        self.entity_id = reader.read_uint64() # must be > 1 and < 10
        self.data = EntityData()
        self.data.read(reader)

    def write(self, writer):
        writer.write_uint32(0)
        writer.write_uint64(self.entity_id)
        if self.data is None:
            writer.write('\x00' * 0x1168)
        else:
            self.data.write(writer)
Exemplo n.º 7
0
class JoinPacket(Packet):
    data = None

    def read(self, reader):
        if reader.read_uint32() != 0:
            raise NotImplementedError()
            return
        self.entity_id = reader.read_uint64()  # must be > 1 and < 10
        self.data = EntityData()
        self.data.read(reader)

    def write(self, writer):
        writer.write_uint32(0)
        writer.write_uint64(self.entity_id)
        if self.data is None:
            writer.write('\x00' * 0x1168)
        else:
            self.data.write(writer)