rely on remaining targets to delete the spell, caster ptr is not reliable in this case
This commit is contained in:
parent
5770adffee
commit
9e986f3ace
@ -1614,11 +1614,7 @@ void LuaInterface::DeletePendingSpells(bool all) {
|
|||||||
spell = *del_itr;
|
spell = *del_itr;
|
||||||
|
|
||||||
if(!all) {
|
if(!all) {
|
||||||
if (spell->caster) {
|
// rely on targets the spell->caster could be corrupt
|
||||||
ZoneServer* curZone = spell->caster->GetZone();
|
|
||||||
if(curZone)
|
|
||||||
curZone->GetSpellProcess()->DeleteActiveSpell(spell, true);
|
|
||||||
}
|
|
||||||
if(spell->targets.size() > 0) {
|
if(spell->targets.size() > 0) {
|
||||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||||
for (int8 i = 0; i < spell->targets.size(); i++) {
|
for (int8 i = 0; i < spell->targets.size(); i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user