aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rwxr-xr-xsrc/server/game/AI/CreatureAI.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index ee822d9df40..b72556dbab1 100755
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -34,8 +34,8 @@ void CreatureAI::OnCharmed(bool /*apply*/)
me->IsAIEnabled = false;
}
-AISpellInfoType * UnitAI::AISpellInfo;
- AISpellInfoType * GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i]; }
+AISpellInfoType* UnitAI::AISpellInfo;
+AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i]; }
void CreatureAI::Talk(uint8 id, uint64 WhisperGuid)
{
@@ -50,7 +50,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/)
if (!creature->CanHaveThreatList())
return;
- Map *map = creature->GetMap();
+ Map* map = creature->GetMap();
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
{
sLog->outError("DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
@@ -63,7 +63,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/)
creature->AI()->AttackStart(target);
else if (creature->isSummon())
{
- if (Unit *summoner = creature->ToTempSummon()->GetSummoner())
+ if (Unit* summoner = creature->ToTempSummon()->GetSummoner())
{
Unit* target = summoner->getAttackerForHelper();
if (!target && summoner->CanHaveThreatList() && !summoner->getThreatManager().isThreatListEmpty())
@@ -80,23 +80,23 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/)
return;
}
- Map::PlayerList const &PlList = map->GetPlayers();
+ Map::PlayerList const& playerList = map->GetPlayers();
- if (PlList.isEmpty())
+ if (playerList.isEmpty())
return;
- for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
+ for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
{
- if (Player* pPlayer = i->getSource())
+ if (Player* player = itr->getSource())
{
- if (pPlayer->isGameMaster())
+ if (player->isGameMaster())
continue;
- if (pPlayer->isAlive())
+ if (player->isAlive())
{
- creature->SetInCombatWith(pPlayer);
- pPlayer->SetInCombatWith(creature);
- creature->AddThreat(pPlayer, 0.0f);
+ creature->SetInCombatWith(player);
+ player->SetInCombatWith(creature);
+ creature->AddThreat(player, 0.0f);
}
/* Causes certain things to never leave the threat list (Priest Lightwell, etc):
@@ -112,7 +112,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/)
// scripts does not take care about MoveInLineOfSight loops
// MoveInLineOfSight can be called inside another MoveInLineOfSight and cause stack overflow
-void CreatureAI::MoveInLineOfSight_Safe(Unit *who)
+void CreatureAI::MoveInLineOfSight_Safe(Unit* who)
{
if (m_MoveInLineOfSight_locked == true)
return;
@@ -121,7 +121,7 @@ void CreatureAI::MoveInLineOfSight_Safe(Unit *who)
m_MoveInLineOfSight_locked = false;
}
-void CreatureAI::MoveInLineOfSight(Unit *who)
+void CreatureAI::MoveInLineOfSight(Unit* who)
{
if (me->getVictim())
return;
@@ -146,7 +146,7 @@ void CreatureAI::EnterEvadeMode()
if (!me->GetVehicle()) // otherwise me will be in evade mode forever
{
- if (Unit *owner = me->GetCharmerOrOwner())
+ if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);