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

than the defender's
This commit is contained in:
GJ 2013-01-25 17:57:42 -05:00
parent c4ec9a6df9
commit 18a4f5ed40
2 changed files with 3 additions and 3 deletions

View File

@ -23,6 +23,7 @@ Version 1.4.00-dev
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml = Fixed Leaf Blower not respecting the unlock level set in advanced.yml
= Fixed abilities activating with the wrong tool in hand = Fixed abilities activating with the wrong tool in hand
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted) = 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 ! 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. ! 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 ! Changed how Tree Feller is handled, it should now put less stress on the CPU

View File

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