Monsters in instances should not teleport to spawn.

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2018-04-20 09:11:13 +00:00
parent 9be2cb4243
commit 108bebeacf
7 changed files with 7 additions and 7 deletions

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -845,7 +845,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && (npc.getInstanceId() == 0))
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }

View File

@ -679,7 +679,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
} }
// Monster teleport to spawn // Monster teleport to spawn
if (npc.isMonster() && (npc.getSpawn() != null)) if (npc.isMonster() && (npc.getSpawn() != null) && !npc.isInInstance())
{ {
npc.teleToLocation(npc.getSpawn(), false); npc.teleToLocation(npc.getSpawn(), false);
} }