diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-02 00:13:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:55 +0300 |
commit | 65d1d4810e79d15e436208dccd865d93c237e5a9 (patch) | |
tree | 96396300e4fe69dac17a9a2eba808f5289958554 /src/net/eathena | |
parent | c8bc9c87d58ba40581da09aa30c79b43f47e0cb0 (diff) | |
download | mv-65d1d4810e79d15e436208dccd865d93c237e5a9.tar.gz mv-65d1d4810e79d15e436208dccd865d93c237e5a9.tar.bz2 mv-65d1d4810e79d15e436208dccd865d93c237e5a9.tar.xz mv-65d1d4810e79d15e436208dccd865d93c237e5a9.zip |
Move processPlayerStatUpdate5 from ea namespace into tmwa and eathena.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 76 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.h | 3 |
2 files changed, 79 insertions, 0 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 81068b959..1a3a18d8a 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -24,6 +24,8 @@ #include "being/attributes.h" +#include "gui/windows/statuswindow.h" + #include "net/net.h" #include "net/eathena/attrs.h" @@ -241,4 +243,78 @@ void PlayerHandler::processPlayerShowEquip(Net::MessageIn &msg) msg.readUInt8(); // show equip } +void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) +{ + BLOCK_START("PlayerHandler::processPlayerStatUpdate5") + PlayerInfo::setAttribute(Attributes::CHAR_POINTS, msg.readInt16()); + + unsigned int val = msg.readUInt8(); + PlayerInfo::setStatBase(STR, val); + if (statusWindow) + statusWindow->setPointsNeeded(STR, msg.readUInt8()); + else + msg.readUInt8(); + + val = msg.readUInt8(); + PlayerInfo::setStatBase(AGI, val); + if (statusWindow) + statusWindow->setPointsNeeded(AGI, msg.readUInt8()); + else + msg.readUInt8(); + + val = msg.readUInt8(); + PlayerInfo::setStatBase(VIT, val); + if (statusWindow) + statusWindow->setPointsNeeded(VIT, msg.readUInt8()); + else + msg.readUInt8(); + + val = msg.readUInt8(); + PlayerInfo::setStatBase(INT, val); + if (statusWindow) + statusWindow->setPointsNeeded(INT, msg.readUInt8()); + else + msg.readUInt8(); + + val = msg.readUInt8(); + PlayerInfo::setStatBase(DEX, val); + if (statusWindow) + statusWindow->setPointsNeeded(DEX, msg.readUInt8()); + else + msg.readUInt8(); + + val = msg.readUInt8(); + PlayerInfo::setStatBase(LUK, val); + if (statusWindow) + statusWindow->setPointsNeeded(LUK, msg.readUInt8()); + else + msg.readUInt8(); + + PlayerInfo::setStatBase(ATK, msg.readInt16(), false); + PlayerInfo::setStatMod(ATK, msg.readInt16()); + PlayerInfo::updateAttrs(); + + val = msg.readInt16(); + PlayerInfo::setStatBase(MATK, val, false); + + val = msg.readInt16(); + PlayerInfo::setStatMod(MATK, val); + + PlayerInfo::setStatBase(DEF, msg.readInt16(), false); + PlayerInfo::setStatMod(DEF, msg.readInt16()); + + PlayerInfo::setStatBase(MDEF, msg.readInt16(), false); + PlayerInfo::setStatMod(MDEF, msg.readInt16()); + + PlayerInfo::setStatBase(HIT, msg.readInt16()); + + PlayerInfo::setStatBase(FLEE, msg.readInt16(), false); + PlayerInfo::setStatMod(FLEE, msg.readInt16()); + + PlayerInfo::setStatBase(CRIT, msg.readInt16()); + + msg.readInt16(); // manner + BLOCK_END("PlayerHandler::processPlayerStatUpdate5") +} + } // namespace EAthena diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 3881150cb..6db5e5bce 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -59,6 +59,9 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void requestOnlineList() const override final; void respawn() const override final; + + protected: + void processPlayerStatUpdate5(Net::MessageIn &msg); }; } // namespace EAthena |