mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10987] Prevent deleting reflect source aura ebfore reflected spell cast.
This commit is contained in:
parent
287229bfdb
commit
6e241689e7
2 changed files with 7 additions and 1 deletions
|
|
@ -2055,6 +2055,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
reflectDamage = currentAbsorb / 2;
|
||||
reflectSpell = 33619;
|
||||
reflectTriggeredBy = *i;
|
||||
reflectTriggeredBy->SetInUse(true); // lock aura from final deletion until processing
|
||||
break;
|
||||
}
|
||||
if (spellProto->Id == 39228 || // Argussian Compass
|
||||
|
|
@ -2130,6 +2131,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;
|
||||
reflectSpell = 33619;
|
||||
reflectTriggeredBy = *i;
|
||||
reflectTriggeredBy->SetInUse(true);// lock aura from final deletion until processing
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
|
@ -2237,7 +2239,11 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
|
||||
// Cast back reflect damage spell
|
||||
if (canReflect && reflectSpell)
|
||||
{
|
||||
CastCustomSpell(pCaster, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy);
|
||||
reflectTriggeredBy->SetInUse(false); // free lock from deletion
|
||||
}
|
||||
|
||||
|
||||
// absorb by mana cost
|
||||
AuraList const& vManaShield = GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue