Core/Areas: Update AreaFlags
Port From (https://github.com/TrinityCore/TrinityCore/commit/f8f1c3b4f0ca631e76101f8492b9688c6d2dca01)
This commit is contained in:
@@ -131,25 +131,14 @@ namespace Game.DataStorage
|
||||
public uint[] Flags = new uint[2];
|
||||
public ushort[] LiquidTypeID = new ushort[4];
|
||||
|
||||
public AreaFlags GetFlags() { return (AreaFlags)Flags[0]; }
|
||||
public AreaFlags2 GetFlags2() { return (AreaFlags2)Flags[1]; }
|
||||
public AreaMountFlags GetMountFlags() { return (AreaMountFlags)MountFlags; }
|
||||
|
||||
public bool IsSanctuary()
|
||||
{
|
||||
return HasFlag(AreaFlags.Sanctuary);
|
||||
return GetFlags().HasFlag(AreaFlags.NoPvP);
|
||||
}
|
||||
|
||||
public bool IsFlyable()
|
||||
{
|
||||
if (HasFlag(AreaFlags.Outland))
|
||||
{
|
||||
if (!HasFlag(AreaFlags.NoFlyZone))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool HasFlag(AreaFlags flag) { return Flags[0].HasAnyFlag((uint)flag); }
|
||||
|
||||
public bool HasFlag2(AreaFlags2 flag) { return Flags[1].HasAnyFlag((uint)flag); }
|
||||
}
|
||||
|
||||
public sealed class AreaTriggerRecord
|
||||
|
||||
Reference in New Issue
Block a user