Additionally RemoveProc should only remove the target, not all targets in the spell
This commit is contained in:
parent
b985613791
commit
bd7d69c495
@ -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));
|
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;
|
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;
|
Spawn* target;
|
||||||
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++) {
|
||||||
@ -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));
|
lua_interface->LogError("%s: LUA RemoveProc command error: spawn is not a valid entity", lua_interface->GetScriptName(state));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
((Entity*)spawn)->RemoveProc(item, spell);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user