1
0

Additionally RemoveProc should only remove the target, not all targets in the spell

This commit is contained in:
Emagi 2025-01-19 10:23:57 -05:00
parent b985613791
commit bd7d69c495

View File

@ -8736,8 +8736,11 @@ int EQ2Emu_lua_RemoveProc(lua_State* state) {
lua_interface->LogError("%s: LUA RemoveProc command error: can only use with an item provided or inside a spell script", lua_interface->GetScriptName(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;
}