mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Apply style fix pt3
This commit is contained in:
parent
1392c131e7
commit
d93dbd95fe
191 changed files with 9851 additions and 676 deletions
|
|
@ -73,7 +73,9 @@ CanCastResult CreatureAI::CanCastSpell(Unit* pTarget, const SpellEntry* pSpell,
|
|||
}
|
||||
|
||||
if (!pSpell->HasAttribute(SPELL_ATTR_EX2_IGNORE_LOS) && !m_creature->IsWithinLOSInMap(pTarget) && m_creature != pTarget)
|
||||
{
|
||||
return CAST_FAIL_NOT_IN_LOS;
|
||||
}
|
||||
}
|
||||
|
||||
if (const SpellRangeEntry* pSpellRange = sSpellRangeStore.LookupEntry(pSpell->rangeIndex))
|
||||
|
|
@ -99,7 +101,9 @@ CanCastResult CreatureAI::CanCastSpell(Unit* pTarget, const SpellEntry* pSpell,
|
|||
return CAST_OK;
|
||||
}
|
||||
else
|
||||
{ return CAST_FAIL_OTHER; }
|
||||
{
|
||||
return CAST_FAIL_OTHER;
|
||||
}
|
||||
}
|
||||
|
||||
CanCastResult CreatureAI::DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, ObjectGuid uiOriginalCasterGUID)
|
||||
|
|
@ -162,7 +166,9 @@ CanCastResult CreatureAI::DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32
|
|||
}
|
||||
}
|
||||
else
|
||||
{ return CAST_FAIL_IS_CASTING; }
|
||||
{
|
||||
return CAST_FAIL_IS_CASTING;
|
||||
}
|
||||
}
|
||||
|
||||
bool CreatureAI::DoMeleeAttackIfReady()
|
||||
|
|
@ -179,7 +185,9 @@ void CreatureAI::SetCombatMovement(bool enable, bool stopOrStartMovement /*=fals
|
|||
m_creature->clearUnitState(UNIT_STAT_NO_COMBAT_MOVEMENT);
|
||||
}
|
||||
else
|
||||
{ m_creature->addUnitState(UNIT_STAT_NO_COMBAT_MOVEMENT); }
|
||||
{
|
||||
m_creature->addUnitState(UNIT_STAT_NO_COMBAT_MOVEMENT);
|
||||
}
|
||||
|
||||
if (stopOrStartMovement && m_creature->getVictim()) // Only change current movement while in combat
|
||||
{
|
||||
|
|
@ -188,7 +196,9 @@ void CreatureAI::SetCombatMovement(bool enable, bool stopOrStartMovement /*=fals
|
|||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), m_attackDistance, m_attackAngle);
|
||||
}
|
||||
else if (!enable && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
|
||||
{ m_creature->StopMoving(); }
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue