assure we remove the spell from all targets even if the caster is not set/present
This commit is contained in:
parent
14a03bf255
commit
765a110732
@ -460,6 +460,7 @@ bool SpellProcess::DeleteCasterSpell(LuaSpell* spell, string reason, bool removi
|
|||||||
return target_valid;
|
return target_valid;
|
||||||
}
|
}
|
||||||
if (!zone_shutting_down && spell->caster) { // spell->caster ptr cannot be trusted during zone shutdown
|
if (!zone_shutting_down && spell->caster) { // spell->caster ptr cannot be trusted during zone shutdown
|
||||||
|
if(spell->caster) {
|
||||||
if(spell->caster->GetThreatTransfer() && spell->caster->GetThreatTransfer()->Spell == spell) {
|
if(spell->caster->GetThreatTransfer() && spell->caster->GetThreatTransfer()->Spell == spell) {
|
||||||
spell->caster->SetThreatTransfer(nullptr);
|
spell->caster->SetThreatTransfer(nullptr);
|
||||||
}
|
}
|
||||||
@ -492,6 +493,8 @@ bool SpellProcess::DeleteCasterSpell(LuaSpell* spell, string reason, bool removi
|
|||||||
spell->caster->RemoveProc(0, spell);
|
spell->caster->RemoveProc(0, spell);
|
||||||
spell->caster->RemoveMaintainedSpell(spell);
|
spell->caster->RemoveMaintainedSpell(spell);
|
||||||
CheckRemoveTargetFromSpell(spell, removing_all_spells, removing_all_spells);
|
CheckRemoveTargetFromSpell(spell, removing_all_spells, removing_all_spells);
|
||||||
|
}
|
||||||
|
|
||||||
ZoneServer* zone = spell->zone;
|
ZoneServer* zone = spell->zone;
|
||||||
if(zone) {
|
if(zone) {
|
||||||
LogWrite(SPELL__DEBUG, 0, "Spell", "SpellProcess::DeleteCasterSpell RemoveTargets Spell: %s.",
|
LogWrite(SPELL__DEBUG, 0, "Spell", "SpellProcess::DeleteCasterSpell RemoveTargets Spell: %s.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user