diff options
Diffstat (limited to 'servergreps')
-rwxr-xr-x | servergreps/hercules/packets.py | 19 | ||||
-rwxr-xr-x | servergreps/hercules/src/hercules.py | 12 | ||||
-rwxr-xr-x | servergreps/hercules/src/manaplus.py | 8 |
3 files changed, 22 insertions, 17 deletions
diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py index 62ce954..b5fea2c 100755 --- a/servergreps/hercules/packets.py +++ b/servergreps/hercules/packets.py @@ -29,22 +29,7 @@ manaplus = ManaPlus() reporter = Reporter() reporter.packetDir = packetDir; -srcPath = packetDir + "/src" -namedPacketsPath = packetDir + "/src/packets_struct.h" -manaplusPath = "../../../manaplus/src/" -protocolPath = manaplusPath + "net/eathena/packets" -serverInPacketsHPath = packetDir + "/src/packets.h" -serverLoginInPackets = packetDir + "/src/lclif.c" -packetsPath = manaplusPath + "net/eathena/packetsin.inc" -eathenaPath = manaplusPath + "net/eathena/" - -hercules.collectNamedPackets(namedPacketsPath) -hercules.collectOutPackets(srcPath) -hercules.collectInPackets(serverInPacketsHPath, serverLoginInPackets) -manaplus.collectInPackets(protocolPath + "in.inc", int(packetVersion)) -manaplus.collectOutPackets(protocolPath + "out.inc", int(packetVersion)) -manaplus.processCppFiles(eathenaPath) -hercules.sortInPackets() -hercules.sortOutPackets() +hercules.processPackets(packetDir, packetVersion) +manaplus.processPackets(packetVersion); reporter.reportManaplus(hercules, manaplus) reporter.reportHercules(hercules) diff --git a/servergreps/hercules/src/hercules.py b/servergreps/hercules/src/hercules.py index f60a0f8..1fd99e6 100755 --- a/servergreps/hercules/src/hercules.py +++ b/servergreps/hercules/src/hercules.py @@ -155,3 +155,15 @@ class Hercules: for packet in self.inPackets: self.inPacketsSorted.append(packet) self.inPacketsSorted.sort() + + + def processPackets(self, packetDir, packetVersion): + namedPacketsPath = packetDir + "/src/packets_struct.h" + srcPath = packetDir + "/src" + serverInPacketsHPath = packetDir + "/src/packets.h" + serverLoginInPackets = packetDir + "/src/lclif.c" + self.collectNamedPackets(namedPacketsPath) + self.collectOutPackets(srcPath) + self.collectInPackets(serverInPacketsHPath, serverLoginInPackets) + self.sortInPackets() + self.sortOutPackets() diff --git a/servergreps/hercules/src/manaplus.py b/servergreps/hercules/src/manaplus.py index 144dd3f..56fd11c 100755 --- a/servergreps/hercules/src/manaplus.py +++ b/servergreps/hercules/src/manaplus.py @@ -87,3 +87,11 @@ class ManaPlus: m = self.packetOutNametre.search(line) if m is not None: self.manaplusUsedPacketsSet.add(m.group("name")) + + def processPackets(self, packetVersion): + manaplusPath = "../../../manaplus/src/" + protocolPath = manaplusPath + "net/eathena/packets" + eathenaPath = manaplusPath + "net/eathena/" + self.collectInPackets(protocolPath + "in.inc", int(packetVersion)) + self.collectOutPackets(protocolPath + "out.inc", int(packetVersion)) + self.processCppFiles(eathenaPath) |