Core: Codestyle cleanup
This commit is contained in:
@@ -39,22 +39,22 @@ void AggressorAI::UpdateAI(const uint32 /*diff*/)
|
||||
}
|
||||
|
||||
// some day we will delete these useless things
|
||||
int CombatAI::Permissible(const Creature * /*creature*/)
|
||||
int CombatAI::Permissible(const Creature* /*creature*/)
|
||||
{
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
int ArcherAI::Permissible(const Creature * /*creature*/)
|
||||
int ArcherAI::Permissible(const Creature* /*creature*/)
|
||||
{
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
int TurretAI::Permissible(const Creature * /*creature*/)
|
||||
int TurretAI::Permissible(const Creature* /*creature*/)
|
||||
{
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
int VehicleAI::Permissible(const Creature * /*creature*/)
|
||||
int VehicleAI::Permissible(const Creature* /*creature*/)
|
||||
{
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ TurretAI::TurretAI(Creature *c) : CreatureAI(c)
|
||||
me->m_SightDistance = me->m_CombatDistance;
|
||||
}
|
||||
|
||||
bool TurretAI::CanAIAttack(const Unit * /*who*/) const
|
||||
bool TurretAI::CanAIAttack(const Unit* /*who*/) const
|
||||
{
|
||||
// TODO: use one function to replace it
|
||||
if (!me->IsWithinCombatRange(me->getVictim(), me->m_CombatDistance)
|
||||
|
||||
@@ -57,9 +57,9 @@ class CasterAI : public CombatAI
|
||||
public:
|
||||
explicit CasterAI(Creature *c) : CombatAI(c) { m_attackDist = MELEE_RANGE; }
|
||||
void InitializeAI();
|
||||
void AttackStart(Unit * victim) { AttackStartCaster(victim, m_attackDist); }
|
||||
void AttackStart(Unit* victim) { AttackStartCaster(victim, m_attackDist); }
|
||||
void UpdateAI(const uint32 diff);
|
||||
void EnterCombat(Unit * /*who*/);
|
||||
void EnterCombat(Unit* /*who*/);
|
||||
private:
|
||||
float m_attackDist;
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class GameObjectAI
|
||||
{
|
||||
protected:
|
||||
GameObject * const go;
|
||||
GameObject* const go;
|
||||
public:
|
||||
explicit GameObjectAI(GameObject *g) : go(g) {}
|
||||
virtual ~GameObjectAI() {}
|
||||
|
||||
@@ -46,7 +46,7 @@ void PossessedAI::UpdateAI(const uint32 /*diff*/)
|
||||
}
|
||||
}
|
||||
|
||||
void PossessedAI::JustDied(Unit * /*u*/)
|
||||
void PossessedAI::JustDied(Unit* /*u*/)
|
||||
{
|
||||
// We died while possessed, disable our loot
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
@@ -59,7 +59,7 @@ void PossessedAI::KilledUnit(Unit* victim)
|
||||
victim->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
}
|
||||
|
||||
void CritterAI::DamageTaken(Unit * /*done_by*/, uint32 &)
|
||||
void CritterAI::DamageTaken(Unit* /*done_by*/, uint32 &)
|
||||
{
|
||||
if (!me->HasUnitState(UNIT_STAT_FLEEING))
|
||||
me->SetControlled(true, UNIT_STAT_FLEEING);
|
||||
|
||||
@@ -32,12 +32,12 @@ class PetAI : public CreatureAI
|
||||
explicit PetAI(Creature *c);
|
||||
|
||||
void EnterEvadeMode();
|
||||
void JustDied(Unit * /*who*/) { _stopAttack(); }
|
||||
void JustDied(Unit* /*who*/) { _stopAttack(); }
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
static int Permissible(const Creature *);
|
||||
|
||||
void KilledUnit(Unit * /*victim*/);
|
||||
void KilledUnit(Unit* /*victim*/);
|
||||
void AttackStart(Unit *target);
|
||||
void MovementInform(uint32 moveType, uint32 data);
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ struct DefaultTargetSelector : public std::unary_function<Unit* , bool>
|
||||
class UnitAI
|
||||
{
|
||||
protected:
|
||||
Unit * const me;
|
||||
Unit* const me;
|
||||
public:
|
||||
explicit UnitAI(Unit* unit) : me(unit) {}
|
||||
virtual ~UnitAI() {}
|
||||
|
||||
@@ -294,7 +294,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
||||
{
|
||||
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
|
||||
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
|
||||
Aura const * aura = me->GetAura(event.buffed.spellId);
|
||||
Aura const* aura = me->GetAura(event.buffed.spellId);
|
||||
if (!aura || aura->GetStackAmount() < event.buffed.amount)
|
||||
return false;
|
||||
|
||||
@@ -310,7 +310,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
||||
|
||||
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
|
||||
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
|
||||
Aura const * aura = pActionInvoker->GetAura(event.buffed.spellId);
|
||||
Aura const* aura = pActionInvoker->GetAura(event.buffed.spellId);
|
||||
if (!aura || aura->GetStackAmount() < event.buffed.amount)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ struct SimpleAI : public ScriptedAI
|
||||
|
||||
void Reset();
|
||||
|
||||
void EnterCombat(Unit * /*who*/);
|
||||
void EnterCombat(Unit* /*who*/);
|
||||
|
||||
void KilledUnit(Unit * /*victim*/);
|
||||
void KilledUnit(Unit* /*victim*/);
|
||||
|
||||
void DamageTaken(Unit *killer, uint32 &damage);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class SmartAI : public CreatureAI
|
||||
void IsSummonedBy(Unit* summoner);
|
||||
|
||||
// Called at any Damage to any victim (before damage apply)
|
||||
void DamageDealt(Unit * done_to, uint32 & damage, DamageEffectType /*damagetype*/);
|
||||
void DamageDealt(Unit* done_to, uint32 & damage, DamageEffectType /*damagetype*/);
|
||||
|
||||
// Called when a summoned creature dissapears (UnSommoned)
|
||||
void SummonedCreatureDespawn(Creature* unit);
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
void SetScript9(SmartScriptHolder &e, uint32 entry, Unit* invoker);
|
||||
|
||||
protected:
|
||||
GameObject * const go;
|
||||
GameObject* const go;
|
||||
SmartScript mScript;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user