Core/Movement: Don't rely on client for water state detection

Port From (https://github.com/TrinityCore/TrinityCore/commit/931a3871f88737ca13277ee88444b9808b366039)
This commit is contained in:
hondacrx
2021-03-04 21:56:26 -05:00
parent 866b81af86
commit 5fd04ced4f
3 changed files with 16 additions and 16 deletions
-6
View File
@@ -140,12 +140,6 @@ namespace Game
if (opcode == ClientOpcodes.MoveFallLand || opcode == ClientOpcodes.MoveStartSwim)
mover.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Landing); // Parachutes
if (plrMover && movementInfo.HasMovementFlag(MovementFlag.Swimming) != plrMover.IsInWater())
{
// now client not include swimming flag in case jumping under water
plrMover.SetInWater(!plrMover.IsInWater() || plrMover.GetMap().IsUnderWater(plrMover.GetPhaseShift(), movementInfo.Pos.posX, movementInfo.Pos.posY, movementInfo.Pos.posZ));
}
uint mstime = GameTime.GetGameTimeMS();
if (m_clientTimeDelay == 0)