本文整理汇总了Python中cuwo.bytes.ByteReader.read_uint64方法的典型用法代码示例。如果您正苦于以下问题:Python ByteReader.read_uint64方法的具体用法?Python ByteReader.read_uint64怎么用?Python ByteReader.read_uint64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cuwo.bytes.ByteReader
的用法示例。
在下文中一共展示了ByteReader.read_uint64方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: read
# 需要导入模块: from cuwo.bytes import ByteReader [as 别名]
# 或者: from cuwo.bytes.ByteReader import read_uint64 [as 别名]
def read(self, reader):
size = reader.read_uint32()
decompressed_data = zlib.decompress(reader.read(size))
reader = ByteReader(decompressed_data)
self.items_1 = read_list(reader, Packet4Struct1)
self.player_hits = read_list(reader, HitPacket)
self.items_3 = []
for _ in xrange(reader.read_uint32()):
self.items_3.append(reader.read(72))
self.sound_actions = read_list(reader, SoundAction)
self.shoot_actions = read_list(reader, ShootPacket)
self.items_6 = []
for _ in xrange(reader.read_uint32()):
self.items_6.append(reader.read(88))
self.chunk_items = read_list(reader, ChunkItems)
self.items_8 = []
for _ in xrange(reader.read_uint32()):
something = reader.read_uint64()
sub_items = []
for _ in xrange(reader.read_uint32()):
sub_items.append(reader.read(16))
self.items_8.append((something, sub_items))
self.pickups = read_list(reader, PickupAction)
self.kill_actions = read_list(reader, KillAction)
self.damage_actions = read_list(reader, DamageAction)
self.items_12 = []
for _ in xrange(reader.read_uint32()):
self.items_12.append(reader.read(40))
# objective/quests? not sure
self.items_13 = read_list(reader, Item13)
debug = True
if debug:
v = vars(self).copy()
del v['pickups']
# del v['kill_actions']
del v['damage_actions']
del v['sound_actions']
del v['shoot_actions']
# del v['player_hits']
del v['chunk_items']
for k, v in v.iteritems():
if not v:
continue
print k, v
if len(decompressed_data) != reader.tell():
raise NotImplementedError()
示例2: read
# 需要导入模块: from cuwo.bytes import ByteReader [as 别名]
# 或者: from cuwo.bytes.ByteReader import read_uint64 [as 别名]
def read(self, reader):
size = reader.read_uint32()
decompressed_data = zlib.decompress(reader.read(size))
reader = ByteReader(decompressed_data)
self.items_1 = read_list(reader, Packet4Struct1)
self.player_hits = read_list(reader, HitPacket)
self.particles = read_list(reader, ParticleData)
self.sound_actions = read_list(reader, SoundAction)
self.shoot_actions = read_list(reader, ShootPacket)
self.static_entities = read_list(reader, StaticEntityData)
self.chunk_items = read_list(reader, ChunkItems)
self.items_8 = []
for _ in xrange(reader.read_uint32()):
something = reader.read_uint64()
sub_items = []
for _ in xrange(reader.read_uint32()):
sub_items.append(reader.read(16))
self.items_8.append((something, sub_items))
self.pickups = read_list(reader, PickupAction)
self.kill_actions = read_list(reader, KillAction)
self.damage_actions = read_list(reader, DamageAction)
self.items_12 = []
for _ in xrange(reader.read_uint32()):
self.items_12.append(reader.read(40))
# objective/quests? not sure
self.missions = read_list(reader, MissionData)
debug = False
if debug:
v = vars(self).copy()
# del v['kill_actions']
# del v['player_hits']
del v["pickups"]
del v["damage_actions"]
del v["sound_actions"]
del v["shoot_actions"]
del v["chunk_items"]
for k, v in v.iteritems():
if not v:
continue
print k, v
if len(decompressed_data) != reader.tell():
raise NotImplementedError()
示例3: read
# 需要导入模块: from cuwo.bytes import ByteReader [as 别名]
# 或者: from cuwo.bytes.ByteReader import read_uint64 [as 别名]
def read(self, reader):
size = reader.read_uint32()
decompressed_data = zlib.decompress(reader.read(size))
reader = ByteReader(decompressed_data)
self.block_actions = read_list(reader, BlockAction)
self.player_hits = read_list(reader, HitPacket)
self.particles = read_list(reader, ParticleData)
self.sound_actions = read_list(reader, SoundAction)
self.shoot_actions = read_list(reader, ShootPacket)
self.static_entities = read_list(reader, StaticEntityPacket)
self.chunk_items = read_list(reader, ChunkItems)
self.items_8 = []
for _ in range(reader.read_uint32()):
something = reader.read_uint64()
sub_items = []
for _ in range(reader.read_uint32()):
sub_items.append(reader.read(16))
self.items_8.append((something, sub_items))
self.pickups = read_list(reader, PickupAction)
self.kill_actions = read_list(reader, KillAction)
self.damage_actions = read_list(reader, DamageAction)
# EXT: used when NPC wizards/creatures use a right-click targeted
# action such as a spell cast. (NPC rclick action?)
self.passive_actions = read_list(reader, PassivePacket)
self.missions = read_list(reader, MissionPacket)
debug = False
if debug:
v = vars(self).copy()
# del v['kill_actions']
# del v['player_hits']
del v['pickups']
del v['damage_actions']
del v['sound_actions']
del v['shoot_actions']
del v['chunk_items']
for k, v in v.items():
if not v:
continue
print(k, v)
if len(decompressed_data) != reader.tell():
raise NotImplementedError()