Core/GameObjects: Use serverOnly property of GameObjectTemplate for all types that have it, not just spell focus
Port From (https://github.com/TrinityCore/TrinityCore/commit/7df4f5b2856af9b8eb2af83f827915ac28e3db3a)
This commit is contained in:
@@ -1295,7 +1295,7 @@ namespace Game.Entities
|
|||||||
if (base.IsNeverVisibleFor(seer))
|
if (base.IsNeverVisibleFor(seer))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (GetGoType() == GameObjectTypes.SpellFocus && GetGoInfo().SpellFocus.serverOnly == 1)
|
if (GetGoInfo().GetServerOnly() != 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (GetDisplayId() == 0)
|
if (GetDisplayId() == 0)
|
||||||
|
|||||||
@@ -677,6 +677,15 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint GetServerOnly() => type switch
|
||||||
|
{
|
||||||
|
GameObjectTypes.Generic => Generic.serverOnly,
|
||||||
|
GameObjectTypes.Trap => Trap.serverOnly,
|
||||||
|
GameObjectTypes.SpellFocus => SpellFocus.serverOnly,
|
||||||
|
GameObjectTypes.AuraGenerator => AuraGenerator.serverOnly,
|
||||||
|
_ => 0,
|
||||||
|
};
|
||||||
|
|
||||||
public uint GetSpellFocusType()
|
public uint GetSpellFocusType()
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|||||||
Reference in New Issue
Block a user