Proper Homunculus exp value and fix for exp over 100% on level 5.
Contributed by nasseka.
This commit is contained in:
parent
c16d5940a6
commit
64dc3ca824
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user