summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xservergreps/hercules/src/packetdb.py4
-rwxr-xr-xservergreps/hercules/src/reporter.py25
2 files changed, 23 insertions, 6 deletions
diff --git a/servergreps/hercules/src/packetdb.py b/servergreps/hercules/src/packetdb.py
index 11af019..e50f51a 100755
--- a/servergreps/hercules/src/packetdb.py
+++ b/servergreps/hercules/src/packetdb.py
@@ -52,7 +52,7 @@ class PacketDb:
'weaponrefine': 'clif->pWeaponRefine',
'maildelete': 'clif->pMail_delete',
'useskilltoid': 'clif->pUseSkillToId',
- 'cashshopbuy': 'clif->pCashShopBuy',
+ 'cashshopbuy': 'clif->pcashshop_buy',
'traderequest': 'clif->pTradeRequest',
'restart': 'clif->pRestart',
'gmreqnochat': 'clif->pGMReqNoChat',
@@ -226,7 +226,7 @@ class PacketDb:
'mergeitem_cancel': 'clif->cancelmergeitem',
'booking_playcancel': 'in packet',
'cashshopitemlist': 'clif->pCashShopSchedule',
- 'reqworldinfo': 'missing',
+ 'reqworldinfo': 'reqworldinfo',
'ranklist': 'clif->pRanklist',
'bankdeposit': 'clif->pBankDeposit',
'bankwithdrawal': 'clif->pBankWithdraw',
diff --git a/servergreps/hercules/src/reporter.py b/servergreps/hercules/src/reporter.py
index a880922..46257c0 100755
--- a/servergreps/hercules/src/reporter.py
+++ b/servergreps/hercules/src/reporter.py
@@ -239,6 +239,14 @@ class Reporter:
w.write("Exists only in " + name + ", but missing packet size: " + packet + "\n")
else:
w.write("Exists only in " + name + ": " + packet + "\n")
+ for packet in fork.outPacketsSorted:
+ if packet not in hercules.packetsSet:
+ if packet in fork.getLenPackets and packet in fork.knownLenPackets and \
+ packet in hercules.getLenPackets and packet in hercules.knownLenPackets:
+ w.write("Different packet size for packet {0}: {1} vs {2}\n",
+ packet,
+ hercules.knownLenPackets[packet],
+ fork.knownLenPackets[packet])
with open(self.packetDir + "/" + hercules.reportName + "_" + fork.reportName + "_inpackets.txt", "w") as w:
for func in hercules.functionToId:
packet = hercules.functionToId[func]
@@ -246,7 +254,7 @@ class Reporter:
if func not in fork.functionToId:
continue
forkPacket = fork.functionToId[func]
- if packet != forkPacket:
+ if packet != forkPacket and func != "clif->pDull":
w.write("Wrong preffered packet for function {0}: {1} vs {2}\n".format(
func,
packet,
@@ -257,12 +265,21 @@ class Reporter:
for packet in fork.inPacketsSorted:
if packet in hercules.inPackets:
herculesFunction = hercules.inPackets[packet][1]
+ herculesLen = hercules.inPackets[packet][0]
forkFunction = fork.inPackets[packet][1]
- if herculesFunction != forkFunction and (hercules.functionToId[herculesFunction] == packet or fork.functionToId[forkFunction] == packet):
- w.write("Wrong function name for packet {0}: {1} vs {2}\n".format(
+ forkLen = fork.inPackets[packet][0]
+ if herculesFunction != forkFunction:
+ if hercules.functionToId[herculesFunction] == packet or fork.functionToId[forkFunction] == packet:
+ w.write("Wrong function name for packet {0}: {1} vs {2}\n".format(
+ packet,
+ herculesFunction,
+ forkFunction))
+ elif herculesLen != forkLen:
+ w.write("Different packet size for packet {0} {1}: {2} vs {3}\n".format(
packet,
herculesFunction,
- forkFunction))
+ herculesLen,
+ forkLen))
def reportServer(self, hercules, server):