aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r--src/server/game/AI/CreatureAI.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 808a1a55a6a..09a6725485a 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -58,11 +58,11 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
return;
}
- if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
+ if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
if (Unit* nearTarget = creature->SelectNearestTarget(maxRangeToNearestTarget))
creature->AI()->AttackStart(nearTarget);
- else if (creature->isSummon())
+ else if (creature->IsSummon())
{
if (Unit* summoner = creature->ToTempSummon()->GetSummoner())
{
@@ -75,7 +75,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
}
}
- if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
+ if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
TC_LOG_ERROR(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
return;
@@ -88,12 +88,12 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
{
- if (Player* player = itr->getSource())
+ if (Player* player = itr->GetSource())
{
- if (player->isGameMaster())
+ if (player->IsGameMaster())
continue;
- if (player->isAlive())
+ if (player->IsAlive())
{
creature->SetInCombatWith(player);
player->SetInCombatWith(creature);
@@ -124,18 +124,18 @@ void CreatureAI::MoveInLineOfSight_Safe(Unit* who)
void CreatureAI::MoveInLineOfSight(Unit* who)
{
- if (me->getVictim())
+ if (me->GetVictim())
return;
if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) // non-combat pets should just stand there and look good;)
return;
- if (me->canStartAttack(who, false))
+ if (me->CanStartAttack(who, false))
AttackStart(who);
- //else if (who->getVictim() && me->IsFriendlyTo(who)
+ //else if (who->GetVictim() && me->IsFriendlyTo(who)
// && me->IsWithinDistInMap(who, sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))
- // && me->canStartAttack(who->getVictim(), true)) /// @todo if we use true, it will not attack it when it arrives
- // me->GetMotionMaster()->MoveChase(who->getVictim());
+ // && me->CanStartAttack(who->GetVictim(), true)) /// @todo if we use true, it will not attack it when it arrives
+ // me->GetMotionMaster()->MoveChase(who->GetVictim());
}
void CreatureAI::EnterEvadeMode()
@@ -171,7 +171,7 @@ void CreatureAI::EnterEvadeMode()
/*void CreatureAI::AttackedBy(Unit* attacker)
{
- if (!me->getVictim())
+ if (!me->GetVictim())
AttackStart(attacker);
}*/
@@ -186,12 +186,12 @@ void CreatureAI::SetGazeOn(Unit* target)
bool CreatureAI::UpdateVictimWithGaze()
{
- if (!me->isInCombat())
+ if (!me->IsInCombat())
return false;
if (me->HasReactState(REACT_PASSIVE))
{
- if (me->getVictim())
+ if (me->GetVictim())
return true;
else
me->SetReactState(REACT_AGGRESSIVE);
@@ -199,19 +199,19 @@ bool CreatureAI::UpdateVictimWithGaze()
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
- return me->getVictim();
+ return me->GetVictim();
}
bool CreatureAI::UpdateVictim()
{
- if (!me->isInCombat())
+ if (!me->IsInCombat())
return false;
if (!me->HasReactState(REACT_PASSIVE))
{
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
- return me->getVictim();
+ return me->GetVictim();
}
else if (me->getThreatManager().isThreatListEmpty())
{
@@ -224,7 +224,7 @@ bool CreatureAI::UpdateVictim()
bool CreatureAI::_EnterEvadeMode()
{
- if (!me->isAlive())
+ if (!me->IsAlive())
return false;
// dont remove vehicle auras, passengers arent supposed to drop off the vehicle