mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Do not allow to proc spells if they can't stack with already active auras.
this fixes 13048 and 12292. --HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user