Added new creature extra flag which makes npc visible only to dead units
Port From (https://github.com/TrinityCore/TrinityCore/commit/70d5775d3f679e77c2b00418375f180f6209484d)
This commit is contained in:
@@ -208,6 +208,7 @@ namespace Framework.Constants
|
||||
Trigger = 0x80, // Trigger Creature
|
||||
NoTaunt = 0x100, // Creature Is Immune To Taunt Auras And Effect Attack Me
|
||||
NoMoveFlagsUpdate = 0x200, // Creature won't update movement flags
|
||||
GhostVisibility = 0x400, // creature will be only visible for dead players
|
||||
Worldevent = 0x4000, // Custom Flag For World Event Creatures (Left Room For Merging)
|
||||
Guard = 0x8000, // Creature Is Guard
|
||||
NoCrit = 0x20000, // Creature Can'T Do Critical Strikes
|
||||
|
||||
@@ -813,8 +813,7 @@ namespace Game.Entities
|
||||
|
||||
LastUsedScriptID = GetScriptId();
|
||||
|
||||
// TODO: Replace with spell, handle from DB
|
||||
if (IsSpiritHealer() || IsSpiritGuide())
|
||||
if (IsSpiritHealer() || IsSpiritGuide() || GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.GhostVisibility))
|
||||
{
|
||||
m_serverSideVisibility.SetValue(ServerSideVisibilityType.Ghost, GhostVisibilityType.Ghost);
|
||||
m_serverSideVisibilityDetect.SetValue(ServerSideVisibilityType.Ghost, GhostVisibilityType.Ghost);
|
||||
|
||||
@@ -2076,7 +2076,7 @@ namespace Game.Entities
|
||||
bgMap.GetBG().ProcessEvent(this, eventId, invoker);
|
||||
}
|
||||
|
||||
public virtual uint GetScriptId()
|
||||
public uint GetScriptId()
|
||||
{
|
||||
GameObjectData gameObjectData = GetGoData();
|
||||
if (gameObjectData != null)
|
||||
|
||||
Reference in New Issue
Block a user