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

@@ -235,7 +235,6 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
m_MirrorTimerFlags = UNDERWATER_NONE;
m_MirrorTimerFlagsLast = UNDERWATER_NONE;
m_isInWater = false;
m_drunkTimer = 0;
m_deathTimer = 0;
m_deathExpireTime = 0;
@@ -2091,24 +2090,6 @@ bool Player::IsFalling() const
return GetPositionZ() < m_lastFallZ && !IsInFlight();
}
void Player::SetInWater(bool apply)
{
if (m_isInWater == apply)
return;
//define player in water by opcodes
//move player's guid into HateOfflineList of those mobs
//which can't swim and move guid back into ThreatList when
//on surface.
//TODO: exist also swimming mobs, and function must be symmetric to enter/leave water
m_isInWater = apply;
// remove auras that need water/land
RemoveAurasWithInterruptFlags(apply ? AURA_INTERRUPT_FLAG_NOT_ABOVEWATER : AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
getHostileRefMgr().updateThreatTables();
}
bool Player::IsInAreaTriggerRadius(const AreaTrigger* trigger) const
{
static const float delta = 5.0f;

View File

@@ -1085,9 +1085,6 @@ public:
static bool BuildEnumData(PreparedQueryResult result, WorldPacket* data);
void SetInWater(bool apply);
[[nodiscard]] bool IsInWater() const override { return m_isInWater; }
[[nodiscard]] bool IsFalling() const;
bool IsInAreaTriggerRadius(const AreaTrigger* trigger) const;
@@ -2915,7 +2912,6 @@ private:
int32 m_MirrorTimer[MAX_TIMERS];
uint8 m_MirrorTimerFlags;
uint8 m_MirrorTimerFlagsLast;
bool m_isInWater;
// Current teleport data
WorldLocation teleportStore_dest;