[9530] Fixed check for SPELL_AURA_ALLOW_ONLY_ABILITY

Also remove public access to SpellAura::m_spellmod for avoid another hacks
with it use. Spellmods only for Player::ApplySpellMod use.
This commit is contained in:
VladimirMangos 2010-03-06 07:52:01 +03:00
parent bbdb7bb09c
commit 3cf9e47110
4 changed files with 2 additions and 14 deletions

View file

@ -5141,7 +5141,7 @@ SpellCastResult Spell::CheckCasterAuras() const
Unit::AuraList const& casingLimit = m_caster->GetAurasByType(SPELL_AURA_ALLOW_ONLY_ABILITY);
for(Unit::AuraList::const_iterator itr = casingLimit.begin(); itr != casingLimit.end(); ++itr)
{
if(!IsAffectedByAura(*itr))
if(!(*itr)->isAffectedOnSpell(m_spellInfo))
{
prevented_reason = SPELL_FAILED_CASTER_AURASTATE;
break;
@ -5953,14 +5953,6 @@ void Spell::UpdatePointers()
m_targets.Update(m_caster);
}
bool Spell::IsAffectedByAura(Aura *aura) const
{
if(SpellModifier* mod = aura->getAuraSpellMod())
return mod->isAffectedOnSpell(m_spellInfo);
else
return false;
}
bool Spell::CheckTargetCreatureType(Unit* target) const
{
uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType;