fix(Core/Spells): Implemented SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_SAME_SPELL. (#10307)

Fixed #10263
This commit is contained in:
UltraNix
2022-01-31 01:29:22 +01:00
committed by GitHub
parent 0c09e88f64
commit 8f8fbd95ce
5 changed files with 39 additions and 19 deletions

View File

@@ -2031,9 +2031,14 @@ bool Aura::CanStackWith(Aura const* existingAura, bool remove) const
// xinef: check priority before effect mask
SpellGroupSpecialFlags thisAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(GetId());
SpellGroupSpecialFlags existingAuraFlag = sSpellMgr->GetSpellGroupSpecialFlags(existingSpellInfo->Id);
if (thisAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && existingAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1)
if (thisAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && thisAuraFlag <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 &&
existingAuraFlag >= SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 && existingAuraFlag <= SPELL_GROUP_SPECIAL_FLAG_PRIORITY4)
{
if (thisAuraFlag < existingAuraFlag)
{
return false;
}
}
// xinef: forced strongest aura in group by flag
if (stackFlags & SPELL_GROUP_STACK_FLAG_FORCED_STRONGEST)