*Handle SPELL_AURA_MOD_ABILITY_AFFECTED_TARGETS.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-03 19:12:33 +01:00
parent c3c36ec1c8
commit 8b36eb7f0c
3 changed files with 11 additions and 4 deletions

View File

@@ -1442,6 +1442,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
uint32 EffectChainTarget = m_spellInfo->EffectChainTarget[i];
uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets;
Unit::AuraList const& Auras = m_caster->GetAurasByType(SPELL_AURA_MOD_ABILITY_AFFECTED_TARGETS);
for(Unit::AuraList::const_iterator j = Auras.begin();j != Auras.end(); ++j)
{
if((*j)->isAffectedOnSpell(m_spellInfo))
unMaxTargets+=(*j)->GetModifier()->m_amount;
}
if(m_originalCaster)
{
if(Player* modOwner = m_originalCaster->GetSpellModOwner())