public void UpdateBot(string name, UserBattleStatus battleStatus, int teamColor)
 {
     con.SendCommand("UPDATEBOT", name, battleStatus.ToInt(), teamColor);
 }
 public void SendMyBattleStatus(UserBattleStatus status)
 {
     con.SendCommand("MYBATTLESTATUS", status.ToInt(), status.TeamColor);
 }
 void OnOpenBattle(string[] args)
 {
     MyBattleID = int.Parse(args[0]);
     existingBattles[MyBattleID] = MyBattle;
     var self = new UserBattleStatus(username, existingUsers[username]);
     MyBattle.Users.Add(self); // add self
     lastUserBattleStatus = self.ToInt();
     UpdateBattleDetails(MyBattle.Details);
     // SetScriptTag(MyBattle.Mod.GetDefaultModOptionsTags()); // sends default mod options // enable if tasclient is not fixed
     BattleOpened(this, new TasEventArgs(args[0]));
 }
 public void AddBot(string name, UserBattleStatus status, int teamColor, string aiDll)
 {
     if (name.Contains(" ")) throw new TasClientException("Bot name must not contain spaces. " + name);
     con.SendCommand("ADDBOT", name, status.ToInt(), teamColor, aiDll);
 }
 void OnJoinedBattle(string[] args)
 {
     var joinedBattleID = Int32.Parse(args[0]);
     Battle battle;
     if (!existingBattles.TryGetValue(joinedBattleID, out battle)) return;
     var userName = args[1];
     var scriptPassword = args.Length > 2 ? args[2] : null;
     var ubs = new UserBattleStatus(userName, existingUsers[userName], scriptPassword);
     battle.Users.Add(ubs);
     ExistingUsers[userName].IsInBattleRoom = true;
     if (userName == username) lastUserBattleStatus = ubs.ToInt();
     BattleUserJoined(this, new BattleUserEventArgs(userName, joinedBattleID, scriptPassword));
 }