diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-03 01:41:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:56 +0300 |
commit | c92bd42d51d305d64519d16d3f83c5412c34fe2e (patch) | |
tree | 33c7f21d52702663c4527814f5162ae8e0db1b7b | |
parent | 6c4ea4c75fb64a4594503e46d1a3238860c845c9 (diff) | |
download | plus-c92bd42d51d305d64519d16d3f83c5412c34fe2e.tar.gz plus-c92bd42d51d305d64519d16d3f83c5412c34fe2e.tar.bz2 plus-c92bd42d51d305d64519d16d3f83c5412c34fe2e.tar.xz plus-c92bd42d51d305d64519d16d3f83c5412c34fe2e.zip |
eathena: partially impliment packet SMSG_PLAYER_GET_EXP 0x07f6.
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 17 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index df3f8fbf4..b3a65f7fe 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -211,7 +211,7 @@ int16_t packet_lengths[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0 1 2 3 4 5 6 7 8 9 a b c d e f //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0800 diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index e830db43c..16f313531 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -22,6 +22,8 @@ #include "net/eathena/playerhandler.h" +#include "actormanager.h" + #include "being/attributes.h" #include "being/localplayer.h" @@ -58,6 +60,7 @@ PlayerHandler::PlayerHandler() : SMSG_PLAYER_ARROW_MESSAGE, SMSG_PLAYER_SHORTCUTS, SMSG_PLAYER_SHOW_EQUIP, + SMSG_PLAYER_GET_EXP, 0 }; handledMessages = _messages; @@ -113,6 +116,10 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) processPlayerShowEquip(msg); break; + case SMSG_PLAYER_GET_EXP: + processPlayerGetExp(msg); + break; + default: break; } @@ -322,4 +329,14 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) BLOCK_END("PlayerHandler::processPlayerStatUpdate5") } +void PlayerHandler::processPlayerGetExp(Net::MessageIn &msg) +{ + const int id = msg.readInt32("player id"); + const int exp = msg.readInt32("exp amount"); + const int type = msg.readInt16("exp type"); + const int isQuest = msg.readInt16("is from quest"); +// Being *dstBeing = actorManager->findBeing(id); + // need show particle depend on isQuest flag, for now ignored +} + } // namespace EAthena diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 6db5e5bce..03806ec4d 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -62,6 +62,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler protected: void processPlayerStatUpdate5(Net::MessageIn &msg); + + void processPlayerGetExp(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index f77af71a5..923d2ee9c 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -65,6 +65,7 @@ #define SMSG_PLAYER_STAT_UPDATE_4 0x00bc #define SMSG_PLAYER_STAT_UPDATE_5 0x00bd #define SMSG_PLAYER_STAT_UPDATE_6 0x00be +#define SMSG_PLAYER_GET_EXP 0x07f6 #define SMSG_WHO_ANSWER 0x00c2 #define SMSG_PLAYER_WARP 0x0091 /**< Warp player to map/location */ #define SMSG_PLAYER_INVENTORY 0x01ee |