From 145bb98ecbc4bb265d5c33cc2bb8358a639d5e98 Mon Sep 17 00:00:00 2001 From: Teleqraph Date: Sat, 6 May 2023 22:54:13 +0200 Subject: Core/Auras: Implement SpellAuraInterruptFlags2::Falling (#28941) --- src/server/game/Entities/Unit/Unit.cpp | 3 +++ src/server/game/Spells/SpellDefines.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 32e3362285f..6c7491f2c2e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12496,6 +12496,9 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel _positionUpdateInfo.Relocated = relocated; _positionUpdateInfo.Turned = turn; + if (IsFalling()) + RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2::Falling); + bool isInWater = IsInWater(); if (!IsFalling() || isInWater || IsFlying()) RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2::Ground); diff --git a/src/server/game/Spells/SpellDefines.h b/src/server/game/Spells/SpellDefines.h index de0cb71c7e1..54f850c4e1f 100644 --- a/src/server/game/Spells/SpellDefines.h +++ b/src/server/game/Spells/SpellDefines.h @@ -116,7 +116,7 @@ DEFINE_ENUM_FLAG(SpellAuraInterruptFlags); enum class SpellAuraInterruptFlags2 : uint32 { None = 0, - Falling = 0x00000001, // NYI + Falling = 0x00000001, // Implemented in Unit::UpdatePosition Swimming = 0x00000002, NotMoving = 0x00000004, // NYI Ground = 0x00000008, -- cgit v1.2.3