فهرست منبع

Fixed bug where Iron Grip was using the attacker's skill values rather
than the defender's

GJ 12 سال پیش
والد
کامیت
18a4f5ed40
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 0
      Changelog.txt
  2. 2 3
      src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java

+ 1 - 0
Changelog.txt

@@ -23,6 +23,7 @@ Version 1.4.00-dev
  = Fixed Leaf Blower not respecting the unlock level set in advanced.yml
  = Fixed abilities activating with the wrong tool in hand
  = Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
+ = Fixed bug where Iron Grip was using the attacker's skill values rather than the defender's.
  ! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
  ! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
  ! Changed how Tree Feller is handled, it should now put less stress on the CPU

+ 2 - 3
src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java

@@ -84,10 +84,9 @@ public class UnarmedManager extends SkillManager {
 
         IronGripEventHandler eventHandler = new IronGripEventHandler(this, defender);
 
-        float chance = (float) ((Unarmed.ironGripMaxChance / Unarmed.ironGripMaxBonusLevel) * skillLevel);
-        if (chance > Unarmed.ironGripMaxChance) chance = (float) Unarmed.ironGripMaxChance;
+        double chance = (Unarmed.ironGripMaxChance / Unarmed.ironGripMaxBonusLevel) * eventHandler.skillModifier;
 
-        if (chance > Misc.getRandom().nextInt(activationChance)) {
+        if (chance > Misc.getRandom().nextInt(Misc.calculateActivationChance(Permissions.luckyUnarmed(defender)))) {
             eventHandler.sendAbilityMessages();
             return true;
         }