Dropped OnNpcCreatureSee in favor of OnCreatureSee event.
This commit is contained in:
		| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -36,7 +37,7 @@ public class MercenaryCaptain extends AbstractNpcAI | ||||
| 	 | ||||
| 	private MercenaryCaptain() | ||||
| 	{ | ||||
| 		addSeeCreatureId(MERCENARY_CAPTAIN); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MERCENARY_CAPTAIN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -49,14 +50,14 @@ public class MercenaryCaptain extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -36,7 +37,7 @@ public class Namo extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Namo() | ||||
| 	{ | ||||
| 		addSeeCreatureId(NAMO); | ||||
| 		setCreatureSeeId(this::onCreatureSee, NAMO); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -49,14 +50,14 @@ public class Namo extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -36,7 +37,7 @@ public class Rakun extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Rakun() | ||||
| 	{ | ||||
| 		addSeeCreatureId(RAKUN); | ||||
| 		setCreatureSeeId(this::onCreatureSee, RAKUN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -49,14 +50,14 @@ public class Rakun extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			startQuestTimer("BROADCAST_TEXT", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -79,7 +80,7 @@ public class Rooney extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Rooney() | ||||
| 	{ | ||||
| 		addSeeCreatureId(ROONEY); | ||||
| 		setCreatureSeeId(this::onCreatureSee, ROONEY); | ||||
| 		addSpawn(ROONEY, getRandomEntry(LOCATIONS), false, 0); | ||||
| 	} | ||||
| 	 | ||||
| @@ -124,16 +125,19 @@ public class Rooney extends AbstractNpcAI | ||||
| 		return null; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELCOME); | ||||
| 			startQuestTimer("teleport", 60000, npc, null); | ||||
| 			npc.setScriptValue(1); | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WELCOME); | ||||
| 				startQuestTimer("teleport", 60000, npc, null); | ||||
| 				npc.setScriptValue(1); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -44,7 +45,7 @@ public class GardenWatchman extends AbstractNpcAI | ||||
| 	public GardenWatchman() | ||||
| 	{ | ||||
| 		addSpawnId(GARDEN_WATCHMAN); | ||||
| 		addSeeCreatureId(GENESIS_TRAP_1, GENESIS_TRAP_2); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GENESIS_TRAP_1, GENESIS_TRAP_2); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -89,14 +90,14 @@ public class GardenWatchman extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			startQuestTimer("DEBUFF", 3000, npc, null, true); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger; | ||||
|  | ||||
| @@ -56,7 +57,7 @@ public class EntrancePortalToCrystalCaverns extends AbstractNpcAI | ||||
| 		addTalkId(CAVERNS_ENTRACE); | ||||
| 		addFirstTalkId(CAVERNS_ENTRACE); | ||||
| 		addSpawnId(CAVERNS_ENTRACE); | ||||
| 		addSeeCreatureId(CAVERNS_ENTRACE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, CAVERNS_ENTRACE); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -116,16 +117,15 @@ public class EntrancePortalToCrystalCaverns extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			creature.getActingPlayer().sendPacket(new OnEventTrigger(PRISON_ENTRACE_TRIGGER_1, true)); | ||||
| 			creature.getActingPlayer().sendPacket(new OnEventTrigger(PRISON_ENTRACE_TRIGGER_2, true)); | ||||
| 			updateTriggersForPlayer(creature.getActingPlayer(), getCurrentInstanceTemplateId()); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void updateTriggersForPlayer(PlayerInstance player, int currentTemplateId) | ||||
|   | ||||
| @@ -29,6 +29,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.items.instance.ItemInstance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| @@ -115,8 +116,8 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 		addAttackId(TREX); | ||||
| 		addAttackId(MONSTERS); | ||||
| 		addKillId(EGG, SAILREN, DEINO, ORNIT); | ||||
| 		addSeeCreatureId(TREX); | ||||
| 		addSeeCreatureId(MONSTERS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, TREX); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MONSTERS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -242,9 +243,10 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (CommonUtil.contains(MONSTERS, npc.getId())) | ||||
| 		{ | ||||
| 			if (creature.isPlayer()) | ||||
| @@ -298,7 +300,6 @@ public class PrimevalIsle extends AbstractNpcAI | ||||
| 			npc.setRunning(); | ||||
| 			npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.enums.ChatType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.NpcSay; | ||||
|  | ||||
| @@ -43,8 +44,8 @@ public class AltarOfSacrifice extends AbstractNpcAI | ||||
| 	 | ||||
| 	private AltarOfSacrifice() | ||||
| 	{ | ||||
| 		addSeeCreatureId(JENNAS_GUARD); | ||||
| 		addSpawnId(IMMERIAL, JENNAS_GUARD, GIGGLE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, JENNAS_GUARD); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -71,15 +72,15 @@ public class AltarOfSacrifice extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if ((creature != null) && creature.isPlayer() && _jenas_guard.isScriptValue(0)) | ||||
| 		{ | ||||
| 			startQuestTimer("msg_text", 3000, npc, null); | ||||
| 			_jenas_guard.setScriptValue(1); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Summon; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| @@ -64,9 +65,9 @@ public class SilentValley extends AbstractNpcAI | ||||
| 		addAttackId(CHEST, GUARD1, GUARD2); | ||||
| 		addEventReceivedId(GUARD1, GUARD2); | ||||
| 		addKillId(MOBS); | ||||
| 		addSeeCreatureId(MOBS); | ||||
| 		addSeeCreatureId(GUARD1, GUARD2); | ||||
| 		addSpawnId(CHEST, GUARD2); | ||||
| 		setCreatureSeeId(this::onCreatureSee, MOBS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GUARD1, GUARD2); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -153,12 +154,13 @@ public class SilentValley extends AbstractNpcAI | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayable()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = (isSummon) ? ((Summon) creature).getOwner() : creature.getActingPlayer(); | ||||
| 			final PlayerInstance player = (creature.isSummon()) ? ((Summon) creature).getOwner() : creature.getActingPlayer(); | ||||
| 			if ((npc != null) && ((npc.getId() == GUARD1) || (npc.getId() == GUARD2))) | ||||
| 			{ | ||||
| 				npc.setTarget(player); | ||||
| @@ -170,7 +172,6 @@ public class SilentValley extends AbstractNpcAI | ||||
| 				addAttackPlayerDesire(npc, player); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
| @@ -77,9 +78,9 @@ public class Wastelands extends AbstractNpcAI | ||||
| 	 | ||||
| 	private Wastelands() | ||||
| 	{ | ||||
| 		addSpawnId(COMMANDER, GUARD, DECO_GUARD, REGENERATED_KANILOV, REGENERATED_POSLOF, SAKUM); | ||||
| 		addSeeCreatureId(JOEL, SCHUAZEN, COMMANDO, COMMANDO_CAPTAIN); | ||||
| 		addKillId(REGENERATED_POSLOF, SAKUM); | ||||
| 		addSpawnId(COMMANDER, GUARD, DECO_GUARD, REGENERATED_KANILOV, REGENERATED_POSLOF, SAKUM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, JOEL, SCHUAZEN, COMMANDO, COMMANDO_CAPTAIN); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -187,14 +188,14 @@ public class Wastelands extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK)) | ||||
| 		{ | ||||
| 			startQuestTimer("START_ATTACK", 250, npc, null); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -34,6 +34,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.GrandBossInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| import org.l2jmobius.gameserver.model.skills.SkillCaster; | ||||
| @@ -110,8 +111,8 @@ public class Baium extends AbstractNpcAI | ||||
| 		addStartNpc(ANG_VORTEX, TELE_CUBE, BAIUM_STONE); | ||||
| 		addAttackId(BAIUM, ARCHANGEL); | ||||
| 		addKillId(BAIUM); | ||||
| 		addSeeCreatureId(BAIUM); | ||||
| 		addSpellFinishedId(BAIUM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BAIUM); | ||||
| 		 | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(BAIUM); | ||||
| 		 | ||||
| @@ -560,12 +561,12 @@ public class Baium extends AbstractNpcAI | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (!zone.isInsideZone(creature) || (creature.isNpc() && (creature.getId() == BAIUM_STONE))) | ||||
| 		{ | ||||
| 			return super.onSeeCreature(npc, creature, isSummon); | ||||
| 			return; | ||||
| 		} | ||||
| 		 | ||||
| 		if (creature.isPlayer() && !creature.isDead() && (_standbyPlayer == null)) | ||||
| @@ -573,6 +574,7 @@ public class Baium extends AbstractNpcAI | ||||
| 			_standbyPlayer = (PlayerInstance) creature; | ||||
| 		} | ||||
| 		 | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		if (creature.isInCategory(CategoryType.CLERIC_GROUP)) | ||||
| 		{ | ||||
| 			if (npc.getCurrentHp() < (npc.getMaxHp() * 0.25)) | ||||
| @@ -597,7 +599,6 @@ public class Baium extends AbstractNpcAI | ||||
| 			refreshAiParams(creature, npc, 10000, 1000); | ||||
| 		} | ||||
| 		manageSkills(npc); | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -59,9 +60,9 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 		super(TEMPLATE_ID); | ||||
| 		addStartNpc(JINIA); | ||||
| 		addTalkId(JINIA); | ||||
| 		addSeeCreatureId(BATTALION_LEADER, LEGIONNAIRE, MERCENARY_ARCHER); | ||||
| 		addSpawnId(FREYA); | ||||
| 		addSpellFinishedId(FREYA); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BATTALION_LEADER, LEGIONNAIRE, MERCENARY_ARCHER); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -139,9 +140,10 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		{ | ||||
| 			npc.setScriptValue(1); | ||||
| @@ -157,7 +159,6 @@ public class IceQueensCastle extends AbstractInstance | ||||
| 			}); | ||||
| 			startQuestTimer("ATTACK_KNIGHT", 5000, npc, null); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -46,6 +46,7 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDamageReceived; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -205,9 +206,9 @@ public class Lindvior extends AbstractNpcAI | ||||
| 		addExitZoneId(ZONE_ID); | ||||
| 		addKillId(LINDVIOR_GROUND, LINDVIOR_FLY, LINDVIOR_RAID, NPC_GENERATOR); | ||||
| 		addSkillSeeId(NPC_GENERATOR); | ||||
| 		addSpawnId(NPC_ATTACKER_GENERATORS, NPC_ATTACKER_GENERATORS_1, LYN_DRACO_ATTACKER_GENERATORS, GENERATOR_GUARD, NPC_GENERATOR); | ||||
| 		addFirstTalkId(NPC_GENERATOR); | ||||
| 		addSeeCreatureId(INVISIBLE); | ||||
| 		addSpawnId(NPC_ATTACKER_GENERATORS, NPC_ATTACKER_GENERATORS_1, LYN_DRACO_ATTACKER_GENERATORS, GENERATOR_GUARD, NPC_GENERATOR); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE); | ||||
| 		_zoneLair = ZoneManager.getInstance().getZoneById(ZONE_ID, NoSummonFriendZone.class); | ||||
| 		// Unlock | ||||
| 		final StatSet info = GrandBossManager.getInstance().getStatSet(LINDVIOR_RAID); | ||||
| @@ -508,18 +509,17 @@ public class Lindvior extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature player, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		setLindviorSpawnTask(); | ||||
| 		npc.getSpawn().stopRespawn(); | ||||
| 		npc.deleteMe(); | ||||
| 		return super.onSeeCreature(npc, player, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	private void nextStage(int _taskId) | ||||
| 	private void nextStage(int taskId) | ||||
| 	{ | ||||
| 		switch (_taskId) | ||||
| 		switch (taskId) | ||||
| 		{ | ||||
| 			case 1: // Spawn Generators | ||||
| 			{ | ||||
|   | ||||
| @@ -22,9 +22,9 @@ import org.l2jmobius.gameserver.ai.CtrlIntention; | ||||
| import org.l2jmobius.gameserver.geoengine.GeoEngine; | ||||
| import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation; | ||||
|  | ||||
| @@ -43,8 +43,8 @@ public class Vortex extends AbstractNpcAI | ||||
| 	public Vortex() | ||||
| 	{ | ||||
| 		super(); | ||||
| 		addSeeCreatureId(SMALL_VORTEX, BIG_VORTEX); | ||||
| 		addSpawnId(SMALL_VORTEX, BIG_VORTEX); | ||||
| 		setCreatureSeeId(this::onCreatureSee, SMALL_VORTEX, BIG_VORTEX); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -112,9 +112,9 @@ public class Vortex extends AbstractNpcAI | ||||
| 		return super.onAdvEvent(event, npc, player); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		switch (npc.getId()) | ||||
| 		{ | ||||
| 			case SMALL_VORTEX: | ||||
| @@ -128,7 +128,6 @@ public class Vortex extends AbstractNpcAI | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Playable; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.skills.BuffInfo; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| @@ -317,6 +318,7 @@ public class Trasken extends AbstractNpcAI | ||||
| 		addExitZoneId(ZONE_ID); | ||||
| 		addEnterZoneId(ZONE_ID_HEART); | ||||
| 		addExitZoneId(ZONE_ID_HEART); | ||||
| 		setCreatureSeeId(this::onCreatureSee, LAVRA_1, LAVRA_2, LAVRA_3, TRADJAN, TIE, BIG_TIE); | ||||
| 		init(); | ||||
| 		if (DoorData.getInstance().getDoor(DOOR) != null) | ||||
| 		{ | ||||
| @@ -537,19 +539,21 @@ public class Trasken extends AbstractNpcAI | ||||
| 		return super.onSpawn(npc); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		if (npc.isDead() || (creature == null)) | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		if (npc.isDead()) | ||||
| 		{ | ||||
| 			return null; | ||||
| 			return; | ||||
| 		} | ||||
| 		 | ||||
| 		if ((npc.getId() == LAVRA_1) || (npc.getId() == LAVRA_2) || (npc.getId() == LAVRA_3) || (npc.getId() == TRADJAN)) | ||||
| 		{ | ||||
| 			addAttackPlayerDesire(npc, getRandomEntry(_zoneLair.getPlayersInside())); | ||||
| 		} | ||||
| 		else if ((npc.getId() == TIE) || (npc.getId() == BIG_TIE)) | ||||
| 		{ | ||||
| 			final Creature creature = event.getSeen(); | ||||
| 			if (getRandom(100) < 60) | ||||
| 			{ | ||||
| 				npc.setTarget(creature); | ||||
| @@ -563,7 +567,6 @@ public class Trasken extends AbstractNpcAI | ||||
| 				addAttackPlayerDesire(npc, (Playable) creature); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -30,6 +30,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.clan.ClanPrivilege; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.residences.ClanHall; | ||||
| import org.l2jmobius.gameserver.model.residences.ResidenceFunction; | ||||
| @@ -103,7 +104,7 @@ public class ClanHallManager extends AbstractNpcAI | ||||
| 		addStartNpc(CLANHALL_MANAGERS); | ||||
| 		addTalkId(CLANHALL_MANAGERS); | ||||
| 		addFirstTalkId(CLANHALL_MANAGERS); | ||||
| 		addSeeCreatureId(CLANHALL_MANAGERS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, CLANHALL_MANAGERS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -485,18 +486,18 @@ public class ClanHallManager extends AbstractNpcAI | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			final ClanHall clanHall = npc.getClanHall(); | ||||
| 			if (clanHall != null) | ||||
| 			{ | ||||
| 				creature.getActingPlayer().sendPacket(new AgitDecoInfo(clanHall)); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	private void updateVisualEffects(ClanHall clanHall, Npc npc) | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
|  | ||||
| import ai.AbstractNpcAI; | ||||
|  | ||||
| @@ -34,17 +35,17 @@ public class Gordon extends AbstractNpcAI | ||||
| 	private Gordon() | ||||
| 	{ | ||||
| 		addSpawnId(GORDON); | ||||
| 		addSeeCreatureId(GORDON); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GORDON); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() && ((PlayerInstance) creature).isCursedWeaponEquipped()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			addAttackPlayerDesire(npc, (PlayerInstance) creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| @@ -66,8 +67,7 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 		addStartNpc(KAIN_VAN_HALTER); | ||||
| 		addFirstTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD); | ||||
| 		addTalkId(KAIN_VAN_HALTER, GRAIL, MYSTERIOUS_WIZARD); | ||||
| 		addSeeCreatureId(FERIN); | ||||
| 		addSeeCreatureId(VAN_HALTER); | ||||
| 		setCreatureSeeId(this::onCreatureSee, FERIN, VAN_HALTER); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -501,12 +501,13 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Npc npc = (Npc) event.getSeer(); | ||||
| 		final Instance world = npc.getInstanceWorld(); | ||||
| 		if (world != null) | ||||
| 		{ | ||||
| 			final Creature creature = event.getSeen(); | ||||
| 			switch (npc.getId()) | ||||
| 			{ | ||||
| 				case FERIN: | ||||
| @@ -527,7 +528,6 @@ public class ChamberOfProphecies extends AbstractInstance | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -30,6 +30,7 @@ import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -97,7 +98,7 @@ public class HarnakUndergroundRuins extends AbstractInstance | ||||
| 	{ | ||||
| 		super(TEMPLATE_ID); | ||||
| 		registerMobs(KRAKIA_BATHUS, KRAKIA_CARCASS, KRAKIA_LOTUS, RAKZAN, WEISS_KHAN, BAMONTI, SEKNUS, WEISS_ELE, HARNAKS_WRAITH); | ||||
| 		addSeeCreatureId(POWER_SOURCES); | ||||
| 		setCreatureSeeId(this::onCreatureSee, POWER_SOURCES); | ||||
| 		addEnterZoneId(ZONE_ROOM_2, ZONE_ROOM_3); | ||||
| 		addFirstTalkId(SEAL_CONTROL_DEVICE); | ||||
| 		addTalkId(HADEL); | ||||
| @@ -673,18 +674,18 @@ public class HarnakUndergroundRuins extends AbstractInstance | ||||
| 		return super.onAttack(npc, player, damage, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			startQuestTimer("cast_release_power", 2000, npc, creature.getActingPlayer()); | ||||
| 			if (npc.getId() == POWER_SOURCE) | ||||
| 			{ | ||||
| 				startQuestTimer("whisper_to_player", 2000, npc, creature.getActingPlayer()); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -89,10 +90,10 @@ public class KartiaHelperAdolph extends AbstractNpcAI | ||||
| 	 | ||||
| 	private KartiaHelperAdolph() | ||||
| 	{ | ||||
| 		addSpellFinishedId(KARTIA_ADOLPH); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ADOLPH); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_ADOLPH); | ||||
| 		addSpellFinishedId(KARTIA_ADOLPH); | ||||
| 		addSeeCreatureId(KARTIA_ADOLPH); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ADOLPH); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -287,14 +288,14 @@ public class KartiaHelperAdolph extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public static void main(String[] args) | ||||
|   | ||||
| @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -87,7 +88,7 @@ public class KartiaHelperBarton extends AbstractNpcAI | ||||
| 	{ | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_BARTON); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_BARTON); | ||||
| 		addSeeCreatureId(KARTIA_BARTON); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_BARTON); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -145,18 +146,17 @@ public class KartiaHelperBarton extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			((Npc) event.getSeer()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			((Npc) event.getSeer()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -110,7 +111,7 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 	private KartiaHelperElise() | ||||
| 	{ | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 		addSeeCreatureId(KARTIA_ELISE); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ELISE); | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ELISE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -242,11 +243,12 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer() || (creature instanceof FriendlyNpcInstance)) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			final StatSet npcVars = npc.getVariables(); | ||||
| 			if (creature.isPlayer()) | ||||
| 			{ | ||||
| @@ -269,7 +271,6 @@ public class KartiaHelperElise extends AbstractNpcAI | ||||
| 				npcVars.set("HAYUK_OBJECT", creature); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureKill(OnCreatureDeath event) | ||||
|   | ||||
| @@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
|  | ||||
| @@ -82,7 +83,7 @@ public class KartiaHelperEliyah extends AbstractNpcAI | ||||
| 	{ | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_ELIYAH); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_ELIYAH); | ||||
| 		addSeeCreatureId(KARTIA_ELIYAH); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_ELIYAH); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -136,18 +137,17 @@ public class KartiaHelperEliyah extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			((Npc) event.getSeer()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			((Npc) event.getSeer()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void onCreatureAttacked(OnCreatureAttacked event) | ||||
|   | ||||
| @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -91,7 +92,7 @@ public class KartiaHelperGuardian extends AbstractNpcAI | ||||
| 	{ | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_GUARDIANS); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_GUARDIANS); | ||||
| 		addSeeCreatureId(KARTIA_GUARDIANS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_GUARDIANS); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -154,22 +155,21 @@ public class KartiaHelperGuardian extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			((Npc) event.getSeer()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			((Npc) event.getSeer()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ELIYAH, creature.getId())) | ||||
| 		{ | ||||
| 			npc.getVariables().set("ELIYAH_OBJECT", creature); | ||||
| 			((Npc) event.getSeer()).getVariables().set("ELIYAH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.instance.FriendlyNpcInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureDeath; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.instance.OnInstanceStatusChange; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -88,7 +89,7 @@ public class KartiaHelperHayuk extends AbstractNpcAI | ||||
| 	{ | ||||
| 		setCreatureKillId(this::onCreatureKill, KARTIA_HAYUK); | ||||
| 		setCreatureAttackedId(this::onCreatureAttacked, KARTIA_HAYUK); | ||||
| 		addSeeCreatureId(KARTIA_HAYUK); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KARTIA_HAYUK); | ||||
| 		setInstanceStatusChangeId(this::onInstanceStatusChange, KARTIA_SOLO_INSTANCES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -151,18 +152,17 @@ public class KartiaHelperHayuk extends AbstractNpcAI | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 			((Npc) event.getSeer()).getVariables().set("PLAYER_OBJECT", creature.getActingPlayer()); | ||||
| 		} | ||||
| 		else if (CommonUtil.contains(KARTIA_ADOLPH, creature.getId())) | ||||
| 		{ | ||||
| 			npc.getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 			((Npc) event.getSeer()).getVariables().set("ADOLPH_OBJECT", creature); | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	public void useRandomSkill(Npc npc) | ||||
|   | ||||
| @@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -85,11 +86,11 @@ public class NornilsGarden extends AbstractInstance | ||||
| 		addTalkId(BOZ_CORE); | ||||
| 		addFirstTalkId(BOZ_CORE); | ||||
| 		addAttackId(SPICULA_ZERO); | ||||
| 		addSpawnId(ATTACABLE_MONSTERS); | ||||
| 		addKillId(ATTACABLE_MONSTERS); | ||||
| 		addKillId(SPICULA_ZERO); | ||||
| 		addKillId(BOZ_STAGE1, BOZ_STAGE2, BOZ_STAGE3, BOZ_STAGE4); | ||||
| 		addSeeCreatureId(BOZ_STAGE1); | ||||
| 		addSpawnId(ATTACABLE_MONSTERS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BOZ_STAGE1); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -282,16 +283,19 @@ public class NornilsGarden extends AbstractInstance | ||||
| 		return "33781.html"; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		if ((npc.getId() == BOZ_STAGE1) && creature.isPlayable() && npc.isScriptValue(0)) | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayable()) | ||||
| 		{ | ||||
| 			startQuestTimer("stage1", 3000, npc, null); | ||||
| 			npc.setTargetable(false); | ||||
| 			npc.setScriptValue(1); | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				startQuestTimer("stage1", 3000, npc, null); | ||||
| 				npc.setTargetable(false); | ||||
| 				npc.setScriptValue(1); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneType; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| @@ -57,9 +58,9 @@ public class PailakaSongOfIceAndFire extends AbstractInstance | ||||
| 		addTalkId(ADLER1); | ||||
| 		addAttackId(BOTTLE, BRAZIER); | ||||
| 		addExitZoneId(ZONE); | ||||
| 		addSeeCreatureId(GARGOS); | ||||
| 		addSpawnId(BLOOM); | ||||
| 		addKillId(BLOOM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, GARGOS); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -168,15 +169,18 @@ public class PailakaSongOfIceAndFire extends AbstractInstance | ||||
| 		return super.onExitZone(creature, zone); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		if (npc.isScriptValue(0) && creature.isPlayer()) | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			npc.setScriptValue(1); | ||||
| 			startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer()); | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				npc.setScriptValue(1); | ||||
| 				startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer()); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.itemcontainer.Inventory; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -59,7 +60,7 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 		addStartNpc(YUMI); | ||||
| 		addTalkId(YUMI, WENDY, BOX, STONES, NEWYEAR); | ||||
| 		addKillId(GUARDIAN); | ||||
| 		addSeeCreatureId(STONES); | ||||
| 		setCreatureSeeId(this::onCreatureSee, STONES); | ||||
| 		registerQuestItems(STARSTONE, STARSTONE2, DETCTOR, DETCTOR2, LETTER); | ||||
| 	} | ||||
| 	 | ||||
| @@ -404,9 +405,9 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 		return super.onKill(npc, player, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(creature.getActingPlayer(), false); | ||||
| @@ -418,7 +419,6 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest | ||||
| 				showOnScreenMsg(creature.getActingPlayer(), NpcStringId.THE_RADIO_SIGNAL_DETECTOR_IS_RESPONDING_A_SUSPICIOUS_PILE_OF_STONES_CATCHES_YOUR_EYE, 2, 4500); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.events.annotations.Id; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureAttacked; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.returns.TerminateReturn; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -58,7 +59,7 @@ public class Q00454_CompletelyLost extends Quest | ||||
| 		addStartNpc(INJURED_SOLDIER); | ||||
| 		addTalkId(INJURED_SOLDIER, ERMIAN); | ||||
| 		addMoveFinishedId(INJURED_SOLDIER); | ||||
| 		addSeeCreatureId(INJURED_SOLDIER); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INJURED_SOLDIER); | ||||
| 		addEventReceivedId(INJURED_SOLDIER); | ||||
| 	} | ||||
| 	 | ||||
| @@ -397,14 +398,17 @@ public class Q00454_CompletelyLost extends Quest | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		if (creature.isPlayer() && npc.isScriptValue(0)) | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			addAttackPlayerDesire(npc, creature.getActingPlayer(), 10); | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			if (npc.isScriptValue(0)) | ||||
| 			{ | ||||
| 				addAttackPlayerDesire(npc, creature.getActingPlayer(), 10); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -24,9 +24,9 @@ import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.QuestSound; | ||||
| import org.l2jmobius.gameserver.enums.QuestType; | ||||
| import org.l2jmobius.gameserver.model.Party; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.NpcLogListHolder; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -60,8 +60,8 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 		addStartNpc(DETON); | ||||
| 		addTalkId(SETTLEN); | ||||
| 		addKillId(FLAME_SCORPION, FLAME_GOLEM, FLAME_SCARAB, SEAL_TOMBSTONE); | ||||
| 		addSeeCreatureId(DETON); | ||||
| 		registerQuestItems(FLAME_FLOWER); | ||||
| 		setCreatureSeeId(this::onCreatureSee, DETON); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -115,10 +115,9 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final PlayerInstance player = creature.getActingPlayer(); | ||||
| 		final PlayerInstance player = event.getSeen().getActingPlayer(); | ||||
| 		if (player != null) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(player, true); | ||||
| @@ -128,7 +127,6 @@ public class Q00833_DevilsTreasureTauti extends Quest | ||||
| 				qs.startQuest(); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,9 +19,9 @@ package quests.Q00835_PitiableMelisa; | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.QuestType; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -55,9 +55,9 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 		super(835); | ||||
| 		addStartNpc(KANNA); | ||||
| 		addTalkId(SETTLEN); | ||||
| 		addSeeCreatureId(KANNA); | ||||
| 		addKillId(MONSTERS); | ||||
| 		registerQuestItems(ICE_CRYSTAL_SHARD); | ||||
| 		setCreatureSeeId(this::onCreatureSee, KANNA); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -119,10 +119,9 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final PlayerInstance player = creature.getActingPlayer(); | ||||
| 		final PlayerInstance player = event.getSeen().getActingPlayer(); | ||||
| 		if (player != null) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState(player, true); | ||||
| @@ -132,7 +131,6 @@ public class Q00835_PitiableMelisa extends Quest | ||||
| 				qs.startQuest(); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -17,6 +17,7 @@ | ||||
| package quests.Q10369_NoblesseSoulTesting; | ||||
|  | ||||
| import org.l2jmobius.Config; | ||||
| import org.l2jmobius.commons.concurrent.ThreadPool; | ||||
| import org.l2jmobius.commons.util.CommonUtil; | ||||
| import org.l2jmobius.gameserver.enums.Movie; | ||||
| import org.l2jmobius.gameserver.enums.QuestSound; | ||||
| @@ -26,6 +27,7 @@ import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| @@ -111,13 +113,13 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 		addKillId(ONE_WHO_EATS_PROPHECIES); | ||||
| 		addKillId(HOT_SPRINGS); | ||||
| 		addKillId(ISLE_OF_PRAYER); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC_NOBLE); | ||||
| 		addSpawnId(INVISIBLE_NPC_NOBLE_2, FLAME_FLOWER, LANYA, HELPING_TREE); | ||||
| 		addSkillSeeId(INVISIBLE_NPC_NOBLE, FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE); | ||||
| 		addFirstTalkId(FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE, HELPING_TREE); | ||||
| 		addCondMinLevel(MIN_LEVEL, "31281-13.htm"); | ||||
| 		addCondIsSubClassActive(""); | ||||
| 		registerQuestItems(SUMMONING_STONE, NOVELLA_PROPHECY, EMPTY_HOT_SPRINGS_WATER_BOTTLE, HOT_SPRINGS_WATER_BOTTLE, DURABLE_LEATHER, TROWEL, FIRE_ENERGY, HARD_FOSSIL_CONTAINING_WATER_ENERGY, HELPING_SEED, ASHES_OF_REMNANTS, SOE_HOT_SPRINGS, SOE_ADEN_CASTLE, SOE_RUNE_CASTLE, SOE_ISLE_OF_PRAYER, SOE_FORGE_OF_GODS, SOE_SECRET_ROOM); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC_NOBLE); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -496,9 +498,9 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -510,7 +512,10 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 					if (!hasQuestItems(player, HOT_SPRINGS_WATER_BOTTLE)) | ||||
| 					{ | ||||
| 						showOnScreenMsg(player, NpcStringId.OPEN_THE_ITEM_SCREEN_AND_DOUBLE_CLICK_THE_EMPTY_WATER_BOTTLE, ExShowScreenMessage.TOP_CENTER, 5000); | ||||
| 						getTimers().addTimer("LOL", null, 5000, npc, player, event -> showOnScreenMsg(event.getPlayer(), NpcStringId.IF_YOU_DOUBLE_CLICK_THE_EMPTY_BOTTLE_IT_WILL_BECOME_FULL_OF_WATER, ExShowScreenMessage.TOP_CENTER, 5000)); | ||||
| 						ThreadPool.schedule(() -> | ||||
| 						{ | ||||
| 							showOnScreenMsg(player, NpcStringId.IF_YOU_DOUBLE_CLICK_THE_EMPTY_BOTTLE_IT_WILL_BECOME_FULL_OF_WATER, ExShowScreenMessage.TOP_CENTER, 5000); | ||||
| 						}, 5000); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (qs.isCond(16)) | ||||
| @@ -522,7 +527,6 @@ public class Q10369_NoblesseSoulTesting extends Quest | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -30,6 +30,7 @@ import org.l2jmobius.gameserver.model.events.EventType; | ||||
| import org.l2jmobius.gameserver.model.events.ListenerRegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent; | ||||
| import org.l2jmobius.gameserver.model.events.annotations.RegisterType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerSocialAction; | ||||
| import org.l2jmobius.gameserver.model.holders.SkillHolder; | ||||
| import org.l2jmobius.gameserver.model.instancezone.Instance; | ||||
| @@ -112,10 +113,10 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 		addFirstTalkId(ALTAR_OF_SHILEN, MOTHER_TREE, PAAGRIO_TEMPLE, DESERTED_DWARVEN_HOUSE, CAVE_OF_SOULS); | ||||
| 		addTalkId(RAINA, MORELYN, LANYA, LADY_OF_THE_LAKE, NERUPA, ENFEUX, INNOCENTIN, VULCAN, MIXING_URN, WESLEY, HEINE_WATER_SOURCE, MYSTERIOUS_DARK_KNIGHT, DARIN, ROXXY, BIOTIN); | ||||
| 		addSkillSeeId(ALTAR_OF_SHILEN, MOTHER_TREE, PAAGRIO_TEMPLE, DESERTED_DWARVEN_HOUSE, CAVE_OF_SOULS); | ||||
| 		addSeeCreatureId(INVISIBLE_ANGHEL_WATERFALL_NPC); | ||||
| 		addKillId(SHILEN_MESSENGER); | ||||
| 		addCondMinLevel(MIN_LEVEL, "33491-08.html"); | ||||
| 		addCondNotRace(Race.ERTHEIA, "33491-09.html"); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_ANGHEL_WATERFALL_NPC); | ||||
| 		registerQuestItems(MYSTERIOUS_LETTER, HEINE_FROM_THE_GARDEN_OF_EVA, CLEAREST_WATER, BRIGHTEST_LIGHT, PUREST_SOUL, FIERCEST_FLAME, FONDEST_HEART, VULCUN_TRUE_GOLD, VULCUN_PURE_SILVER, VULCUN_BLOOD_FIRE, SCROLL_OF_ESCAPE_VALLEY_OF_SAINTS, SCROLL_OF_ESCAPE_FORGE_OF_THE_GODS, SCROLL_OF_ESCAPE_IVORY_TOWER, SCROLL_OF_ESCAPE_DWARVEN_VILLAGE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -689,11 +690,12 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 		return super.onKill(npc, killer, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final Npc npc = (Npc) event.getSeer(); | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| 			final QuestState qs = getQuestState(player, false); | ||||
| 			if ((npc.getId() == INVISIBLE_ANGHEL_WATERFALL_NPC) && (qs != null) && qs.isCond(7)) | ||||
| @@ -701,7 +703,6 @@ public class Q10385_RedThreadOfFate extends Quest | ||||
| 				showOnScreenMsg(player, NpcStringId.YOU_HAVE_REACHED_ANGHEL_WATERFALL_GO_INSIDE_THE_CAVE, ExShowScreenMessage.TOP_CENTER, 5000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,6 +19,7 @@ package quests.Q10390_KekropusLetter; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -62,7 +63,7 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 		super(10390); | ||||
| 		addStartNpc(RAYMOND, RAINS, TOBIAS, DRIKUS, MENDIO, GERSHWIN, ESRANDELL, ELLENIA); | ||||
| 		addTalkId(RAYMOND, RAINS, TOBIAS, DRIKUS, MENDIO, GERSHWIN, ESRANDELL, ELLENIA, BATHIS, GOSTA, ELI); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(KEKROPUS_LETTER, HAINE_SOE, ALLIGATOR_ISLAND_SOE); | ||||
| 		addCondCompletedQuest(Q10360_CertificationOfFate.class.getSimpleName(), ""); | ||||
| 	} | ||||
| @@ -296,9 +297,9 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -308,7 +309,6 @@ public class Q10390_KekropusLetter extends Quest | ||||
| 				showOnScreenMsg(player, NpcStringId.ALLIGATOR_ISLAND_IS_A_GOOD_HUNTING_ZONE_FOR_LV_40_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	private boolean isRightMaster(Npc npc, PlayerInstance player) | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,8 +51,7 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 	{ | ||||
| 		super(10393); | ||||
| 		addTalkId(FLUTER, KELIOS); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_2"); | ||||
| @@ -127,9 +127,9 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -139,6 +139,5 @@ public class Q10393_KekropusLetterAClueCompleted extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.OUTLAW_FOREST_IS_A_GOOD_HUNTING_ZONE_FOR_LV_46_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| } | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 	{ | ||||
| 		super(10397); | ||||
| 		addTalkId(MOUEN, ANDY); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_3"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN, SOE_SEA_OF_SPORES); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +130,9 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,6 +142,5 @@ public class Q10397_KekropusLetterASuspiciousBadge extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SEA_OF_SPORES_IS_A_GOOD_HUNTING_ZONE_FOR_LV_52_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| } | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 	{ | ||||
| 		super(10401); | ||||
| 		addTalkId(PATERSON, EBLUNE); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_4"); | ||||
| 		setStartLocation(SOE_TOWN_OF_ADEN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_ADEN, SOE_FORSAKEN_PLAINS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +130,9 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,6 +142,5 @@ public class Q10401_KekropusLetterDecodingTheBadge extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FORSAKEN_PLAINS_IA_A_GOOD_HUNTING_ZONE_FOR_LV_58_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| } | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 	{ | ||||
| 		super(10404); | ||||
| 		addTalkId(PATERSON, SHUVANN); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartLocation(SOE_TOWN_OF_ADEN, TELEPORT_LOC); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_5"); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_ADEN, SOE_FIELDS_OF_MASSACRE); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +130,9 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,6 +142,5 @@ public class Q10404_KekropusLetterAHiddenMeaning extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FIELDS_OF_MASSACRE_IS_A_GOOD_HUNTING_ZONE_FOR_LV_61_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| } | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 	{ | ||||
| 		super(10408); | ||||
| 		addTalkId(MATHIAS, DOKARA); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_6"); | ||||
| 		setStartLocation(SOE_TOWN_OF_RUNE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_RUNE, SOE_SWAMP_OF_SCREAMS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +131,9 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +143,6 @@ public class Q10408_KekropusLetterTheSwampOfScreams extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SWAMP_OF_SCREAMS_IA_A_GOOD_HUNTING_ZONE_FOR_LV_65_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 	{ | ||||
| 		super(10411); | ||||
| 		addTalkId(MATHIAS, HATUBA); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_7"); | ||||
| 		setStartLocation(SOE_TOWN_OF_RUNE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_RUNE, SOE_FOREST_OF_THE_DEAD); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +131,9 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +143,6 @@ public class Q10411_KekropusLetterTheForestOfTheDead extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.FOREST_OF_THE_DEAD_IS_A_GOOD_HUNTING_ZONE_FOR_LV_65_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 	{ | ||||
| 		super(10414); | ||||
| 		addTalkId(ANDREI, JANITT); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_8"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_WALL_OF_ARGOS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +131,9 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +143,6 @@ public class Q10414_KekropusLetterWithCourage extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.WALL_OF_ARGOS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_70_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,8 +52,7 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 	{ | ||||
| 		super(10415); | ||||
| 		addTalkId(ANDREI, JANITT); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_8"); | ||||
| @@ -127,9 +127,9 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -139,7 +139,6 @@ public class Q10415_KekropusLetterWithWisdom extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.WALL_OF_ARGOS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_70_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,12 +51,11 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 	{ | ||||
| 		super(10419); | ||||
| 		addTalkId(ANDREI, HANSEN); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		 | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_VARKA_SILENOS_BARRACKS); | ||||
| 	} | ||||
| 	 | ||||
| @@ -131,9 +131,9 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +143,6 @@ public class Q10419_KekropusLetterKampfsWhereabouts extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.VARKA_SILENOS_BARRACKS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_76_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -50,11 +51,11 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 	{ | ||||
| 		super(10424); | ||||
| 		addTalkId(ANDREI, LUGONNES); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_10"); | ||||
| 		setStartLocation(SOE_TOWN_OF_GODDARD, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_GODDARD, SOE_KETRA_ORC_OUTPOST); | ||||
| 	} | ||||
| 	 | ||||
| @@ -130,9 +131,9 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -142,7 +143,6 @@ public class Q10424_KekropusLetterBelosWhereabouts extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.KETRA_ORC_OUTPOST_IS_A_GOOD_HUNTING_ZONE_FOR_LV_76_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -52,11 +53,11 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 	{ | ||||
| 		super(10430); | ||||
| 		addTalkId(VISHOTSKY, JOKEL); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_SCHUTTGART, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_SCHUTTGART, SOE_DEN_OF_EVIL); | ||||
| 		addCondInCategory(CategoryType.MAGE_GROUP, "nocond.html"); | ||||
| 	} | ||||
| @@ -133,9 +134,9 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -145,7 +146,6 @@ public class Q10430_KekropusLetterTrackingTheEvil extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.DEN_OF_EVIL_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +52,11 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 	{ | ||||
| 		super(10433); | ||||
| 		addTalkId(MOUEN, RUA); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN); | ||||
| 		addCondInCategory(CategoryType.WEAPON_MASTER, "nocond.html"); | ||||
| 	} | ||||
| @@ -131,9 +132,9 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +144,6 @@ public class Q10433_KekropusLetterRegardingASeal extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.SEL_MAHUM_TRAINING_GROUNDS_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -51,11 +52,11 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 	{ | ||||
| 		super(10436); | ||||
| 		addTalkId(MOUEN, LAKI); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_TOWN_OF_OREN, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_TOWN_OF_OREN); | ||||
| 		addCondInCategory(CategoryType.BOW_MASTER, "nocond.html"); | ||||
| 	} | ||||
| @@ -131,9 +132,9 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| @@ -143,7 +144,6 @@ public class Q10436_KekropusLetterTheSealOfPunishment extends LetterQuest | ||||
| 				showOnScreenMsg(player, NpcStringId.PLAINS_OF_THE_LIZARDMEN_IS_A_GOOD_HUNTING_ZONE_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -21,6 +21,7 @@ import org.l2jmobius.gameserver.model.Location; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.network.NpcStringId; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; | ||||
| @@ -54,11 +55,11 @@ public class Q10439_KekropusLetterTheOriginsOfARumor extends LetterQuest | ||||
| 	{ | ||||
| 		super(10439); | ||||
| 		addTalkId(GOSTA, HELVETICA, ATHENIA); | ||||
| 		addSeeCreatureId(INVISIBLE_NPC); | ||||
| 		setIsErtheiaQuest(false); | ||||
| 		setLevel(MIN_LEVEL, MAX_LEVEL); | ||||
| 		setStartQuestSound("Npcdialog1.kekrops_quest_9"); | ||||
| 		setStartLocation(SOE_HEINE, TELEPORT_LOC); | ||||
| 		setCreatureSeeId(this::onCreatureSee, INVISIBLE_NPC); | ||||
| 		registerQuestItems(SOE_HEINE, SOE_FIELD_OF_SILENCE, SOE_FIELD_OF_WISPERS); | ||||
| 		addCondInCategory(CategoryType.MAGE_CLOACK, "nocond.html"); | ||||
| 	} | ||||
| @@ -166,23 +167,25 @@ public class Q10439_KekropusLetterTheOriginsOfARumor extends LetterQuest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final PlayerInstance player = creature.getActingPlayer(); | ||||
| 			final QuestState qs = getQuestState(player, false); | ||||
| 			if ((qs != null) && qs.isCond(2)) | ||||
| 			if (qs != null) | ||||
| 			{ | ||||
| 				showOnScreenMsg(player, NpcStringId.FIELD_OF_SILENCE_AND_FIELD_OR_WHISPERS_ARE_GOOD_HUNTING_ZONES_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 			} | ||||
| 			else if ((qs != null) && qs.isCond(3)) | ||||
| 			{ | ||||
| 				showOnScreenMsg(player, NpcStringId.FIELD_OF_SILENCE_AND_FIELD_OR_WHISPERS_ARE_GOOD_HUNTING_ZONES_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 				if (qs.isCond(2)) | ||||
| 				{ | ||||
| 					showOnScreenMsg(player, NpcStringId.FIELD_OF_SILENCE_AND_FIELD_OR_WHISPERS_ARE_GOOD_HUNTING_ZONES_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 				} | ||||
| 				else if (qs.isCond(3)) | ||||
| 				{ | ||||
| 					showOnScreenMsg(player, NpcStringId.FIELD_OF_SILENCE_AND_FIELD_OR_WHISPERS_ARE_GOOD_HUNTING_ZONES_FOR_LV_81_OR_ABOVE, ExShowScreenMessage.TOP_CENTER, 6000); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
|   | ||||
| @@ -19,6 +19,7 @@ package quests.Q10829_InSearchOfTheCause; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.quest.Quest; | ||||
| import org.l2jmobius.gameserver.model.quest.QuestState; | ||||
| import org.l2jmobius.gameserver.model.quest.State; | ||||
| @@ -44,7 +45,7 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 		super(10829); | ||||
| 		addStartNpc(SERESIN); | ||||
| 		addTalkId(SERESIN, BELAS, FERIN, CYPHONIA); | ||||
| 		addSeeCreatureId(BELAS); | ||||
| 		setCreatureSeeId(this::onCreatureSee, BELAS); | ||||
| 		addCondMinLevel(MIN_LEVEL, "30657-00.htm"); | ||||
| 	} | ||||
| 	 | ||||
| @@ -167,9 +168,9 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 		return htmltext; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	public void onCreatureSee(OnCreatureSee event) | ||||
| 	{ | ||||
| 		final Creature creature = event.getSeen(); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
| 			final QuestState qs = getQuestState((PlayerInstance) creature, true); | ||||
| @@ -178,6 +179,5 @@ public class Q10829_InSearchOfTheCause extends Quest | ||||
| 				qs.setCond(2, true); | ||||
| 			} | ||||
| 		} | ||||
| 		return super.onSeeCreature(npc, creature, isSummon); | ||||
| 	} | ||||
| } | ||||
| @@ -37,8 +37,6 @@ import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.Summon; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PetInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; | ||||
| import org.l2jmobius.gameserver.model.events.EventDispatcher; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcCreatureSee; | ||||
| import org.l2jmobius.gameserver.network.Disconnection; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.DeleteObject; | ||||
|  | ||||
| @@ -357,16 +355,6 @@ public class World | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 			 | ||||
| 			if (wo.isNpc() && object.isCreature()) | ||||
| 			{ | ||||
| 				EventDispatcher.getInstance().notifyEventAsync(new OnNpcCreatureSee((Npc) wo, (Creature) object, object.isSummon()), (Npc) wo); | ||||
| 			} | ||||
| 			 | ||||
| 			if (object.isNpc() && wo.isCreature()) | ||||
| 			{ | ||||
| 				EventDispatcher.getInstance().notifyEventAsync(new OnNpcCreatureSee((Npc) object, (Creature) wo, wo.isSummon()), (Npc) object); | ||||
| 			} | ||||
| 		}); | ||||
| 	} | ||||
| 	 | ||||
| @@ -580,16 +568,6 @@ public class World | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 				 | ||||
| 				if (wo.isNpc() && object.isCreature()) | ||||
| 				{ | ||||
| 					EventDispatcher.getInstance().notifyEventAsync(new OnNpcCreatureSee((Npc) wo, (Creature) object, object.isSummon()), (Npc) wo); | ||||
| 				} | ||||
| 				 | ||||
| 				if (object.isNpc() && wo.isCreature()) | ||||
| 				{ | ||||
| 					EventDispatcher.getInstance().notifyEventAsync(new OnNpcCreatureSee((Npc) object, (Creature) wo, wo.isSummon()), (Npc) object); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -85,7 +85,6 @@ import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableFacti | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableHate; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableKill; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcCanBeSeen; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcDespawn; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcEventReceived; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcFirstTalk; | ||||
| @@ -951,28 +950,6 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime | ||||
| 	 | ||||
| 	// --------------------------------------------------------------------------------------------------------------------------- | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Provides instant callback operation when {@link Npc} sees another creature. | ||||
| 	 * @param callback | ||||
| 	 * @param npcIds | ||||
| 	 * @return | ||||
| 	 */ | ||||
| 	protected final List<AbstractEventListener> setNpcCreatureSeeId(Consumer<OnNpcCreatureSee> callback, int... npcIds) | ||||
| 	{ | ||||
| 		return registerConsumer(callback, EventType.ON_NPC_CREATURE_SEE, ListenerRegisterType.NPC, npcIds); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Provides instant callback operation when {@link Npc} sees another creature. | ||||
| 	 * @param callback | ||||
| 	 * @param npcIds | ||||
| 	 * @return | ||||
| 	 */ | ||||
| 	protected final List<AbstractEventListener> setNpcCreatureSeeId(Consumer<OnNpcCreatureSee> callback, Collection<Integer> npcIds) | ||||
| 	{ | ||||
| 		return registerConsumer(callback, EventType.ON_NPC_CREATURE_SEE, ListenerRegisterType.NPC, npcIds); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Provides instant callback operation when {@link Creature} sees another creature. | ||||
| 	 * @param callback | ||||
|   | ||||
| @@ -43,7 +43,6 @@ import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableFacti | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableHate; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnAttackableKill; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcCanBeSeen; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcCreatureSee; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcDespawn; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcEventReceived; | ||||
| import org.l2jmobius.gameserver.model.events.impl.creature.npc.OnNpcFirstTalk; | ||||
| @@ -186,7 +185,6 @@ public enum EventType | ||||
| 	 | ||||
| 	// NPC events | ||||
| 	ON_NPC_CAN_BE_SEEN(OnNpcCanBeSeen.class, void.class, TerminateReturn.class), | ||||
| 	ON_NPC_CREATURE_SEE(OnNpcCreatureSee.class, void.class), | ||||
| 	ON_NPC_EVENT_RECEIVED(OnNpcEventReceived.class, void.class), | ||||
| 	ON_NPC_FIRST_TALK(OnNpcFirstTalk.class, void.class), | ||||
| 	ON_NPC_HATE(OnAttackableHate.class, void.class, TerminateReturn.class), | ||||
|   | ||||
| @@ -1,61 +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 <http://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package org.l2jmobius.gameserver.model.events.impl.creature.npc; | ||||
|  | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.events.EventType; | ||||
| import org.l2jmobius.gameserver.model.events.impl.IBaseEvent; | ||||
|  | ||||
| /** | ||||
|  * An instantly executed event when Creature is killed by Creature. | ||||
|  * @author UnAfraid | ||||
|  */ | ||||
| public class OnNpcCreatureSee implements IBaseEvent | ||||
| { | ||||
| 	private final Npc _npc; | ||||
| 	private final Creature _creature; | ||||
| 	private final boolean _isSummon; | ||||
| 	 | ||||
| 	public OnNpcCreatureSee(Npc npc, Creature creature, boolean isSummon) | ||||
| 	{ | ||||
| 		_npc = npc; | ||||
| 		_creature = creature; | ||||
| 		_isSummon = isSummon; | ||||
| 	} | ||||
| 	 | ||||
| 	public Npc getNpc() | ||||
| 	{ | ||||
| 		return _npc; | ||||
| 	} | ||||
| 	 | ||||
| 	public Creature getCreature() | ||||
| 	{ | ||||
| 		return _creature; | ||||
| 	} | ||||
| 	 | ||||
| 	public boolean isSummon() | ||||
| 	{ | ||||
| 		return _isSummon; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public EventType getType() | ||||
| 	{ | ||||
| 		return EventType.ON_NPC_CREATURE_SEE; | ||||
| 	} | ||||
| } | ||||
| @@ -817,37 +817,6 @@ public class Quest extends AbstractScript implements IIdentifiable | ||||
| 		showResult(player, res); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @param npc the NPC that sees the creature | ||||
| 	 * @param creature the creature seen by the NPC | ||||
| 	 * @param isSummon | ||||
| 	 */ | ||||
| 	public void notifySeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	{ | ||||
| 		PlayerInstance player = null; | ||||
| 		if (isSummon || creature.isPlayer()) | ||||
| 		{ | ||||
| 			player = creature.getActingPlayer(); | ||||
| 		} | ||||
| 		String res = null; | ||||
| 		try | ||||
| 		{ | ||||
| 			res = onSeeCreature(npc, creature, isSummon); | ||||
| 		} | ||||
| 		catch (Exception e) | ||||
| 		{ | ||||
| 			if (player != null) | ||||
| 			{ | ||||
| 				showError(player, e); | ||||
| 			} | ||||
| 			return; | ||||
| 		} | ||||
| 		if (player != null) | ||||
| 		{ | ||||
| 			showResult(player, res); | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @param eventName - name of event | ||||
| 	 * @param sender - NPC, who sent event | ||||
| @@ -1312,18 +1281,6 @@ public class Quest extends AbstractScript implements IIdentifiable | ||||
| 		return null; | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * This function is called whenever a NPC "sees" a creature. | ||||
| 	 * @param npc the NPC who sees the creature | ||||
| 	 * @param creature the creature seen by the NPC | ||||
| 	 * @param isSummon this parameter if it's {@code false} it denotes that the character seen by the NPC was indeed the player, else it specifies that the character was the player's summon | ||||
| 	 * @return | ||||
| 	 */ | ||||
| 	public String onSeeCreature(Npc npc, Creature creature, boolean isSummon) | ||||
| 	{ | ||||
| 		return null; | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * This function is called whenever a player enters the game. | ||||
| 	 * @param player this parameter contains a reference to the exact instance of the player who is entering to the world. | ||||
| @@ -2101,22 +2058,6 @@ public class Quest extends AbstractScript implements IIdentifiable | ||||
| 		setAttackableAggroRangeEnterId(event -> notifyAggroRangeEnter(event.getNpc(), event.getActiveChar(), event.isSummon()), npcIds); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @param npcIds the IDs of the NPCs to register | ||||
| 	 */ | ||||
| 	public void addSeeCreatureId(int... npcIds) | ||||
| 	{ | ||||
| 		setNpcCreatureSeeId(event -> notifySeeCreature(event.getNpc(), event.getCreature(), event.isSummon()), npcIds); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @param npcIds the IDs of the NPCs to register | ||||
| 	 */ | ||||
| 	public void addSeeCreatureId(Collection<Integer> npcIds) | ||||
| 	{ | ||||
| 		setNpcCreatureSeeId(event -> notifySeeCreature(event.getNpc(), event.getCreature(), event.isSummon()), npcIds); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Register onEnterZone trigger for zone | ||||
| 	 * @param zoneId the ID of the zone to register | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment