Exemplo n.º 1
0
 private void teleportTeam(KolizeumTeam team)
 {
     foreach (var client in team.Clients)
     {
         client.Action.Regen(0, true);
         client.Action.KolizeumLastMapID  = client.Character.MapID;
         client.Action.KolizeumLastCellID = client.Character.CellID;
         World.Network.World.GoToMap(client, this.Map.MapID, this.Map.CellID);
         System.Threading.Thread.Sleep(350);
     }
 }
Exemplo n.º 2
0
        private static void MakeTeams()
        {
            var tempList        = new List <KolizeumTeam>();
            var currentKoliTeam = new KolizeumTeam();

            foreach (var client in RegisteredClient.ToArray())
            {
                try
                {
                    client.Action.KolizeumMessage("Preparation des equipes, merci de patienter ...");
                    if (!client.Action.IsOccuped)
                    {
                        currentKoliTeam.AddMember(client);
                        if (currentKoliTeam.IsFull)
                        {
                            tempList.Add(currentKoliTeam);
                            currentKoliTeam = new KolizeumTeam();
                        }
                    }
                    else
                    {
                        client.Action.KolizeumMessage("Vous etes occuper, votre participation au kolizeum a ete annuler !");
                        UnSubscribeToKolizeum(client);
                    }
                }
                catch (Exception e)
                {
                    client.Action.KolizeumMessage("Votre participation au kolizeum a ete annuler du a une erreur lie a votre personnage");
                }
            }

            //Get formatted teams
            for (int i = 0; i <= tempList.Count - 1; i += 2)
            {
                try
                {
                    var redTeam  = tempList[i];
                    var blueTeam = tempList[i + 1];
                    redTeam.UnsubcribeMembers();
                    blueTeam.UnsubcribeMembers();
                    var match = new KolizeumMatch(redTeam, blueTeam);
                    match.Map = RandomMap();
                    match.InitializeMatch();
                }
                catch (Exception e)
                {
                    //Utilities.ConsoleStyle.Error("Can't make matchmaking : " + e.ToString());
                }
            }
        }
Exemplo n.º 3
0
 public KolizeumMatch(KolizeumTeam team1, KolizeumTeam team2)
 {
     this.RedTeam  = team1;
     this.BlueTeam = team2;
 }
Exemplo n.º 4
0
        private static void MakeTeams()
        {
            var tempList = new List<KolizeumTeam>();
            var currentKoliTeam = new KolizeumTeam();
            foreach (var client in RegisteredClient.ToArray())
            {
                try
                {
                    client.Action.KolizeumMessage("Preparation des equipes, merci de patienter ...");
                    if (!client.Action.IsOccuped)
                    {
                        currentKoliTeam.AddMember(client);
                        if (currentKoliTeam.IsFull)
                        {
                            tempList.Add(currentKoliTeam);
                            currentKoliTeam = new KolizeumTeam();
                        }
                    }
                    else
                    {
                        client.Action.KolizeumMessage("Vous etes occuper, votre participation au kolizeum a ete annuler !");
                        UnSubscribeToKolizeum(client);
                    }
                }
                catch (Exception e)
                {
                    client.Action.KolizeumMessage("Votre participation au kolizeum a ete annuler du a une erreur lie a votre personnage");
                }
            }

            //Get formatted teams
            for (int i = 0; i <= tempList.Count - 1; i += 2)
            {
                try
                {
                    var redTeam = tempList[i];
                    var blueTeam = tempList[i + 1];
                    redTeam.UnsubcribeMembers();
                    blueTeam.UnsubcribeMembers();
                    var match = new KolizeumMatch(redTeam, blueTeam);
                    match.Map = RandomMap();
                    match.InitializeMatch();
                }
                catch (Exception e)
                {
                    //Utilities.ConsoleStyle.Error("Can't make matchmaking : " + e.ToString());
                }
            }
        }
Exemplo n.º 5
0
 public KolizeumMatch(KolizeumTeam team1, KolizeumTeam team2)
 {
     this.RedTeam = team1;
     this.BlueTeam = team2;
 }
Exemplo n.º 6
0
 private void teleportTeam(KolizeumTeam team)
 {
     foreach (var client in team.Clients)
     {
         client.Action.Regen(0, true);
         client.Action.KolizeumLastMapID = client.Character.MapID;
         client.Action.KolizeumLastCellID = client.Character.CellID;
         World.Network.World.GoToMap(client, this.Map.MapID, this.Map.CellID);
         System.Threading.Thread.Sleep(350);
     }
 }