diff options
author | krz <none@none> | 2009-05-14 14:35:09 +0200 |
---|---|---|
committer | krz <none@none> | 2009-05-14 14:35:09 +0200 |
commit | ee40287ef72ec00d3ede4abe5ad5aa68ac6cd7af (patch) | |
tree | abdb71aee4affbc0bdb4b212f5f0a646fa95e6ca /src | |
parent | bfaaa8201e6887fedd2145d668f40a484a609dac (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')
-rw-r--r-- | src/game/SpellMgr.cpp | 14 | ||||
-rw-r--r-- | src/game/SpellMgr.h | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 12 |
3 files changed, 27 insertions, 0 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 54911ff4451..48bae52983c 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -345,6 +345,19 @@ SpellSpecific GetSpellSpecific(uint32 spellId) else if((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_FOOD) && !spellInfo->Category) return SPELL_WELL_FED; + + switch(spellInfo->Id) + { + case 12880: // warrior's Enrage rank 1 + case 14201: // Enrage rank 2 + case 14202: // Enrage rank 3 + case 14203: // Enrage rank 4 + case 14204: // Enrage rank 5 + case 12292: // Death Wish + return SPELL_WARRIOR_ENRAGE; + break; + default: break; + } break; } case SPELLFAMILY_MAGE: @@ -489,6 +502,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2) case SPELL_DRINK: case SPELL_FOOD: case SPELL_CHARM: + case SPELL_WARRIOR_ENRAGE: return spellSpec1==spellSpec2; case SPELL_BATTLE_ELIXIR: return spellSpec2==SPELL_BATTLE_ELIXIR diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index aeba2deb068..62c46ccf990 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -295,6 +295,7 @@ enum SpellSpecific SPELL_DRINK = 19, SPELL_FOOD = 20, SPELL_CHARM = 21, + SPELL_WARRIOR_ENRAGE = 22, }; #define SPELL_LINKED_MAX_SPELLS 200000 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) |