Jump to content

Recommended Posts

Posted

Fix for Max CP Exploit, as my title says :P

 

For Interlude L2J, servers.

 

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/CharStat.java
@@ -244,5 +244,5 @@
    }

-    public final int getMaxCp()
+    public int getMaxCp()
    {
	if (_activeChar == null)
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
@@ -42,4 +42,5 @@
    private int _oldMaxHp; // stats watch
    private int _oldMaxMp; // stats watch
+    private int _oldMaxCp; // stats watch

    // =========================================================
@@ -411,4 +412,19 @@
    }

+     @Override
+    public final int getMaxCp()
+    {
+    	int val = super.getMaxCp();
+    	if (val != _oldMaxCp)
+    	{
+    		_oldMaxCp = val;
+    		if (getActiveChar().getStatus().getCurrentCp() != val)
+    		{
+    			getActiveChar().getStatus().setCurrentCp(getActiveChar().getStatus().getCurrentCp());
+    		}
+    	}
+    	return val;
+    }
+
    @Override
    public final int getSp()

 

Credits: ŚyśţęmƒяәдҚς

  • 2 weeks later...
Posted

Actually, i haven't made this ^^, but i haven't took it from L2JForums .! Credits for me for share. !

well that's the actual problem in your shares

you say credits to me but you see you just adapt it

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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..