From 4acdea8dc3c12147965f63b2974d192d8cd0ed34 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Jun 2017 03:17:28 +0300 Subject: Improve strings concatination performance. --- src/actormanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/actormanager.cpp') 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()) { -- cgit v1.2.3-70-g09d2