mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Entities: Tweak WorldObject::IsNeverVisible to pass the seer
This commit is contained in:
@@ -1039,9 +1039,9 @@ void GameObject::SaveRespawnTime()
|
||||
GetMap()->SaveGORespawnTime(m_spawnId, m_respawnTime);
|
||||
}
|
||||
|
||||
bool GameObject::IsNeverVisible() const
|
||||
bool GameObject::IsNeverVisibleFor(WorldObject const* seer) const
|
||||
{
|
||||
if (WorldObject::IsNeverVisible())
|
||||
if (WorldObject::IsNeverVisibleFor(seer))
|
||||
return true;
|
||||
|
||||
if (GetGoType() == GAMEOBJECT_TYPE_SPELL_FOCUS && GetGOInfo()->spellFocus.serverOnly == 1)
|
||||
|
||||
@@ -1091,8 +1091,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject>
|
||||
|
||||
void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
|
||||
|
||||
bool IsNeverVisible() const override;
|
||||
|
||||
bool IsNeverVisibleFor(WorldObject const* seer) const override;
|
||||
bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
|
||||
bool IsInvisibleDueToDespawn() const override;
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
void SetLocationMapId(uint32 _mapId) { m_mapId = _mapId; }
|
||||
void SetLocationInstanceId(uint32 _instanceId) { m_InstanceId = _instanceId; }
|
||||
|
||||
virtual bool IsNeverVisible() const { return !IsInWorld(); }
|
||||
virtual bool IsNeverVisibleFor(WorldObject const* /*seer*/) const { return !IsInWorld(); }
|
||||
virtual bool IsAlwaysVisibleFor(WorldObject const* /*seer*/) const { return false; }
|
||||
virtual bool IsInvisibleDueToDespawn() const { return false; }
|
||||
//difference from IsAlwaysVisibleFor: 1. after distance check; 2. use owner or charmer as seer
|
||||
|
||||
@@ -22963,9 +22963,9 @@ bool Player::HaveAtClient(Object const* u) const
|
||||
return u == this || m_clientGUIDs.find(u->GetGUID()) != m_clientGUIDs.end();
|
||||
}
|
||||
|
||||
bool Player::IsNeverVisible() const
|
||||
bool Player::IsNeverVisibleFor(WorldObject const* seer) const
|
||||
{
|
||||
if (Unit::IsNeverVisible())
|
||||
if (Unit::IsNeverVisibleFor(seer))
|
||||
return true;
|
||||
|
||||
if (GetSession()->PlayerLogout() || GetSession()->PlayerLoading())
|
||||
|
||||
@@ -2346,7 +2346,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
|
||||
bool HaveAtClient(Object const* u) const;
|
||||
|
||||
bool IsNeverVisible() const override;
|
||||
bool IsNeverVisibleFor(WorldObject const* seer) const override;
|
||||
|
||||
bool IsVisibleGloballyFor(Player const* player) const;
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ namespace WorldPackets
|
||||
bool SpeedAsTime = false;
|
||||
float TravelSpeed = 0.0f;
|
||||
float UnkZero = 0.0f; // Always zero
|
||||
G3D::Vector3 SourceOrientation; // Orientation is z
|
||||
G3D::Vector3 SourceOrientation; // Vector of rotations, Orientation is z
|
||||
G3D::Vector3 TargetLocation; // Exclusive with Target
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user