From 0450dc96c571f8ca17d73e49d39083f22eb4e9dd Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 30 Nov 2022 05:38:26 +0000 Subject: [PATCH] After defeating Antharas all players in the zone receive Antharas Reward Pack. Contributed by CostyKiller. --- .../scripts/ai/bosses/Antharas/Antharas.java | 17 +++++++++++++---- .../scripts/ai/bosses/Antharas/Antharas.java | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java index 8e2d586b18..af1fba996f 100644 --- a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java +++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java @@ -96,6 +96,8 @@ public class Antharas extends AbstractInstance // Zone private static final NoRestartZone ZONE = ZoneManager.getInstance().getZoneById(70050, NoRestartZone.class); // Antharas Nest zone // @formatter:on + // Reward + private static final int REWARD_BOX = 82243; // Misc private static final int TEMPLATE_ID = 304; @@ -403,18 +405,25 @@ public class Antharas extends AbstractInstance } @Override - public String onKill(Npc npc, Player player, boolean isSummon) + public String onKill(Npc npc, Player killer, boolean isSummon) { - final Instance world = player.getInstanceWorld(); + final Instance world = killer.getInstanceWorld(); final Npc antharas = world.getParameters().getObject("antharas", Npc.class); - if (ZONE.isCharacterInZone(player) && (npc.getId() == ANTHARAS)) + if (ZONE.isCharacterInZone(killer) && (npc.getId() == ANTHARAS)) { notifyEvent("DESPAWN_MINIONS", null, null); ZONE.broadcastPacket(new SpecialCamera(antharas, 1200, 20, -10, 0, 10000, 13000, 0, 0, 0, 0, 0)); ZONE.broadcastPacket(new PlaySound("BS01_D")); + + // After defeating Antharas all players in the zone receive Antharas' Reward Pack. + for (Player player : world.getPlayers()) + { + giveItems(player, REWARD_BOX, 1); + } + world.finishInstance(); } - return super.onKill(npc, player, isSummon); + return super.onKill(npc, killer, isSummon); } @Override diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java index 8e2d586b18..af1fba996f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/ai/bosses/Antharas/Antharas.java @@ -96,6 +96,8 @@ public class Antharas extends AbstractInstance // Zone private static final NoRestartZone ZONE = ZoneManager.getInstance().getZoneById(70050, NoRestartZone.class); // Antharas Nest zone // @formatter:on + // Reward + private static final int REWARD_BOX = 82243; // Misc private static final int TEMPLATE_ID = 304; @@ -403,18 +405,25 @@ public class Antharas extends AbstractInstance } @Override - public String onKill(Npc npc, Player player, boolean isSummon) + public String onKill(Npc npc, Player killer, boolean isSummon) { - final Instance world = player.getInstanceWorld(); + final Instance world = killer.getInstanceWorld(); final Npc antharas = world.getParameters().getObject("antharas", Npc.class); - if (ZONE.isCharacterInZone(player) && (npc.getId() == ANTHARAS)) + if (ZONE.isCharacterInZone(killer) && (npc.getId() == ANTHARAS)) { notifyEvent("DESPAWN_MINIONS", null, null); ZONE.broadcastPacket(new SpecialCamera(antharas, 1200, 20, -10, 0, 10000, 13000, 0, 0, 0, 0, 0)); ZONE.broadcastPacket(new PlaySound("BS01_D")); + + // After defeating Antharas all players in the zone receive Antharas' Reward Pack. + for (Player player : world.getPlayers()) + { + giveItems(player, REWARD_BOX, 1); + } + world.finishInstance(); } - return super.onKill(npc, player, isSummon); + return super.onKill(npc, killer, isSummon); } @Override