Beispiel #1
0
 private Profession(eProfession profession, string nameEN, string nameDE, string iconPath, string emote, int raidOrgaPlusID) : base(nameEN, nameDE)
 {
     ProfessionEnum = profession;
     IconPath       = iconPath;
     Icon           = Image.FromFile(iconPath);
     Emote          = emote;
     RaidOrgaPlusID = raidOrgaPlusID;
 }
Beispiel #2
0
        private void SetTower()
        {
            var validProfessions = new eProfession[] { eProfession.Chronomancer, eProfession.Mirage, eProfession.Mesmer };
            var orderdPlayers    = Players
                                   .Where(p => p.Role == Role.Empty && p.Toughness > 0 && p.DPS_Target < 500)
                                   .Where(p => validProfessions.Contains(p.Class.ProfessionEnum))
                                   .OrderByDescending(p => p.Toughness)
                                   .ThenBy(p => p.DPS);

            if (orderdPlayers.Count() > 0)
            {
                foreach (var p in orderdPlayers.Take(Math.Max(orderdPlayers.Count(), 2)))
                {
                    p.Role = Role.Special;
                }
            }
        }
Beispiel #3
0
 public static Profession Get(eProfession profession)
 {
     return(Professions.Where(e => e.Key == profession).FirstOrDefault().Value ?? Professions[eProfession.Unknown]);
 }