Esempio n. 1
0
 internal void JoinBlue(TSPlayer player)
 {
     if (!allPlayers.Contains(player.Index))
     {
         allPlayers.Add(player.Index);
     }
     RedTeam.RemoveAll(p => p.Index == player.Index);
     BlueTeam.RemoveAll(p => p.Index == player.Index);
     BlueTeam.Add(player);
     Main.player[player.Index].team = 3;
     player.SendInfoMessage("You have joined Blue team for Class Wars.");
 }
 private void JoinBlue(BasePlayer player)
 {
     if (BlueTeam.Count == TeamSize)
     {
         SendChatMessage(player, CurrentTeamFull);
         return;
     }
     if (RedTeam.Contains(player.userID))
     {
         RedTeam.Remove(player.userID);
         RedReady.Remove(player.userID);
         RedParty.RemovePlayer(player.userID);
     }
     if (!BlueTeam.Contains(player.userID))
     {
         BlueTeam.Add(player.userID);
         BlueParty.AddPlayer(player);
     }
     BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentNow, player.displayName, CurrentBlueLower));
 }