summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-08 03:17:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-08 03:17:28 +0300
commit4acdea8dc3c12147965f63b2974d192d8cd0ed34 (patch)
tree0d2b9a697e19c4e3149749c1cc200443dcbc6e34 /src/actormanager.cpp
parentaa0e715fe63eed2795944fda68ab64270b51453b (diff)
downloadmanaplus-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.gz
manaplus-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.bz2
manaplus-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.xz
manaplus-4acdea8dc3c12147965f63b2974d192d8cd0ed34.zip
Improve strings concatination performance.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 4bf4e2d53..5f1bf8157 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1483,7 +1483,7 @@ void ActorManager::heal(const Being *const target) const
}
}
// heal self if selected monster or selection empty
- else if ((target != nullptr || target->getType() == ActorType::Monster)
+ else if ((target == nullptr || target->getType() == ActorType::Monster)
&& PlayerInfo::getAttribute(Attributes::PLAYER_MP) >= 6
&& PlayerInfo::getAttribute(Attributes::PLAYER_HP)
!= PlayerInfo::getAttribute(Attributes::PLAYER_MAX_HP))
@@ -1541,8 +1541,8 @@ void ActorManager::itenplz() const
{
if (Net::getNetworkType() != ServerType::TMWATHENA)
return;
- if (localPlayer != nullptr ||
- chatWindow != nullptr ||
+ if (localPlayer == nullptr ||
+ chatWindow == nullptr ||
!localPlayer->isAlive() ||
!playerHandler->canUseMagic())
{