mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/GameObjects: Use serverOnly property of GameObjectTemplate for all types that have it, not just spell focus
This commit is contained in:
@@ -1245,7 +1245,7 @@ bool GameObject::IsNeverVisible() const
|
||||
if (WorldObject::IsNeverVisible())
|
||||
return true;
|
||||
|
||||
if (GetGoType() == GAMEOBJECT_TYPE_SPELL_FOCUS && GetGOInfo()->spellFocus.serverOnly == 1)
|
||||
if (GetGOInfo()->GetServerOnly())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -617,6 +617,18 @@ struct GameObjectTemplate
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetServerOnly() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_GENERIC: return _generic.serverOnly;
|
||||
case GAMEOBJECT_TYPE_TRAP: return trap.serverOnly;
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.serverOnly;
|
||||
case GAMEOBJECT_TYPE_AURA_GENERATOR: return auraGenerator.serverOnly;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void InitializeQueryData();
|
||||
WorldPacket BuildQueryData(LocaleConstant loc) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user