summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-15 18:14:19 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-18 16:21:43 +0300
commita499c34b05b70a72572d8e43572def558403338e (patch)
tree2322f00723e6ebe5a53e8bfc08851ac3babbd475 /src/net
parente05956bcbefba4f846f90e7f5c9c05c4931b3a26 (diff)
downloadmanaverse-a499c34b05b70a72572d8e43572def558403338e.tar.gz
manaverse-a499c34b05b70a72572d8e43572def558403338e.tar.bz2
manaverse-a499c34b05b70a72572d8e43572def558403338e.tar.xz
manaverse-a499c34b05b70a72572d8e43572def558403338e.zip
Add packet SMSG_PLAYER_GET_EXP2 0x0acc.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/packetsin.inc1
-rw-r--r--src/net/eathena/playerrecv.cpp20
-rw-r--r--src/net/eathena/playerrecv.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 69a09b082..b12e6c212 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -968,6 +968,7 @@ if (packetVersion >= 20170502)
// 20170830
packet(SMSG_PLAYER_STAT_UPDATE_7, 0x0acb, 12, &PlayerRecv::processPlayerStatUpdate7, 20170830);
+packet(SMSG_PLAYER_GET_EXP2, 0x0acc, 18, &PlayerRecv::processPlayerGetExp2, 20170830);
// 0
// evol always packets
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")
diff --git a/src/net/eathena/playerrecv.h b/src/net/eathena/playerrecv.h
index df3de2715..e9551ce98 100644
--- a/src/net/eathena/playerrecv.h
+++ b/src/net/eathena/playerrecv.h
@@ -36,6 +36,7 @@ namespace EAthena
void processPlayerShowEquip(Net::MessageIn &msg);
void processPlayerStatUpdate5(Net::MessageIn &msg);
void processPlayerGetExp(Net::MessageIn &msg);
+ void processPlayerGetExp2(Net::MessageIn &msg);
void processPvpInfo(Net::MessageIn &msg);
void processPlayerHeal(Net::MessageIn &msg);
void processPlayerSkillMessage(Net::MessageIn &msg);