summaryrefslogtreecommitdiff
path: root/servergreps/hercules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-10-07 01:21:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-10-07 01:21:25 +0300
commitc21b13c5ad3e1b9864cf4a58e92a1e9956a6d625 (patch)
tree04d6cf06013d2395180453117cabd93af1f78f64 /servergreps/hercules
parenta9703573356a5798a12b0b5a7a8342a2dbd0d6ee (diff)
downloadevol-tools-c21b13c5ad3e1b9864cf4a58e92a1e9956a6d625.tar.gz
evol-tools-c21b13c5ad3e1b9864cf4a58e92a1e9956a6d625.tar.bz2
evol-tools-c21b13c5ad3e1b9864cf4a58e92a1e9956a6d625.tar.xz
evol-tools-c21b13c5ad3e1b9864cf4a58e92a1e9956a6d625.zip
servergreps: dont mix in peek checks char and map server packets.
Diffstat (limited to 'servergreps/hercules')
-rwxr-xr-xservergreps/hercules/src/hercules.py6
-rwxr-xr-xservergreps/hercules/src/peek.py4
-rwxr-xr-xservergreps/hercules/src/reporter.py4
3 files changed, 11 insertions, 3 deletions
diff --git a/servergreps/hercules/src/hercules.py b/servergreps/hercules/src/hercules.py
index 344ec31..cfa98b8 100755
--- a/servergreps/hercules/src/hercules.py
+++ b/servergreps/hercules/src/hercules.py
@@ -18,6 +18,8 @@ class Hercules:
outPacketsSorted = []
inPacketsSorted = []
inPackets = dict()
+ inMapPacketsSorted = []
+ inMapPackets = dict()
functionToId = dict()
loginPacketNameToId = dict()
getLenPackets = set()
@@ -129,6 +131,7 @@ class Hercules:
data = "0" + data
self.inPackets[data] = \
(int(m.group("len")), m.group("function"))
+ self.inMapPackets[data] = self.inPackets[data]
self.functionToId[m.group("function")] = data
m = self.clientpacketLenre.search(line)
if m is not None:
@@ -159,6 +162,9 @@ class Hercules:
for packet in self.inPackets:
self.inPacketsSorted.append(packet)
self.inPacketsSorted.sort()
+ for packet in self.inMapPackets:
+ self.inMapPacketsSorted.append(packet)
+ self.inMapPacketsSorted.sort()
def processPackets(self, packetDir, packetVersion):
diff --git a/servergreps/hercules/src/peek.py b/servergreps/hercules/src/peek.py
index 3012987..d4410c7 100755
--- a/servergreps/hercules/src/peek.py
+++ b/servergreps/hercules/src/peek.py
@@ -5,7 +5,6 @@
# Author: Andrei Karas (4144)
import configparser
-import re
import os
class Peek:
@@ -13,6 +12,9 @@ class Peek:
inPackets = dict()
knownLenPackets = dict()
+# staticMap = {
+# }
+
shuffleMap = {
'0': 'clif->pActionRequest',
'1': 'clif->pUseSkillToId',
diff --git a/servergreps/hercules/src/reporter.py b/servergreps/hercules/src/reporter.py
index fb287ce..ea1c6b7 100755
--- a/servergreps/hercules/src/reporter.py
+++ b/servergreps/hercules/src/reporter.py
@@ -364,11 +364,11 @@ class Reporter:
w.write("Exists only in Hercules: " + packet + "\n");
if fail == False:
w.write("Table include all hercules packets\n")
- for packet in hercules.inPacketsSorted:
+ for packet in hercules.inMapPacketsSorted:
if packet in peek.inPackets:
peekFunction = peek.inPackets[packet][1]
if peekFunction != "":
- herculesFunction = hercules.inPackets[packet][1]
+ herculesFunction = hercules.inMapPackets[packet][1]
if peekFunction != herculesFunction:
w.write("Wrong function name for packet {0}: {1} vs {2}\n".format(
packet,