Core/Scripts: Allow accessing removed spell HitAura in scripts
Port From (https://github.com/TrinityCore/TrinityCore/commit/cc0e892d8db6bbb385039efe01f29f83c94a0ef6)
This commit is contained in:
@@ -926,7 +926,7 @@ namespace Game.Scripting
|
|||||||
}
|
}
|
||||||
|
|
||||||
// returns current spell hit target aura
|
// returns current spell hit target aura
|
||||||
public Aura GetHitAura(bool dynObjAura = false)
|
public Aura GetHitAura(bool dynObjAura = false, bool withRemoved = false)
|
||||||
{
|
{
|
||||||
if (!IsInTargetHook())
|
if (!IsInTargetHook())
|
||||||
{
|
{
|
||||||
@@ -938,7 +938,7 @@ namespace Game.Scripting
|
|||||||
if (dynObjAura)
|
if (dynObjAura)
|
||||||
aura = m_spell.dynObjAura;
|
aura = m_spell.dynObjAura;
|
||||||
|
|
||||||
if (aura == null || aura.IsRemoved())
|
if (aura == null || (aura.IsRemoved() && !withRemoved))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return aura;
|
return aura;
|
||||||
|
|||||||
Reference in New Issue
Block a user