Core: More codestyle cleanups
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -30,7 +30,7 @@ void PassiveAI::UpdateAI(const uint32)
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
void PossessedAI::AttackStart(Unit *target)
|
||||
void PossessedAI::AttackStart(Unit* target)
|
||||
{
|
||||
me->Attack(target, true);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user