From 1b17669d5bf8a89b589eb040fbf1aa623ec91de8 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sat, 9 Sep 2017 02:38:17 +0000
Subject: [PATCH] Dropped L2QuestGuardInstance.
---
.../ai/areas/Wastelands/Wastelands.java | 6 +-
.../IceQueensCastleBattle.java | 6 +-
.../Q10791_TheManOfMystery.java | 4 +-
.../dist/game/data/stats/npcs/18800-18899.xml | 10 +-
.../dist/game/data/stats/npcs/18900-18999.xml | 2 +-
.../dist/game/data/stats/npcs/19100-19199.xml | 6 +-
.../dist/game/data/stats/npcs/32200-32299.xml | 2 +-
.../dist/game/data/stats/npcs/32300-32399.xml | 2 +-
.../dist/game/data/stats/npcs/33000-33099.xml | 2 +-
.../dist/game/data/stats/npcs/33500-33599.xml | 4 +-
.../dist/game/data/stats/npcs/33700-33799.xml | 2 +-
.../dist/game/data/stats/npcs/33900-33999.xml | 2 +-
.../gameserver/enums/InstanceType.java | 1 -
.../gameserver/model/actor/L2Character.java | 3 +-
.../actor/instance/L2QuestGuardInstance.java | 101 ------------------
.../ai/areas/Wastelands/Wastelands.java | 6 +-
.../IceQueensCastleBattle.java | 6 +-
.../Q10791_TheManOfMystery.java | 4 +-
.../dist/game/data/stats/npcs/18800-18899.xml | 10 +-
.../dist/game/data/stats/npcs/18900-18999.xml | 2 +-
.../dist/game/data/stats/npcs/19100-19199.xml | 6 +-
.../dist/game/data/stats/npcs/32200-32299.xml | 2 +-
.../dist/game/data/stats/npcs/32300-32399.xml | 2 +-
.../dist/game/data/stats/npcs/33000-33099.xml | 2 +-
.../dist/game/data/stats/npcs/33500-33599.xml | 4 +-
.../dist/game/data/stats/npcs/33700-33799.xml | 2 +-
.../dist/game/data/stats/npcs/33900-33999.xml | 2 +-
.../gameserver/enums/InstanceType.java | 1 -
.../gameserver/model/actor/L2Character.java | 3 +-
.../actor/instance/L2QuestGuardInstance.java | 101 ------------------
.../ai/areas/Wastelands/Wastelands.java | 6 +-
.../IceQueensCastleBattle.java | 6 +-
.../MuseumDungeon/MuseumDungeon.java | 6 +-
.../Q10791_TheManOfMystery.java | 4 +-
.../dist/game/data/stats/npcs/18800-18899.xml | 10 +-
.../dist/game/data/stats/npcs/18900-18999.xml | 2 +-
.../dist/game/data/stats/npcs/19100-19199.xml | 6 +-
.../dist/game/data/stats/npcs/32200-32299.xml | 2 +-
.../dist/game/data/stats/npcs/32300-32399.xml | 2 +-
.../dist/game/data/stats/npcs/33000-33099.xml | 2 +-
.../dist/game/data/stats/npcs/33500-33599.xml | 4 +-
.../dist/game/data/stats/npcs/33700-33799.xml | 2 +-
.../dist/game/data/stats/npcs/33900-33999.xml | 2 +-
.../gameserver/enums/InstanceType.java | 1 -
.../gameserver/model/actor/L2Character.java | 3 +-
.../actor/instance/L2QuestGuardInstance.java | 101 ------------------
.../gameserver/enums/InstanceType.java | 1 -
.../gameserver/model/actor/L2Character.java | 3 +-
.../actor/instance/L2QuestGuardInstance.java | 101 ------------------
49 files changed, 79 insertions(+), 491 deletions(-)
delete mode 100644 L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
delete mode 100644 L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
delete mode 100644 L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
delete mode 100644 L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
index 3b5c481414..93301bbb8c 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
@@ -23,8 +23,8 @@ import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
@@ -149,7 +149,7 @@ public final class Wastelands extends AbstractNpcAI
if (guard.getId() == SCHUAZEN)
{
//@formatter:off
- final L2QuestGuardInstance decoGuard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
+ final FriendlyNpcInstance decoGuard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == DECO_GUARD2))
.findFirst()
@@ -202,7 +202,7 @@ public final class Wastelands extends AbstractNpcAI
{
final int guardId = npc.getId() == REGENERATED_KANILOV ? JOEL : SCHUAZEN;
//@formatter:off
- final L2QuestGuardInstance guard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
+ final FriendlyNpcInstance guard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == guardId))
.findFirst()
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
index 4e3ab64023..92b19efcf5 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
@@ -30,10 +30,10 @@ import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
@@ -430,14 +430,14 @@ public final class IceQueensCastleBattle extends AbstractInstance
freya.disableCoreAI(false);
manageScreenMsg(world, NpcStringId.BEGIN_STAGE_4);
- final L2QuestGuardInstance jinia = (L2QuestGuardInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance jinia = (FriendlyNpcInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
jinia.setIsRunning(true);
jinia.setIsInvul(true);
jinia.setCanReturnToSpawnPoint(false);
jinia.reduceCurrentHp(1, freya, null); // TODO: Find better way for attack
freya.reduceCurrentHp(1, jinia, null);
- final L2QuestGuardInstance kegor = (L2QuestGuardInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance kegor = (FriendlyNpcInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
kegor.setIsRunning(true);
kegor.setIsInvul(true);
kegor.setCanReturnToSpawnPoint(false);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
index e39457f8f7..424a90be84 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
@@ -19,8 +19,8 @@ package quests.Q10791_TheManOfMystery;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
@@ -187,7 +187,7 @@ public class Q10791_TheManOfMystery extends Quest
if (kills >= 5)
{
final L2Npc monster = addSpawn(NEEDLE_STAKATO_CAPTAIN, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 600000, false);
- final L2QuestGuardInstance kain = (L2QuestGuardInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
+ final FriendlyNpcInstance kain = (FriendlyNpcInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
kain.setRunning();
kain.setIsInvul(true);
kain.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18800-18899.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18800-18899.xml
index f3762de9b4..cf4394ccf3 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18800-18899.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18800-18899.xml
@@ -1846,7 +1846,7 @@
-
+
@@ -1924,7 +1924,7 @@
-
+
@@ -1963,7 +1963,7 @@
-
+
@@ -2002,7 +2002,7 @@
-
+
@@ -2042,7 +2042,7 @@
-
+
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18900-18999.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18900-18999.xml
index 21c8d67952..df3e858e6a 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18900-18999.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/18900-18999.xml
@@ -1258,7 +1258,7 @@
-
+
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/19100-19199.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/19100-19199.xml
index f1963ccf13..08e2c0e3b3 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/19100-19199.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/19100-19199.xml
@@ -951,7 +951,7 @@
-
+
HUMAN
MALE
@@ -977,7 +977,7 @@
-
+
HUMAN
MALE
@@ -1972,7 +1972,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32200-32299.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32200-32299.xml
index 9591b82b0e..513269cf4d 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32200-32299.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32200-32299.xml
@@ -3829,7 +3829,7 @@
-
+
HUMANOID
MALE
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32300-32399.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32300-32399.xml
index d3077fe77a..f12f431669 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32300-32399.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/32300-32399.xml
@@ -2189,7 +2189,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33000-33099.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33000-33099.xml
index 3433c80aac..8e53592303 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33000-33099.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33000-33099.xml
@@ -135,7 +135,7 @@
-
+
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33500-33599.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33500-33599.xml
index daad889ebb..53087cce0f 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33500-33599.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33500-33599.xml
@@ -550,7 +550,7 @@
-
+
@@ -584,7 +584,7 @@
-
+
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33700-33799.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33700-33799.xml
index 6ca5e70885..4162c64831 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33700-33799.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33700-33799.xml
@@ -1044,7 +1044,7 @@
-
+
CONSTRUCT
MALE
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
index af4d9bdaf8..6b8a8da083 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/npcs/33900-33999.xml
@@ -2098,7 +2098,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/enums/InstanceType.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/enums/InstanceType.java
index 677acb99d9..ff0cd3a8be 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/enums/InstanceType.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/enums/InstanceType.java
@@ -42,7 +42,6 @@ public enum InstanceType
// Attackable
L2Attackable(L2Npc),
L2GuardInstance(L2Attackable),
- L2QuestGuardInstance(L2GuardInstance),
L2MonsterInstance(L2Attackable),
L2BlockInstance(L2Attackable),
L2ChestInstance(L2MonsterInstance),
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java
index 257cc931d2..218b2ffb9e 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java
@@ -82,7 +82,6 @@ import com.l2jmobius.gameserver.model.TimeStamp;
import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.stat.CharStat;
import com.l2jmobius.gameserver.model.actor.status.CharStatus;
import com.l2jmobius.gameserver.model.actor.tasks.character.HitTask;
@@ -3631,7 +3630,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle)
{
// Path calculation -- overrides previous movement check
- if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance) || (this instanceof L2QuestGuardInstance))
+ if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance))
{
m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld());
if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
deleted file mode 100644
index 2a9a4ac654..0000000000
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.actor.instance;
-
-import com.l2jmobius.gameserver.enums.InstanceType;
-import com.l2jmobius.gameserver.model.actor.L2Attackable;
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jmobius.gameserver.model.events.EventDispatcher;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAttack;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * This class extends Guard class for quests, that require tracking of onAttack and onKill events from monsters' attacks.
- * @author GKR
- */
-public final class L2QuestGuardInstance extends L2GuardInstance
-{
- private boolean _isAutoAttackable = true;
- private boolean _isPassive = false;
-
- public L2QuestGuardInstance(L2NpcTemplate template)
- {
- super(template);
- setInstanceType(InstanceType.L2QuestGuardInstance);
- }
-
- @Override
- public void addDamage(L2Character attacker, int damage, Skill skill)
- {
- super.addDamage(attacker, damage, skill);
-
- if (attacker instanceof L2Attackable)
- {
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableAttack(null, this, damage, skill, false), this);
- }
- }
-
- @Override
- public boolean doDie(L2Character killer)
- {
- // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
- if (!super.doDie(killer))
- {
- return false;
- }
-
- if (killer instanceof L2Attackable)
- {
- // Delayed notification
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(null, this, false), this);
- }
- return true;
- }
-
- @Override
- public void addDamageHate(L2Character attacker, int damage, int aggro)
- {
- if (!_isPassive && !(attacker instanceof L2PcInstance))
- {
- super.addDamageHate(attacker, damage, aggro);
- }
- }
-
- public void setPassive(boolean state)
- {
- _isPassive = state;
- }
-
- @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- return _isAutoAttackable && !(attacker instanceof L2PcInstance);
- }
-
- @Override
- public void setAutoAttackable(boolean state)
- {
- _isAutoAttackable = state;
- }
-
- public boolean isPassive()
- {
- return _isPassive;
- }
-}
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
index 3b5c481414..93301bbb8c 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
@@ -23,8 +23,8 @@ import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
@@ -149,7 +149,7 @@ public final class Wastelands extends AbstractNpcAI
if (guard.getId() == SCHUAZEN)
{
//@formatter:off
- final L2QuestGuardInstance decoGuard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
+ final FriendlyNpcInstance decoGuard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == DECO_GUARD2))
.findFirst()
@@ -202,7 +202,7 @@ public final class Wastelands extends AbstractNpcAI
{
final int guardId = npc.getId() == REGENERATED_KANILOV ? JOEL : SCHUAZEN;
//@formatter:off
- final L2QuestGuardInstance guard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
+ final FriendlyNpcInstance guard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == guardId))
.findFirst()
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
index 4e3ab64023..92b19efcf5 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
@@ -30,10 +30,10 @@ import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
@@ -430,14 +430,14 @@ public final class IceQueensCastleBattle extends AbstractInstance
freya.disableCoreAI(false);
manageScreenMsg(world, NpcStringId.BEGIN_STAGE_4);
- final L2QuestGuardInstance jinia = (L2QuestGuardInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance jinia = (FriendlyNpcInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
jinia.setIsRunning(true);
jinia.setIsInvul(true);
jinia.setCanReturnToSpawnPoint(false);
jinia.reduceCurrentHp(1, freya, null); // TODO: Find better way for attack
freya.reduceCurrentHp(1, jinia, null);
- final L2QuestGuardInstance kegor = (L2QuestGuardInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance kegor = (FriendlyNpcInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
kegor.setIsRunning(true);
kegor.setIsInvul(true);
kegor.setCanReturnToSpawnPoint(false);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
index e39457f8f7..424a90be84 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
@@ -19,8 +19,8 @@ package quests.Q10791_TheManOfMystery;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
@@ -187,7 +187,7 @@ public class Q10791_TheManOfMystery extends Quest
if (kills >= 5)
{
final L2Npc monster = addSpawn(NEEDLE_STAKATO_CAPTAIN, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 600000, false);
- final L2QuestGuardInstance kain = (L2QuestGuardInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
+ final FriendlyNpcInstance kain = (FriendlyNpcInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
kain.setRunning();
kain.setIsInvul(true);
kain.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18800-18899.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18800-18899.xml
index 34c2fdf0f5..9f8df90464 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18800-18899.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18800-18899.xml
@@ -1846,7 +1846,7 @@
-
+
@@ -1924,7 +1924,7 @@
-
+
@@ -1963,7 +1963,7 @@
-
+
@@ -2002,7 +2002,7 @@
-
+
@@ -2042,7 +2042,7 @@
-
+
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18900-18999.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18900-18999.xml
index e3d84799b8..896d7302fa 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18900-18999.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/18900-18999.xml
@@ -1258,7 +1258,7 @@
-
+
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/19100-19199.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/19100-19199.xml
index 3037296dd1..7f4d496d87 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/19100-19199.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/19100-19199.xml
@@ -951,7 +951,7 @@
-
+
HUMAN
MALE
@@ -977,7 +977,7 @@
-
+
HUMAN
MALE
@@ -1972,7 +1972,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32200-32299.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32200-32299.xml
index 0949eb529e..369aa7b80d 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32200-32299.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32200-32299.xml
@@ -3829,7 +3829,7 @@
-
+
HUMANOID
MALE
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32300-32399.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32300-32399.xml
index 70807a87df..50f2877f72 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32300-32399.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/32300-32399.xml
@@ -2189,7 +2189,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33000-33099.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33000-33099.xml
index 2484eea8ac..6b48dce4f4 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33000-33099.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33000-33099.xml
@@ -135,7 +135,7 @@
-
+
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33500-33599.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33500-33599.xml
index ae35753a24..00a4c4642d 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33500-33599.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33500-33599.xml
@@ -550,7 +550,7 @@
-
+
@@ -584,7 +584,7 @@
-
+
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33700-33799.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33700-33799.xml
index 4876c8c9e4..00d0079174 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33700-33799.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33700-33799.xml
@@ -1044,7 +1044,7 @@
-
+
CONSTRUCT
MALE
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
index 61d40763e0..9933c4abf2 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/npcs/33900-33999.xml
@@ -2098,7 +2098,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/enums/InstanceType.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/enums/InstanceType.java
index 677acb99d9..ff0cd3a8be 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/enums/InstanceType.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/enums/InstanceType.java
@@ -42,7 +42,6 @@ public enum InstanceType
// Attackable
L2Attackable(L2Npc),
L2GuardInstance(L2Attackable),
- L2QuestGuardInstance(L2GuardInstance),
L2MonsterInstance(L2Attackable),
L2BlockInstance(L2Attackable),
L2ChestInstance(L2MonsterInstance),
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java
index 257cc931d2..218b2ffb9e 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java
@@ -82,7 +82,6 @@ import com.l2jmobius.gameserver.model.TimeStamp;
import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.stat.CharStat;
import com.l2jmobius.gameserver.model.actor.status.CharStatus;
import com.l2jmobius.gameserver.model.actor.tasks.character.HitTask;
@@ -3631,7 +3630,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle)
{
// Path calculation -- overrides previous movement check
- if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance) || (this instanceof L2QuestGuardInstance))
+ if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance))
{
m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld());
if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
deleted file mode 100644
index 2a9a4ac654..0000000000
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.actor.instance;
-
-import com.l2jmobius.gameserver.enums.InstanceType;
-import com.l2jmobius.gameserver.model.actor.L2Attackable;
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jmobius.gameserver.model.events.EventDispatcher;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAttack;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * This class extends Guard class for quests, that require tracking of onAttack and onKill events from monsters' attacks.
- * @author GKR
- */
-public final class L2QuestGuardInstance extends L2GuardInstance
-{
- private boolean _isAutoAttackable = true;
- private boolean _isPassive = false;
-
- public L2QuestGuardInstance(L2NpcTemplate template)
- {
- super(template);
- setInstanceType(InstanceType.L2QuestGuardInstance);
- }
-
- @Override
- public void addDamage(L2Character attacker, int damage, Skill skill)
- {
- super.addDamage(attacker, damage, skill);
-
- if (attacker instanceof L2Attackable)
- {
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableAttack(null, this, damage, skill, false), this);
- }
- }
-
- @Override
- public boolean doDie(L2Character killer)
- {
- // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
- if (!super.doDie(killer))
- {
- return false;
- }
-
- if (killer instanceof L2Attackable)
- {
- // Delayed notification
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(null, this, false), this);
- }
- return true;
- }
-
- @Override
- public void addDamageHate(L2Character attacker, int damage, int aggro)
- {
- if (!_isPassive && !(attacker instanceof L2PcInstance))
- {
- super.addDamageHate(attacker, damage, aggro);
- }
- }
-
- public void setPassive(boolean state)
- {
- _isPassive = state;
- }
-
- @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- return _isAutoAttackable && !(attacker instanceof L2PcInstance);
- }
-
- @Override
- public void setAutoAttackable(boolean state)
- {
- _isAutoAttackable = state;
- }
-
- public boolean isPassive()
- {
- return _isPassive;
- }
-}
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
index 3b5c481414..93301bbb8c 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/Wastelands/Wastelands.java
@@ -23,8 +23,8 @@ import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
@@ -149,7 +149,7 @@ public final class Wastelands extends AbstractNpcAI
if (guard.getId() == SCHUAZEN)
{
//@formatter:off
- final L2QuestGuardInstance decoGuard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
+ final FriendlyNpcInstance decoGuard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(guard, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == DECO_GUARD2))
.findFirst()
@@ -202,7 +202,7 @@ public final class Wastelands extends AbstractNpcAI
{
final int guardId = npc.getId() == REGENERATED_KANILOV ? JOEL : SCHUAZEN;
//@formatter:off
- final L2QuestGuardInstance guard = (L2QuestGuardInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
+ final FriendlyNpcInstance guard = (FriendlyNpcInstance) L2World.getInstance().getVisibleObjects(npc, L2Npc.class, 500)
.stream()
.filter(obj -> (obj.getId() == guardId))
.findFirst()
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
index 4e3ab64023..92b19efcf5 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Freya/IceQueensCastleBattle/IceQueensCastleBattle.java
@@ -30,10 +30,10 @@ import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2GrandBossInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2RaidBossInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
@@ -430,14 +430,14 @@ public final class IceQueensCastleBattle extends AbstractInstance
freya.disableCoreAI(false);
manageScreenMsg(world, NpcStringId.BEGIN_STAGE_4);
- final L2QuestGuardInstance jinia = (L2QuestGuardInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance jinia = (FriendlyNpcInstance) addSpawn(SUPP_JINIA, SUPP_JINIA_SPAWN, false, 0, true, world.getId());
jinia.setIsRunning(true);
jinia.setIsInvul(true);
jinia.setCanReturnToSpawnPoint(false);
jinia.reduceCurrentHp(1, freya, null); // TODO: Find better way for attack
freya.reduceCurrentHp(1, jinia, null);
- final L2QuestGuardInstance kegor = (L2QuestGuardInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
+ final FriendlyNpcInstance kegor = (FriendlyNpcInstance) addSpawn(SUPP_KEGOR, SUPP_KEGOR_SPAWN, false, 0, true, world.getId());
kegor.setIsRunning(true);
kegor.setIsInvul(true);
kegor.setCanReturnToSpawnPoint(false);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java
index 6a25c1827a..900b51ba44 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java
@@ -24,8 +24,8 @@ import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
@@ -153,7 +153,7 @@ public final class MuseumDungeon extends AbstractInstance
if (npc.isScriptValue(0) && (skill == SPOIL.getSkill()) && (caster.getTarget() == npc) && (npc.calculateDistance(caster, false, false) < 200))
{
final L2Npc toyron = npc.getInstanceWorld().getNpc(TOYRON);
- ((L2QuestGuardInstance) toyron).addDamageHate(npc, 0, 9999); // TODO: Find better way for attack
+ ((FriendlyNpcInstance) toyron).addDamageHate(npc, 0, 9999); // TODO: Find better way for attack
npc.reduceCurrentHp(1, toyron, null);
npc.setScriptValue(1);
}
@@ -277,7 +277,7 @@ public final class MuseumDungeon extends AbstractInstance
}
final L2Npc toyron = instance.getNpc(TOYRON);
- ((L2QuestGuardInstance) toyron).addDamageHate(target, 0, 9999); // TODO: Find better way for attack
+ ((FriendlyNpcInstance) toyron).addDamageHate(target, 0, 9999); // TODO: Find better way for attack
target.reduceCurrentHp(1, toyron, null);
((L2Npc) target).setScriptValue(1);
return new DamageReturn(false, true, false, target.getMaxHp() * DAMAGE_BY_SKILL);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
index e39457f8f7..424a90be84 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q10791_TheManOfMystery/Q10791_TheManOfMystery.java
@@ -19,8 +19,8 @@ package quests.Q10791_TheManOfMystery;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
+import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
@@ -187,7 +187,7 @@ public class Q10791_TheManOfMystery extends Quest
if (kills >= 5)
{
final L2Npc monster = addSpawn(NEEDLE_STAKATO_CAPTAIN, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 600000, false);
- final L2QuestGuardInstance kain = (L2QuestGuardInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
+ final FriendlyNpcInstance kain = (FriendlyNpcInstance) addSpawn(KAIN_VAN_HALTER, killer.getX() + getRandom(-100, 100), killer.getY() + getRandom(-100, 100), killer.getZ(), 0, true, 300000, false);
kain.setRunning();
kain.setIsInvul(true);
kain.reduceCurrentHp(1, monster, null); // TODO: Find better way for attack
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18800-18899.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18800-18899.xml
index 34c2fdf0f5..9f8df90464 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18800-18899.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18800-18899.xml
@@ -1846,7 +1846,7 @@
-
+
@@ -1924,7 +1924,7 @@
-
+
@@ -1963,7 +1963,7 @@
-
+
@@ -2002,7 +2002,7 @@
-
+
@@ -2042,7 +2042,7 @@
-
+
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18900-18999.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18900-18999.xml
index 75966350b5..754a6da7a1 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18900-18999.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/18900-18999.xml
@@ -1178,7 +1178,7 @@
-
+
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/19100-19199.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/19100-19199.xml
index 5cb9edb5fb..b4c20e4471 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/19100-19199.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/19100-19199.xml
@@ -822,7 +822,7 @@
-
+
HUMAN
MALE
@@ -848,7 +848,7 @@
-
+
HUMAN
MALE
@@ -1843,7 +1843,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32200-32299.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32200-32299.xml
index 0949eb529e..369aa7b80d 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32200-32299.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32200-32299.xml
@@ -3829,7 +3829,7 @@
-
+
HUMANOID
MALE
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32300-32399.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32300-32399.xml
index 70807a87df..50f2877f72 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32300-32399.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/32300-32399.xml
@@ -2189,7 +2189,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33000-33099.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33000-33099.xml
index 2484eea8ac..6b48dce4f4 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33000-33099.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33000-33099.xml
@@ -135,7 +135,7 @@
-
+
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33500-33599.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33500-33599.xml
index ae35753a24..00a4c4642d 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33500-33599.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33500-33599.xml
@@ -550,7 +550,7 @@
-
+
@@ -584,7 +584,7 @@
-
+
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33700-33799.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33700-33799.xml
index 5271de7920..ffe25a2e9a 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33700-33799.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33700-33799.xml
@@ -1044,7 +1044,7 @@
-
+
CONSTRUCT
MALE
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33900-33999.xml b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
index 61d40763e0..9933c4abf2 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/npcs/33900-33999.xml
@@ -2098,7 +2098,7 @@
-
+
HUMAN
MALE
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/enums/InstanceType.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/enums/InstanceType.java
index 677acb99d9..ff0cd3a8be 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/enums/InstanceType.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/enums/InstanceType.java
@@ -42,7 +42,6 @@ public enum InstanceType
// Attackable
L2Attackable(L2Npc),
L2GuardInstance(L2Attackable),
- L2QuestGuardInstance(L2GuardInstance),
L2MonsterInstance(L2Attackable),
L2BlockInstance(L2Attackable),
L2ChestInstance(L2MonsterInstance),
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java
index 257cc931d2..218b2ffb9e 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java
@@ -82,7 +82,6 @@ import com.l2jmobius.gameserver.model.TimeStamp;
import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.stat.CharStat;
import com.l2jmobius.gameserver.model.actor.status.CharStatus;
import com.l2jmobius.gameserver.model.actor.tasks.character.HitTask;
@@ -3631,7 +3630,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle)
{
// Path calculation -- overrides previous movement check
- if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance) || (this instanceof L2QuestGuardInstance))
+ if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance))
{
m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld());
if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
deleted file mode 100644
index 2a9a4ac654..0000000000
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.actor.instance;
-
-import com.l2jmobius.gameserver.enums.InstanceType;
-import com.l2jmobius.gameserver.model.actor.L2Attackable;
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jmobius.gameserver.model.events.EventDispatcher;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAttack;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * This class extends Guard class for quests, that require tracking of onAttack and onKill events from monsters' attacks.
- * @author GKR
- */
-public final class L2QuestGuardInstance extends L2GuardInstance
-{
- private boolean _isAutoAttackable = true;
- private boolean _isPassive = false;
-
- public L2QuestGuardInstance(L2NpcTemplate template)
- {
- super(template);
- setInstanceType(InstanceType.L2QuestGuardInstance);
- }
-
- @Override
- public void addDamage(L2Character attacker, int damage, Skill skill)
- {
- super.addDamage(attacker, damage, skill);
-
- if (attacker instanceof L2Attackable)
- {
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableAttack(null, this, damage, skill, false), this);
- }
- }
-
- @Override
- public boolean doDie(L2Character killer)
- {
- // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
- if (!super.doDie(killer))
- {
- return false;
- }
-
- if (killer instanceof L2Attackable)
- {
- // Delayed notification
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(null, this, false), this);
- }
- return true;
- }
-
- @Override
- public void addDamageHate(L2Character attacker, int damage, int aggro)
- {
- if (!_isPassive && !(attacker instanceof L2PcInstance))
- {
- super.addDamageHate(attacker, damage, aggro);
- }
- }
-
- public void setPassive(boolean state)
- {
- _isPassive = state;
- }
-
- @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- return _isAutoAttackable && !(attacker instanceof L2PcInstance);
- }
-
- @Override
- public void setAutoAttackable(boolean state)
- {
- _isAutoAttackable = state;
- }
-
- public boolean isPassive()
- {
- return _isPassive;
- }
-}
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/enums/InstanceType.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/enums/InstanceType.java
index 1c6247086a..a918695558 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/enums/InstanceType.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/enums/InstanceType.java
@@ -42,7 +42,6 @@ public enum InstanceType
// Attackable
L2Attackable(L2Npc),
L2GuardInstance(L2Attackable),
- L2QuestGuardInstance(L2GuardInstance),
L2MonsterInstance(L2Attackable),
L2BlockInstance(L2Attackable),
L2ChestInstance(L2MonsterInstance),
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java
index 257cc931d2..218b2ffb9e 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java
@@ -82,7 +82,6 @@ import com.l2jmobius.gameserver.model.TimeStamp;
import com.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.actor.stat.CharStat;
import com.l2jmobius.gameserver.model.actor.status.CharStatus;
import com.l2jmobius.gameserver.model.actor.tasks.character.HitTask;
@@ -3631,7 +3630,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (Config.PATHFINDING && ((originalDistance - distance) > 30) && !isControlBlocked() && !isInVehicle)
{
// Path calculation -- overrides previous movement check
- if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance) || (this instanceof L2QuestGuardInstance))
+ if (isPlayable() || isMinion() || isInCombat() || (this instanceof FriendlyNpcInstance))
{
m.geoPath = GeoEngine.getInstance().findPath(curX, curY, curZ, originalX, originalY, originalZ, getInstanceWorld());
if ((m.geoPath == null) || (m.geoPath.size() < 2)) // No path found
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
deleted file mode 100644
index 2a9a4ac654..0000000000
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2QuestGuardInstance.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package com.l2jmobius.gameserver.model.actor.instance;
-
-import com.l2jmobius.gameserver.enums.InstanceType;
-import com.l2jmobius.gameserver.model.actor.L2Attackable;
-import com.l2jmobius.gameserver.model.actor.L2Character;
-import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
-import com.l2jmobius.gameserver.model.events.EventDispatcher;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableAttack;
-import com.l2jmobius.gameserver.model.events.impl.character.npc.OnAttackableKill;
-import com.l2jmobius.gameserver.model.skills.Skill;
-
-/**
- * This class extends Guard class for quests, that require tracking of onAttack and onKill events from monsters' attacks.
- * @author GKR
- */
-public final class L2QuestGuardInstance extends L2GuardInstance
-{
- private boolean _isAutoAttackable = true;
- private boolean _isPassive = false;
-
- public L2QuestGuardInstance(L2NpcTemplate template)
- {
- super(template);
- setInstanceType(InstanceType.L2QuestGuardInstance);
- }
-
- @Override
- public void addDamage(L2Character attacker, int damage, Skill skill)
- {
- super.addDamage(attacker, damage, skill);
-
- if (attacker instanceof L2Attackable)
- {
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableAttack(null, this, damage, skill, false), this);
- }
- }
-
- @Override
- public boolean doDie(L2Character killer)
- {
- // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
- if (!super.doDie(killer))
- {
- return false;
- }
-
- if (killer instanceof L2Attackable)
- {
- // Delayed notification
- EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(null, this, false), this);
- }
- return true;
- }
-
- @Override
- public void addDamageHate(L2Character attacker, int damage, int aggro)
- {
- if (!_isPassive && !(attacker instanceof L2PcInstance))
- {
- super.addDamageHate(attacker, damage, aggro);
- }
- }
-
- public void setPassive(boolean state)
- {
- _isPassive = state;
- }
-
- @Override
- public boolean isAutoAttackable(L2Character attacker)
- {
- return _isAutoAttackable && !(attacker instanceof L2PcInstance);
- }
-
- @Override
- public void setAutoAttackable(boolean state)
- {
- _isAutoAttackable = state;
- }
-
- public boolean isPassive()
- {
- return _isPassive;
- }
-}