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
|