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/actormanager.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/actormanager.cpp') diff --git a/src/actormanager.cpp b/src/actormanager.cpp index bee73cd05..4edd23476 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1407,9 +1407,9 @@ void ActorManager::heal(const Being *const target) const // self if (target && localPlayer->getName() == target->getName()) { - if (PlayerInfo::getAttribute(Attributes::MP) >= 6 - && PlayerInfo::getAttribute(Attributes::HP) - != PlayerInfo::getAttribute(Attributes::MAX_HP)) + if (PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= 6 + && PlayerInfo::getAttribute(Attributes::PLAYER_HP) + != PlayerInfo::getAttribute(Attributes::PLAYER_MAX_HP)) { if (!PacketLimiter::limitPackets(PacketType::PACKET_CHAT)) return; @@ -1420,7 +1420,7 @@ void ActorManager::heal(const Being *const target) const else if (PlayerInfo::getSkillLevel(340) < 2 || PlayerInfo::getSkillLevel(341) < 2) { - if (PlayerInfo::getAttribute(Attributes::MP) >= 6) + if (PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= 6) { if (target && target->getType() != ActorType::Monster) { @@ -1429,8 +1429,8 @@ void ActorManager::heal(const Being *const target) const chatWindow->localChatInput(mSpellHeal1 + " " + target->getName()); } - else if (PlayerInfo::getAttribute(Attributes::HP) - != PlayerInfo::getAttribute(Attributes::MAX_HP)) + else if (PlayerInfo::getAttribute(Attributes::PLAYER_HP) + != PlayerInfo::getAttribute(Attributes::PLAYER_MAX_HP)) { if (!PacketLimiter::limitPackets(PacketType::PACKET_CHAT)) return; @@ -1442,7 +1442,7 @@ void ActorManager::heal(const Being *const target) const else { // mp > 10 and target not monster - if (PlayerInfo::getAttribute(Attributes::MP) >= 10 && target + if (PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= 10 && target && target->getType() != ActorType::Monster) { // target not enemy @@ -1464,9 +1464,9 @@ void ActorManager::heal(const Being *const target) const } // heal self if selected monster or selection empty else if ((!target || target->getType() == ActorType::Monster) - && PlayerInfo::getAttribute(Attributes::MP) >= 6 - && PlayerInfo::getAttribute(Attributes::HP) - != PlayerInfo::getAttribute(Attributes::MAX_HP)) + && PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= 6 + && PlayerInfo::getAttribute(Attributes::PLAYER_HP) + != PlayerInfo::getAttribute(Attributes::PLAYER_MAX_HP)) { if (!PacketLimiter::limitPackets(PacketType::PACKET_CHAT)) return; -- cgit v1.2.3-60-g2f50