Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [Lineage] Java Mods (https://secretexperience.net/forumdisplay.php?f=636)
-   -   [L2JFree] Fix para Exploit Cp (https://secretexperience.net/showthread.php?t=12700)

KaL 07-09-2009 02:31 PM

Fix para Exploit Cp
 
Este Mod corrige o exploit do CP que as pessoas usam para ficar com CP acima do limite. Testado apenas no Interlude L2jFree, contudo deve funcionar nas demais versões.

Código:

Index: gameserver.model.actor.stat.CharStat.java

}
- public final int getMaxCp()
+ public int getMaxCp()
{
if (_activeChar == null)

Código:

Index: net/sf/l2j/gameserver/model/actor/stat/PcStat.java
===================================================================
--- C:/workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (Revision 2746)
+++ C:/workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java        (working copy)

private int _oldMaxHp;      // stats watch
    private int _oldMaxMp;      // stats watch
+  private int _oldMaxCp;      // stats watch



                        super.setLevel(value);
                }
        }
+        @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 getMaxHp()

Créditos: L2jServer Team


Horários baseados na GMT -3. Agora são 12:52 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.