This is an update to this: https://l2jlisvus.forumotion.com/t927-buff-time-in-rates
For rev. 589
https://gist.github.com/JMD13/f831821924b32c1ab02295dfe1b3f480
Example 59 minutes (1hour) buff duration:
For rev. 589
https://gist.github.com/JMD13/f831821924b32c1ab02295dfe1b3f480
- Code:
Index: java/config/rates.properties
===================================================================
--- java/config/rates.properties (revision 589)
+++ java/config/rates.properties (working copy)
@@ -57,4 +57,10 @@
# is LastLevelSpoilIsLearned for calculations on success rate
# 72 = spoil lvl 11 (c3)
LastLevelSpoilIsLearned = 72
-# ----
\ No newline at end of file
+
+# ------------------------
+# Buff Time Rates
+# ------------------------
+BuffMultiplier=1.00
+SpiritMultiplier=1.00
+DanceTimeMultiplier=1.00
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 589)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -552,6 +552,11 @@
/** Karma drop rate for equipment and weapon */
public static int KARMA_RATE_DROP_EQUIP_WEAPON;
+ // Custom Buff rates
+ public static float BUFF_TIME_MULTIPLIER;
+ public static float SPIRIT_TIME_MULTIPLIER;
+ public static float DANCE_TIME_MULTIPLIER;
+
/** Time after which item will auto-destroy */
public static int AUTODESTROY_ITEM_AFTER;
/** List of items that will not be destroyed (seperated by ",") */
@@ -1849,6 +1854,11 @@
KARMA_RATE_DROP_EQUIP = Integer.parseInt(ratesSettings.getProperty("KarmaRateDropEquip", "40"));
KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(ratesSettings.getProperty("KarmaRateDropEquipWeapon", "10"));
+ // Custom Buff time rates
+ BUFF_TIME_MULTIPLIER = Float.parseFloat(ratesSettings.getProperty("BuffMultiplier", "1.00"));
+ SPIRIT_TIME_MULTIPLIER = Float.parseFloat(ratesSettings.getProperty("SpiritMultiplier", "1.00"));
+ DANCE_TIME_MULTIPLIER = Float.parseFloat(ratesSettings.getProperty("DanceTimeMultiplier", "1.00"));
+
CAN_SPOIL_LOWER_LEVEL_MOBS = Boolean.parseBoolean(ratesSettings.getProperty("CanSpoilLowerLevelMobs", "false"));
CAN_DELEVEL_AND_SPOIL_MOBS = Boolean.parseBoolean(ratesSettings.getProperty("CanDelevelToSpoil", "true"));
MAXIMUM_PLAYER_AND_MOB_LEVEL_DIFFERENCE = Float.parseFloat(ratesSettings.getProperty("MaximumPlayerAndMobLevelDifference", "9."));
Index: java/net/sf/l2j/gameserver/skills/DocumentBase.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/DocumentBase.java (revision 589)
+++ java/net/sf/l2j/gameserver/skills/DocumentBase.java (working copy)
@@ -222,8 +222,15 @@
}
}
}
- else
- time = ((L2Skill) template).getBuffDuration() / 1000 / count;
+ else time = ((L2Skill) template).getBuffDuration() / 1000 / count;
+
+ if (attrs.getNamedItem("name").getNodeValue().equalsIgnoreCase("buff"))
+ //if (((L2Skill)template).isDance()) time = (int)((float)time * Config.DANCE_TIME_MULTIPLIER);
+ if (119 < time && time < 151) time = (int)((float)time * Config.DANCE_TIME_MULTIPLIER);
+ else
+ if (1199 < time && time < 1501) time = (int)((float)time * Config.BUFF_TIME_MULTIPLIER);
+ else
+ if (299 < time && time < 481) time = (int)((float)time * Config.SPIRIT_TIME_MULTIPLIER);
boolean self = false;
if (attrs.getNamedItem("self") != null)
Example 59 minutes (1hour) buff duration:
# ------------------------
# Buff Time Rates
# ------------------------
BuffMultiplier=3.00
SpiritMultiplier=12.00
DanceTimeMultiplier=30.00