L2JMobius
Public Development => Shares/Contributions => Topic started by: LLiuKe on September 28, 2021, 06:02:25 AM
-
diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CpHealPercent.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CpHealPercent.java
index 0ce2905..9cf6c5e 100644
--- a/Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CpHealPercent.java
+++ b/Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CpHealPercent.java
@@ -70,19 +70,17 @@
effected.setCurrentCp(newCp, false);
effected.broadcastStatusUpdate(effector);
}
-
- if ((effector != null) && (effector != effected))
+ SystemMessage sm;
+ if (effector.getObjectId() != effected.getObjectId())
{
- final SystemMessage sm = new SystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
+ sm = new SystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(effector.getName());
- sm.addInt((int) amount);
- effected.sendPacket(sm);
}
else
{
- final SystemMessage sm = new SystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
- sm.addInt((int) amount);
- effected.sendPacket(sm);
+ sm = new SystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
}
+ sm.addInt((int) amount);
+ effected.sendPacket(sm);
}
}
Also you must change all skills that have CpHealPercent effect values from "1.15" to "15" for example !
P.S : I hope someone who is better then me in java could check the code and assure it had no bugs :D
-
Both this and code before the patch seem to do the same thing.
-
First code wasn't working , try to use any item/skill that gives cphealpercent and you will see it's not working . Strange , i know
-
The only change I see is.
if (effector.getObjectId() != effected.getObjectId())
Can you try only that?
-
but it works probably...did u check if it's defined properly? Give me skill ID
-
but it works probably...did u check if it's defined properly? Give me skill ID
<skill id="2289" toLevel="7" name="No-grade Elixir of CP">
<skill id="28147" toLevel="3" name="Sayha's Support">
<skill id="30793" toLevel="5" name="Pa'agrio's Fist">