summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-10 23:58:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-10 23:58:39 +0300
commit0a39e956218ca15bf78803f89141c7c9dfcec0d9 (patch)
treeadfc0fcd42792ddad6b3cb8843d6fe0c22170580 /src/actions
parent69022cd939e572feadaadf1041ae7dadad782ed6 (diff)
downloadManaVerse-0a39e956218ca15bf78803f89141c7c9dfcec0d9.tar.gz
ManaVerse-0a39e956218ca15bf78803f89141c7c9dfcec0d9.tar.bz2
ManaVerse-0a39e956218ca15bf78803f89141c7c9dfcec0d9.tar.xz
ManaVerse-0a39e956218ca15bf78803f89141c7c9dfcec0d9.zip
Change format in ActorType enum.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp18
-rw-r--r--src/actions/target.cpp8
2 files changed, 13 insertions, 13 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 190258cc2..250e43227 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -313,7 +313,7 @@ impHandler(heal)
if (!event.args.empty())
{
const Being *const being = actorManager->findBeingByName(
- event.args, ActorType::PLAYER);
+ event.args, ActorType::Player);
if (being)
actorManager->heal(being);
}
@@ -322,10 +322,10 @@ impHandler(heal)
Being *target = localPlayer->getTarget();
if (inputManager.isActionActive(InputAction::STOP_ATTACK))
{
- if (!target || target->getType() != ActorType::PLAYER)
+ if (!target || target->getType() != ActorType::Player)
{
target = actorManager->findNearestLivingBeing(
- localPlayer, 10, ActorType::PLAYER, true);
+ localPlayer, 10, ActorType::Player, true);
}
}
else
@@ -434,7 +434,7 @@ impHandler0(talk)
if (!target && actorManager)
{
target = actorManager->findNearestLivingBeing(
- localPlayer, 1, ActorType::NPC, true);
+ localPlayer, 1, ActorType::Npc, true);
// ignore closest target if distance in each direction more than 1
if (target)
{
@@ -449,7 +449,7 @@ impHandler0(talk)
{
if (target->canTalk())
target->talkTo();
- else if (target->getType() == ActorType::PLAYER)
+ else if (target->getType() == ActorType::Player)
new BuySellDialog(target->getName());
}
return true;
@@ -510,7 +510,7 @@ impHandler0(targetAttack)
{
// Only auto target Monsters
target = actorManager->findNearestLivingBeing(
- localPlayer, 90, ActorType::MONSTER, true);
+ localPlayer, 90, ActorType::Monster, true);
}
else
{
@@ -529,7 +529,7 @@ impHandler0(attackHuman)
return false;
Being *const target = actorManager->findNearestLivingBeing(
- localPlayer, 10, ActorType::PLAYER, true);
+ localPlayer, 10, ActorType::Player, true);
if (target)
{
if (localPlayer->checAttackPermissions(target))
@@ -597,7 +597,7 @@ impHandler0(showWindows)
impHandler0(openTrade)
{
const Being *const being = localPlayer->getTarget();
- if (being && being->getType() == ActorType::PLAYER)
+ if (being && being->getType() == ActorType::Player)
{
Net::getTradeHandler()->request(being);
tradePartnerName = being->getName();
@@ -683,7 +683,7 @@ impHandler(trade)
return false;
const Being *being = actorManager->findBeingByName(
- event.args, ActorType::PLAYER);
+ event.args, ActorType::Player);
if (!being)
being = localPlayer->getTarget();
if (being)
diff --git a/src/actions/target.cpp b/src/actions/target.cpp
index c5772c1b5..c4c314ddb 100644
--- a/src/actions/target.cpp
+++ b/src/actions/target.cpp
@@ -48,22 +48,22 @@ static bool setTarget(const ActorType::Type type, const bool allowSort)
impHandler0(targetPlayer)
{
- return setTarget(ActorType::PLAYER, true);
+ return setTarget(ActorType::Player, true);
}
impHandler0(targetMonster)
{
- return setTarget(ActorType::MONSTER, true);
+ return setTarget(ActorType::Monster, true);
}
impHandler0(targetClosestMonster)
{
- return setTarget(ActorType::MONSTER, false);
+ return setTarget(ActorType::Monster, false);
}
impHandler0(targetNPC)
{
- return setTarget(ActorType::NPC, true);
+ return setTarget(ActorType::Npc, true);
}
} // namespace Actions