diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-24 17:22:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-24 17:22:32 +0300 |
commit | 82df40f813bf90fd93bbff3aaf8cdb8a92473d27 (patch) | |
tree | 920a9b73d823f0fbb5ca9a9df15d21a330735079 /src/net/eathena | |
parent | 2e64d3f76e9ad4233f2dd7e95625a73660c2f116 (diff) | |
download | manaverse-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.gz manaverse-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.bz2 manaverse-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.tar.xz manaverse-82df40f813bf90fd93bbff3aaf8cdb8a92473d27.zip |
eathena: use exp packet to show exp and job messages.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 21 |
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 } |