From 02ecd10bb64c08c21cb6666ca0ff5ab2a067b811 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:22:11 +0000 Subject: [PATCH] Removed regent count from homunculus functions. Contributed by nasseka. --- .../homunculus/RequestExEnchantHomunculusSkill.java | 1 + .../clientpackets/homunculus/RequestExHomunculusInsert.java | 6 ++++-- .../homunculus/RequestExEnchantHomunculusSkill.java | 1 + .../clientpackets/homunculus/RequestExHomunculusInsert.java | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java index 316022480f..d483b85df2 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java @@ -67,6 +67,7 @@ public class RequestExEnchantHomunculusSkill implements IClientIncomingPacket } player.getVariables().set(PlayerVariables.HOMUNCULUS_UPGRADE_POINTS, points - 1); + player.setSp(player.getSp() - SP_COST); player.sendPacket(new ExEnchantHomunculusSkillResult(player, _slot, _skillNumber)); player.sendPacket(new ExHomunculusHPSPVP(player)); player.sendPacket(new ExShowHomunculusList(player)); diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java index 0ec715c535..5a921295bc 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java @@ -76,7 +76,7 @@ public class RequestExHomunculusInsert implements IClientIncomingPacket { if ((player.getSp() >= SP_COST) && (spPoints < 10)) { - player.addExpAndSp(0, -SP_COST); + player.setSp(player.getSp() - SP_COST); spPoints += 1; player.getVariables().set(PlayerVariables.HOMUNCULUS_SP_POINTS, spPoints); } @@ -102,8 +102,10 @@ public class RequestExHomunculusInsert implements IClientIncomingPacket break; } } + player.getHomunculusList().refreshStats(true); + player.sendPacket(new ExShowHomunculusBirthInfo(player)); player.sendPacket(new ExHomunculusHPSPVP(player)); player.sendPacket(new ExHomunculusInsertResult(_type)); } -} +} \ No newline at end of file diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java index 316022480f..d483b85df2 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExEnchantHomunculusSkill.java @@ -67,6 +67,7 @@ public class RequestExEnchantHomunculusSkill implements IClientIncomingPacket } player.getVariables().set(PlayerVariables.HOMUNCULUS_UPGRADE_POINTS, points - 1); + player.setSp(player.getSp() - SP_COST); player.sendPacket(new ExEnchantHomunculusSkillResult(player, _slot, _skillNumber)); player.sendPacket(new ExHomunculusHPSPVP(player)); player.sendPacket(new ExShowHomunculusList(player)); diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java index 0ec715c535..5a921295bc 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/homunculus/RequestExHomunculusInsert.java @@ -76,7 +76,7 @@ public class RequestExHomunculusInsert implements IClientIncomingPacket { if ((player.getSp() >= SP_COST) && (spPoints < 10)) { - player.addExpAndSp(0, -SP_COST); + player.setSp(player.getSp() - SP_COST); spPoints += 1; player.getVariables().set(PlayerVariables.HOMUNCULUS_SP_POINTS, spPoints); } @@ -102,8 +102,10 @@ public class RequestExHomunculusInsert implements IClientIncomingPacket break; } } + player.getHomunculusList().refreshStats(true); + player.sendPacket(new ExShowHomunculusBirthInfo(player)); player.sendPacket(new ExHomunculusHPSPVP(player)); player.sendPacket(new ExHomunculusInsertResult(_type)); } -} +} \ No newline at end of file