Secret Experience

Secret Experience (https://secretexperience.net/index.php)
-   [Lineage] Java Mods (https://secretexperience.net/forumdisplay.php?f=636)
-   -   [L2JServer] Limite Enchant em Olympiad (https://secretexperience.net/showthread.php?t=26635)

B1Z4R0 17-10-2010 03:21 PM

Limite Enchant em Olympiad
 
1 Anexo(s)
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)
        {


Kinho! 18-10-2010 12:13 PM

Desculpe!

Achei o MOD massa mais surgiu uma duvida:

Tipo si eu colocar -1 - desativado!

e si eu coocar +5, so pode echante ate +5?

Ou eu coloco 5 ?

Inspector 18-10-2010 12:26 PM

@Kinho!
vc coloca o valor exemplo 7
dai so podera itens ate +7
ou seja se colocar 5
os itens so poderao ser usadoa te +5

thiago2659 14-07-2012 11:43 AM

Thx!!!!!!!!!!!!!


Horários baseados na GMT -3. Agora são 11:50 PM.

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