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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...