本文整理汇总了Python中cuwo.entity.ItemData.write方法的典型用法代码示例。如果您正苦于以下问题:Python ItemData.write方法的具体用法?Python ItemData.write怎么用?Python ItemData.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cuwo.entity.ItemData
的用法示例。
在下文中一共展示了ItemData.write方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PickupAction
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class PickupAction(Loader):
def read(self, reader):
self.entity_id = reader.read_uint64() # player who picked up
self.item_data = ItemData()
self.item_data.read(reader)
def write(self, writer):
writer.write_uint64(self.entity_id)
self.item_data.write(writer)
示例2: PickupAction
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class PickupAction(Loader):
def read(self, reader):
self.entity_id = reader.read_uint64()
self.item = ItemData()
self.item.read(reader)
def write(self, writer):
writer.write_uint64(self.entity_id)
self.item.write(writer)
示例3: InteractPacket
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class InteractPacket(Packet):
def read(self, reader):
self.item_data = ItemData()
self.item_data.read(reader)
self.chunk_x = reader.read_int32()
self.chunk_y = reader.read_int32()
# index of item in ChunkItems
self.item_index = reader.read_int32()
self.something4 = reader.read_uint32()
self.interact_type = reader.read_uint8()
self.something6 = reader.read_uint8()
self.something7 = reader.read_uint16()
def write(self, writer):
self.item_data.write(writer)
writer.write_int32(self.chunk_x)
writer.write_int32(self.chunk_y)
writer.write_int32(self.item_index)
writer.write_uint32(self.something4)
writer.write_uint8(self.interact_type)
writer.write_uint8(self.something6)
writer.write_uint16(self.something7)
示例4: ChunkItemData
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class ChunkItemData(Loader):
def read(self, reader):
self.item_data = ItemData()
self.item_data.read(reader)
self.pos = reader.read_qvec3()
self.rotation = reader.read_float() # angle something
self.scale = reader.read_float()
self.something3 = reader.read_uint8()
reader.skip(3)
self.drop_time = reader.read_uint32() # drop time
self.something5 = reader.read_uint32() # 320
self.something6 = reader.read_int32() # 324
def write(self, writer):
self.item_data.write(writer)
writer.write_qvec3(self.pos)
writer.write_float(self.rotation)
writer.write_float(self.scale)
writer.write_uint8(self.something3)
writer.pad(3)
writer.write_uint32(self.drop_time)
writer.write_uint32(self.something5)
writer.write_int32(self.something6)
示例5: InteractPacket
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class InteractPacket(Packet):
def read(self, reader):
self.equipment = ItemData()
self.equipment.read(reader)
self.chunk_x = reader.read_int32()
self.chunk_y = reader.read_int32()
self.something3 = reader.read_int32()
#
self.something4 = reader.read_uint32()
self.interact_type = reader.read_uint8()
self.something6 = reader.read_uint8()
self.something7 = reader.read_uint16()
# print vars(self)
def write(self, writer):
self.equipment.write(writer)
writer.write_int32(self.chunk_x)
writer.write_int32(self.chunk_y)
writer.write_int32(self.something3)
writer.write_uint32(self.something4)
writer.write_uint8(self.interact_type)
writer.write_uint8(self.something6)
writer.write_uint16(self.something7)
示例6: EntitySubAction
# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import write [as 别名]
class EntitySubAction(Loader):
def read(self, reader):
self.item_data = ItemData()
self.item_data.read(reader)
self.vec = reader.read_qvec3()
self.something = reader.read_float() # angle something
self.something2 = reader.read_float()
self.something3 = reader.read_uint8()
reader.skip(3)
self.something4 = reader.read_uint32() # 316
self.something5 = reader.read_uint32() # 320
self.something6 = reader.read_int32() # 324
# print vars(self)
def write(self, writer):
self.item_data.write(writer)
writer.write_qvec3(self.vec)
writer.write_float(self.something)
writer.write_float(self.something2)
writer.write_uint8(self.something3)
writer.pad(3)
writer.write_uint32(self.something4)
writer.write_uint32(self.something5)
writer.write_int32(self.something6)