Revert Visibility Notifier changes (#17682)

* Revert "fix(Core/Grid): Implement missing GridUnload setting (#17569)"

This reverts commit 79b39f9655.

* Revert "fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)"

This reverts commit 60e27511c5.

* Revert "fix(Core): GridCleanUpDelay Log (#17436)"

This reverts commit 90b16ca065.

* Revert "feat(Core/Grids): Implement visibility notifier (#15919)"

This reverts commit 2779833768.
This commit is contained in:
Kitzunu
2023-11-12 00:48:49 +01:00
committed by GitHub
parent 4df0ab3427
commit bbadc32bea
64 changed files with 1074 additions and 1764 deletions

View File

@@ -1353,7 +1353,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (GetTransport())
{
m_transport->RemovePassenger(this, true);
m_transport->RemovePassenger(this);
m_transport = nullptr;
m_movementInfo.transport.Reset();
m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
}
@@ -1395,7 +1398,10 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
else
{
m_transport->RemovePassenger(this, true);
m_transport->RemovePassenger(this);
m_transport = nullptr;
m_movementInfo.transport.Reset();
m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
}
}
@@ -5575,11 +5581,14 @@ void Player::SaveRecallPosition()
m_recallO = GetOrientation();
}
void Player::SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, Player const* skipped_rcvr) const
void Player::SendMessageToSetInRange(WorldPacket const* data, float dist, bool self, bool includeMargin, Player const* skipped_rcvr) const
{
if (self)
GetSession()->SendPacket(data);
dist += GetObjectSize();
if (includeMargin)
dist += VISIBILITY_COMPENSATION; // pussywizard: to ensure everyone receives all important packets
Acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr);
Cell::VisitWorldObjects(this, notifier, dist);
}
@@ -11313,7 +11322,7 @@ WorldLocation Player::GetStartPosition() const
return WorldLocation(mapId, info->positionX, info->positionY, info->positionZ, 0);
}
bool Player::HaveAtClient(Object const* u) const
bool Player::HaveAtClient(WorldObject const* u) const
{
if (u == this)
{
@@ -13087,11 +13096,14 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
UpdateVisibilityOf(target);
if (target->isType(TYPEMASK_UNIT) && !GetVehicle())
static_cast<Unit*>(target)->AddPlayerToVision(this);
((Unit*)target)->AddPlayerToVision(this);
SetSeer(target);
}
else
{
//must immediately set seer back otherwise may crash
m_seer = this;
LOG_DEBUG("maps", "Player::CreateViewpoint: Player {} remove seer", GetName());
if (!RemoveGuidValue(PLAYER_FARSIGHT, target->GetGUID()))