Apply style fix pt3

This commit is contained in:
Antz 2020-01-13 10:14:05 +00:00
parent 1392c131e7
commit d93dbd95fe
191 changed files with 9851 additions and 676 deletions

View file

@ -54,7 +54,9 @@ void PetAI::MoveInLineOfSight(Unit* pWho)
{
if (Unit* victim = m_creature->getVictim())
if (victim->IsAlive())
{
return;
}
if (CharmInfo* charmInfo = m_creature->GetCharmInfo())
{
@ -154,7 +156,9 @@ void PetAI::UpdateAI(const uint32 diff)
// UpdateAllies self set update timer
{ UpdateAllies(); }
else
{ m_updateAlliesTimer -= diff; }
{
m_updateAlliesTimer -= diff;
}
if (inCombat && !victim)
{
@ -214,7 +218,9 @@ void PetAI::UpdateAI(const uint32 diff)
((Pet*)m_creature)->SetSpellOpener();
}
else
{
return;
}
}
// Autocast (casted only in combat or persistent spells in any state)
else if (!m_creature->IsNonMeleeSpellCasted(false))
@ -357,7 +363,9 @@ void PetAI::UpdateAI(const uint32 diff)
// Stop here if casting spell (No melee and no movement)
if (m_creature->IsNonMeleeSpellCasted(false))
{
return;
}
if (victim)
{
@ -465,7 +473,9 @@ void PetAI::UpdateAllies()
return;
}
else if (owner->GetTypeId() == TYPEID_PLAYER)
{ pGroup = ((Player*)owner)->GetGroup(); }
{
pGroup = ((Player*)owner)->GetGroup();
}
// only pet and owner/not in group->ok
if (m_AllySet.size() == 2 && !pGroup)
@ -499,7 +509,9 @@ void PetAI::UpdateAllies()
}
}
else // remove group
{ m_AllySet.insert(owner->GetObjectGuid()); }
{
m_AllySet.insert(owner->GetObjectGuid());
}
}
void PetAI::AttackedBy(Unit* attacker)