fix(Unit/ProcessTerrainStatusUpdate): prevent removal swimming auras if swimming (#18902)

* do not remove swimming auras if we are swimming

* refactor to isSwimming()

* Update src/server/game/Entities/Unit/Unit.cpp

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>

---------

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
Jelle Meeus
2024-05-29 20:17:25 +02:00
committed by GitHub
parent 4884e33f07
commit 0793a979bb

View File

@@ -4223,7 +4223,7 @@ void Unit::ProcessTerrainStatusUpdate()
// remove appropriate auras if we are swimming/not swimming respectively
if (liquidData.Status & MAP_LIQUID_STATUS_SWIMMING)
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_ABOVEWATER);
else
else if (!isSwimming())
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
// liquid aura handling