diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-06 20:40:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-06 20:40:23 +0300 |
commit | c03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31 (patch) | |
tree | 4caa00016d52fad784e75b928e7ce374cab2b8d6 /servergreps | |
parent | 1ebdb3dcda085b1fc7949b8e36e127b83f80db8a (diff) | |
download | tools-c03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31.tar.gz tools-c03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31.tar.bz2 tools-c03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31.tar.xz tools-c03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31.zip |
servergreps: fix detecting preffered packets if packet defined more than once.
Diffstat (limited to 'servergreps')
11 files changed, 4 insertions, 11 deletions
diff --git a/servergreps/hercules/20120700/clientpreferredpackets.txt b/servergreps/hercules/20120700/clientpreferredpackets.txt index 14b26b2..8f24d01 100644 --- a/servergreps/hercules/20120700/clientpreferredpackets.txt +++ b/servergreps/hercules/20120700/clientpreferredpackets.txt @@ -1,2 +1 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 088a -> 096a CMSG_NAME_REQUEST clif->pGetCharNameRequest diff --git a/servergreps/hercules/20130000/clientpreferredpackets.txt b/servergreps/hercules/20130000/clientpreferredpackets.txt index 14b26b2..8f24d01 100644 --- a/servergreps/hercules/20130000/clientpreferredpackets.txt +++ b/servergreps/hercules/20130000/clientpreferredpackets.txt @@ -1,2 +1 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 088a -> 096a CMSG_NAME_REQUEST clif->pGetCharNameRequest diff --git a/servergreps/hercules/20130221/clientpreferredpackets.txt b/servergreps/hercules/20130221/clientpreferredpackets.txt index 14b26b2..8f24d01 100644 --- a/servergreps/hercules/20130221/clientpreferredpackets.txt +++ b/servergreps/hercules/20130221/clientpreferredpackets.txt @@ -1,2 +1 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 088a -> 096a CMSG_NAME_REQUEST clif->pGetCharNameRequest diff --git a/servergreps/hercules/20140000/clientpreferredpackets.txt b/servergreps/hercules/20140000/clientpreferredpackets.txt index f1c83b5..7364e10 100644 --- a/servergreps/hercules/20140000/clientpreferredpackets.txt +++ b/servergreps/hercules/20140000/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 094a CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0360 -> 0969 CMSG_BUYINGSTORE_OPEN clif->pReqClickBuyingStore 0361 -> 0949 CMSG_HOMUNCULUS_MENU clif->pHomMenu diff --git a/servergreps/hercules/20140403/clientpreferredpackets.txt b/servergreps/hercules/20140403/clientpreferredpackets.txt index 5f64323..4e20309 100644 --- a/servergreps/hercules/20140403/clientpreferredpackets.txt +++ b/servergreps/hercules/20140403/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 035f -> 0950 CMSG_MAP_PING clif->pTickSend 0362 -> 0882 CMSG_PLAYER_INVENTORY_DROP clif->pDropItem 0366 -> 092d CMSG_SKILL_USE_POSITION_MORE clif->pUseSkillToPosMoreInfo diff --git a/servergreps/hercules/20141016/clientpreferredpackets.txt b/servergreps/hercules/20141016/clientpreferredpackets.txt index 530a822..146bde9 100644 --- a/servergreps/hercules/20141016/clientpreferredpackets.txt +++ b/servergreps/hercules/20141016/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 0967 CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0361 -> 0364 CMSG_HOMUNCULUS_MENU clif->pHomMenu 0436 -> 0438 CMSG_SKILL_USE_POSITION clif->pUseSkillToPos diff --git a/servergreps/hercules/20141022/clientpreferredpackets.txt b/servergreps/hercules/20141022/clientpreferredpackets.txt index c59909d..6580011 100644 --- a/servergreps/hercules/20141022/clientpreferredpackets.txt +++ b/servergreps/hercules/20141022/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 08ad CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0361 -> 0899 CMSG_HOMUNCULUS_MENU clif->pHomMenu 0362 -> 087d CMSG_PLAYER_INVENTORY_DROP clif->pDropItem diff --git a/servergreps/hercules/20150226/clientpreferredpackets.txt b/servergreps/hercules/20150226/clientpreferredpackets.txt index c59909d..6580011 100644 --- a/servergreps/hercules/20150226/clientpreferredpackets.txt +++ b/servergreps/hercules/20150226/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 08ad CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0361 -> 0899 CMSG_HOMUNCULUS_MENU clif->pHomMenu 0362 -> 087d CMSG_PLAYER_INVENTORY_DROP clif->pDropItem diff --git a/servergreps/hercules/20150513/clientpreferredpackets.txt b/servergreps/hercules/20150513/clientpreferredpackets.txt index 3c15954..3262f89 100644 --- a/servergreps/hercules/20150513/clientpreferredpackets.txt +++ b/servergreps/hercules/20150513/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 0924 CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0361 -> 0817 CMSG_HOMUNCULUS_MENU clif->pHomMenu 0362 -> 0885 CMSG_PLAYER_INVENTORY_DROP clif->pDropItem diff --git a/servergreps/hercules/20150805/clientpreferredpackets.txt b/servergreps/hercules/20150805/clientpreferredpackets.txt index 3c15954..3262f89 100644 --- a/servergreps/hercules/20150805/clientpreferredpackets.txt +++ b/servergreps/hercules/20150805/clientpreferredpackets.txt @@ -1,4 +1,3 @@ -0102 -> 07d7 CMSG_PARTY_SETTINGS clif->pPartyChangeOption 0202 -> 0924 CMSG_PLAYER_CHANGE_DIR clif->pChangeDir 0361 -> 0817 CMSG_HOMUNCULUS_MENU clif->pHomMenu 0362 -> 0885 CMSG_PLAYER_INVENTORY_DROP clif->pDropItem diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py index 3647abd..f3d0e0b 100755 --- a/servergreps/hercules/packets.py +++ b/servergreps/hercules/packets.py @@ -32,6 +32,7 @@ sizes = dict() manaplusUsedPacketsSet = set() namedPackets = dict() serverFunctionToId = dict() +outMsgNameToId = dict() def addServerPacket(data): if data in namedPackets: @@ -133,6 +134,7 @@ def collectManaPlusOutPackets(fileName, packetVersion): continue clientPacketsManaPlus[m.group("packet").lower()] = (m.group("name"), int(m.group("len")), m.group("function")) clientPacketsManaPlusClient[m.group("packet").lower()] = (m.group("name"), int(m.group("len")), m.group("function")) + outMsgNameToId[m.group("name")] = m.group("packet").lower() def collectClientPackets(fileName): with open(fileName, "r") as f: @@ -318,7 +320,8 @@ def printPackets(packetDir): rev = [] with open(packetDir + "/clientpreferredpackets.txt", "w") as w: - for packet in clientPacketsManaPlusClient: + for name in outMsgNameToId: + packet = outMsgNameToId[name] if packet in clientPackets: packet1 = clientPacketsManaPlusClient[packet] packet2 = clientPackets[packet] |