public override void Serialize(LittleEndianWriter writer) { writer.WriteInt(blueMax); // blueMax writer.WriteInt(purpleMax); // purpleMax foreach (var id in blueTeam) { writer.WriteLong(id); } for (var i = 0; i < blueMax - (blueTeam.Length); ++i) { writer.WriteLong(0); } writer.Fill(0, 144); foreach (var id in purpleTeam) { writer.WriteLong(id); } for (var i = 0; i < purpleMax - (purpleTeam.Length); ++i) { writer.WriteLong(0); } writer.Fill(0, 144); writer.WriteInt(blueTeam.Length); writer.WriteInt(purpleTeam.Length); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteInt(0); foreach (var b in Encoding.UTF8.GetBytes(message)) { writer.WriteByte(b); } writer.Fill(0, 512 - message.Length); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(netId); writer.WriteInt(playerId); writer.WriteByte(40); // net node id? writer.WriteByte(0); // botskilllevel if (team == TeamId.BLUE) { writer.WriteByte(1); } else { writer.WriteByte(0); } writer.WriteByte(0); // is bot writer.WriteByte(0); // spawn pos index writer.WriteInt(skinId); foreach (var b in Encoding.Default.GetBytes(name)) { writer.WriteByte((byte)b); } writer.Fill(0, 128 - name.Length); foreach (var b in Encoding.Default.GetBytes(championType)) { writer.WriteByte((byte)b); } writer.Fill(0, 40 - championType.Length); writer.WriteFloat(0.0f); writer.WriteFloat(0.0f); writer.WriteInt(0); writer.WriteByte(0); }
public void Serialize(LittleEndianWriter writer) { writer.WriteLong(userId); writer.WriteShort(0x1E); writer.WriteInt(summonerSkill1); writer.WriteInt(summonerSkill2); writer.WriteByte(isBot); writer.WriteInt(teamId); writer.Fill(0, 64); // name is no longer here writer.Fill(0, 64); foreach (var b in Encoding.UTF8.GetBytes(rank)) { writer.WriteByte(b); } writer.Fill(0, 24 - rank.Length); writer.WriteInt(summonerIcon); writer.WriteShort(ribbon); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteInt(0); writer.WriteLong(gameId); var data = Encoding.UTF8.GetBytes(name); foreach (var d in data) { writer.WriteByte((byte)d); } writer.Fill(0, 128 - data.Length); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteUInt(turretNetId); writer.WriteByte((byte)0x40); foreach (var b in Encoding.UTF8.GetBytes(turretName)) { writer.WriteByte((byte)b); } writer.Fill(0, 64 - turretName.Length); writer.WriteByte((byte)0x0C); writer.WriteByte((byte)0x00); writer.WriteByte((byte)0x00); writer.WriteByte((byte)0x80); writer.WriteByte((byte)0x01); }
public override void Serialize(LittleEndianWriter writer) { writer.WriteByte(unk); writer.WriteInt(mapId); foreach (var player in players) { player.Serialize(writer); } for (var i = 0; i < 12 - players.Length; ++i) { writer.WriteLong(-1); writer.Fill(0, 173); } foreach (var b in Encoding.UTF8.GetBytes(version)) { writer.WriteByte(b); } writer.Fill(0, 256 - version.Length); string gameModeString = gameMode.ToString(); foreach (var b in Encoding.UTF8.GetBytes(gameModeString)) { writer.WriteByte(b); } writer.Fill(0, 128 - gameModeString.Length); foreach (var b in Encoding.UTF8.GetBytes(region)) { writer.WriteByte((byte)b); } writer.Fill(0, 2333); // 128 - 3 + 661 + 1546 writer.WriteInt(gameFeatures); // gameFeatures (turret range indicators, etc.) writer.Fill(0, 256); writer.WriteInt((int)0); writer.Fill(1, 19); }