예제 #1
0
 /// <summary>
 /// Verschiebt die Spieler vom Winning Bracket in das Loser Bracket
 /// </summary>
 /// <param name="losers"></param>
 public void MoveLosingPlayers(List <Player> losers)
 {
     // Bei der ersten Loser Runde werden einfach alle Spieler in eine Liste getan
     if (FirstLosers)
     {
         foreach (Player loser in losers)
         {
             Winners.Remove(loser);
             Losers.Add(loser);
         }
         FirstLosers = false;
     }
     // Bei den nachfolgenden Runden müssen die Verlierer vom Winning Bracket gegen gezielte Gegner aus dem Loser Bracket spielen
     else
     {
         int counterIndex = 0;
         foreach (Player loser in losers)
         {
             Winners.Remove(loser);
             Losers.Insert(counterIndex, loser);
             counterIndex += 2;
         }
     }
 }
예제 #2
0
        public void RemovePlayer(Mobile m, bool defeated, bool kicked)
        {
            SupplySystem.RemoveEventGear(m);
            m.IsInEvent = false;
            m.Blessed   = false;

            m.MoveToWorld(LeaveLocation, LeaveMap);

            if (Contestants.Contains(m))
            {
                Contestants.Remove(m);
            }

            if (Fighting.Contains(m))
            {
                Fighting.Remove(m);
            }

            if (Winners.Contains(m))
            {
                Winners.Remove(m);
            }

            // Rob
            if (NeedRestock.Contains(m))
            {
                NeedRestock.Remove(m);
            }
            // end Rob

            if (m.NetState != null)
            {
                if (defeated)
                {
                    m.SendAsciiMessage(38, "You have been defeated");
                }
                else if (kicked)
                {
                    m.SendAsciiMessage(38, "You have been kicked from the tournament");
                }
                else
                {
                    m.SendAsciiMessage(38, "You have left the tournament");
                }
            }

            //Only print the message if the match is onging
            if (!m_Started)
            {
                return;
            }

            string leaveMessage;

            if (defeated)
            {
                leaveMessage = string.Format("{0} has been defeated", m.Name);
            }
            else if (kicked)
            {
                leaveMessage = string.Format("{0} has been kicked from a tournament", m.Name);
            }
            else
            {
                leaveMessage = string.Format("{0} has left a tournament", m.Name);
            }

            TournamentCore.SendMessage(Contestants, leaveMessage, true);
        }