aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
authorclick <clickvd@gonnamakeyou.com>2011-06-12 01:47:45 +0200
committerclick <clickvd@gonnamakeyou.com>2011-06-12 01:47:45 +0200
commitf16df538eeaecbb5e9364368cfa48d04f48db4de (patch)
tree21451f2febc083a2cc6953d1ff88292305fe8364 /src/server/game/AI
parent158966dc793f47dd4ada264da775f647601298aa (diff)
Core: More codestyle cleanups
Diffstat (limited to 'src/server/game/AI')
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp2
-rwxr-xr-xsrc/server/game/AI/CoreAI/PassiveAI.cpp2
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp14
-rwxr-xr-xsrc/server/game/AI/CoreAI/UnitAI.cpp8
-rwxr-xr-xsrc/server/game/AI/CreatureAI.cpp4
-rwxr-xr-xsrc/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp4
6 files changed, 17 insertions, 17 deletions
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index c37fa7b08d3..d75d32d7c6d 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -73,7 +73,7 @@ void CombatAI::Reset()
events.Reset();
}
-void CombatAI::JustDied(Unit *killer)
+void CombatAI::JustDied(Unit* killer)
{
for (SpellVct::iterator i = spells.begin(); i != spells.end(); ++i)
if (AISpellInfo[*i].condition == AICOND_DIE)
diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp
index 1bff5a3a80c..1b449f44fbd 100755
--- a/src/server/game/AI/CoreAI/PassiveAI.cpp
+++ b/src/server/game/AI/CoreAI/PassiveAI.cpp
@@ -30,7 +30,7 @@ void PassiveAI::UpdateAI(const uint32)
EnterEvadeMode();
}
-void PossessedAI::AttackStart(Unit *target)
+void PossessedAI::AttackStart(Unit* target)
{
me->Attack(target, true);
}
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index c43c1e143ae..a4cc49bf850 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -170,7 +170,7 @@ void PetAI::UpdateAI(const uint32 diff)
continue;
}
- Spell *spell = new Spell(me, spellInfo, false, 0);
+ Spell* spell = new Spell(me, spellInfo, false, 0);
// Fix to allow pets on STAY to autocast
if (me->getVictim() && _CanAttack(me->getVictim()) && spell->CanAutoCast(me->getVictim()))
@@ -274,7 +274,7 @@ void PetAI::UpdateAllies()
m_AllySet.insert(owner->GetGUID());
}
-void PetAI::KilledUnit(Unit *victim)
+void PetAI::KilledUnit(Unit* victim)
{
// Called from Unit::Kill() in case where pet or owner kills something
// if owner killed this victim, pet may still be attacking something else
@@ -296,7 +296,7 @@ void PetAI::KilledUnit(Unit *victim)
HandleReturnMovement(); // Return
}
-void PetAI::AttackStart(Unit *target)
+void PetAI::AttackStart(Unit* target)
{
// Overrides Unit::AttackStart to correctly evaluate Pet states
@@ -317,7 +317,7 @@ Unit *PetAI::SelectNextTarget()
if (me->HasReactState(REACT_PASSIVE))
return NULL;
- Unit *target = me->getAttackerForHelper();
+ Unit* target = me->getAttackerForHelper();
targetHasCC = false;
// Check pet's attackers first to prevent dragging mobs back to owner
@@ -376,7 +376,7 @@ void PetAI::HandleReturnMovement()
}
-void PetAI::DoAttack(Unit *target, bool chase)
+void PetAI::DoAttack(Unit* target, bool chase)
{
// Handles attack with or without chase and also resets all
// PetAI flags for next update / creature kill
@@ -448,7 +448,7 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
}
}
-bool PetAI::_CanAttack(Unit *target)
+bool PetAI::_CanAttack(Unit* target)
{
// Evaluates wether a pet can attack a specific
// target based on CommandState, ReactState and other flags
@@ -479,7 +479,7 @@ bool PetAI::_CanAttack(Unit *target)
return false;
}
-bool PetAI::_CheckTargetCC(Unit *target)
+bool PetAI::_CheckTargetCC(Unit* target)
{
if (me->GetCharmerOrOwnerGUID() && target->HasNegativeAuraWithAttribute(SPELL_ATTR0_BREAKABLE_BY_DAMAGE, me->GetCharmerOrOwnerGUID()))
return true;
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 6598ec7707a..d3eb23ab0cd 100755
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -24,13 +24,13 @@
#include "SpellMgr.h"
#include "CreatureAIImpl.h"
-void UnitAI::AttackStart(Unit *victim)
+void UnitAI::AttackStart(Unit* victim)
{
if (victim && me->Attack(victim, true))
me->GetMotionMaster()->MoveChase(victim);
}
-void UnitAI::AttackStartCaster(Unit *victim, float dist)
+void UnitAI::AttackStartCaster(Unit* victim, float dist)
{
if (victim && me->Attack(victim, false))
me->GetMotionMaster()->MoveChase(victim, dist);
@@ -127,7 +127,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
void UnitAI::DoCast(uint32 spellId)
{
- Unit *target = NULL;
+ Unit* target = NULL;
//sLog->outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
switch(AISpellInfo[spellId].target)
{
@@ -242,7 +242,7 @@ void SimpleCharmedAI::UpdateAI(const uint32 /*diff*/)
if (!charmer->isInCombat())
me->GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, me->GetFollowAngle());
- Unit *target = me->getVictim();
+ Unit* target = me->getVictim();
if (!target || !charmer->canAttack(target))
AttackStart(charmer->SelectNearestTargetInAttackDistance());
}
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 09640661fd5..1932710a43e 100755
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -56,13 +56,13 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/)
if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
{
- if (Unit *target = creature->SelectNearestTarget(50))
+ if (Unit* target = creature->SelectNearestTarget(50))
creature->AI()->AttackStart(target);
else if (creature->isSummon())
{
if (Unit *summoner = creature->ToTempSummon()->GetSummoner())
{
- Unit *target = summoner->getAttackerForHelper();
+ Unit* target = summoner->getAttackerForHelper();
if (!target && summoner->CanHaveThreatList() && !summoner->getThreatManager().isThreatListEmpty())
target = summoner->getThreatManager().getHostilTarget();
if (target && (creature->IsFriendlyTo(summoner) || creature->IsHostileTo(target)))
diff --git a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
index cb3f9aa8346..a3bbd65aff0 100755
--- a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
@@ -108,7 +108,7 @@ void SimpleAI::EnterCombat(Unit *who)
DoPlaySoundToSet(me, Aggro_Sound[random_text]);
}
-void SimpleAI::KilledUnit(Unit *victim)
+void SimpleAI::KilledUnit(Unit* victim)
{
uint8 random_text = urand(0, 2);
@@ -152,7 +152,7 @@ void SimpleAI::KilledUnit(Unit *victim)
DoCast(pTarget, Kill_Spell);
}
-void SimpleAI::DamageTaken(Unit *killer, uint32 &damage)
+void SimpleAI::DamageTaken(Unit* killer, uint32 &damage)
{
//Return if damage taken won't kill us
if (me->GetHealth() > damage)