summaryrefslogtreecommitdiff
path: root/servergreps/hercules/src/threeceam.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-16 20:41:01 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-16 20:42:17 +0300
commitae7f2a6c850b841693082a401ecdb4e572cfc9cc (patch)
tree00b71481eb557e7ac501c6472026c3f6219ec517 /servergreps/hercules/src/threeceam.py
parent5d512ce82c9dcb4047634c08227917c26cf761c2 (diff)
downloadevol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.gz
evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.bz2
evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.tar.xz
evol-tools-ae7f2a6c850b841693082a401ecdb4e572cfc9cc.zip
servergreps: add support for parsing char server packets in other servers
Diffstat (limited to 'servergreps/hercules/src/threeceam.py')
-rwxr-xr-xservergreps/hercules/src/threeceam.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/servergreps/hercules/src/threeceam.py b/servergreps/hercules/src/threeceam.py
index 4b9fd02..77e1f19 100755
--- a/servergreps/hercules/src/threeceam.py
+++ b/servergreps/hercules/src/threeceam.py
@@ -8,6 +8,7 @@ import os
import re
from src.preproc import PreProc
+from src.utils import Utils
filt = re.compile(".+[.](c|h)", re.IGNORECASE)
@@ -194,6 +195,12 @@ class Threeceam:
self.functionToId[m.group("function")] = data
+ def collectCharInPackets(self, charFilePackets):
+ for packets in Utils.enumCasePackets(charFilePackets, "int char_parse_char(int fd)"):
+ self.inPackets[packets[1]] = (0, packets[0])
+ self.functionToId[packets[0]] = packets[1]
+
+
def sortInPackets(self):
for packet in self.inPackets:
self.inPacketsSorted.append(packet)
@@ -205,9 +212,11 @@ class Threeceam:
srcPath = packetDir + "/src/" + self.dirName
# serverInPacketsHPath = packetDir + "/src/" + self.dirName + "/packets.h"
# serverLoginInPackets = packetDir + "/src/" + self.dirName + "/lclif.c"
+# serverCharPackets = packetDir + "/src/" + self.dirName + "/char.c"
# self.collectNamedPackets(namedPacketsPath)
self.collectOutPackets(srcPath)
# self.collectInPackets(serverInPacketsHPath, serverLoginInPackets)
+# self.collectCharInPackets(serverCharPackets);
# self.sortInPackets()
self.sortOutPackets()