public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.UnableToFriend); if (this.Players != null) { binaryWriter.Write(this.Players.Count); foreach (int userId in this.Players) { binaryWriter.Write(userId); } } else { binaryWriter.Write(0); } } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.Scores); if (this.Players != null) { binaryWriter.Write(this.Players.Count); foreach (KeyValuePair <int, int> player in this.Players) { binaryWriter.Write(player.Key); binaryWriter.Write(player.Value); } } else { binaryWriter.Write(0); } } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.Texts); if (this.Texts != null) { binaryWriter.Write(this.Texts.Count); foreach (KeyValuePair <string, string> text in this.Texts) { binaryWriter.Write(text.Key); binaryWriter.Write(text.Value); } } else { binaryWriter.Write(0); } } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.Credits); binaryWriter.Write(this.Credits); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.PowerupGained); binaryWriter.Write((int)this.Type); binaryWriter.Write(this.Amount); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.Maintenance); binaryWriter.Write(false); //unused binaryWriter.Write(this.FastFoodServerMaintenance); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.OpenBigParachute); binaryWriter.Write(this.PlateId); binaryWriter.Write(this.GameUserID); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.LaunchMissile); binaryWriter.Write(this.TargetPlateID); binaryWriter.Write(this.SenderGameUserID); binaryWriter.Write(this.TargetGameUserID); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.GamePowerups); if (this.GamePowerups != null) { binaryWriter.Write(this.GamePowerups.Count); foreach (GamePowerup powerup in this.GamePowerups) { binaryWriter.Write(powerup.PackageName); binaryWriter.Write(powerup.TypeString); binaryWriter.Write(powerup.Amount); binaryWriter.Write(powerup.Cost); } } else { binaryWriter.Write(0); } } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.UpdateState); binaryWriter.Write(this.PlateID); binaryWriter.Write(this.GameUserID); binaryWriter.Write(this.Distance.ToString()); binaryWriter.Write(this.Speed.ToString()); binaryWriter.Write((int)this.State); binaryWriter.Write(this.Failed); } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.FoodHitTable); binaryWriter.Write(this.Stars); binaryWriter.Write(this.GameUserID); binaryWriter.Write((int)this.State); binaryWriter.Write(this.NextPlateID); binaryWriter.Write(12); //idk? } return(memoryStream.ToArray()); } }
public byte[] GetBytes() { using (MemoryStream memoryStream = new MemoryStream()) { using (NewCryptoServerMessage binaryWriter = new NewCryptoServerMessage(memoryStream)) { binaryWriter.Write(OutgoingHeaders.GameStarting); binaryWriter.Write(this.GameUserID); binaryWriter.Write(true); binaryWriter.Write(true); binaryWriter.Write(true); binaryWriter.Write(0); if (FastFoodGamePlate.Plates != null) { binaryWriter.Write(FastFoodGamePlate.Plates.Count); foreach (FastFoodGamePlate plate in FastFoodGamePlate.Plates) { binaryWriter.Write(plate.ID); binaryWriter.Write(plate.FallMultiplayer.ToString()); binaryWriter.Write(plate.ParachuteMultiplayer.ToString()); binaryWriter.Write(plate.ParachuteSpeed.ToString()); binaryWriter.Write(plate.BigParachuteSpeed.ToString()); binaryWriter.Write(plate.PlateTimer); } } else { binaryWriter.Write(0); } if (this.Powerups != null) { binaryWriter.Write(this.Powerups.Count); foreach (KeyValuePair <int, int> powerup in this.Powerups) { binaryWriter.Write(powerup.Key); //id binaryWriter.Write(powerup.Value); //count } } else { binaryWriter.Write(0); //powerup count } if (this.Users != null) { binaryWriter.Write(this.Users.Count); foreach (FastFoodGameUser user in this.Users) { binaryWriter.Write(user.GameUserID); binaryWriter.Write(user.User.Username); binaryWriter.Write(""); //Figure URL binaryWriter.Write(user.User.Gender); binaryWriter.Write("hhfi"); //hotel if (user.User.Badges != null) { binaryWriter.Write(user.User.Badges.Count); for (int i = 0; i < user.User.Badges.Count; i++) { binaryWriter.Write(user.User.Badges[i]); binaryWriter.Write(i); binaryWriter.Write(""); //URL } } else { binaryWriter.Write(0); //badges count } } } else { binaryWriter.Write(0); //players count } } return(memoryStream.ToArray()); } }