aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-07-07 21:33:58 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-07-07 21:33:58 +0200
commit60bcd6c98cb403e357631c0a666ee8eea753c3e5 (patch)
treeab086c318a2bcdae16431781322db3b214bd47e1
parente1a3908c858f49d05f24c438a5a899e32e115eb9 (diff)
Core/GameObject: GAMEOBJECT_TYPE_SPELL_FOCUS serverOnly == 1 are now invisible (only server)
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp11
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index ae08a4251a5..23e40382fa2 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -958,6 +958,17 @@ void GameObject::SaveRespawnTime()
GetMap()->SaveGORespawnTime(m_DBTableGuid, m_respawnTime);
}
+bool GameObject::IsNeverVisible() const
+{
+ if (WorldObject::IsNeverVisible())
+ return true;
+
+ if (GetGoType() == GAMEOBJECT_TYPE_SPELL_FOCUS && GetGOInfo()->spellFocus.serverOnly == 1)
+ return true;
+
+ return false;
+}
+
bool GameObject::IsAlwaysVisibleFor(WorldObject const* seer) const
{
if (WorldObject::IsAlwaysVisibleFor(seer))
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 8f70fc0e907..549de28bb12 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -778,6 +778,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void TriggeringLinkedGameObject(uint32 trapEntry, Unit* target);
+ bool IsNeverVisible() const override;
+
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsInvisibleDueToDespawn() const;