Explorar o código

Fixed bug where Deflect was calculated based on the attacker, not the defender

Closes #794
TfT_02 %!s(int64=12) %!d(string=hai) anos
pai
achega
ce32792668

+ 1 - 0
Changelog.txt

@@ -25,6 +25,7 @@ Version 1.4.03-dev
  = Fixed bug with using Salvage on stacked items.
  = Fixed bug where the 'mcmmo.commands.ptp.world.all' was registered twice
  = Fixed bug where Beast Lore wouldn't work on friendly pets
+ = Fixed bug where Deflect was calculated based on the attacker, not the defender. (We really did this time!)
  ! Moved the Salvage unlock level from config.yml to advanced.yml
  ! Changed how Chimaera Wings are acquired, you need to craft them now. (By default, use 5 feathers in a shapeless recipe)
  - Removed option to disable Salvage via the config file. This should be handled via permissions instead.

+ 1 - 1
src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java

@@ -232,7 +232,7 @@ public final class CombatUtils {
                         UnarmedManager unarmedManager = UserManager.getPlayer((Player) target).getUnarmedManager();
 
                         if (unarmedManager.canDeflect()) {
-                            event.setCancelled(mcMMOPlayer.getUnarmedManager().deflectCheck());
+                            event.setCancelled(unarmedManager.deflectCheck());
 
                             if (event.isCancelled()) {
                                 return;