diff options
| author | QAston <none@none> | 2009-04-20 18:58:35 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-04-20 18:58:35 +0200 |
| commit | 8888038f1efb1d0222f4054f75d78bd2ce81d4a8 (patch) | |
| tree | 0a50aadf9f3d1c46e17c12e9e21da096ff0bcf68 | |
| parent | cc5414f9256ab2d27caa9f08bbb7b453a3155feb (diff) | |
*Prevent useless area aura reapplying in some cases
--HG--
branch : trunk
| -rw-r--r-- | src/game/SpellAuras.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 6d3b9bb5424..ea3746e8b46 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -744,7 +744,25 @@ void AreaAuraEffect::Update(uint32 diff) for(std::list<Unit *>::iterator tIter = targets.begin(); tIter != targets.end(); tIter++) { - if((*tIter)->HasAuraEffect(GetId(), GetEffIndex(), caster->GetGUID())) + bool skip=false; + for(Unit::AuraMap::iterator iter = (*tIter)->GetAuras().begin(); iter != (*tIter)->GetAuras().end();++iter) + { + bool samecaster = iter->second->GetCasterGUID() == GetCasterGUID(); + if (samecaster && iter->first == GetId()) + { + if (AuraEffect * aurEff = iter->second->GetPartAura(m_effIndex)) + { + skip=true; + } + break; + } + if (spellmgr.IsNoStackSpellDueToSpell(GetId(), iter->first,samecaster)) + { + skip=true; + break; + } + } + if(skip) continue; if(SpellEntry const *actualSpellInfo = spellmgr.SelectAuraRankForPlayerLevel(GetSpellProto(), (*tIter)->getLevel())) |
