Additionally RemoveProc should only remove the target, not all targets in the spell
This commit is contained in:
parent
b985613791
commit
bd7d69c495
@ -8737,7 +8737,10 @@ int EQ2Emu_lua_RemoveProc(lua_State* state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (spell && spell->caster && spell->caster->GetZone()) {
|
||||
if(spawn && spawn->IsEntity()) {
|
||||
((Entity*)spawn)->RemoveProc(item, spell);
|
||||
}
|
||||
else if (spell && spell->caster && spell->caster->GetZone()) {
|
||||
Spawn* target;
|
||||
spell->MSpellTargets.readlock(__FUNCTION__, __LINE__);
|
||||
for (int8 i = 0; i < spell->targets.size(); i++) {
|
||||
@ -8758,9 +8761,6 @@ int EQ2Emu_lua_RemoveProc(lua_State* state) {
|
||||
lua_interface->LogError("%s: LUA RemoveProc command error: spawn is not a valid entity", lua_interface->GetScriptName(state));
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
((Entity*)spawn)->RemoveProc(item, spell);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user