From 9f10ec578cf64f917c01025b2241a446ab5a56e4 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 26 Aug 2018 16:58:59 +0000 Subject: [PATCH] Fixed last day attendance reward bug. --- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- .../l2jmobius/gameserver/model/actor/instance/L2PcInstance.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 9c147c172b..5814c24adc 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -14132,7 +14132,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 1edaf936c5..383a39e3d9 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -14190,7 +14190,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index d3d8044f99..a448f5566b 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -14204,7 +14204,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index cb9cc63f2b..5ef43860ae 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -13963,7 +13963,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index cb4d52b020..73a9b3899c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -13963,7 +13963,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 4458cbd5e6..56fe8178e2 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -13964,7 +13964,7 @@ public final class L2PcInstance extends L2Playable { canBeRewarded = true; // Reset index if max is reached. - if (rewardIndex >= AttendanceRewardData.getInstance().getRewardsCount()) + if (rewardIndex >= (AttendanceRewardData.getInstance().getRewardsCount() - 1)) { rewardIndex = 0; }