LUA Functions do not call with MSpawnList locked? (hopefully not)

This is a tough situation here, question is if Combat code can somehow call LUA and lua calls back to KillSpawn, so this might go both ways...

Entity::DamageSpawn

GetZone()->CallSpawnScript(victim, SPAWN_SCRIPT_HEALTHCHANGED, this);

This could if calling KillSpawn on that script action cause a deadlock
This commit is contained in:
Image 2020-03-09 18:51:58 -04:00
parent 714d7a3676
commit d695965fbb

View file

@ -184,7 +184,7 @@ int EQ2Emu_lua_KillSpawn(lua_State* state) {
Spawn* killer = lua_interface->GetSpawn(state, 2);
bool send_packet = (lua_interface->GetInt8Value(state, 3) == 1);
if(dead && dead->Alive() && dead->GetZone())
dead->GetZone()->KillSpawn(true, dead, killer, send_packet);
dead->GetZone()->KillSpawn(false, dead, killer, send_packet);
return 0;
}