Explorar o código

Fixed bug where Shake wouldn't damage mobs whose max health was less
than 4.

Fixes #845

GJ %!s(int64=12) %!d(string=hai) anos
pai
achega
ed09d1b390

+ 1 - 0
Changelog.txt

@@ -11,6 +11,7 @@ Version 1.4.04-dev
  = Fixed bug where trying to activate a Chimaera Wing would require one item too much
  = Fixed bug where Treefeller would try to cut too many leaves and reach the threshold when it shouldn't
  = Fixed bug where Mining wasn't awarding double drops
+ = Fixed bug where Shake wouldn't damage mobs whose max health was less than 4
 
 Version 1.4.03
  + Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java

@@ -189,7 +189,7 @@ public class FishingManager extends SkillManager {
             }
 
             Misc.dropItem(target.getLocation(), drop);
-            CombatUtils.dealDamage(target, target.getMaxHealth() / 4); // Make it so you can shake a mob no more than 4 times.
+            CombatUtils.dealDamage(target, Math.max(target.getMaxHealth() / 4, 1)); // Make it so you can shake a mob no more than 4 times.
         }
     }