mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed bug where Iron Grip was using the attacker's skill values rather
than the defender's
This commit is contained in:
parent
c4ec9a6df9
commit
18a4f5ed40
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user