Browse Source

Fixed potion buff option not using the appropriate # of ticks

GJ 12 years ago
parent
commit
c849f751bb
2 changed files with 3 additions and 2 deletions
  1. 1 0
      Changelog.txt
  2. 2 2
      src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java

+ 1 - 0
Changelog.txt

@@ -20,6 +20,7 @@ Version 1.4.05-dev
  = Fixed Berserk getting "stuck" when /mcrefresh was used
  = Fixed ClassCastException with Taming
  = Fixed huge mushroom blocks not being properly tracked
+ = Fixed potion buff option not using the appropriate # of ticks
 
 Version 1.4.04
  + Added functions to ExperienceAPI for use with offline players

+ 2 - 2
src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java

@@ -503,10 +503,10 @@ public class SkillUtils {
             int ticks = 0;
 
             if (mcMMOPlayer.getAbilityMode(AbilityType.SUPER_BREAKER)) {
-                ticks = ((int) (mcMMOPlayer.getProfile().getSkillDATS(AbilityType.SUPER_BREAKER) - System.currentTimeMillis())) / Misc.TIME_CONVERSION_FACTOR;
+                ticks = ((int) (mcMMOPlayer.getProfile().getSkillDATS(AbilityType.SUPER_BREAKER) - (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR))) * 20;
             }
             else if (mcMMOPlayer.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER)) {
-                ticks = ((int) (mcMMOPlayer.getProfile().getSkillDATS(AbilityType.GIGA_DRILL_BREAKER) - System.currentTimeMillis())) / Misc.TIME_CONVERSION_FACTOR;
+                ticks = ((int) (mcMMOPlayer.getProfile().getSkillDATS(AbilityType.GIGA_DRILL_BREAKER) - (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR))) * 20;
             }
 
             PotionEffect abilityBuff = new PotionEffect(PotionEffectType.FAST_DIGGING, duration + ticks, amplifier + 10);