diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-21 15:22:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-21 15:22:33 +0300 |
commit | a48c9dc049e5c22a18f4ca16c0aedddc94812436 (patch) | |
tree | 6590f7d8cece5605651b5c1bc6cff7335a89d32e /src/net/ea/playerhandler.cpp | |
parent | bae3199bffdb458276d937d64268d005f8fe0528 (diff) | |
download | plus-a48c9dc049e5c22a18f4ca16c0aedddc94812436.tar.gz plus-a48c9dc049e5c22a18f4ca16c0aedddc94812436.tar.bz2 plus-a48c9dc049e5c22a18f4ca16c0aedddc94812436.tar.xz plus-a48c9dc049e5c22a18f4ca16c0aedddc94812436.zip |
While updating stats Use INT_MAX as unset value for mod stat.
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index f1bbc79c0..121a6284c 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -171,7 +171,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) return; } - playerHandler->setStat(msg, type, value, -1, true); + playerHandler->setStat(msg, type, value, NoStat, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate1") } @@ -180,7 +180,7 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) BLOCK_START("PlayerHandler::processPlayerStatUpdate2") const int type = msg.readInt16("type"); const int value = msg.readInt32("value"); - playerHandler->setStat(msg, type, value, -1, true); + playerHandler->setStat(msg, type, value, NoStat, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate2") } @@ -211,7 +211,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) NotifyManager::notify(NotifyTypes::SKILL_RAISE_ERROR); } - playerHandler->setStat(msg, type, value, -1, true); + playerHandler->setStat(msg, type, value, NoStat, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate4") } @@ -221,7 +221,7 @@ void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const int type = msg.readInt16("type"); const int value = msg.readUInt8("value"); if (statusWindow) - playerHandler->setStat(msg, type, value, -1, true); + playerHandler->setStat(msg, type, value, NoStat, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate6") } @@ -251,7 +251,7 @@ bool PlayerHandler::canUseMagic() const #define setStatComplex(stat) \ PlayerInfo::setStatBase(stat, base, notify); \ - if (mod != -1) \ + if (mod != NoStat) \ PlayerInfo::setStatMod(stat, mod) void PlayerHandler::setStat(Net::MessageIn &msg, |