fix(Core/Players): Removed old and invalid Player::SetInWater funct… (#9739)

* fix(Core/Players): Removed old and invalid `Player::SetInWater` function.

Updates #8729

* buildfix.
This commit is contained in:
UltraNix
2021-12-28 13:34:45 +01:00
committed by GitHub
parent f88203a73a
commit a54c84f349
6 changed files with 6 additions and 48 deletions

View File

@@ -3790,10 +3790,13 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
return false;
}
if (IsInWater())
// In water or jumping in water
if (IsInWater() || (GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER && (IsFalling() || (ToPlayer() && ToPlayer()->IsFalling()))))
{
return IsUnderWater() ? c->CanEnterWater() : (c->CanEnterWater() || c->CanFly());
else
return c->CanWalk() || c->CanFly() || (c->CanSwim() && IsInWater());
}
return c->CanWalk() || c->CanFly() || (c->CanSwim() && IsInWater());
}
void Unit::ProcessPositionDataChanged(PositionFullTerrainStatus const& data)