Ejemplo n.º 1
0
 public LFGuildPlayer(LFGuildPlayer settings)
 {
     _comment      = settings.GetComment();
     _guid         = settings.GetGUID();
     _roles        = settings.GetClassRoles();
     _availability = settings.GetAvailability();
     _interests    = settings.GetInterests();
     _level        = settings.GetLevel();
 }
Ejemplo n.º 2
0
        public List <LFGuildSettings> GetGuildsMatchingSetting(LFGuildPlayer settings, uint faction)
        {
            List <LFGuildSettings> resultSet = new List <LFGuildSettings>();

            foreach (var guildSettings in _guildSettings.Values)
            {
                if (!guildSettings.IsListed())
                {
                    continue;
                }

                if (guildSettings.GetTeam() != faction)
                {
                    continue;
                }

                if (!Convert.ToBoolean(guildSettings.GetAvailability() & settings.GetAvailability()))
                {
                    continue;
                }

                if (!Convert.ToBoolean(guildSettings.GetClassRoles() & settings.GetClassRoles()))
                {
                    continue;
                }

                if (!Convert.ToBoolean(guildSettings.GetInterests() & settings.GetInterests()))
                {
                    continue;
                }

                if (!Convert.ToBoolean(guildSettings.GetLevel() & settings.GetLevel()))
                {
                    continue;
                }

                resultSet.Add(guildSettings);
            }

            return(resultSet);
        }