void Awake () { //Debug.Log ("ArenaGroup AWAKE()"); arenaGroupStatic = this; ArenaViewOff(); this.enabled = false; }
void Awake() { //Debug.Log ("ArenaGroup AWAKE()"); arenaGroupStatic = this; ArenaViewOff(); this.enabled = false; }
public FightArena CreateArenaFight(MapRecord map, ArenaGroup group) { FightTeam blueTeam = new FightTeam(0, map.BlueCells, TeamColorEnum.BLUE_TEAM, TeamTypeEnum.TEAM_TYPE_PLAYER); FightTeam redTeam = new FightTeam(1, map.RedCells, TeamColorEnum.RED_TEAM, TeamTypeEnum.TEAM_TYPE_PLAYER); FightArena fight = new FightArena(PopNextFightId(), map, blueTeam, redTeam, 350); m_worldFights.Add(fight); return(fight); }
public void Answer(WorldClient client, bool accept) { lock (m_locker) { ArenaGroup group = m_arena_groups.Find(x => x.Contains(client)); if (group == null) { client.Character.ReplyError("Vous ne pouvez pas répondre a un match, désinscrit..."); return; } else { group.Answer(client, accept); } } }
public void SearchArena(WorldClient client) { lock (m_locker) { ArenaGroup arena = FindArena(client); if (arena == null) { m_arena_groups.Add(new ArenaGroup(client)); } else { arena.AddClient(client, false); } client.Send(new GameRolePlayArenaRegistrationStatusMessage(true, (sbyte)PvpArenaStepEnum.ARENA_STEP_REGISTRED, 0)); } }
public void Unregister(WorldClient client) { lock (m_locker) { ArenaGroup group = m_arena_groups.Find(x => x.Contains(client)); if (group == null) { Logger.Error("Unable to unregister " + client.Character.Record.Name + " no arena linked to this character"); } else { group.Clients.FindAll(x => x.Ready).ForEach(x => x.UpdateRegistrationStatus(true, PvpArenaStepEnum.ARENA_STEP_REGISTRED)); group.Clients.ForEach(x => x.Ready = false); group.Clients.FindAll(x => x.Requested).ForEach(x => x.AbortRequest(client.Character.Id)); group.GetClient(client).UpdateRegistrationStatus(false, PvpArenaStepEnum.ARENA_STEP_UNREGISTER); group.Remove(client); if (group.Empty) { m_arena_groups.Remove(group); } } } }