summaryrefslogtreecommitdiff
path: root/servergreps/hercules/src/rathena.py
diff options
context:
space:
mode:
Diffstat (limited to 'servergreps/hercules/src/rathena.py')
-rwxr-xr-xservergreps/hercules/src/rathena.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/servergreps/hercules/src/rathena.py b/servergreps/hercules/src/rathena.py
index 78f14b4..596edf0 100755
--- a/servergreps/hercules/src/rathena.py
+++ b/servergreps/hercules/src/rathena.py
@@ -7,6 +7,7 @@
import os
import re
+from src.packetdb import PacketDb
from src.preproc import PreProc
from src.utils import Utils
@@ -21,6 +22,7 @@ class Rathena:
functionToId = dict()
loginPacketNameToId = dict()
getLenPackets = set()
+ knownLenPackets = dict()
namedPacketre = re.compile(
"((\t|[ ])*)(?P<name>[\w0-9_]+)([ ]*)=" +
@@ -154,17 +156,18 @@ class Rathena:
self.inPacketsSorted.sort()
- def processPackets(self, packetDir, packetVersion):
+ def processPackets(self, codeDir, packetDir, packetVersion):
# namedPacketsPath = packetDir + "/src/" + self.dirName + "/packets_struct.h"
srcPath = packetDir + "/src/" + self.dirName
+ packetsDbPath = "../links/" + codeDir + "/db/packet_db.txt"
# serverInPacketsHPath = packetDir + "/src/" + self.dirName + "/packets.h"
# serverLoginInPackets = packetDir + "/src/" + self.dirName + "/lclif.c"
# serverCharPackets = packetDir + "/src/" + self.dirName + "/char_clif.c"
# self.collectNamedPackets(namedPacketsPath)
self.collectOutPackets(srcPath)
-# self.collectInPackets(serverInPacketsHPath, serverLoginInPackets)
+ PacketDb.getInPackets(packetsDbPath, packetVersion, self)
# self.collectCharInPackets(serverCharPackets);
-# self.sortInPackets()
+ self.sortInPackets()
self.sortOutPackets()