summaryrefslogtreecommitdiff
path: root/servergreps
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-01 20:10:25 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-01 20:10:25 +0300
commit73751fc163818537aa49f13eb995eadbf90a34f9 (patch)
treefbc56d9985390acbaf851c7c470f9004d82cf9e0 /servergreps
parent0b6ef6d1d63d2421e415c5ed6dfa8025d1df89ac (diff)
downloadevol-tools-73751fc163818537aa49f13eb995eadbf90a34f9.tar.gz
evol-tools-73751fc163818537aa49f13eb995eadbf90a34f9.tar.bz2
evol-tools-73751fc163818537aa49f13eb995eadbf90a34f9.tar.xz
evol-tools-73751fc163818537aa49f13eb995eadbf90a34f9.zip
servergreps: update packets.py
Diffstat (limited to 'servergreps')
-rw-r--r--servergreps/clientpackets.txt2
-rwxr-xr-xservergreps/packets.py28
-rw-r--r--servergreps/serverpackets.txt16
3 files changed, 35 insertions, 11 deletions
diff --git a/servergreps/clientpackets.txt b/servergreps/clientpackets.txt
index 80a3bd4..a8602de 100644
--- a/servergreps/clientpackets.txt
+++ b/servergreps/clientpackets.txt
@@ -23,6 +23,8 @@ UNIMPLIMENTED CMSG_SOLVE_CHAR_NAME
0959 18 clif->pPartyBookingRegisterReq
0963 -1 clif->pItemListWindowSelected
0964 36 clif->pStoragePassword
+096e -1 clif->ackmergeitems
+0974 2 clif->cancelmergeitem
09ce 102 clif->pGM_Monster_Item
0a19 2 clif->pRouletteOpen
0a1b 2 clif->pRouletteInfo
diff --git a/servergreps/packets.py b/servergreps/packets.py
index 50d08e1..69ffce8 100755
--- a/servergreps/packets.py
+++ b/servergreps/packets.py
@@ -11,8 +11,16 @@ filt = re.compile(".+[.]c", re.IGNORECASE)
serverpacketre = re.compile("(WFIFOW|WBUFW)([ ]*)[(]([ ]*)([\w>_-]+),([ ]*)"
+ "(?P<offset>0)([ ]*)[)]([ ]*)=([ ]*)0x(?P<packet>[0-9a-fA-F]+)([ ]*)[;]")
serverpacketre2 = re.compile("[.]PacketType([ ]*)=([ ]*)(?P<name>[\w]+);")
-protocolre = re.compile("#define[ ](?P<name>[A-Z0-9_]+)([ ]*)0x(?P<packet>[0-9a-fA-F]+)")
-protocolClientre = re.compile("#define[ ](?P<name>CMSG_[A-Z0-9_]+)([ ]*)0x(?P<packet>[0-9a-fA-F]+)")
+#serverpacketre3 = re.compile("(WFIFOW|WBUFW)([ ]*)[(]([ ]*)0,([ ]*)"
+# + "(?P<offset>0)([ ]*)[)]([ ]*)=([ ]*)0x(?P<packet>[0-9\w]+)([ ]*)[;]")
+serverpacketre3 = re.compile("(WFIFOW|WBUFW)([ ]*)[(]([ ]*)([\w>_-]+),([ ]*)"
+ + "(?P<offset>0)([ ]*)[)]([ ]*)=([ ]*)(?P<packet>[0-9\w]+)([ ]*)[;]")
+#manaplus re expr all packets
+#protocolre = re.compile("#define[ ](?P<name>[A-Z0-9_]+)([ ]*)0x(?P<packet>[0-9a-fA-F]+)")
+protocolre = re.compile("packet[(](?P<name>[A-Z0-9_]+),([ ]*)0x(?P<packet>[0-9a-fA-F]+)[)];")
+#manaplus re expr client to server packets
+#protocolClientre = re.compile("#define[ ](?P<name>CMSG_[A-Z0-9_]+)([ ]*)0x(?P<packet>[0-9a-fA-F]+)")
+protocolClientre = re.compile("packet[(](?P<name>CMSG_[A-Z0-9_]+),([ ]*)0x(?P<packet>[0-9a-fA-F]+)[)];")
clientpacketre = re.compile("(\t*)packet[(]0x(?P<packet>[0-9a-fA-F]+),(?P<len>[\w-]+),(?P<function>[0-9a-zA-Z_>-]+)(,|[)])")
packetNameClientre = re.compile("(?P<name>(S|C)MSG_[A-Z0-9_]+)")
@@ -38,8 +46,12 @@ def collectServerPackets(parentDir):
with open(file2, "r") as f:
for line in f:
m = serverpacketre.findall(line)
+ if len(m) == 0:
+ m = serverpacketre3.findall(line)
if len(m) > 0:
for str in m:
+ if str[9] == "0":
+ continue
data = str[9]
while len(data) < 4:
data = "0" + data
@@ -47,6 +59,8 @@ def collectServerPackets(parentDir):
m = serverpacketre2.findall(line)
if len(m) > 0:
for str in m:
+ if str[2] == "0":
+ continue
packetsSet.add(str[2].lower())
def sortServerPackets():
@@ -109,7 +123,7 @@ def collectManaPlusUsedPackets(fileName):
m = packetNameClientre.search(line)
if m is not None:
manaplusUsedPacketsSet.add(m.group("name"))
- print m.group("name")
+ #print m.group("name")
def processManaPlusCppFiles(parentDir):
files = os.listdir(parentDir)
@@ -185,14 +199,16 @@ def printPackets():
srcPath = "../../server-code/src/"
manaplusPath = "../../manaplus/src/"
-protocolPath = manaplusPath + "net/eathena/protocol.h"
-clientPacketsPath = srcPath + "map/packets.h"
+protocolPath = manaplusPath + "net/eathena/packets"
+#clientPacketsPath = srcPath + "map/packets.h"
+clientPacketsPath = "./packets.h"
packetsPath = manaplusPath + "net/eathena/packets.h"
eathenaPath = manaplusPath + "net/eathena/"
collectServerPackets(srcPath)
collectClientPackets(clientPacketsPath)
-collectManaPlusPackets(protocolPath)
+collectManaPlusPackets(protocolPath + "in.inc")
+collectManaPlusPackets(protocolPath + "out.inc")
collectManaPlusSizes(packetsPath);
processManaPlusCppFiles(eathenaPath);
sortClientPackets()
diff --git a/servergreps/serverpackets.txt b/servergreps/serverpackets.txt
index d196bd3..8846511 100644
--- a/servergreps/serverpackets.txt
+++ b/servergreps/serverpackets.txt
@@ -1,3 +1,4 @@
+j
62 client name: SMSG_CHAR_PASSWORD_RESPONSE
63 client name: SMSG_UPDATE_HOST
69 client name: SMSG_LOGIN_DATA
@@ -68,7 +69,6 @@ ee client name: SMSG_TRADE_CANCEL
f0 client name: SMSG_TRADE_COMPLETE
f1 client name: SMSG_TRADE_UNDO
f2 client name: SMSG_PLAYER_STORAGE_STATUS
-f4 client name: SMSG_PLAYER_STORAGE_ADD_OUTDATED
f6 client name: SMSG_PLAYER_STORAGE_REMOVE
f8 client name: SMSG_PLAYER_STORAGE_CLOSE
fa client name: SMSG_PARTY_CREATE
@@ -94,7 +94,6 @@ UNIMPLIMENTED 115 client name: SMSG_SKILL_GROUND_DAMAGE_UNUSED
11e client name: SMSG_SKILL_MEMO_MESSAGE
120 client name: SMSG_BEING_REMOVE_SKILL
121 client name: SMSG_CART_INFO
-124 client name: SMSG_PLAYER_CART_ADD_OUTDATED
125 client name: SMSG_PLAYER_CART_REMOVE
12b client name: SMSG_CART_REMOVE
12d client name: SMSG_VENDING_OPEN_REQ
@@ -136,7 +135,7 @@ UNIMPLIMENTED 115 client name: SMSG_SKILL_GROUND_DAMAGE_UNUSED
174 client name: SMSG_GUILD_POSITION_CHANGED
177 client name: SMSG_PLAYER_IDENTIFY_LIST
179 client name: SMSG_PLAYER_IDENTIFIED
-17b client name: SMSG_PLAYER_UNE_CARD
+17b client name: SMSG_PLAYER_USE_CARD
17d client name: SMSG_PLAYER_INSERT_CARD
17f client name: SMSG_GUILD_MESSAGE
181 client name: SMSG_GUILD_OPPOSITION_ACK
@@ -171,8 +170,6 @@ UNIMPLIMENTED 185 client name: SMSG_GUILD_ALLIANCE_ADDED_DISABLED
1b6 client name: SMSG_GUILD_BASIC_INFO
1b9 client name: SMSG_SKILL_CAST_CANCEL
1c3 client name: SMSG_GM_CHAT2
-1c4 client name: SMSG_PLAYER_STORAGE_ADD
-1c5 client name: SMSG_PLAYER_CART_ADD
1c8 client name: SMSG_PLAYER_INVENTORY_USE
1cd client name: SMSG_PLAYER_SKILL_AUTO_SPELLS
1cf client name: SMSG_SKILL_DEVOTION_EFFECT
@@ -348,6 +345,8 @@ UNIMPLIMENTED 185 client name: SMSG_GUILD_ALLIANCE_ADDED_DISABLED
909
90b
90c
+96d
+96f
97a client name: SMSG_QUEST_LIST
97d client name: SMSG_RANKS_LIST
97e client name: SMSG_PLAYER_RANK_POINTS
@@ -366,6 +365,10 @@ b0a client name: SMSG_BEING_ATTRS
b0b client name: SMSG_NPC_AREA
b10 client name: SMSG_ONLINE_LIST
b16 client name: SMSG_PLAYER_CLIENT_COMMAND
+b17 client name: SMSG_BEING_CHANGE_LOOKS_CARDS
+b18 client name: SMSG_ITEM_VISIBLE2
+b19 client name: SMSG_ITEM_DROPPED2
+cmd
xa1a
2710
2711
@@ -586,6 +589,7 @@ bgqueue_notice_deletetype
bgqueue_notify_entrytype
bgqueue_updateinfotype
cart_additem_acktype
+cartaddtype
cartlistequiptype
cartlistnormaltype
damagetype
@@ -615,8 +619,10 @@ spawn_unittype
status_change2type
status_change_endtype
status_changetype
+storageaddtype
storagelistequiptype
storagelistnormaltype
+tradeaddtype
unequipitemacktype
unit_walkingtype
viewequipacktype