From c9795055ee1b6079ef9b0c0e3faf4bb79704bd98 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Jul 2016 02:30:47 +0300 Subject: Add into player attributes prefix PLAYER_. --- src/net/ea/inventoryrecv.cpp | 4 ++-- src/net/ea/playerhandler.cpp | 2 +- src/net/ea/playerrecv.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp index 3910011d4..dbbe38c75 100644 --- a/src/net/ea/inventoryrecv.cpp +++ b/src/net/ea/inventoryrecv.cpp @@ -171,8 +171,8 @@ void InventoryRecv::processPlayerAttackRange(Net::MessageIn &msg) const int range = msg.readInt16("range"); if (localPlayer) localPlayer->setAttackRange(range); - PlayerInfo::setStatBase(Attributes::ATTACK_RANGE, range); - PlayerInfo::setStatMod(Attributes::ATTACK_RANGE, 0); + PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_RANGE, range); + PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_RANGE, 0); BLOCK_END("InventoryRecv::processPlayerAttackRange") } diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 0c57ab0ef..5a231c25c 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -49,7 +49,7 @@ int PlayerHandler::getDefaultWalkSpeed() const bool PlayerHandler::canUseMagic() const { - return PlayerInfo::getStatEffective(Attributes::MATK) > 0; + return PlayerInfo::getStatEffective(Attributes::PLAYER_MATK) > 0; } } // namespace Ea diff --git a/src/net/ea/playerrecv.cpp b/src/net/ea/playerrecv.cpp index 8035b9612..7a3b448f7 100644 --- a/src/net/ea/playerrecv.cpp +++ b/src/net/ea/playerrecv.cpp @@ -181,9 +181,9 @@ void PlayerRecv::processPlayerStatUpdate4(Net::MessageIn &msg) { const int oldValue = PlayerInfo::getStatBase( static_cast(type)); - const int points = PlayerInfo::getAttribute(Attributes::CHAR_POINTS) - + oldValue - value; - PlayerInfo::setAttribute(Attributes::CHAR_POINTS, points); + const int points = PlayerInfo::getAttribute( + Attributes::PLAYER_CHAR_POINTS) + oldValue - value; + PlayerInfo::setAttribute(Attributes::PLAYER_CHAR_POINTS, points); NotifyManager::notify(NotifyTypes::SKILL_RAISE_ERROR); } -- cgit v1.2.3-70-g09d2