mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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;
|
reflectDamage = currentAbsorb / 2;
|
||||||
reflectSpell = 33619;
|
reflectSpell = 33619;
|
||||||
reflectTriggeredBy = *i;
|
reflectTriggeredBy = *i;
|
||||||
|
reflectTriggeredBy->SetInUse(true); // lock aura from final deletion until processing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (spellProto->Id == 39228 || // Argussian Compass
|
if (spellProto->Id == 39228 || // Argussian Compass
|
||||||
|
|
@ -2130,6 +2131,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
||||||
reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;
|
reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;
|
||||||
reflectSpell = 33619;
|
reflectSpell = 33619;
|
||||||
reflectTriggeredBy = *i;
|
reflectTriggeredBy = *i;
|
||||||
|
reflectTriggeredBy->SetInUse(true);// lock aura from final deletion until processing
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
@ -2237,7 +2239,11 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
||||||
|
|
||||||
// Cast back reflect damage spell
|
// Cast back reflect damage spell
|
||||||
if (canReflect && reflectSpell)
|
if (canReflect && reflectSpell)
|
||||||
|
{
|
||||||
CastCustomSpell(pCaster, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy);
|
CastCustomSpell(pCaster, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy);
|
||||||
|
reflectTriggeredBy->SetInUse(false); // free lock from deletion
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// absorb by mana cost
|
// absorb by mana cost
|
||||||
AuraList const& vManaShield = GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
AuraList const& vManaShield = GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10986"
|
#define REVISION_NR "10987"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue