From ea0b61e18f36f28806940b00a2cddaef912c3340 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 May 2014 01:04:05 +0300 Subject: Move actor type into separate file. --- src/commands.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 508c78e4e..f3ea4eff7 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -670,7 +670,7 @@ impHandler0(attackHuman) return; Being *const target = actorManager->findNearestLivingBeing( - player_node, 10, ActorSprite::PLAYER); + player_node, 10, ActorType::PLAYER); if (target) { if (player_node->checAttackPermissions(target)) @@ -783,7 +783,7 @@ impHandler1(heal) if (!args.empty()) { const Being *const being = actorManager->findBeingByName( - args, Being::PLAYER); + args, ActorType::PLAYER); if (being) actorManager->heal(being); } @@ -848,7 +848,7 @@ impHandler1(trade) return; const Being *const being = actorManager->findBeingByName( - args, Being::PLAYER); + args, ActorType::PLAYER); if (being) { Net::getTradeHandler()->request(being); @@ -1530,10 +1530,10 @@ void replaceVars(std::string &str) if (str.find("") != std::string::npos) { const Being *target = player_node->getTarget(); - if (!target || target->getType() != ActorSprite::PLAYER) + if (!target || target->getType() != ActorType::PLAYER) { target = actorManager->findNearestLivingBeing( - player_node, 20, ActorSprite::PLAYER); + player_node, 20, ActorType::PLAYER); } if (target) replaceAll(str, "", target->getName()); @@ -1543,10 +1543,10 @@ void replaceVars(std::string &str) if (str.find("") != std::string::npos) { const Being *target = player_node->getTarget(); - if (!target || target->getType() != ActorSprite::MONSTER) + if (!target || target->getType() != ActorType::MONSTER) { target = actorManager->findNearestLivingBeing( - player_node, 20, ActorSprite::MONSTER); + player_node, 20, ActorType::MONSTER); } if (target) replaceAll(str, "", target->getName()); -- cgit v1.2.3-60-g2f50