mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[11633] Implement function Unit::HasAffectedAura
This commit is contained in:
parent
54f623d2b8
commit
3443a97a28
5 changed files with 27 additions and 24 deletions
|
|
@ -4526,19 +4526,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
}
|
||||
// only check at first call, Stealth auras are already removed at second call
|
||||
// for now, ignore triggered spells
|
||||
if( strict && !m_IsTriggeredSpell)
|
||||
if (strict && !m_IsTriggeredSpell)
|
||||
{
|
||||
bool checkForm = true;
|
||||
// Ignore form req aura
|
||||
Unit::AuraList const& ignore = m_caster->GetAurasByType(SPELL_AURA_MOD_IGNORE_SHAPESHIFT);
|
||||
for(Unit::AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
|
||||
{
|
||||
if (!(*i)->isAffectedOnSpell(m_spellInfo))
|
||||
continue;
|
||||
checkForm = false;
|
||||
break;
|
||||
}
|
||||
if (checkForm)
|
||||
if (!m_caster->HasAffectedAura(SPELL_AURA_MOD_IGNORE_SHAPESHIFT, m_spellInfo))
|
||||
{
|
||||
// Cannot be used in this stance/form
|
||||
SpellCastResult shapeError = GetErrorAtShapeshiftedCast(m_spellInfo, m_caster->GetShapeshiftForm());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue