Prevent instant available previously used spawn location.

This commit is contained in:
MobiusDevelopment 2021-09-04 00:57:07 +00:00
parent c9f1bba4a2
commit eaeab9e073
2 changed files with 12 additions and 4 deletions

View File

@ -68,8 +68,12 @@ public class Kerr extends AbstractNpcAI
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
KERR_SPAWN_LOCATIONS.remove(npc);
ThreadPool.schedule(() -> spawnKerr(), RESPAWN_DELAY);
ThreadPool.schedule(() ->
{
KERR_SPAWN_LOCATIONS.remove(npc);
spawnKerr();
}, RESPAWN_DELAY);
return super.onKill(npc, killer, isSummon);
}

View File

@ -68,8 +68,12 @@ public class Kerr extends AbstractNpcAI
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
KERR_SPAWN_LOCATIONS.remove(npc);
ThreadPool.schedule(() -> spawnKerr(), RESPAWN_DELAY);
ThreadPool.schedule(() ->
{
KERR_SPAWN_LOCATIONS.remove(npc);
spawnKerr();
}, RESPAWN_DELAY);
return super.onKill(npc, killer, isSummon);
}