diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-01 14:21:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-01 14:21:29 +0300 |
commit | 43e4d3322100bf057938c19d6f521d53c6216d3e (patch) | |
tree | e7d3afa332493cd2aedc632b421b3b337947fc71 /src/net/tmwa | |
parent | d3cc61c242430f92f005b81b8336bd58dc686bff (diff) | |
download | plus-43e4d3322100bf057938c19d6f521d53c6216d3e.tar.gz plus-43e4d3322100bf057938c19d6f521d53c6216d3e.tar.bz2 plus-43e4d3322100bf057938c19d6f521d53c6216d3e.tar.xz plus-43e4d3322100bf057938c19d6f521d53c6216d3e.zip |
Split packets definition files to in and out packets.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/packetsin.inc (renamed from src/net/tmwa/packets.inc) | 108 | ||||
-rw-r--r-- | src/net/tmwa/packetsout.inc | 125 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 5 | ||||
-rw-r--r-- | src/net/tmwa/recvpackets.inc | 4 |
4 files changed, 133 insertions, 109 deletions
diff --git a/src/net/tmwa/packets.inc b/src/net/tmwa/packetsin.inc index 3933b8379..af219d4a5 100644 --- a/src/net/tmwa/packets.inc +++ b/src/net/tmwa/packetsin.inc @@ -22,8 +22,6 @@ packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531); -packet(CMSG_LOGIN_REGISTER, 0x0064); - packet(SMSG_SERVER_PING, 0x007f); /**< Contains server tick */ packet(SMSG_CONNECTION_PROBLEM, 0x0081); @@ -91,7 +89,6 @@ packet(SMSG_BEING_SELFEFFECT, 0x019b); packet(SMSG_BEING_EMOTION, 0x00c0); packet(SMSG_BEING_ACTION, 0x008a); /**< Attack, sit, stand up, ... */ packet(SMSG_BEING_CHAT, 0x008d); /**< A being talks */ -packet(CMSG_NAME_REQUEST, 0x0094); packet(SMSG_BEING_NAME_RESPONSE, 0x0095); /**< Has to be requested */ packet(SMSG_BEING_CHANGE_DIRECTION, 0x009c); packet(SMSG_BEING_RESURRECT, 0x0148); @@ -176,108 +173,7 @@ packet(SMSG_GUILD_BROKEN, 0x015e); packet(SMSG_MVP_EFFECT, 0x010c); -/********************************** - * Packets from client to server * - **********************************/ -packet(CMSG_SERVER_VERSION_REQUEST, 0x7530); - -// Custom change password packet -packet(CMSG_CHAR_PASSWORD_CHANGE, 0x0061); -packet(CMSG_CHAR_SERVER_CONNECT, 0x0065); -packet(CMSG_CHAR_SELECT, 0x0066); -packet(CMSG_CHAR_CREATE, 0x0067); -packet(CMSG_CHAR_DELETE, 0x0068); - -packet(CMSG_MAP_SERVER_CONNECT, 0x0072); -packet(CMSG_MAP_PING, 0x007e); /**< Send to server with tick */ -packet(CMSG_MAP_LOADED, 0x007d); -packet(CMSG_CLIENT_QUIT, 0x018A); - -packet(CMSG_CHAT_MESSAGE, 0x008c); -packet(CMSG_CHAT_WHISPER, 0x0096); -packet(CMSG_CHAT_WHO, 0x00c1); - -packet(CMSG_SKILL_LEVELUP_REQUEST, 0x0112); -packet(CMSG_STAT_UPDATE_REQUEST, 0x00bb); -packet(CMSG_SKILL_USE_BEING, 0x0113); -packet(CMSG_SKILL_USE_POSITION, 0x0116); -// Variant of 0x116 with 80 char string at end (unsure of use) -packet(CMSG_SKILL_USE_POSITION_MORE, 0x0190); -packet(CMSG_SKILL_USE_MAP, 0x011b); - -packet(CMSG_PLAYER_INVENTORY_USE, 0x00a7); -packet(CMSG_PLAYER_INVENTORY_DROP, 0x00a2); -packet(CMSG_PLAYER_EQUIP, 0x00a9); -packet(CMSG_PLAYER_UNEQUIP, 0x00ab); - -packet(CMSG_ITEM_PICKUP, 0x009f); -packet(CMSG_PLAYER_CHANGE_DIR, 0x009b); -packet(CMSG_PLAYER_CHANGE_DEST, 0x0085); -packet(CMSG_PLAYER_CHANGE_ACT, 0x0089); -packet(CMSG_PLAYER_RESTART, 0x00b2); -packet(CMSG_PLAYER_EMOTE, 0x00bf); -packet(CMSG_PLAYER_STOP_ATTACK, 0x0118); -packet(CMSG_WHO_REQUEST, 0x00c1); - -packet(CMSG_NPC_TALK, 0x0090); -packet(CMSG_NPC_NEXT_REQUEST, 0x00b9); -packet(CMSG_NPC_CLOSE, 0x0146); -packet(CMSG_NPC_LIST_CHOICE, 0x00b8); -packet(CMSG_NPC_INT_RESPONSE, 0x0143); -packet(CMSG_NPC_STR_RESPONSE, 0x01d5); -packet(CMSG_NPC_BUY_SELL_REQUEST, 0x00c5); -packet(CMSG_NPC_BUY_REQUEST, 0x00c8); -packet(CMSG_NPC_SELL_REQUEST, 0x00c9); - -packet(CMSG_TRADE_REQUEST, 0x00e4); -packet(CMSG_TRADE_RESPONSE, 0x00e6); -packet(CMSG_TRADE_ITEM_ADD_REQUEST, 0x00e8); -packet(CMSG_TRADE_CANCEL_REQUEST, 0x00ed); -packet(CMSG_TRADE_ADD_COMPLETE, 0x00eb); -packet(CMSG_TRADE_OK, 0x00ef); - -packet(CMSG_PARTY_CREATE, 0x00f9); -packet(CMSG_PARTY_INVITE, 0x00fc); -packet(CMSG_PARTY_INVITED, 0x00ff); -packet(CMSG_PARTY_LEAVE, 0x0100); -packet(CMSG_PARTY_SETTINGS, 0x0102); -packet(CMSG_PARTY_KICK, 0x0103); -packet(CMSG_PARTY_MESSAGE, 0x0108); - -packet(CMSG_MOVE_TO_STORAGE, 0x00f3); /** Move item to storage */ -packet(CMSG_MOVE_FROM_STORAGE, 0x00f5); /** Remove item from storage */ -packet(CMSG_CLOSE_STORAGE, 0x00f7); /** Request storage close */ - -packet(CMSG_ADMIN_ANNOUNCE, 0x0099); -packet(CMSG_ADMIN_LOCAL_ANNOUNCE, 0x019C); -packet(CMSG_ADMIN_HIDE, 0x019D); -packet(CMSG_ADMIN_KICK, 0x00CC); -packet(CMSG_ADMIN_MUTE, 0x0149); - -packet(CMSG_GUILD_CHECK_MASTER, 0x014d); -packet(CMSG_GUILD_REQUEST_INFO, 0x014f); -packet(CMSG_GUILD_REQUEST_EMBLEM, 0x0151); -packet(CMSG_GUILD_CHANGE_EMBLEM, 0x0153); -packet(CMSG_GUILD_CHANGE_MEMBER_POS, 0x0155); -packet(CMSG_GUILD_LEAVE, 0x0159); -packet(CMSG_GUILD_EXPULSION, 0x015b); -packet(CMSG_GUILD_BREAK, 0x015d); -packet(CMSG_GUILD_CHANGE_POS_INFO, 0x0161); -packet(CMSG_GUILD_CREATE, 0x0165); -packet(CMSG_GUILD_INVITE, 0x0168); -packet(CMSG_GUILD_INVITE_REPLY, 0x016b); -packet(CMSG_GUILD_CHANGE_NOTICE, 0x016e); -packet(CMSG_GUILD_ALLIANCE_REQUEST, 0x0170); -packet(CMSG_GUILD_ALLIANCE_REPLY, 0x0172); -packet(CMSG_GUILD_MESSAGE, 0x017e); -packet(CMSG_GUILD_OPPOSITION, 0x0180); -packet(CMSG_GUILD_ALLIANCE_DELETE, 0x0183); - -packet(CMSG_SOLVE_CHAR_NAME, 0x0193); -packet(CMSG_IGNORE_NICK, 0x00cf); packet(SMSG_SOLVE_CHAR_NAME, 0x0194); - -packet(CMSG_CLIENT_DISCONNECT, 0x7532); packet(SMSG_SKILL_CASTING, 0x013e); packet(SMSG_SKILL_CAST_CANCEL, 0x01b9); packet(SMSG_SKILL_NO_DAMAGE, 0x011a); @@ -285,7 +181,7 @@ packet(SMSG_SKILL_NO_DAMAGE, 0x011a); packet(SMSG_BEING_IP_RESPONSE, 0x020c); packet(SMSG_PVP_MAP_MODE, 0x0199); packet(SMSG_PVP_SET, 0x019a); -packet(CMSG_IGNORE_ALL, 0x00d0); + packet(SMSG_IGNORE_ALL_RESPONSE, 0x00d2); packet(SMSG_NPC_COMMAND, 0x0212); packet(SMSG_QUEST_SET_VAR, 0x0214); @@ -294,5 +190,3 @@ packet(SMSG_BEING_MOVE3, 0x0225); packet(SMSG_MAP_MUSIC, 0x0227); packet(SMSG_NPC_CHANGETITLE, 0x0228); packet(SMSG_SCRIPT_MESSAGE, 0x0229); - -#undef packet diff --git a/src/net/tmwa/packetsout.inc b/src/net/tmwa/packetsout.inc new file mode 100644 index 000000000..011af496a --- /dev/null +++ b/src/net/tmwa/packetsout.inc @@ -0,0 +1,125 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +packet(CMSG_SERVER_VERSION_REQUEST, 0x7530); + +packet(CMSG_LOGIN_REGISTER, 0x0064); + +packet(CMSG_NAME_REQUEST, 0x0094); + +// Custom change password packet +packet(CMSG_CHAR_PASSWORD_CHANGE, 0x0061); +packet(CMSG_CHAR_SERVER_CONNECT, 0x0065); +packet(CMSG_CHAR_SELECT, 0x0066); +packet(CMSG_CHAR_CREATE, 0x0067); +packet(CMSG_CHAR_DELETE, 0x0068); + +packet(CMSG_MAP_SERVER_CONNECT, 0x0072); +packet(CMSG_MAP_PING, 0x007e); /**< Send to server with tick */ +packet(CMSG_MAP_LOADED, 0x007d); +packet(CMSG_CLIENT_QUIT, 0x018A); + +packet(CMSG_CHAT_MESSAGE, 0x008c); +packet(CMSG_CHAT_WHISPER, 0x0096); +packet(CMSG_CHAT_WHO, 0x00c1); + +packet(CMSG_SKILL_LEVELUP_REQUEST, 0x0112); +packet(CMSG_STAT_UPDATE_REQUEST, 0x00bb); +packet(CMSG_SKILL_USE_BEING, 0x0113); +packet(CMSG_SKILL_USE_POSITION, 0x0116); +// Variant of 0x116 with 80 char string at end (unsure of use) +packet(CMSG_SKILL_USE_POSITION_MORE, 0x0190); +packet(CMSG_SKILL_USE_MAP, 0x011b); + +packet(CMSG_PLAYER_INVENTORY_USE, 0x00a7); +packet(CMSG_PLAYER_INVENTORY_DROP, 0x00a2); +packet(CMSG_PLAYER_EQUIP, 0x00a9); +packet(CMSG_PLAYER_UNEQUIP, 0x00ab); + +packet(CMSG_ITEM_PICKUP, 0x009f); +packet(CMSG_PLAYER_CHANGE_DIR, 0x009b); +packet(CMSG_PLAYER_CHANGE_DEST, 0x0085); +packet(CMSG_PLAYER_CHANGE_ACT, 0x0089); +packet(CMSG_PLAYER_RESTART, 0x00b2); +packet(CMSG_PLAYER_EMOTE, 0x00bf); +packet(CMSG_PLAYER_STOP_ATTACK, 0x0118); +packet(CMSG_WHO_REQUEST, 0x00c1); + +packet(CMSG_NPC_TALK, 0x0090); +packet(CMSG_NPC_NEXT_REQUEST, 0x00b9); +packet(CMSG_NPC_CLOSE, 0x0146); +packet(CMSG_NPC_LIST_CHOICE, 0x00b8); +packet(CMSG_NPC_INT_RESPONSE, 0x0143); +packet(CMSG_NPC_STR_RESPONSE, 0x01d5); +packet(CMSG_NPC_BUY_SELL_REQUEST, 0x00c5); +packet(CMSG_NPC_BUY_REQUEST, 0x00c8); +packet(CMSG_NPC_SELL_REQUEST, 0x00c9); + +packet(CMSG_TRADE_REQUEST, 0x00e4); +packet(CMSG_TRADE_RESPONSE, 0x00e6); +packet(CMSG_TRADE_ITEM_ADD_REQUEST, 0x00e8); +packet(CMSG_TRADE_CANCEL_REQUEST, 0x00ed); +packet(CMSG_TRADE_ADD_COMPLETE, 0x00eb); +packet(CMSG_TRADE_OK, 0x00ef); + +packet(CMSG_PARTY_CREATE, 0x00f9); +packet(CMSG_PARTY_INVITE, 0x00fc); +packet(CMSG_PARTY_INVITED, 0x00ff); +packet(CMSG_PARTY_LEAVE, 0x0100); +packet(CMSG_PARTY_SETTINGS, 0x0102); +packet(CMSG_PARTY_KICK, 0x0103); +packet(CMSG_PARTY_MESSAGE, 0x0108); + +packet(CMSG_MOVE_TO_STORAGE, 0x00f3); /** Move item to storage */ +packet(CMSG_MOVE_FROM_STORAGE, 0x00f5); /** Remove item from storage */ +packet(CMSG_CLOSE_STORAGE, 0x00f7); /** Request storage close */ + +packet(CMSG_ADMIN_ANNOUNCE, 0x0099); +packet(CMSG_ADMIN_LOCAL_ANNOUNCE, 0x019C); +packet(CMSG_ADMIN_HIDE, 0x019D); +packet(CMSG_ADMIN_KICK, 0x00CC); +packet(CMSG_ADMIN_MUTE, 0x0149); + +packet(CMSG_GUILD_CHECK_MASTER, 0x014d); +packet(CMSG_GUILD_REQUEST_INFO, 0x014f); +packet(CMSG_GUILD_REQUEST_EMBLEM, 0x0151); +packet(CMSG_GUILD_CHANGE_EMBLEM, 0x0153); +packet(CMSG_GUILD_CHANGE_MEMBER_POS, 0x0155); +packet(CMSG_GUILD_LEAVE, 0x0159); +packet(CMSG_GUILD_EXPULSION, 0x015b); +packet(CMSG_GUILD_BREAK, 0x015d); +packet(CMSG_GUILD_CHANGE_POS_INFO, 0x0161); +packet(CMSG_GUILD_CREATE, 0x0165); +packet(CMSG_GUILD_INVITE, 0x0168); +packet(CMSG_GUILD_INVITE_REPLY, 0x016b); +packet(CMSG_GUILD_CHANGE_NOTICE, 0x016e); +packet(CMSG_GUILD_ALLIANCE_REQUEST, 0x0170); +packet(CMSG_GUILD_ALLIANCE_REPLY, 0x0172); +packet(CMSG_GUILD_MESSAGE, 0x017e); +packet(CMSG_GUILD_OPPOSITION, 0x0180); +packet(CMSG_GUILD_ALLIANCE_DELETE, 0x0183); + +packet(CMSG_SOLVE_CHAR_NAME, 0x0193); +packet(CMSG_IGNORE_NICK, 0x00cf); + +packet(CMSG_CLIENT_DISCONNECT, 0x7532); +packet(CMSG_IGNORE_ALL, 0x00d0); diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index 508507e0e..71e2a6981 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -25,6 +25,9 @@ #include "net/protocoldefine.h" -#include "net/tmwa/packets.inc" +#include "net/tmwa/packetsin.inc" +#include "net/tmwa/packetsout.inc" + +#undef packet #endif // NET_TMWA_PROTOCOL_H diff --git a/src/net/tmwa/recvpackets.inc b/src/net/tmwa/recvpackets.inc index 59c12fec2..13e76da4d 100644 --- a/src/net/tmwa/recvpackets.inc +++ b/src/net/tmwa/recvpackets.inc @@ -23,6 +23,8 @@ #include "net/recvpacketdefine.h" -#include "net/tmwa/packets.inc" +#include "net/tmwa/packetsin.inc" + +#undef packet #endif // NET_TMWA_RECVPACKETS_H |