From 3d3d73309c0c287211593ba2d2bbf142669b9817 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 8 Aug 2021 12:10:46 +0000 Subject: [PATCH] Fixed Clan exp related ArrayIndexOutOfBoundsException. --- .../java/org/l2jmobius/gameserver/model/clan/Clan.java | 2 +- .../java/org/l2jmobius/gameserver/model/clan/Clan.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/clan/Clan.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/clan/Clan.java index 8a343c989a..905c058048 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/clan/Clan.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/clan/Clan.java @@ -3104,7 +3104,7 @@ public class Clan implements IIdentifiable, INamable _exp += value; broadcastToOnlineMembers(new ExPledgeV3Info(_exp, getRank(), getNotice(), isNoticeEnabled())); - if ((EXP_TABLE[getLevel() - 1]) <= _exp) + if ((EXP_TABLE[Math.max(0, getLevel() - 1)]) <= _exp) { changeLevel(_level + 1); } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/Clan.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/Clan.java index 8a343c989a..905c058048 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/Clan.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/clan/Clan.java @@ -3104,7 +3104,7 @@ public class Clan implements IIdentifiable, INamable _exp += value; broadcastToOnlineMembers(new ExPledgeV3Info(_exp, getRank(), getNotice(), isNoticeEnabled())); - if ((EXP_TABLE[getLevel() - 1]) <= _exp) + if ((EXP_TABLE[Math.max(0, getLevel() - 1)]) <= _exp) { changeLevel(_level + 1); }