當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。