From 4fd1fb3701088b62b78e7c90bf4f7e825ff8259a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 15:16:07 +0300 Subject: Move actual update stats into one function. --- src/net/tmwa/playerhandler.cpp | 15 +++++++++++++++ src/net/tmwa/playerhandler.h | 5 +++++ 2 files changed, 20 insertions(+) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 9ad631d71..f2b47c607 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -25,6 +25,7 @@ #include "configuration.h" #include "game.h" #include "soundmanager.h" +#include "units.h" #include "being/attributes.h" #include "being/beingflag.h" @@ -37,6 +38,7 @@ #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" +#include "gui/windows/skilldialog.h" #include "gui/windows/whoisonline.h" #include "gui/onlineplayer.h" @@ -470,4 +472,17 @@ void PlayerHandler::setViewEquipment(const bool allow A_UNUSED) const { } +void PlayerHandler::setStat(const int type, + const int base, + const int mod, + const bool notify) const +{ + if (type == 500) + { + localPlayer->setGMLevel(base); + return; + } + Ea::PlayerHandler::setStat(type, base, mod, notify); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 3fb89db83..05b7b1d27 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -82,6 +82,11 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void setViewEquipment(const bool allow) const override final; protected: + void setStat(const int type, + const int base, + const int mod, + const bool notify) const override final; + void processPlayerStatUpdate5(Net::MessageIn &msg); static void processWalkResponse(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2