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
  On 1/11/2010 at 5:13 PM, SySt3MGaM3RFr3aKs said:

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock