aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorkrz <none@none>2009-05-14 14:35:09 +0200
committerkrz <none@none>2009-05-14 14:35:09 +0200
commitee40287ef72ec00d3ede4abe5ad5aa68ac6cd7af (patch)
treeabdb71aee4affbc0bdb4b212f5f0a646fa95e6ca /src/game/Unit.cpp
parentbfaaa8201e6887fedd2145d668f40a484a609dac (diff)
Do not allow to proc spells if they can't stack with already active auras.
this fixes 13048 and 12292. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0890bcce364..e6aee7de708 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6894,6 +6894,18 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
+ // check if triggering spell can stack with current target's auras (if not - don't proc)
+ AuraMap::iterator i,next;
+ for (i = m_Auras.begin(); i != m_Auras.end(); i = next)
+ {
+ next = i;
+ ++next;
+ if (!(*i).second) continue;
+ if ( (*i).second->GetSpellProto()->Id == trigger_spell_id) continue;
+ if (spellmgr.IsNoStackSpellDueToSpell(trigger_spell_id, (*i).second->GetSpellProto()->Id, (pVictim == this)))
+ return false;
+ }
+
// Try handle uncnown trigger spells
if (sSpellStore.LookupEntry(trigger_spell_id)==NULL)
switch (auraSpellInfo->SpellFamilyName)