summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-24 17:22:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-24 17:22:32 +0300
commit82df40f813bf90fd93bbff3aaf8cdb8a92473d27 (patch)
tree920a9b73d823f0fbb5ca9a9df15d21a330735079 /src/net/eathena/playerhandler.cpp
parent2e64d3f76e9ad4233f2dd7e95625a73660c2f116 (diff)
downloadplus-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.gz
plus-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.bz2
plus-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.xz
plus-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.zip
eathena: use exp packet to show exp and job messages.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 9edb50e01..c2f3e7ee1 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -469,12 +469,21 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
void PlayerHandler::processPlayerGetExp(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readInt32("player id");
- msg.readInt32("exp amount");
- msg.readInt16("exp type");
- msg.readInt16("is from quest");
-// Being *dstBeing = actorManager->findBeing(id);
+ if (!localPlayer)
+ return;
+ const int id = msg.readInt32("player id");
+ const int exp = msg.readInt32("exp amount");
+ const int stat = msg.readInt16("exp type");
+ const bool fromQuest = msg.readInt16("is from quest");
+ if (!fromQuest && id == localPlayer->getId())
+ {
+ if (stat == 1)
+ localPlayer->addXpMessage(exp);
+ else if (stat == 2)
+ localPlayer->addJobMessage(exp);
+ else
+ logger->log("unknown exp type");
+ }
// need show particle depend on isQuest flag, for now ignored
}