Jump to content

[Share][Int]Max CP Exploit fix.


Recommended Posts

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ƒяәдҚς

Link to comment
Share on other sites

 

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

 

If you wanna leech, don't leech good guys.

http://my-trac.assembla.com/L2J-HardCode/changeset/40

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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