diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index b9d283653d..23ca2b30c4 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 1d84f3da14..53e208dbd2 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index 433cfdd815..f04aeae337 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 1d84f3da14..53e208dbd2 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index 433cfdd815..f04aeae337 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 1d84f3da14..53e208dbd2 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index 433cfdd815..f04aeae337 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 1d84f3da14..53e208dbd2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Spawn.java index 441d73f73e..b5505262a5 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -526,8 +526,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, getInstanceId()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, getInstanceId()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index a6d66df2d2..c69370fe3a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -136,6 +136,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1926,6 +1927,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 2cfb2f7edd..0be0b31f68 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -71,6 +71,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -144,6 +145,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -361,6 +363,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index c6d0dec751..7050ae8a18 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index f9e325c275..c9fea877c3 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index c6d0dec751..7050ae8a18 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index f9e325c275..c9fea877c3 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Spawn.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Spawn.java index f36fed74eb..15a8278ba2 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Spawn.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Spawn.java @@ -530,8 +530,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable final int randX = newlocx + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); final int randY = newlocy + Rnd.get(Config.MOB_MIN_SPAWN_RANGE, Config.MOB_MAX_SPAWN_RANGE); - final boolean isQuestMonster = (npc.getTitle() != null) && npc.getTitle().contains("Quest"); - if (npc.isMonster() && !isQuestMonster && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) + if (npc.isMonster() && !npc.isQuestMonster() && !npc.isWalker() && !npc.isInsideZone(ZoneId.NO_BOOKMARK) && (getInstanceId() == 0) && GeoEngine.getInstance().canMoveToTarget(newlocx, newlocy, newlocz, randX, randY, newlocz, npc.getInstanceWorld()) && !getTemplate().isUndying() && !npc.isRaid() && !npc.isRaidMinion() && !Config.MOBS_LIST_NOT_RANDOM.contains(npc.getId())) { newlocx = randX; newlocy = randY; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index c6d0dec751..7050ae8a18 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -129,6 +129,7 @@ public class L2Npc extends L2Character private boolean _isRandomAnimationEnabled = true; private boolean _isRandomWalkingEnabled = true; private boolean _isTalkable = getTemplate().isTalkable(); + private final boolean _isQuestMonster = getTemplate().isQuestMonster(); private final boolean _isFakePlayer = getTemplate().isFakePlayer(); protected RandomAnimationTask _rAniTask; @@ -1644,6 +1645,15 @@ public class L2Npc extends L2Character return _isTalkable; } + /** + * Checks if the NPC is a Quest Monster. + * @return {@code true} if the NPC is a Quest Monster, {@code false} otherwise. + */ + public boolean isQuestMonster() + { + return _isQuestMonster; + } + /** * Sets the weapon id with which this npc was killed. * @param weaponId diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index f9e325c275..c9fea877c3 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -73,6 +73,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable private boolean _attackable; private boolean _targetable; private boolean _talkable; + private boolean _isQuestMonster; private boolean _undying; private boolean _showName; private boolean _randomWalk; @@ -154,6 +155,7 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable _attackable = set.getBoolean("attackable", true); _targetable = set.getBoolean("targetable", true); _talkable = set.getBoolean("talkable", true); + _isQuestMonster = _title.contains("Quest"); _undying = set.getBoolean("undying", true); _showName = set.getBoolean("showName", true); _randomWalk = set.getBoolean("randomWalk", !_type.equals("L2Guard")); @@ -372,6 +374,11 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable return _talkable; } + public boolean isQuestMonster() + { + return _isQuestMonster; + } + public boolean isUndying() { return _undying;