diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index d917c8a83a..d6259dc0af 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 61; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index d917c8a83a..d6259dc0af 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 61; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index c5cd98677b..a94f98762d 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 85; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index c5cd98677b..a94f98762d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 85; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index c5cd98677b..a94f98762d 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 85; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index c5cd98677b..a94f98762d 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -52,7 +52,7 @@ public class Q00500_BrothersBoundInChains extends Quest // Agathion private static final int SIN_EATER = 16098; // Others - private static final int DROP_QI_CHANCE = 5; + private static final int DROP_CHANCE = 5; private static final int MIN_LEVEL = 85; public Q00500_BrothersBoundInChains() @@ -182,6 +182,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -193,14 +197,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -212,11 +217,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -224,7 +226,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -234,8 +236,9 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE) && (getRandom(100) < DROP_QI_CHANCE)) + if (getRandom(100) < DROP_CHANCE) { + // Player can drop more than 10 Crumbs of Penitence but there's no point in getting more than 10 (retail). giveItems(player, CRUMBS_OF_PENITENCE, 1); if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 10)) { diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index a525c40c89..d6744b841a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -183,6 +183,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -194,14 +198,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -213,11 +218,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -225,7 +227,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -254,25 +256,22 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) + // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. + final int killCount = qs.getInt(KILL_COUNT_VAR); + if (killCount >= 20) { - // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. - final int killCount = qs.getInt(KILL_COUNT_VAR); - if (killCount >= 20) + // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail). + giveItems(player, CRUMBS_OF_PENITENCE, 1); + qs.set(KILL_COUNT_VAR, 0); + + if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) { - // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail) - giveItems(player, CRUMBS_OF_PENITENCE, 1); - qs.set(KILL_COUNT_VAR, 0); - - if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) - { - qs.setCond(2, true); - } - } - else - { - qs.set(KILL_COUNT_VAR, killCount + 1); + qs.setCond(2, true); } } + else + { + qs.set(KILL_COUNT_VAR, killCount + 1); + } } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index a525c40c89..d6744b841a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -183,6 +183,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -194,14 +198,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -213,11 +218,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -225,7 +227,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -254,25 +256,22 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) + // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. + final int killCount = qs.getInt(KILL_COUNT_VAR); + if (killCount >= 20) { - // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. - final int killCount = qs.getInt(KILL_COUNT_VAR); - if (killCount >= 20) + // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail). + giveItems(player, CRUMBS_OF_PENITENCE, 1); + qs.set(KILL_COUNT_VAR, 0); + + if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) { - // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail) - giveItems(player, CRUMBS_OF_PENITENCE, 1); - qs.set(KILL_COUNT_VAR, 0); - - if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) - { - qs.setCond(2, true); - } - } - else - { - qs.set(KILL_COUNT_VAR, killCount + 1); + qs.setCond(2, true); } } + else + { + qs.set(KILL_COUNT_VAR, killCount + 1); + } } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java index a525c40c89..d6744b841a 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/quests/Q00500_BrothersBoundInChains/Q00500_BrothersBoundInChains.java @@ -183,6 +183,10 @@ public class Q00500_BrothersBoundInChains extends Quest private void OnPlayerSummonAgathion(OnPlayerSummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -194,14 +198,15 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - startQuestTimer("buff", 2500, null, player); - } + startQuestTimer("buff", 2500, null, player); } private void OnPlayerUnsummonAgathion(OnPlayerUnsummonAgathion event) { + if (event.getAgathionId() != SIN_EATER) + { + return; + } final L2PcInstance player = event.getPlayer(); if (player == null) { @@ -213,11 +218,8 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (event.getAgathionId() == SIN_EATER) - { - cancelQuestTimer("buff", null, player); - player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); - } + cancelQuestTimer("buff", null, player); + player.getEffectList().stopSkillEffects(true, HOUR_OF_PENITENCE); } @RegisterEvent(EventType.ON_ATTACKABLE_KILL) @@ -225,7 +227,7 @@ public class Q00500_BrothersBoundInChains extends Quest public void onAttackableKill(OnAttackableKill event) { final L2PcInstance player = event.getAttacker(); - if (player == null) + if ((player == null) || (player.getAgathionId() != SIN_EATER) || !player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) { return; } @@ -254,25 +256,22 @@ public class Q00500_BrothersBoundInChains extends Quest return; } - if (player.getEffectList().isAffectedBySkill(HOUR_OF_PENITENCE)) + // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. + final int killCount = qs.getInt(KILL_COUNT_VAR); + if (killCount >= 20) { - // The quest item drops from every 20th mob you kill, in total you need to kill 700 mobs. - final int killCount = qs.getInt(KILL_COUNT_VAR); - if (killCount >= 20) + // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail). + giveItems(player, CRUMBS_OF_PENITENCE, 1); + qs.set(KILL_COUNT_VAR, 0); + + if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) { - // Player can drop more than 35 Crumbs of Penitence but there's no point in getting more than 35 (retail) - giveItems(player, CRUMBS_OF_PENITENCE, 1); - qs.set(KILL_COUNT_VAR, 0); - - if (!qs.isCond(2) && (getQuestItemsCount(player, CRUMBS_OF_PENITENCE) >= 35)) - { - qs.setCond(2, true); - } - } - else - { - qs.set(KILL_COUNT_VAR, killCount + 1); + qs.setCond(2, true); } } + else + { + qs.set(KILL_COUNT_VAR, killCount + 1); + } } }