Fixed incorrect Instance getAliveNpcs count.
This commit is contained in:
@@ -160,7 +160,7 @@ public final class ChamberOfProphecies extends AbstractInstance
|
||||
npc.setIsRunning(true);
|
||||
((L2Attackable) npc).setCanReturnToSpawnPoint(false);
|
||||
((L2Attackable) npc).setCanStopAttackByTime(false);
|
||||
if (npc.isScriptValue(0) && ((world.getAliveNpcs(ATTACABLE_MONSTERS).size() < 2) || world.getAliveNpcs(ATTACABLE_MONSTERS).isEmpty()))
|
||||
if (npc.isScriptValue(0) && world.getAliveNpcs(ATTACABLE_MONSTERS).isEmpty())
|
||||
{
|
||||
npc.setTarget(player);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||
|
@@ -438,7 +438,7 @@ public final class EvilIncubator extends AbstractInstance
|
||||
}
|
||||
else if (waveId < 8)
|
||||
{
|
||||
if (world.getAliveNpcs(MONSTERS).size() <= 1)
|
||||
if (world.getAliveNpcs(MONSTERS).isEmpty())
|
||||
{
|
||||
getTimers().addTimer("SPAWN_WAVE", 5000, e -> manageWaveSpawn(world));
|
||||
}
|
||||
|
@@ -365,7 +365,7 @@ public final class KartiasLabyrinth extends AbstractInstance
|
||||
instance.openCloseDoor(instance.getTemplateParameters().getInt("thirdDoorId"), true);
|
||||
instance.setStatus(3); // Used for notify helper's AI
|
||||
}
|
||||
else if (param.getBoolean("CONTINUE_AFTER_KILL", false) && (instance.getAliveNpcs(MONSTERS).size() <= 1))
|
||||
else if (param.getBoolean("CONTINUE_AFTER_KILL", false) && instance.getAliveNpcs(MONSTERS).isEmpty())
|
||||
{
|
||||
param.set("CONTINUE_AFTER_KILL", false);
|
||||
getTimers().addTimer("CALL_PROGRESS", 5000, n -> manageProgressInInstance(instance));
|
||||
|
@@ -235,7 +235,7 @@ public final class MuseumDungeon extends AbstractInstance
|
||||
{
|
||||
final L2PcInstance player = world.getFirstPlayer();
|
||||
final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName());
|
||||
if ((qs != null) && qs.isCond(2) && (world.getAliveNpcs(THIEF).size() <= 1))
|
||||
if ((qs != null) && qs.isCond(2) && world.getAliveNpcs(THIEF).isEmpty())
|
||||
{
|
||||
qs.setCond(3, true);
|
||||
showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500);
|
||||
|
Reference in New Issue
Block a user