public static bool IsNeutralToAll(this FactionTemplateEntry entry)
        {
            for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
            {
                if (entry.EnemyFaction[i] != 0)
                {
                    return(false);
                }
            }

            return(entry.EnemyFactionGroupMask == 0 && entry.FriendlyFactionGroupMask == 0);
        }
        public static bool IsFriendlyTo(this FactionTemplateEntry entry, FactionTemplateEntry entry2)
        {
            if (entry2.FactionId != 0)
            {
                for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
                {
                    if (entry.EnemyFaction[i] == entry2.FactionId)
                    {
                        return(false);
                    }
                }
                for (int i = 0; i < MAX_FACTION_RELATIONS; ++i)
                {
                    if (entry.FriendlyFaction[i] == entry2.FactionId)
                    {
                        return(true);
                    }
                }
            }

            return(((entry.FriendlyFactionGroupMask & entry2.OwnFactionGroupMask) != 0) || ((entry.OwnFactionGroupMask & entry2.FriendlyFactionGroupMask) != 0));
        }
 public static bool IsContestedGuardFaction(this FactionTemplateEntry entry)
 {
     return((entry.FactionFlags & FactionTemplateFlags.FLAG_CONTESTED_GUARD) != 0);
 }
 public static bool IsHostileToPlayers(this FactionTemplateEntry entry)
 {
     return((entry.EnemyFactionGroupMask & FactionGroupMask.PLAYER) != 0);
 }