From a499c34b05b70a72572d8e43572def558403338e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Oct 2017 18:14:19 +0300 Subject: Add packet SMSG_PLAYER_GET_EXP2 0x0acc. --- src/net/eathena/playerrecv.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/net/eathena/playerrecv.cpp') diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp index 03290d48d..6b90d8a8e 100644 --- a/src/net/eathena/playerrecv.cpp +++ b/src/net/eathena/playerrecv.cpp @@ -212,6 +212,26 @@ void PlayerRecv::processPlayerGetExp(Net::MessageIn &msg) // need show particle depend on isQuest flag, for now ignored } +void PlayerRecv::processPlayerGetExp2(Net::MessageIn &msg) +{ + if (localPlayer == nullptr) + return; + const BeingId id = msg.readBeingId("player id"); + const int64_t exp = msg.readInt64("exp amount"); + const int stat = msg.readInt16("exp type"); + const bool fromQuest = msg.readInt16("is from quest") != 0; + if (!fromQuest && id == localPlayer->getId()) + { + if (stat == 1) + localPlayer->addXpMessage(exp); + else if (stat == 2) + localPlayer->addJobMessage(exp); + else + UNIMPLEMENTEDPACKETFIELD(stat); + } + // need show particle depend on isQuest flag, for now ignored +} + void PlayerRecv::processWalkResponse(Net::MessageIn &msg) { BLOCK_START("PlayerRecv::processWalkResponse") -- cgit v1.2.3-70-g09d2