mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Spells: use spellinfo helper methods
(cherry picked from commit 12a52595ed)
This commit is contained in:
@@ -5286,8 +5286,8 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
|
||||
// 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%.
|
||||
bool dispel_charges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
uint8 charges = dispel_charges ? aura->GetCharges() : aura->GetStackAmount();
|
||||
bool dispelCharges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
uint8 charges = dispelCharges ? aura->GetCharges() : aura->GetStackAmount();
|
||||
if (charges > 0)
|
||||
steal_list.push_back(std::make_pair(aura, charges));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user