From 8247f0bb3155f65bbe184d7d8094d208935e6c16 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 23 Jul 2021 22:58:30 +0000 Subject: [PATCH] Proper Homunculus exp value and fix for exp over 100% on level 5. Contributed by nasseka. --- .../homunculus/RequestExHomunculusEnchantExp.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusEnchantExp.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusEnchantExp.java index 8612475fa1..4d014a44db 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusEnchantExp.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusEnchantExp.java @@ -31,7 +31,7 @@ import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExShowHomunculu */ public class RequestExHomunculusEnchantExp implements IClientIncomingPacket { - private static final int EXP_PER_POINT = 750; + private static final int EXP_PER_POINT = 675; private int _slot; @@ -115,6 +115,19 @@ public class RequestExHomunculusEnchantExp implements IClientIncomingPacket } break; } + case 5: + { + if ((homunculus.getTemplate().getExpToLevel6() - homunculus.getExp()) < EXP_PER_POINT) + { + homunculus.setExp(homunculus.getExp() + (homunculus.getTemplate().getExpToLevel6() - homunculus.getExp())); + player.sendPacket(new ExHomunculusPointInfo(player)); + } + if (homunculus.getExp() >= homunculus.getTemplate().getExpToLevel6()) + { + return; + } + break; + } } player.getHomunculusList().update(homunculus); player.getHomunculusList().refreshStats(true);