summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 0003a0a7e..8d4937236 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -61,7 +61,7 @@ PlayerHandler::PlayerHandler()
{
}
-void PlayerHandler::decreaseAttribute(const int attr A_UNUSED) const
+void PlayerHandler::decreaseAttribute(const AttributesT attr A_UNUSED) const
{
}
@@ -198,13 +198,14 @@ void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg)
void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate4")
- const int type = msg.readInt16("type");
+ const uint16_t type = msg.readInt16("type");
const uint8_t ok = msg.readUInt8("flag");
const int value = msg.readUInt8("value");
if (ok != 1)
{
- const int oldValue = PlayerInfo::getStatBase(type);
+ const int oldValue = PlayerInfo::getStatBase(
+ static_cast<AttributesT>(type));
const int points = PlayerInfo::getAttribute(Attributes::CHAR_POINTS)
+ oldValue - value;
PlayerInfo::setAttribute(Attributes::CHAR_POINTS, points);