public bool gameStart() { //We've started! _tickGameStart = Environment.TickCount; _tickGameStarting = 0; _playerCrownStatus.Clear(); //Let everyone know _arena.sendArenaMessage("Game has started!", 1); _crownTeams = new List <Team>(); _playerCrownStatus = new Dictionary <Player, PlayerCrownStatus>(); List <Player> crownPlayers = (_config.king.giveSpecsCrowns ? _arena.Players : _arena.PlayersIngame).ToList(); //Check for first game to spawn flags, otherwise leave them alone if (_firstGame) { _arena.flagSpawn(); _firstGame = false; } foreach (var p in crownPlayers) { _playerCrownStatus[p] = new PlayerCrownStatus(); giveCrown(p); } //Everybody is king! Helpers.Player_Crowns(_arena, true, crownPlayers); return(true); }
public void playerEnter(Player player) { //Send them the crowns and add them back to list incase a game is in progress if (!_playerCrownStatus.ContainsKey(player)) { _playerCrownStatus[player] = new PlayerCrownStatus(false); Helpers.Player_Crowns(_arena, true, _activeCrowns, player); } }
public void playerEnterArena(Player player) { //Send them the crowns.. if (!_playerCrownStatus.ContainsKey(player)) { _playerCrownStatus[player] = new PlayerCrownStatus(false); Helpers.Player_Crowns(_arena, true, _activeCrowns, player); } }
private void AddCrown(Player player) { PlayerCrownStatus status = _playerCrownStatus[player]; status.crown = true; status.crownDeaths = 0; status.crownKills = 0; Helpers.Player_Crowns(arena, true, GetCrowns()); UpdateCrown(player); }
public void PlayerEnterArena(Player player) { if (settings.GameState != GameStates.ActiveGame) { return; } //Send them the crowns.. if (!_playerCrownStatus.ContainsKey(player)) { _playerCrownStatus[player] = new PlayerCrownStatus(false); Helpers.Player_Crowns(arena, true, GetCrowns(), player); } }
public void PlayerEnter(Player player) { if (settings.GameState != GameStates.ActiveGame) { return; } //Send them the crowns and add them back to list incase a game is in progress if (!_playerCrownStatus.ContainsKey(player)) { _playerCrownStatus[player] = new PlayerCrownStatus(false); Helpers.Player_Crowns(arena, true, GetCrowns(), player); } }
public void playerEnter(Player player) { //We always run blank games, try to start a game in whatever arena the player is in if (!_arena._bGameRunning) { _arena.gameStart(); _arena.flagSpawn(); } //Send them the crowns if KOTH is enabled if (_minPlayers > 0) { if (!_playerCrownStatus.ContainsKey(player)) { _playerCrownStatus[player] = new PlayerCrownStatus(false); Helpers.Player_Crowns(_arena, true, _activeCrowns, player); } } }
/// <summary> /// Called when KOTH game has started /// </summary> public void startKOTH() { //We've started! _tickGameStart = Environment.TickCount; _tickGameStarting = 0; _playerCrownStatus.Clear(); //Let everyone know _arena.sendArenaMessage("Game has started!", 1); _crownTeams = new List <Team>(); _playerCrownStatus = new Dictionary <Player, PlayerCrownStatus>(); List <Player> crownPlayers = (_config.king.giveSpecsCrowns ? _arena.Players : _arena.PlayersIngame).ToList(); foreach (var p in crownPlayers) { _playerCrownStatus[p] = new PlayerCrownStatus(); giveCrown(p); } //Everybody is king! Helpers.Player_Crowns(_arena, true, crownPlayers); }
public bool gameStart() { //Do we even have enough players to start a game? if (_arena.PlayerCount < _minPlayers) { //Stop the game! _arena.setTicker(1, 1, 0, "Not Enough Players"); return(false); } //We've started! _arena.flagSpawn(); _tickGameStart = Environment.TickCount; _tickGameStarting = 0; _playerCrownStatus.Clear(); //Let everyone know _arena.sendArenaMessage("Game has started!", 1); _crownTeams = new List <Team>(); _startTeams = new Dictionary <Player, Team>(); _playerCrownStatus = new Dictionary <Player, PlayerCrownStatus>(); List <Player> crownPlayers = (_config.king.giveSpecsCrowns ? _arena.Players : _arena.PlayersIngame).ToList(); foreach (var p in crownPlayers) { _playerCrownStatus[p] = new PlayerCrownStatus(); giveCrown(p); //Register the team he was on when the game starts. _startTeams[p] = p._team; } //Everybody is king! Helpers.Player_Crowns(_arena, true, crownPlayers); return(true); }