Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE
Port From (https://github.com/TrinityCore/TrinityCore/commit/88ff97c1f96381565c47f8ca1993bdc7fce19fd6)
This commit is contained in:
@@ -373,7 +373,7 @@ namespace Game.Entities
|
||||
|
||||
// trigger creature is always not selectable and can not be attacked
|
||||
if (IsTrigger())
|
||||
SetUnitFlag(UnitFlags.Uninteractible);
|
||||
SetUninteractible(true);
|
||||
|
||||
InitializeReactState();
|
||||
|
||||
@@ -2305,7 +2305,7 @@ namespace Game.Entities
|
||||
if (IsCivilian())
|
||||
return false;
|
||||
|
||||
if (HasUnitFlag(UnitFlags.NonAttackable | UnitFlags.Uninteractible) || IsImmuneToNPC())
|
||||
if (HasUnitFlag(UnitFlags.NonAttackable) || IsImmuneToNPC() || IsUninteractible())
|
||||
return false;
|
||||
|
||||
// skip fighting creature
|
||||
|
||||
Reference in New Issue
Block a user