[code]### vokPatch
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (revision 309)
+++ java/net/sf/l2j/gameserver/model/actor/stat/PcStat.java (working copy)
@@ -361,6 +361,9 @@
int val = super.getMAtkSpd();
+ if (val > Config.MAX_MATK_SPEED)
+ return Config.MAX_MATK_SPEED;
+
final int penalty = getActiveChar().getExpertiseArmorPenalty();
if (penalty > 0)
val *= Math.pow(0.84, penalty);
@@ -369,6 +372,24 @@
}
@Override
+ public int getPAtkSpd()
+ {
+ if (getActiveChar() == null)
+ return 1;
+
+ int val = super.getPAtkSpd();
+
+ if (val > Config.MAX_PATK_SPEED)
+ return Config.MAX_PATK_SPEED;
+
+ final int penalty = getActiveChar().getExpertiseArmorPenalty();
+ if (penalty > 0)
+ val *= Math.pow(0.84, penalty);
+
+ return val;
+ }
+
+ @Override
public int getEvasionRate(L2Character target)
{
if (getActiveChar() == null)
Index: config/players.properties
===================================================================
--- config/players.properties (revision 309)
+++ config/players.properties (working copy)
@@ -216,6 +216,15 @@
GMStartupAutoList = True
#=============================================================
+# Limits System
+#=============================================================
+
+# Those settings put a cap limit to some players' stats.
+# Default: 1400, 1600
+MaxPAtkSpeed = 1400
+MaxMAtkSpeed = 1600
+
+#=============================================================
# Petitions
#=============================================================
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 309)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -457,6 +457,10 @@
public static boolean GM_STARTUP_SILENCE;
public static boolean GM_STARTUP_AUTO_LIST;
+ /** Limits */
+ public static int MAX_PATK_SPEED;
+ public static int MAX_MATK_SPEED;
+
/** petitions */
public static boolean PETITIONING_ALLOWED;
public static int MAX_PETITIONS_PER_PLAYER;
@@ -1067,6 +1071,9 @@
GM_STARTUP_SILENCE = players.getProperty("GMStartupSilence", true);
GM_STARTUP_AUTO_LIST = players.getProperty("GMStartupAutoList", true);
+ MAX_PATK_SPEED = Integer.parseInt(players.getProperty("MaxPAtkSpeed", "1400"));
+ MAX_MATK_SPEED = Integer.parseInt(players.getProperty("MaxMAtkSpeed", "1600"));
+
PETITIONING_ALLOWED = players.getProperty("PetitioningAllowed", true);
MAX_PETITIONS_PER_PLAYER = players.getProperty("MaxPetitionsPerPlayer", 5);
MAX_PETITIONS_PENDING = players.getProperty("MaxPetitionsPending", 25);[/code]