| Mazokista |
14-09-2010 09:55 PM |
Skill Delay List
1 Anexo(s)
Creditos : L2JServer
Código:
Index: Trunk/L2JStep_CORE/config/l2jmods.properties
====================================================================
--- Trunk/L2JStep_CORE/config/l2jmods.properties (revision 2)
+++ Trunk/L2JStep_CORE/config/l2jmods.properties (revision 50)
@@ -153,6 +153,12 @@
+# Enable to modify skill reuse data
+EnableModifySkillReuse = false
+# Skill reuse list
+# Format : skillid,newDelayTime;skillid,newDelayTime2....
+SkillReuseList =
+
Index: Trunk/L2JStep_CORE/java/com/l2jstep/Config.java
====================================================================
--- Trunk/L2JStep_CORE/java/com/l2jstep/Config.java (revision 2)
+++ Trunk/L2JStep_CORE/java/com/l2jstep/Config.java (revision 50)
@@ -585,6 +585,8 @@
public static int NOBLE_CUSTOM_ITEM_ID;
public static boolean ALLOW_NOBLE_CUSTOM_ITEM;
public static boolean ACTIVE_SUB_NEEDED_TO_USE_NOBLE_ITEM;
+ public static boolean ENABLE_MODIFY_SKILL_REUSE;
+ public static Map<Integer, Integer> SKILL_REUSE_LIST;
public static int NOBLE_CUSTOM_LEVEL;
public static boolean ALLOW_HERO_CUSTOM_ITEM;
public static int HERO_CUSTOM_ITEM_ID;
@@ -954,6 +956,35 @@
DUEL_SPAWN_X = Integer.parseInt(*********.getProperty("PartyDuelSpawnX", "149319"));
DUEL_SPAWN_Y = Integer.parseInt(*********.getProperty("PartyDuelSpawnY", "46710"));
DUEL_SPAWN_Z = Integer.parseInt(*********.getProperty("PartyDuelSpawnZ", "-3413"));
+ ENABLE_MODIFY_SKILL_REUSE = Boolean.parseBoolean(*********.getProperty("EnableModifySkillReuse", "false"));
+ // Create Map only if enabled
+ if (ENABLE_MODIFY_SKILL_REUSE)
+ {
+ SKILL_REUSE_LIST = new FastMap<Integer, Integer>();
+ String[] propertySplit;
+ propertySplit = *********.getProperty("SkillReuseList", "").split(";");
+ for (String skill : propertySplit)
+ {
+ String[] skillSplit = skill.split(",");
+ if (skillSplit.length != 2)
+ {
+ System.out.println("[SkillReuseList]: invalid config property -> SkillReuseList \"" + skill + "\"");
+ } else
+ {
+ try
+ {
+ SKILL_REUSE_LIST.put(Integer.valueOf(skillSplit[0]), Integer.valueOf(skillSplit[1]));
+ } catch (NumberFormatException nfe)
+ {
+ if (!skill.equals(""))
+ {
+ System.out.println("[SkillReuseList]: invalid config property -> SkillList \"" + skillSplit[0] + "\"" + skillSplit[1]);
+ }
+ }
+ }
+ }
+ }
+
ALT_DISABLE_RAIDBOSS_PETRIFICATION = Boolean.parseBoolean(*********.getProperty("DisableRaidBossPetrification", "False"));
ALT_NEW_SPAWN = Boolean.parseBoolean(*********.getProperty("Customspawn", "False"));
ALT_NEW_SPAWN_X = Integer.parseInt(*********.getProperty("CustomSpawnX", ""));
Index: Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2Skill.java
====================================================================
--- Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2Skill.java (revision 2)
+++ Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/model/L2Skill.java (revision 50)
@@ -27,6 +27,7 @@
import javolution.text.TextBuilder;
import javolution.util.FastList;
+import com.it.br.Config;
import com.it.br.gameserver.GeoData;
import com.it.br.gameserver.datatables.HeroSkillTable;
import com.it.br.gameserver.datatables.SkillTable;
@@ -504,8 +505,16 @@
_isDebuff = set.getBool("isDebuff", false);
_hitTime = set.getInteger("hitTime", 0);
_coolTime = set.getInteger("coolTime", 0);
- //_skillInterruptTime = set.getInteger("hitTime", _hitTime / 2);
- _reuseDelay = set.getInteger("reuseDelay", 0);
+ if (Config.ENABLE_MODIFY_SKILL_REUSE && Config.SKILL_REUSE_LIST.containsKey(_id))
+ {
+ if ( Config.DEBUG )
+ _log.info("*** Skill " + _name + " (" + _level + ") changed reuse from " + set.getInteger("reuseDelay", 0) + " to " + Config.SKILL_REUSE_LIST.get(_id) + " seconds.");
+ _reuseDelay = Config.SKILL_REUSE_LIST.get(_id);
+ }
+ else
+ {
+ _reuseDelay = set.getInteger("reuseDelay", 0);
+ }
_buffDuration = set.getInteger("buffDuration", 0);
_skillRadius = set.getInteger("skillRadius", 80);
_targetType = set.getEnum("target", SkillTargetType.class);
|