summaryrefslogtreecommitdiff
path: root/src/net/protocol.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
commit3dc311a652d1fda1252903a974920395e56e5668 (patch)
tree7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/net/protocol.h
parent78771718bf7af14273d7bb0090dccff97b00b397 (diff)
downloadmana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.gz
mana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2
mana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.xz
mana-client-3dc311a652d1fda1252903a974920395e56e5668.zip
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/net/protocol.h')
-rw-r--r--src/net/protocol.h96
1 files changed, 59 insertions, 37 deletions
diff --git a/src/net/protocol.h b/src/net/protocol.h
index 3fa039ba..69b36783 100644
--- a/src/net/protocol.h
+++ b/src/net/protocol.h
@@ -21,52 +21,74 @@
* $Id$
*/
-#ifndef _TMW_PROTOCOL_H
-#define _TMW_PROTOCOL_H
+#ifndef _TMW_PROTOCOL_
+#define _TMW_PROTOCOL_
class Being;
// Packets from server to client
-#define SMSG_LOGIN_SUCCESS 0x0073 /**< Logged in, starting location */
-#define SMSG_REMOVE_BEING 0x0080 /**< Died, logged out, teleport ... */
-#define SMSG_MOVE_BEING 0x007b /**< A nearby monster moves */
-#define SMSG_PLAYER_UPDATE_1 0x01d8
-#define SMSG_PLAYER_UPDATE_2 0x01d9
-#define SMSG_MOVE_PLAYER_BEING 0x01da /**< A nearby player moves */
-#define SMSG_CHANGE_BEING_LOOKS 0x00c3
-#define SMSG_BEING_CHAT 0x008d /**< A being talks */
-#define SMSG_MY_BEING_CHAT 0x008e /**< My being talks */
-#define SMSG_GM_CHAT 0x009a /**< GM announce */
-#define SMSG_WALK_RESPONSE 0x0087
+#define SMSG_LOGIN_SUCCESS 0x0073 /**< Contains starting location */
+#define SMSG_PLAYER_UPDATE_1 0x01d8
+#define SMSG_PLAYER_UPDATE_2 0x01d9
+#define SMSG_PLAYER_MOVE 0x01da /**< A nearby player moves */
+#define SMSG_PLAYER_STAT_UPDATE_1 0x00b0
+#define SMSG_PLAYER_STAT_UPDATE_2 0x00b1
+#define SMSG_PLAYER_STAT_UPDATE_3 0x0141
+#define SMSG_PLAYER_STAT_UPDATE_4 0x00bc
+#define SMSG_PLAYER_STAT_UPDATE_5 0x00bd
+#define SMSG_PLAYER_STAT_UPDATE_6 0x00be
+#define SMSG_PLAYER_WARP 0x0091 /**< Warp player to map/location */
+#define SMSG_PLAYER_INVENTORY 0x01ee
+#define SMSG_PLAYER_INVENTORY_ADD 0x00a0
+#define SMSG_PLAYER_INVENTORY_REMOVE 0x00af
+#define SMSG_PLAYER_INVENTORY_USE 0x01c8
+#define SMSG_PLAYER_EQUIPMENT 0x00a4
+#define SMSG_PLAYER_EQUIP 0x00aa
+#define SMSG_PLAYER_UNEQUIP 0x00ac
+#define SMSG_PLAYER_ARROW_EQUIP 0x013c
+#define SMSG_PLAYER_ARROW_MESSAGE 0x013b
+#define SMSG_PLAYER_SKILLS 0x010f
+#define SMSG_SKILL_FAILED 0x0110
+#define SMSG_ITEM_USE_RESPONSE 0x00a8
+#define SMSG_ITEM_VISIBLE 0x009d /**< An item is on the floor */
+#define SMSG_ITEM_DROPPED 0x009e /**< An item is dropped */
+#define SMSG_ITEM_REMOVE 0x00a1 /**< An item disappers */
+#define SMSG_BEING_VISIBLE 0x0078
+#define SMSG_BEING_MOVE 0x007b /**< A nearby monster moves */
+#define SMSG_BEING_REMOVE 0x0080
+#define SMSG_BEING_CHANGE_LOOKS 0x00c3
+#define SMSG_BEING_LEVELUP 0x019b
+#define SMSG_BEING_EMOTION 0x00c0
+#define SMSG_BEING_ACTION 0x008a /**< Attack, sit, stand up, ... */
+#define SMSG_BEING_CHAT 0x008d /**< A being talks */
+#define SMSG_BEING_NAME_RESPONSE 0x0095 /**< Has to be requested */
+#define SMSG_NPC_MESSAGE 0x00b4
+#define SMSG_NPC_NEXT 0x00b5
+#define SMSG_NPC_CLOSE 0x00b6
+#define SMSG_NPC_CHOICE 0x00b7 /**< Display a choice */
+#define SMSG_NPC_BUY_SELL_CHOICE 0x00c4
+#define SMSG_NPC_BUY 0x00c6
+#define SMSG_NPC_SELL 0x00c7
+#define SMSG_NPC_BUY_RESPONSE 0x00ca
+#define SMSG_NPC_SELL_RESPONSE 0x00cb
+#define SMSG_PLAYER_CHAT 0x008e /**< Player talks */
+#define SMSG_GM_CHAT 0x009a /**< GM announce */
+#define SMSG_WALK_RESPONSE 0x0087
+#define SMSG_TRADE_REQUEST 0x00e5 /**< Receiving a request to trade */
+#define SMSG_TRADE_RESPONSE 0x00e7
+#define SMSG_TRADE_ITEM_ADD 0x00e9
+#define SMSG_TRADE_ITEM_ADD_RESPONSE 0x01b1 /**< Not standard eAthena! */
+#define SMSG_TRADE_OK 0x00ec
+#define SMSG_TRADE_CANCEL 0x00ee
+#define SMSG_TRADE_COMPLETE 0x00f0
+
+// Packets from client to server
+#define CMSG_TRADE_RESPONSE 0x00e6
-/** Packet length by id */
-short get_length(short id);
-
-/** Decodes x coord */
-unsigned short get_x(const char *data);
-
-/** Decodes y coord */
-unsigned short get_y(const char *data);
-
-/** Decodes direction */
-unsigned char get_direction(const char *data);
-
-/** Decodes src x coord */
-unsigned short get_src_x(const char *data);
-
-/** Decodes src y coord */
-unsigned short get_src_y(const char *data);
-
/** Decodes src direction */
unsigned char get_src_direction(char data);
-/** Decodes dest x coord */
-unsigned short get_dest_x(const char *data);
-
-/** Decodes dest y coord */
-unsigned short get_dest_y(const char *data);
-
/** Decodes dest direction */
unsigned char get_dest_direction(char data);