Ir para conteúdo
  • Cadastre-se
  • 0

Tempo dos Buffer aCis 409


FireStreaM

Pergunta

1 resposta a esta questão

Posts recomendados

  • 0

Vou acrecentar ao meu deixo aqui a Diff

 

Subject: [PATCH] Sistema de Buff Time Setting
---
Index: aCis_gameserver/config/players.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/aCis_gameserver/config/players.properties b/aCis_gameserver/config/players.properties
--- a/aCis_gameserver/config/players.properties    (revision 85067945c8ce8e3bc2054b479387f891b43d42a2)
+++ b/aCis_gameserver/config/players.properties    (revision 686e419de54c0879854c677d060a7ed323544a7c)
@@ -257,4 +257,19 @@
 MaxBuffsAmount = 20
 
 # Store buffs/debuffs on user logout. Default: True
-StoreSkillCooltime = True
\ No newline at end of file
+StoreSkillCooltime = True
+
+# Buff Time Setting
+# Usage format: skill_id, time; skill_id, time; ....
+EnableModifySkillDuration = True
+SkillDurationList = 1085,7200;1062,7200;1243,7200;1045,7200;1048,7200;\
+1078,7200;1043,7200;1242,7200;1059,7200;1077,7200;1240,7200;1086,7200;\
+1036,7200;1035,7200;1068,7200;1044,7200;1040,7200;1303,7200;1204,7200;\
+1238,7200;364,7200;264,7200;268,7200;349,7200;265,7200;363,7200;305,7200;\
+304,7200;267,7200;266,7200;269,7200;271,7200;276,7200;274,7200;275,7200;\
+272,7200;277,7200;273,7200;310,7200;365,7200;4700,7200;4699,7200;4703,7200;\
+4702,7200;1352,7200;1353,7200;1354,7200;1259,7200;1355,7200;1356,7200;\
+1363,7200;1357,7200;1323,7200;1268,7200;311,7200;309,7200;307,7200;1388,7200;\
+1389,7200;1397,7200;1087,7200;1413,7200;1304,7200;1257,7200;1362,7200;1392,7200;\
+1393,7200;1391,7200;1189,7200;1182,7200;270,7200;308,7200;306,7200;1191,7200;\
+1416,7200;1390,7200;1391,7200
\ No newline at end of file
Index: aCis_gameserver/java/net/sf/l2j/Config.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
--- a/aCis_gameserver/java/net/sf/l2j/Config.java    (revision 85067945c8ce8e3bc2054b479387f891b43d42a2)
+++ b/aCis_gameserver/java/net/sf/l2j/Config.java    (revision 686e419de54c0879854c677d060a7ed323544a7c)
@@ -43,7 +43,10 @@
 
     private static final String PROTECT_FILE = "./config/l2jz/protect.properties";
     public static final String DONATEMODS = "./config/l2jz/vip.properties";
-    public static final String AUTOFARM_FILE = "./config/autofarm.properties";
+    public static final String AUTOFARM_FILE = "./config/l2jz/autofarm.properties";
+
+    public static boolean ENABLE_MODIFY_SKILL_DURATION;
+    public static HashMap<Integer, Integer> SKILL_DURATION_LIST;
 
     /** Auto Farm */
     public static boolean AUTOFARM_ENABLED;
@@ -947,6 +950,28 @@
         
         MAX_BUFFS_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
         STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);
+
+        ENABLE_MODIFY_SKILL_DURATION = players.getProperty("EnableModifySkillDuration", false);
+        if (ENABLE_MODIFY_SKILL_DURATION) {
+            SKILL_DURATION_LIST = new HashMap<>();
+            String[] propertySplit = players.getProperty("SkillDurationList", "").split(";");
+
+            for (String skill : propertySplit) {
+                String[] skillSplit = skill.split(",");
+                if (skillSplit.length != 2)
+                    LOGGER.warn("[SkillDurationList]: invalid config property -> SkillDurationList \"" + skill + "\"");
+                else {
+                    try {
+                        SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+                    } catch (NumberFormatException nfe) {
+                        nfe.printStackTrace();
+
+                        if (!skill.equals(""))
+                            LOGGER.warn("[SkillDurationList]: invalid config property -> SkillList \"" + skillSplit[0] + "\"" + skillSplit[1]);
+                    }
+                }
+            }
+        }
     }
     
     /**
Index: aCis_gameserver/java/net/sf/l2j/gameserver/data/DocumentBase.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/DocumentBase.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/DocumentBase.java
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/data/DocumentBase.java    (revision 85067945c8ce8e3bc2054b479387f891b43d42a2)
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/DocumentBase.java    (revision 686e419de54c0879854c677d060a7ed323544a7c)
@@ -11,6 +11,7 @@
 import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilderFactory;
 
+import net.sf.l2j.Config;
 import net.sf.l2j.commons.data.StatSet;
 import net.sf.l2j.commons.logging.CLogger;
 
@@ -209,9 +210,23 @@
         
         if (attrs.getNamedItem("count") != null)
             count = Integer.decode(getValue(attrs.getNamedItem("count").getNodeValue(), template));
-        
+
         if (attrs.getNamedItem("time") != null)
+        {
             time = Integer.decode(getValue(attrs.getNamedItem("time").getNodeValue(), template));
+            if (Config.ENABLE_MODIFY_SKILL_DURATION)
+            {
+                if (Config.SKILL_DURATION_LIST.containsKey(((L2Skill) template).getId()))
+                {
+                    if (((L2Skill) template).getLevel() < 100)
+                        time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                    else if ((((L2Skill) template).getLevel() >= 100) && (((L2Skill) template).getLevel() < 140))
+                        time += Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                    else if (((L2Skill) template).getLevel() > 140)
+                        time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                }
+            }
+        }
         
         boolean self = false;
         if (attrs.getNamedItem("self") != null && Integer.decode(getValue(attrs.getNamedItem("self").getNodeValue(), template)) == 1)
 

Editado por FUSI0N
Codigo
Link para o comentário
Compartilhar em outros sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...



×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.