fix(Core/Spells): Banish should only be dispelled by Mass Dispel (#17703)

* fix(Core/Spells): Banish should only be dispelled by Mass Dispel

* Update Unit.cpp

* Update Unit.cpp
This commit is contained in:
Andrew
2023-11-14 12:27:37 -03:00
committed by GitHub
parent 20cde236c7
commit 5a4fdc7de4
4 changed files with 11 additions and 4 deletions

View File

@@ -5529,7 +5529,7 @@ Aura* Unit::GetAuraOfRankedSpell(uint32 spellId, ObjectGuid casterGUID, ObjectGu
return aurApp ? aurApp->GetBase() : nullptr;
}
void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelChargesList& dispelList)
void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelChargesList& dispelList, SpellInfo const* dispelSpell)
{
// we should not be able to dispel diseases if the target is affected by unholy blight
if (dispelMask & (1 << DISPEL_DISEASE) && HasAura(50536))
@@ -5575,6 +5575,12 @@ void Unit::GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelCharges
continue;
}
// Banish should only be dispelled by Mass Dispel
if (aura->GetSpellInfo()->Mechanic == MECHANIC_BANISH && !dispelSpell->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
{
continue;
}
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell
// Polymorph instead of 1 / (5 + 1) -> 16%.