From 005a008c509d20ba962bca6ec6c80a801ae8a890 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 31 Aug 2016 19:17:15 +0000 Subject: [PATCH] Minor improvements for Brothers Bound in Chains. --- .../handlers/effecthandlers/SummonAgathion.java | 4 ++-- .../Q00500_BrothersBoundInChains.java | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/SummonAgathion.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/SummonAgathion.java index 0413240e4f..0fab6deaee 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/SummonAgathion.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/effecthandlers/SummonAgathion.java @@ -58,12 +58,12 @@ public final class SummonAgathion extends AbstractEffect return; } - EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSummonAgathion(effector.getActingPlayer(), _npcId)); - final L2PcInstance player = effected.getActingPlayer(); player.setAgathionId(_npcId); player.sendPacket(new ExUserInfoCubic(player)); player.broadcastCharInfo(); + + EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSummonAgathion(effector.getActingPlayer(), _npcId)); } } diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index 740c119f16..41862e9a4d 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -45,7 +45,7 @@ public class Q00500_BrothersBoundInChains extends Quest private static final int DARK_JUDGE = 30981; // Items private static final int GEMSTONE_B = 2132; - private static final int PENITENT_MANACLES = 36060; // TODO: check: why multiple items with this name + private static final int PENITENT_MANACLES = 36060; private static final int CRUMBS_OF_PENITENCE = 36077; // Skills private static final int HOUR_OF_PENITENCE[] = @@ -56,8 +56,8 @@ public class Q00500_BrothersBoundInChains extends Quest 15328, 15329 }; - // Agathion - private static final int SIN_EATER[] = + // Agathions + private static final int SIN_EATERS[] = { 16098, 16099, @@ -92,13 +92,13 @@ public class Q00500_BrothersBoundInChains extends Quest { case "buff": { - if ((player != null) && IntStream.of(SIN_EATER).anyMatch(x -> x == player.getAgathionId())) + if (player != null) { final Skill skill = SkillData.getInstance().getSkill(15325, 1); // Hour of Penitence skill.activateSkill(player, player); startQuestTimer("buff", 270000, null, player); // Rebuff every 4min30 (retail like) } - break; + return null; } case "30981-02.htm": case "30981-03.htm": @@ -200,7 +200,10 @@ public class Q00500_BrothersBoundInChains extends Quest @Override public void onSummonAgathion(L2PcInstance player, int agathionId) { - startQuestTimer("buff", 2500, null, player); + if (IntStream.of(SIN_EATERS).anyMatch(x -> x == agathionId)) // TODO: Register IDs + { + startQuestTimer("buff", 2500, null, player); + } } @RegisterEvent(EventType.ON_ATTACKABLE_KILL)