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


Python ByteWriter.write_uint64方法代码示例

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


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

示例1: set_entity

# 需要导入模块: from cuwo.bytes import ByteWriter [as 别名]
# 或者: from cuwo.bytes.ByteWriter import write_uint64 [as 别名]
 def set_entity(self, entity, entity_id, mask=None):
     if mask is None:
         mask = FULL_MASK
     writer = ByteWriter()
     writer.write_uint64(entity_id)
     write_masked_data(entity, writer, mask)
     self.data = writer.get()
开发者ID:Cahor007,项目名称:cuwo,代码行数:9,代码来源:packet.py

示例2: write

# 需要导入模块: from cuwo.bytes import ByteWriter [as 别名]
# 或者: from cuwo.bytes.ByteWriter import write_uint64 [as 别名]
    def write(self, writer):
        data = ByteWriter()
        write_list(data, self.items_1)
        write_list(data, self.player_hits)
        write_list(data, self.particles)
        write_list(data, self.sound_actions)
        write_list(data, self.shoot_actions)
        write_list(data, self.static_entities)
        write_list(data, self.chunk_items)

        data.write_uint32(len(self.items_8))
        for item in self.items_8:
            something, sub_items = item
            data.write_uint64(something)
            data.write_uint32(len(sub_items))
            for item in sub_items:
                data.write(item)

        write_list(data, self.pickups)
        write_list(data, self.kill_actions)
        write_list(data, self.damage_actions)

        data.write_uint32(len(self.items_12))
        for item in self.items_12:
            data.write(item)

        write_list(data, self.missions)

        compressed_data = zlib.compress(data.get())
        writer.write_uint32(len(compressed_data))
        writer.write(compressed_data)
开发者ID:Endimmion,项目名称:cuwo,代码行数:33,代码来源:packet.py

示例3: set_entity

# 需要导入模块: from cuwo.bytes import ByteWriter [as 别名]
# 或者: from cuwo.bytes.ByteWriter import write_uint64 [as 别名]
 def set_entity(self, entity, entity_id):
     writer = ByteWriter()
     writer.write_uint64(entity_id)
     write_masked_data(entity, writer)
     self.data = writer.get()
开发者ID:IFraserAu,项目名称:cuwo,代码行数:7,代码来源:packet.py


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