Código:
trunk/L2KS_GameServer/config/altsettings.properties (revision 140)
+++ trunk/L2KS_GameServer/config/altsettings.properties (revision 145)@@ -252,6 +252,10 @@ # How many week 1 Olympiad cycle should last, default = 4 AltOlyWeeks = 4
+# This is the limit of enchantment of items in olympiad mode
+# if set this to 5 , then players with equipment more than
+5 cannot join
+OlyMaxEnchant = -1
+--- trunk/L2KS_GameServer/java/net/sf/l2j/Config.java (revision 141)
+++ trunk/L2KS_GameServer/java/net/sf/l2j/Config.java (revision 145)@@ -283,6 +283,7 @@ public static long ALT_OLY_WPERIOD; public static long ALT_OLY_VPERIOD; public static int ALT_OLY_WEEKS;+ public static int ALT_OLY_ENCHANT_LIMIT; /** Manor Refresh Starting time */ public static int ALT_MANOR_REFRESH_TIME;@@ -1874,6 +1875,7 @@ ALT_OLY_IWAIT = Long.parseLong(altSettings.getProperty("AltOlyIWait","300000")); ALT_OLY_WPERIOD = Long.parseLong(altSettings.getProperty("AltOlyWPeriod","604800000")); ALT_OLY_VPERIOD = Long.parseLong(altSettings.getProperty("AltOlyVPeriod","86400000"));
+ ALT_OLY_ENCHANT_LIMIT = Integer.parseInt(altSettings.getProperty("OlyMaxEnchant", "-1")); ALT_MANOR_REFRESH_TIME = Integer.parseInt(altSettings.getProperty("AltManorRefreshTime","20")); ALT_MANOR_REFRESH_MIN = Integer.parseInt(altSettings.getProperty("AltManorRefreshMin","00"));--- trunk/L2KS_GameServer/java/net/sf/l2j/gameserver/skills/funcs/FuncEnchant.java (revision 4)
+++ trunk/L2KS_GameServer/java/net/sf/l2j/gameserver/skills/funcs/FuncEnchant.java (revision 145)@@ -18,7 +18,9 @@ */ package net.sf.l2j.gameserver.skills.funcs; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.L2ItemInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.skills.Env; import net.sf.l2j.gameserver.skills.Stats; import net.sf.l2j.gameserver.templates.L2Item;@@ -50,6 +52,21 @@ overenchant = enchant - 3; enchant = 3; }
+
+ if (env.player != null && env.player instanceof L2PcInstance)
+ {
+ L2PcInstance player = (L2PcInstance)env.player;
+ if (player.isInOlympiadMode() && Config.ALT_OLY_ENCHANT_LIMIT >= 0 && (enchant + overenchant) > Config.ALT_OLY_ENCHANT_LIMIT)
+ {
+ if (Config.ALT_OLY_ENCHANT_LIMIT > 3)
+ overenchant = Config.ALT_OLY_ENCHANT_LIMIT - 3;
+ else
+ {
+ overenchant = 0;
+ enchant = Config.ALT_OLY_ENCHANT_LIMIT;
+ }
+ }
+ } if (stat == Stats.MAGIC_DEFENCE || stat == Stats.POWER_DEFENCE) {
Creditos : L2KS eu achu ne