From 5775f66188fb553b3f4461c8b85c2b63adb77d55 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 27 Apr 2018 16:13:52 +0000 Subject: [PATCH] Instance NPC respawn must be set after spawning. --- .../gameserver/model/instancezone/Instance.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java index bbbbb852f8..c9b9a28540 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java @@ -448,6 +448,13 @@ public final class Instance spawnDat.setAmount(1); spawnDat.setHeading(set.getInt("heading")); spawnDat.setRespawnDelay(set.getInt("respawn"), set.getInt("respawnRandom")); + spawnDat.setInstanceId(getId()); + spawnDat.setIsNoRndWalk(set.getBoolean("allowRandomWalk")); + final L2Npc spawned = spawnDat.doSpawn(); + if ((set.getInt("delay") >= 0) && (spawned instanceof L2Attackable)) + { + ((L2Attackable) spawned).setOnKillDelay(set.getInt("delay")); + } if (set.getInt("respawn") == 0) { spawnDat.stopRespawn(); @@ -456,13 +463,6 @@ public final class Instance { spawnDat.startRespawn(); } - spawnDat.setInstanceId(getId()); - spawnDat.setIsNoRndWalk(set.getBoolean("allowRandomWalk")); - final L2Npc spawned = spawnDat.doSpawn(); - if ((set.getInt("delay") >= 0) && (spawned instanceof L2Attackable)) - { - ((L2Attackable) spawned).setOnKillDelay(set.getInt("delay")); - } } catch (Exception e) {