Преглед изворни кода

Vanished players no longer get hit by AoE effects

Fixes #1964
TfT_02 пре 11 година
родитељ
комит
a9488bc18b
2 измењених фајлова са 6 додато и 0 уклоњено
  1. 1 0
      Changelog.txt
  2. 5 0
      src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java

+ 1 - 0
Changelog.txt

@@ -9,6 +9,7 @@ Key:
 
 Version 1.5.01-dev
  = Fixed bug where the Updater was running on the main thread.
+ ! Vanished players no longer get hit by AoE effects
 
 Version 1.5.00
  + Added Podzol & Red Sand to Excavation

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

@@ -502,6 +502,11 @@ public final class CombatUtils {
                 return false;
             }
 
+            // Vanished players should not be able to get hit by AoE effects
+            if (!player.canSee(defender)) {
+                return false;
+            }
+
             // It may seem a bit redundant but we need a check here to prevent bleed from being applied in applyAbilityAoE()
             if (callFakeDamageEvent(player, entity, 1.0) == 0) {
                 return false;