Пример #1
0
 public static void SendParticipantMessage(ArenaDuel duel, int message, bool inRegion = false, string args = "", int hue = 0x1F)
 {
     foreach (KeyValuePair <PlayerMobile, PlayerStatsEntry> part in duel.GetParticipants(inRegion))
     {
         SendMessage(part.Key, message, args, hue);
     }
 }
Пример #2
0
 public static void SendParticipantMessage(ArenaDuel duel, int message, bool inRegion = false, string args = "", int hue = 0x1F)
 {
     foreach (var part in duel.GetParticipants(inRegion))
     {
         SendMessage(part.Key, message, args, hue);
     }
 }
Пример #3
0
        public void RecordRankings(ArenaDuel duel, ArenaTeam winners)
        {
            List <ArenaStats> rankings;

            rankings = duel.BattleMode == BattleMode.Team ? TeamRankings : SurvivalRankings;

            foreach (KeyValuePair <PlayerMobile, PlayerStatsEntry> part in duel.GetParticipants())
            {
                PlayerMobile pm    = part.Key;
                ArenaStats   stats = rankings.FirstOrDefault(r => r.Owner == pm);

                if (stats == null)
                {
                    stats = new ArenaStats(pm);
                    rankings.Add(stats);
                }

                ArenaTeam team = duel.GetTeam(pm);

                if (team != winners)
                {
                    stats.Ranking -= 33;
                }
                else
                {
                    stats.Ranking += 33;
                }
            }

            rankings.Sort();
        }
Пример #4
0
        public static bool HasSameIP(Mobile m, ArenaDuel duel)
        {
            if (duel == null || m.AccessLevel > AccessLevel.Player)
            {
                return(false);
            }

            foreach (KeyValuePair <PlayerMobile, PlayerStatsEntry> kvp in duel.GetParticipants())
            {
                if (IsSameIP(m, kvp.Key))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #5
0
        public void RecordRankings(ArenaDuel duel, ArenaTeam winners)
        {
            List <ArenaStats> rankings;

            rankings = duel.BattleMode == BattleMode.Team ? TeamRankings : SurvivalRankings;

            foreach (KeyValuePair <PlayerMobile, PlayerStatsEntry> part in duel.GetParticipants())
            {
                PlayerMobile pm    = part.Key;
                ArenaStats   stats = null;

                for (var index = 0; index < rankings.Count; index++)
                {
                    var r = rankings[index];

                    if (r.Owner == pm)
                    {
                        stats = r;
                        break;
                    }
                }

                if (stats == null)
                {
                    stats = new ArenaStats(pm);
                    rankings.Add(stats);
                }

                ArenaTeam team = duel.GetTeam(pm);

                if (team != winners)
                {
                    stats.Ranking -= 33;
                }
                else
                {
                    stats.Ranking += 33;
                }
            }

            rankings.Sort();
        }
Пример #6
0
        public void RecordRankings(ArenaDuel duel, ArenaTeam winners)
        {
            List <ArenaStats> rankings;

            if (duel.BattleMode == BattleMode.Team)
            {
                rankings = TeamRankings;
            }
            else
            {
                rankings = SurvivalRankings;
            }

            foreach (var part in duel.GetParticipants())
            {
                var        pm    = part.Key;
                ArenaStats stats = rankings.FirstOrDefault(r => r.Owner == pm);

                if (stats == null)
                {
                    stats = new ArenaStats(pm);
                    rankings.Add(stats);
                }

                var team = duel.GetTeam(pm);

                if (team != winners)
                {
                    stats.Ranking -= 33;
                }
                else
                {
                    stats.Ranking += 33;
                }
            }

            rankings.Sort();
        }