public static PlayerLoadInfo ReadPlayerInfo(this PacketReader reader) { var info = new PlayerLoadInfo(); info.PlayerID = reader.ReadPlayerID(); info.SummonorLevel = reader.ReadUInt16(); info.SummonorSpell1 = reader.ReadUInt32(); info.SummonorSpell2 = reader.ReadUInt32(); info.Bitfield = reader.ReadByte(); info.TeamId = reader.ReadTeamID(); info.BotName = reader.ReadFixedString(64); info.BotSkinName = reader.ReadFixedString(64); info.EloRanking = reader.ReadFixedString(16); info.BotSkinID = reader.ReadInt32(); info.BotDifficulty = reader.ReadInt32(); info.ProfileIconId = reader.ReadInt32(); info.AllyBadgeID = reader.ReadByte(); info.EnemyBadgeID = reader.ReadByte(); return(info); }
public static void WritePlayerInfo(this PacketWriter writer, PlayerLoadInfo info) { if (info == null) { info = new PlayerLoadInfo(); } writer.WritePlayerID(info.PlayerID); writer.WriteUInt16(info.SummonorLevel); writer.WriteUInt32(info.SummonorSpell1); writer.WriteUInt32(info.SummonorSpell2); writer.WriteByte(info.Bitfield); writer.WriteTeamID(info.TeamId); writer.WriteFixedString(info.BotName, 64); writer.WriteFixedString(info.BotSkinName, 64); writer.WriteFixedString(info.EloRanking, 16); writer.WriteInt32(info.BotSkinID); writer.WriteInt32(info.BotDifficulty); writer.WriteInt32(info.ProfileIconId); writer.WriteByte(info.AllyBadgeID); writer.WriteByte(info.EnemyBadgeID); }