Exemple #1
0
        public void StartFighting()
        {
            Clients.ForEach(x => x.UpdateRegistrationStatus(false, PvpArenaStepEnum.ARENA_STEP_STARTING_FIGHT));

            int arenaMapId = ArenaProvider.Instance.RandomArenaMap();

            BlueTeam.ForEach(x => MapsHandler.SendCurrentMapMessage(x.WorldClient, arenaMapId));
            RedTeam.ForEach(x => MapsHandler.SendCurrentMapMessage(x.WorldClient, arenaMapId));

            var fight = FightProvider.Instance.CreateArenaFight(MapRecord.GetMap(arenaMapId), this);

            BlueTeam.ForEach(x => fight.BlueTeam.AddFighter(x.WorldClient.Character.CreateFighter(fight.BlueTeam)));
            RedTeam.ForEach(x => fight.RedTeam.AddFighter(x.WorldClient.Character.CreateFighter(fight.RedTeam)));
            fight.StartPlacement();
            Clients.Clear();
            ArenaProvider.Instance.m_arena_groups.Remove(this);
        }
Exemple #2
0
 public void RequestFight()
 {
     RedTeam.ForEach(x => x.RequestFight(RedTeam.ConvertAll <int>(w => w.WorldClient.Character.Id)));
     BlueTeam.ForEach(x => x.RequestFight(BlueTeam.ConvertAll <int>(w => w.WorldClient.Character.Id)));
 }