summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-25 02:30:47 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-25 02:30:47 +0300
commitc9795055ee1b6079ef9b0c0e3faf4bb79704bd98 (patch)
tree147357b76a80705cf0af7bc1ec69cf417ef94812 /src/actormanager.cpp
parent1e5a50f6c67cd20967e139320a6c00f54e15dfe2 (diff)
downloadmv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.gz
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.bz2
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.tar.xz
mv-c9795055ee1b6079ef9b0c0e3faf4bb79704bd98.zip
Add into player attributes prefix PLAYER_.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp20
1 files changed, 10 insertions, 10 deletions
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;