void DenyFight(WorldClient client) { TemporaryArenaClient arenaClient = GetClient(client); ArenaProvider.Instance.Unregister(client); arenaClient.UpdateFighterStatus(Clients); }
public void AddClient(WorldClient client, bool master) { TemporaryArenaClient newClient = null; if (RedTeam.Count < ArenaProvider.FIGHTERS_PER_TEAM) { newClient = new TemporaryArenaClient(client, TeamColorEnum.RED_TEAM, master); } else if (BlueTeam.Count < ArenaProvider.FIGHTERS_PER_TEAM) { newClient = new TemporaryArenaClient(client, TeamColorEnum.BLUE_TEAM, master); } Clients.Add(newClient); newClient.UpdateRegistrationStatus(true, PvpArenaStepEnum.ARENA_STEP_REGISTRED); if (Full) { RequestFight(); } }
void AcceptFight(WorldClient client) { TemporaryArenaClient arenaClient = GetClient(client); arenaClient.Ready = true; arenaClient.UpdateRegistrationStatus(false, PvpArenaStepEnum.ARENA_STEP_WAITING_FIGHT); arenaClient.UpdateFighterStatus(Clients); foreach (var aClient in Clients) { if (aClient.Ready && aClient != arenaClient) { aClient.UpdateFighterStatus(new List <TemporaryArenaClient>() { aClient }); } } if (RedTeam.All(x => x.Ready) && BlueTeam.All(x => x.Ready)) { StartFighting(); } }