Skip to content

Instantly share code, notes, and snippets.

@Zealar Zealar/core.diff Secret
Created Nov 20, 2015

Embed
What would you like to do?
Retail skill reuse
diff --git a/dist/game/config/Character.properties b/dist/game/config/Character.properties
index 74df674..7c1244e 100644
--- a/dist/game/config/Character.properties
+++ b/dist/game/config/Character.properties
@@ -48,6 +48,8 @@
# ---------------------------------------------------------------------------
# Skills & Effects
# ---------------------------------------------------------------------------
+# In retail when skill is used from macro can be casted 1 second before reuse end.
+RetailSkillReuse = True
# When this is enabled it will read the "SkillDurationList" option.
# This will basically overlook the "time = x" in the skill XMLs so that you do not need to modify the L2J Datapack XMLs to increase skill duration.
diff --git a/src/main/java/com/l2jserver/Config.java b/src/main/java/com/l2jserver/Config.java
index 9f4f486..2a919cc 100644
--- a/src/main/java/com/l2jserver/Config.java
+++ b/src/main/java/com/l2jserver/Config.java
@@ -119,6 +119,7 @@
public static double RESPAWN_RESTORE_CP;
public static double RESPAWN_RESTORE_HP;
public static double RESPAWN_RESTORE_MP;
+ public static boolean RETAIL_SKILL_REUSE;
public static boolean ENABLE_MODIFY_SKILL_DURATION;
public static Map<Integer, Integer> SKILL_DURATION_LIST;
public static boolean ENABLE_MODIFY_SKILL_REUSE;
@@ -1390,6 +1391,7 @@
MP_REGEN_MULTIPLIER = character.getDouble("MpRegenMultiplier", 100) / 100;
CP_REGEN_MULTIPLIER = character.getDouble("CpRegenMultiplier", 100) / 100;
ENABLE_MODIFY_SKILL_DURATION = character.getBoolean("EnableModifySkillDuration", false);
+ RETAIL_SKILL_REUSE = character.getBoolean("RetailSkillReuse", true);
// Create Map only if enabled
if (ENABLE_MODIFY_SKILL_DURATION)
diff --git a/src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java b/src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java
index f57ff2d..d346627 100644
--- a/src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java
+++ b/src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java
@@ -1845,7 +1845,7 @@
}
}
- disableSkill(skill, reuseDelay);
+ disableSkill(skill, Config.RETAIL_SKILL_REUSE ? reuseDelay - 1000 : reuseDelay);
}
// Make sure that char is facing selected target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.