Implement 277 SPELL_AURA_MOD_MAX_AFFECTED_TARGETS

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2008-12-17 01:52:10 +03:00
parent 2c1f19d997
commit 213a10dcbd
3 changed files with 10 additions and 2 deletions

View file

@ -1186,7 +1186,15 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
if(Player* modOwner = m_originalCaster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this);
// Get spell max affected targets
uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets;
Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)
{
if (!(*m)->isAffectedOnSpell(m_spellInfo))
continue;
unMaxTargets+=(*m)->GetModifier()->m_amount;
}
switch(cur)
{
case TARGET_TOTEM_EARTH: