From e812a949db0d465adc3a97c3e24f3ff777430972 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 5 Apr 2014 13:12:20 +0200 Subject: [PATCH] Vanished players no longer get hit by AoE effects Fixes #1964 --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index bb2526c00..ef3abcf6c 100644 --- a/Changelog.txt +++ b/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 diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index 554a4492b..f6ddd1e13 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -501,6 +501,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;