aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b31a406e185..195bc6230ee 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3977,16 +3977,12 @@ inline void Unit::RemoveAuraFromStack(AuraMap::iterator &iter, AuraRemoveMode re
RemoveOwnedAura(iter, removeMode);
}
-void Unit::RemoveAurasDueToSpellByDispel(Aura * aura, Unit *dispeller)
+void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller)
{
- if (aura->IsRemoved())
- return;
-
- uint32 spellId = aura->GetId();
-
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
{
- if (aura == iter->second)
+ Aura * aura = iter->second;
+ if (aura->GetCasterGUID() == casterGUID)
{
if (aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR_EX7_DISPEL_CHARGES)
aura->DropCharge();
@@ -4039,16 +4035,12 @@ void Unit::RemoveAurasDueToSpellByDispel(Aura * aura, Unit *dispeller)
}
}
-void Unit::RemoveAurasDueToSpellBySteal(Aura * aura, Unit *stealer)
+void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer)
{
- if (aura->IsRemoved())
- return;
-
- uint32 spellId = aura->GetId();
-
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
{
- if (aura == iter->second)
+ Aura * aura = iter->second;
+ if (aura->GetCasterGUID() == casterGUID)
{
int32 damage[MAX_SPELL_EFFECTS];
int32 baseDamage[MAX_SPELL_EFFECTS];