Jump to content

Question

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

It's because the code you implement it wasn't complete at all. Your error probably comes from method calculateKarmaLost , you need to edit the array karmaMods at Formulas.java and add new values for each higher level or you can add a check to get always the latest possible value from the retail one.

 

Possible fixes:

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/Formulas.java	(revision 3)
+++ java/net/sf/l2j/gameserver/skills/Formulas.java	(working copy)
@@ -202,6 +202,12 @@
 		29.05534154,
 		29.41038662,
 		29.77769028
+		//your value
+		//your value
+		//your value
+		//your value
+		//your value
+		//....
 	};
 	
 	/**

or

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/skills/Formulas.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/Formulas.java	(revision 3)
+++ java/net/sf/l2j/gameserver/skills/Formulas.java	(working copy)
@@ -1512,7 +1512,7 @@
 	 */
 	public static int calculateKarmaLost(int playerLevel, long exp)
 	{
-		return (int) (exp / karmaMods[playerLevel] / 15);
+		return (int) (exp / karmaMods[Math.min(karmaMods.length-1, playerLevel)] / 15);
 	}
 	
 	/**

 

Edited by melron
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..