From e05956bcbefba4f846f90e7f5c9c05c4931b3a26 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Oct 2017 17:52:54 +0300 Subject: Add packet SMSG_PLAYER_STAT_UPDATE_7 0x0acb. --- src/net/eathena/packetsin.inc | 3 +++ src/net/eathena/playerhandler.cpp | 2 +- src/net/eathena/playerhandler.h | 2 +- src/net/eathena/playerrecv.cpp | 12 ++++++++++++ src/net/eathena/playerrecv.h | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index af497c07c..69a09b082 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -966,6 +966,9 @@ if (packetVersion >= 20170502) packet(SMSG_PARTY_MEMBER_JOB_LEVEL, 0x0abd, 10, &PartyRecv::processPartyMemberJobLevel, 20170502); } +// 20170830 +packet(SMSG_PLAYER_STAT_UPDATE_7, 0x0acb, 12, &PlayerRecv::processPlayerStatUpdate7, 20170830); + // 0 // evol always packets packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index a16984cfa..1091fd454 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -517,7 +517,7 @@ void PlayerHandler::setViewEquipment(const bool allow) const void PlayerHandler::setStat(Net::MessageIn &msg, const int type, - const int base, + const int64_t base, const int mod, const Notify notify) const { diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 1b000025c..b51ad2e92 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -72,7 +72,7 @@ class PlayerHandler final : public Ea::PlayerHandler void setStat(Net::MessageIn &msg, const int type, - const int base, + const int64_t base, const int mod, const Notify notify) const override final; }; diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp index a630bf9b7..03290d48d 100644 --- a/src/net/eathena/playerrecv.cpp +++ b/src/net/eathena/playerrecv.cpp @@ -31,6 +31,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" +#include "const/net/nostat.h" + #include "enums/resources/notifytypes.h" #include "gui/onlineplayer.h" @@ -42,6 +44,7 @@ #include "net/eathena/sp.h" #include "net/messagein.h" +#include "net/playerhandler.h" #include "utils/gettext.h" @@ -495,4 +498,13 @@ void PlayerRecv::processPlayerAttrs(Net::MessageIn &msg) localPlayer->setGM(false); } +void PlayerRecv::processPlayerStatUpdate7(Net::MessageIn &msg) +{ + BLOCK_START("PlayerRecv::processPlayerStatUpdate7") + const int type = msg.readInt16("type"); + const int64_t value = msg.readInt64("value"); + playerHandler->setStat(msg, type, value, NoStat, Notify_true); + BLOCK_END("PlayerRecv::processPlayerStatUpdate7") +} + } // namespace EAthena diff --git a/src/net/eathena/playerrecv.h b/src/net/eathena/playerrecv.h index eb38684b8..df3de2715 100644 --- a/src/net/eathena/playerrecv.h +++ b/src/net/eathena/playerrecv.h @@ -54,6 +54,7 @@ namespace EAthena void processDressRoomOpen(Net::MessageIn &msg); void processKilledBy(Net::MessageIn &msg); void processPlayerAttrs(Net::MessageIn &msg); + void processPlayerStatUpdate7(Net::MessageIn &msg); } // namespace PlayerRecv } // namespace EAthena -- cgit v1.2.3-60-g2f50