make sure to remove spell effect so we don't try to access a dead spell ptr later
This commit is contained in:
parent
19cd63878c
commit
883f172312
@ -892,8 +892,14 @@ void LuaInterface::RemoveSpell(LuaSpell* spell, bool call_remove_function, bool
|
|||||||
ResetFunctionStack(spell->state);
|
ResetFunctionStack(spell->state);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(return_after_call_remove)
|
if(return_after_call_remove) {
|
||||||
|
if(overrideTarget && overrideTarget->IsEntity()) {
|
||||||
|
((Entity*)overrideTarget)->RemoveProc(0, spell);
|
||||||
|
((Entity*)overrideTarget)->RemoveSpellEffect(spell);
|
||||||
|
((Entity*)overrideTarget)->RemoveSpellBonus(spell);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||||
if(spell->caster) {
|
if(spell->caster) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user