From 43e8becee1130b91b58e416ad2a59a04eea20cbd Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Mon, 11 Jan 2021 21:30:01 +0100 Subject: [PATCH] update spykhanat (decode PropVisualA, PropVisualB & PropVisualC message) --- spykhanat.py | 2 +- tools/CAction.py | 40 +++++++++++++++++++++++++++++----- tools/CActionFactory.py | 2 +- tools/DecodeDatabase.py | 4 ++-- tools/Impulse.py | 8 +++---- tools/PropVisual.py | 48 ++++++++++++++++++++++++++++++++++++++++- tools/TVPNodeBase.py | 1 - 7 files changed, 90 insertions(+), 15 deletions(-) diff --git a/spykhanat.py b/spykhanat.py index 768e803..fe13bea 100755 --- a/spykhanat.py +++ b/spykhanat.py @@ -247,7 +247,7 @@ class SpyPcap(): logging.getLogger(LOGGER).debug("too small no decodeVisualProperties [{0} > {1}]".format(msgin.sizeRead() + (8*8 ), msgin.sizeData() * 8 )) slot = msgin.readUint8("Slot") property['slot'] = slot - hearder = 'VisualProperty/Slot'+str(slot) + '/' + hearder = 'VisualProperty/Slot_'+str(slot) + '/' associationBits = msgin.readSerial(2, "associationBits") notices.setdefault(hearder + 'associationBits', associationBits) property['associationBits'] = associationBits diff --git a/tools/CAction.py b/tools/CAction.py index 95299cc..c520a1b 100644 --- a/tools/CAction.py +++ b/tools/CAction.py @@ -196,7 +196,7 @@ class CActionPosition(CAction): self.add_notice('px', self.Position16[0] ) self.add_notice('py', self.Position16[1] ) self.add_notice('pz', self.Position16[2] ) - self.add_notice('IsRelative', (self.Position16[2] & 0x1) != 0 ) + self.add_notice('IsRelative', (self.Position16[2] & 0x1) != 0 ) self.add_notice('Interior', (self.Position16[2] & 0x2) != 0 ) # message.serialAndLog1( Position16[0] ); @@ -480,12 +480,42 @@ class CActionSint64(CAction): logging.getLogger(LOGGER).debug("msgin:%s" % msgin.showAllData()) # self.value = msgin.readSerial( self.NbBits, 'value') self.value = msgin.readSerialUint64( self.NbBits, self.NameProperty) - self.add_notice(self.NameProperty, self.value) + # Decode Message + if self.PropertyIndex == TPropIndex.TPropIndex.PROPERTY_ORIENTATION: + v1 = struct.pack('I', self.value) + angle_radius = struct.unpack(' 1: self.VPA.makeDescendants( nbLevels-1 ); self.VPB.makeDescendants( nbLevels-1 ); - def build_tree(self): # khanat-opennel-code/code/ryzom/common/src/game_share/entity_types.h:458 uint buildTree()