1
Fork 0
mirror of https://github.com/awgil/ffxiv_reverse.git synced 2025-04-22 06:57:44 +00:00

Don't print out unknown packets by default

This commit is contained in:
Andrew Gilewsky 2023-05-23 12:05:45 +01:00
parent 4465eb647b
commit cbca3893d4

View file

@ -268,6 +268,8 @@ class ffnetwork(idaapi.plugin_t):
wanted_name = 'ffnetwork'
wanted_hotkey = ''
_unknown_in_output = False
def init(self):
return idaapi.PLUGIN_OK
@ -306,8 +308,10 @@ class ffnetwork(idaapi.plugin_t):
continue
opcodemap[index] = case
for k, v in sorted(opcodemap.items()):
name = packet_names[k] if k in packet_names else f'Packet{k}'
print(f'{name} = {hex(v)}')
if k in packet_names:
print(f'{packet_names[k]} = 0x{v:0{4}X},')
elif self._unknown_in_output:
print(f'Packet{k} = 0x{v:0{4}X},')
def term(self):
pass