summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-13 00:40:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-13 00:40:44 +0300
commitc28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1 (patch)
tree414bd0a0e2cfee87e9d57857d071edcf92a7974a /src
parent906331c5a512e54424b148a2a89590bc03a704ff (diff)
downloadmanaplus-c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1.tar.gz
manaplus-c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1.tar.bz2
manaplus-c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1.tar.xz
manaplus-c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1.zip
Add offset for all defined evol packets.
For now offset always 0.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/network.cpp1
-rw-r--r--src/net/eathena/packetsin.inc56
-rw-r--r--src/net/eathena/packetsout.inc24
-rw-r--r--src/net/eathena/protocolout.cpp2
-rw-r--r--src/net/eathena/updateprotocol.cpp1
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/protocoloutdefine.h1
-rw-r--r--src/net/protocoloutinclude.h1
-rw-r--r--src/net/protocoloutupdate.h1
-rw-r--r--src/net/recvpacketdefine.h6
10 files changed, 55 insertions, 40 deletions
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index dfc84b6b4..6829c08a6 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -88,6 +88,7 @@
extern int packetVersion;
extern int serverVersion;
+extern int evolPacketOffset;
namespace EAthena
{
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 7b0252e17..fcccd6dc5 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -845,36 +845,36 @@ packet(SMSG_MAIL2_ADD_ITEM_RESULT, 0x0a05, 53, &Mail2Recv::processAddIt
// evol packets
if (serverVersion > 0)
{
- packet(SMSG_NPC_COMMAND, 0x0b00, 16, &Ea::NpcRecv::processNpcCommand, 0);
- packet(SMSG_BEING_NAME_RESPONSE2, 0x0b01, -1, &BeingRecv::processNameResponse2, 0);
- packet(SMSG_MAP_MASK, 0x0b02, 10, &Ea::PlayerRecv::processMapMask, 0);
- packet(SMSG_MOB_INFO, 0x0b03, -1, &BeingRecv::processMobInfo, 0);
- packet(SMSG_BEING_MOVE3, 0x0b04, -1, &Ea::BeingRecv::processBeingMove3, 0);
- packet(SMSG_MAP_MUSIC, 0x0b05, -1, &Ea::PlayerRecv::processMapMusic, 0);
- packet(SMSG_NPC_CHANGETITLE, 0x0b06, -1, &Ea::NpcRecv::processChangeTitle, 0);
- packet(SMSG_CHAT_JOIN_CHANNEL, 0x0b08, 27, &ChatRecv::processJoinChannel, 0);
- packet(SMSG_BEING_ATTRS, 0x0b0a, -1, &BeingRecv::processBeingAttrs, 0);
- packet(SMSG_NPC_AREA, 0x0b0b, -1, &NpcRecv::processArea, 0);
- packet(SMSG_ONLINE_LIST, 0x0b10, -1, &PlayerRecv::processOnlineList, 0);
- packet(SMSG_PLAYER_CLIENT_COMMAND, 0x0b16, -1, &Ea::PlayerRecv::processPlayerClientCommand, 0);
- packet(SMSG_BEING_CHANGE_LOOKS_CARDS, 0x0b17, 19, &BeingRecv::processBeingChangeLookCards, 0);
- packet(SMSG_ITEM_VISIBLE2, 0x0b18, 28, &ItemRecv::processItemVisible2, 0);
- packet(SMSG_ITEM_DROPPED2, 0x0b19, 28, &ItemRecv::processItemDropped2, 0);
- packet(SMSG_BATTLE_EMBLEM2, 0x0b1a, 34, &BattleGroundRecv::processBattleEmblem2, 0);
- packet(SMSG_MAP_SET_TILES_TYPE, 0x0b1b, 34, &Ea::MapRecv::processSetTilesType, 0);
- packet(SMSG_NPC_SKIN, 0x0b1c, -1, &NpcRecv::processNpcSkin, 0);
- packet(SMSG_PLAYER_KILLED_BY, 0x0b1d, 6, &PlayerRecv::processKilledBy, 0);
- packet(SMSG_SKILL_CASTING2, 0x0b1e, -1, &BeingRecv::processSkillCasting2, 0);
- packet(SMSG_PLAYER_ADD_SKILL2, 0x0b1f, -1, &SkillRecv::processSkillAdd2, 0);
- packet(SMSG_PLAYER_UPDATE_SKILL2, 0x0b20, -1, &SkillRecv::processSkillUpdate2, 0);
- packet(SMSG_WALK_ERROR, 0x0b21, 10, &PlayerRecv::processWalkError, 0);
- packet(SMSG_HOMUNCULUS_EXP, 0x0b22, 10, &HomunculusRecv::processHomunculusExp, 0);
- packet(SMSG_QUEST_LIST2, 0x0b23, -1, &QuestRecv::processAddQuests2, 0);
- packet(SMSG_QUEST_ADD2, 0x0b24, 23, &QuestRecv::processAddQuest2, 0);
- packet(SMSG_PLAYER_ATTRS, 0x0b25, -1, &PlayerRecv::processPlayerAttrs, 0);
+ packet2(SMSG_NPC_COMMAND, 0x0b00, 16, &Ea::NpcRecv::processNpcCommand, 0);
+ packet2(SMSG_BEING_NAME_RESPONSE2, 0x0b01, -1, &BeingRecv::processNameResponse2, 0);
+ packet2(SMSG_MAP_MASK, 0x0b02, 10, &Ea::PlayerRecv::processMapMask, 0);
+ packet2(SMSG_MOB_INFO, 0x0b03, -1, &BeingRecv::processMobInfo, 0);
+ packet2(SMSG_BEING_MOVE3, 0x0b04, -1, &Ea::BeingRecv::processBeingMove3, 0);
+ packet2(SMSG_MAP_MUSIC, 0x0b05, -1, &Ea::PlayerRecv::processMapMusic, 0);
+ packet2(SMSG_NPC_CHANGETITLE, 0x0b06, -1, &Ea::NpcRecv::processChangeTitle, 0);
+ packet2(SMSG_CHAT_JOIN_CHANNEL, 0x0b08, 27, &ChatRecv::processJoinChannel, 0);
+ packet2(SMSG_BEING_ATTRS, 0x0b0a, -1, &BeingRecv::processBeingAttrs, 0);
+ packet2(SMSG_NPC_AREA, 0x0b0b, -1, &NpcRecv::processArea, 0);
+ packet2(SMSG_ONLINE_LIST, 0x0b10, -1, &PlayerRecv::processOnlineList, 0);
+ packet2(SMSG_PLAYER_CLIENT_COMMAND, 0x0b16, -1, &Ea::PlayerRecv::processPlayerClientCommand, 0);
+ packet2(SMSG_BEING_CHANGE_LOOKS_CARDS, 0x0b17, 19, &BeingRecv::processBeingChangeLookCards, 0);
+ packet2(SMSG_ITEM_VISIBLE2, 0x0b18, 28, &ItemRecv::processItemVisible2, 0);
+ packet2(SMSG_ITEM_DROPPED2, 0x0b19, 28, &ItemRecv::processItemDropped2, 0);
+ packet2(SMSG_BATTLE_EMBLEM2, 0x0b1a, 34, &BattleGroundRecv::processBattleEmblem2, 0);
+ packet2(SMSG_MAP_SET_TILES_TYPE, 0x0b1b, 34, &Ea::MapRecv::processSetTilesType, 0);
+ packet2(SMSG_NPC_SKIN, 0x0b1c, -1, &NpcRecv::processNpcSkin, 0);
+ packet2(SMSG_PLAYER_KILLED_BY, 0x0b1d, 6, &PlayerRecv::processKilledBy, 0);
+ packet2(SMSG_SKILL_CASTING2, 0x0b1e, -1, &BeingRecv::processSkillCasting2, 0);
+ packet2(SMSG_PLAYER_ADD_SKILL2, 0x0b1f, -1, &SkillRecv::processSkillAdd2, 0);
+ packet2(SMSG_PLAYER_UPDATE_SKILL2, 0x0b20, -1, &SkillRecv::processSkillUpdate2, 0);
+ packet2(SMSG_WALK_ERROR, 0x0b21, 10, &PlayerRecv::processWalkError, 0);
+ packet2(SMSG_HOMUNCULUS_EXP, 0x0b22, 10, &HomunculusRecv::processHomunculusExp, 0);
+ packet2(SMSG_QUEST_LIST2, 0x0b23, -1, &QuestRecv::processAddQuests2, 0);
+ packet2(SMSG_QUEST_ADD2, 0x0b24, 23, &QuestRecv::processAddQuest2, 0);
+ packet2(SMSG_PLAYER_ATTRS, 0x0b25, -1, &PlayerRecv::processPlayerAttrs, 0);
// char server
- packet(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0);
+ packet2(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0);
}
// 20150226
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 2d5131196..3eb90b33c 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -68,8 +68,8 @@ packet(CMSG_CLIENT_QUIT, 0x018A, 4, clif->pQuitGame);
packet(CMSG_CHAT_MESSAGE, 0x008c, -1, clif->pGlobalMessage);
packet(CMSG_CHAT_WHISPER, 0x0096, -1, clif->pWisMessage);
packet(CMSG_CHAT_ROOM_JOIN, 0x00d9, 14, clif->pChatAddMember);
-packet(CMSG_CHAT_JOIN_CHANNEL, 0x0b07, 0, nullptr);
-packet(CMSG_CHAT_PART_CHANNEL, 0x0b09, 0, nullptr);
+packet2(CMSG_CHAT_JOIN_CHANNEL, 0x0b07, 0, nullptr);
+packet2(CMSG_CHAT_PART_CHANNEL, 0x0b09, 0, nullptr);
packet(CMSG_BATTLE_CHAT_MESSAGE, 0x02db, -1, clif->pBattleChat);
packet(CMSG_CREAYE_CHAT_ROOM, 0x00d5, -1, clif->pCreateChatRoom);
@@ -200,19 +200,19 @@ packet(CMSG_PET_SEND_MESSAGE, 0x01a9, 6, clif->pSendEmotion);
packet(CMSG_PET_SET_NAME, 0x01a5, 26, clif->pChangePetName);
packet(CMSG_PET_SELECT_EGG, 0x01a7, 4, clif->pSelectEgg);
packet(CMSG_PET_MENU_ACTION, 0x01a1, 3, clif->pPetMenu);
-packet(CMSG_PET_TALK, 0x0b0c, 0, nullptr);
-packet(CMSG_PET_EMOTE, 0x0b0d, 0, nullptr);
-packet(CMSG_PET_MOVE_TO, 0x0b11, 0, nullptr);
-packet(CMSG_PET_DIRECTION, 0x0b12, 0, nullptr);
+packet2(CMSG_PET_TALK, 0x0b0c, 0, nullptr);
+packet2(CMSG_PET_EMOTE, 0x0b0d, 0, nullptr);
+packet2(CMSG_PET_MOVE_TO, 0x0b11, 0, nullptr);
+packet2(CMSG_PET_DIRECTION, 0x0b12, 0, nullptr);
packet(CMSG_MERCENARY_ACTION, 0x029f, 3, clif->pmercenary_action);
packet(CMSG_HOMUNCULUS_SET_NAME, 0x0231, 26, clif->pChangeHomunculusName);
packet(CMSG_HOMMERC_MOVE_TO_MASTER, 0x0234, 6, clif->pHomMoveToMaster);
packet(CMSG_HOMMERC_MOVE_TO, 0x0232, 9, clif->pHomMoveTo);
packet(CMSG_HOMMERC_ATTACK, 0x0233, 11, clif->pHomAttack);
-packet(CMSG_HOMMERC_TALK, 0x0b13, 0, nullptr);
-packet(CMSG_HOMMERC_EMOTE, 0x0b14, 0, nullptr);
-packet(CMSG_HOMMERC_DIRECTION, 0x0b15, 0, nullptr);
+packet2(CMSG_HOMMERC_TALK, 0x0b13, 0, nullptr);
+packet2(CMSG_HOMMERC_EMOTE, 0x0b14, 0, nullptr);
+packet2(CMSG_HOMMERC_DIRECTION, 0x0b15, 0, nullptr);
packet(CMSG_DORI_DORI, 0x01e7, 2, clif->pNoviceDoriDori);
packet(CMSG_EXPLOSION_SPIRITS, 0x01ed, 2, clif->pNoviceExplosionSpirits);
@@ -255,11 +255,11 @@ packet(CMSG_VENDING_CREATE_SHOP, 0x01b2, -1, clif->pOpenVending);
packet(CMSG_MERGE_ITEM_ACK, 0x096e, -1, clif->ackmergeitems);
packet(CMSG_MERGE_ITEM_CANCEL, 0x0974, 2, clif->cancelmergeitem);
-packet(CMSG_SET_STATUS, 0x0b0e, 0, nullptr);
+packet2(CMSG_SET_STATUS, 0x0b0e, 0, nullptr);
-packet(CMSG_ONLINE_LIST, 0x0b0f, 0, nullptr);
+packet2(CMSG_ONLINE_LIST, 0x0b0f, 0, nullptr);
-packet(CMSG_PLAYER_INVENTORY_USE2, 0x0b26, 6, nullptr);
+packet2(CMSG_PLAYER_INVENTORY_USE2, 0x0b26, 6, nullptr);
#ifndef PACKETS_UPDATE
// 0
diff --git a/src/net/eathena/protocolout.cpp b/src/net/eathena/protocolout.cpp
index d4a2e49fb..154dacf6c 100644
--- a/src/net/eathena/protocolout.cpp
+++ b/src/net/eathena/protocolout.cpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+extern int evolPacketOffset;
+
namespace EAthena
{
#include "net/protocoloutdefine.h"
diff --git a/src/net/eathena/updateprotocol.cpp b/src/net/eathena/updateprotocol.cpp
index afe25b874..ce9148d1e 100644
--- a/src/net/eathena/updateprotocol.cpp
+++ b/src/net/eathena/updateprotocol.cpp
@@ -29,6 +29,7 @@
extern int packetVersion;
extern int serverVersion;
+extern int evolPacketOffset;
namespace EAthena
{
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 8b7b206ba..ebc654563 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -36,6 +36,8 @@
#include "debug.h"
+int evolPacketOffset = 0;
+
namespace Net
{
class AuctionHandler;
diff --git a/src/net/protocoloutdefine.h b/src/net/protocoloutdefine.h
index 5b213249f..b8ab72064 100644
--- a/src/net/protocoloutdefine.h
+++ b/src/net/protocoloutdefine.h
@@ -22,6 +22,7 @@
#define NET_PROTOCOLOUTDEFINE_H
#define packet(name, id, sz, comment) int name = id
+#define packet2(name, id, sz, comment) int name = id + evolPacketOffset
#define PROTOCOLOUT_VOID
#endif // NET_PROTOCOLOUTDEFINE_H
diff --git a/src/net/protocoloutinclude.h b/src/net/protocoloutinclude.h
index 61b2cefb1..08dddbf95 100644
--- a/src/net/protocoloutinclude.h
+++ b/src/net/protocoloutinclude.h
@@ -22,5 +22,6 @@
#define NET_PROTOCOLOUTINCLUDE_H
#define packet(name, id, sz, comment) extern int name
+#define packet2(name, id, sz, comment) extern int name
#endif // NET_PROTOCOLOUTINCLUDE_H
diff --git a/src/net/protocoloutupdate.h b/src/net/protocoloutupdate.h
index 4ada767dc..f6f7a62b2 100644
--- a/src/net/protocoloutupdate.h
+++ b/src/net/protocoloutupdate.h
@@ -22,6 +22,7 @@
#define NET_PROTOCOLOUTUPDATE_H
#define packet(name, id, sz, comment) name = id
+#define packet2(name, id, sz, comment) name = id + evolPacketOffset
#define PROTOCOLOUTUPDATE_VOID
#endif // NET_PROTOCOLOUTUPDATE_H
diff --git a/src/net/recvpacketdefine.h b/src/net/recvpacketdefine.h
index 50c4badac..1ba7bba58 100644
--- a/src/net/recvpacketdefine.h
+++ b/src/net/recvpacketdefine.h
@@ -27,4 +27,10 @@
mPackets[pid].func = pfunc; \
mPackets[pid].version = ver
+#define packet2(pname, pid, sz, pfunc, ver) \
+ mPackets[pid + evolPacketOffset].name = #pname; \
+ mPackets[pid + evolPacketOffset].len = sz; \
+ mPackets[pid + evolPacketOffset].func = pfunc; \
+ mPackets[pid + evolPacketOffset].version = ver
+
#endif // NET_RECVPACKETDEFINE_H