当前位置: 首页>>代码示例>>Python>>正文


Python ItemData.read方法代码示例

本文整理汇总了Python中cuwo.entity.ItemData.read方法的典型用法代码示例。如果您正苦于以下问题:Python ItemData.read方法的具体用法?Python ItemData.read怎么用?Python ItemData.read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cuwo.entity.ItemData的用法示例。


在下文中一共展示了ItemData.read方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: PickupAction

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:IFraserAu,项目名称:cuwo,代码行数:11,代码来源:packet.py

示例2: PickupAction

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:xEnt22,项目名称:cuwo,代码行数:11,代码来源:packet.py

示例3: InteractPacket

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:Endimmion,项目名称:cuwo,代码行数:24,代码来源:packet.py

示例4: ChunkItemData

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:IFraserAu,项目名称:cuwo,代码行数:25,代码来源:packet.py

示例5: InteractPacket

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:xEnt22,项目名称:cuwo,代码行数:25,代码来源:packet.py

示例6: EntitySubAction

# 需要导入模块: from cuwo.entity import ItemData [as 别名]
# 或者: from cuwo.entity.ItemData import read [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)
开发者ID:xEnt22,项目名称:cuwo,代码行数:26,代码来源:packet.py


注:本文中的cuwo.entity.ItemData.read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。