summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 01:04:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 01:04:05 +0300
commitea0b61e18f36f28806940b00a2cddaef912c3340 (patch)
tree616205f44832d4ced4fc0b50b650eedb0fbf435c /src/commands.cpp
parent814e88e5ca69bc54837be27429dbf42dd41f7ac6 (diff)
downloadmanaplus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.gz
manaplus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.bz2
manaplus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.xz
manaplus-ea0b61e18f36f28806940b00a2cddaef912c3340.zip
Move actor type into separate file.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp14
1 files changed, 7 insertions, 7 deletions
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("<PLAYER>") != 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, "<PLAYER>", target->getName());
@@ -1543,10 +1543,10 @@ void replaceVars(std::string &str)
if (str.find("<MONSTER>") != 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, "<MONSTER>", target->getName());