namespace Supercell.Laser.Logic.Battle.Structures { using System.Collections.Generic; using Supercell.Laser.Logic.Helper; using Supercell.Laser.Titan.DataStream; using Supercell.Laser.Titan.Math; public class BattlePlayerMap { public long MapId; public string MapName; public int GMV; public int MapEnvironmentData; public LogicCompressedString MapData; public long AccountId; public string AvatarName; public int State; public List FriendlySignoffAccountIds; public void Encode(ByteStream stream) { ByteStreamHelper.EncodeLogicLong(stream, MapId); stream.WriteString(MapName); stream.WriteVInt(GMV); ByteStreamHelper.WriteDataReference(stream, MapEnvironmentData); LogicCompressedString.Encode(MapData, stream); ByteStreamHelper.EncodeLogicLong(stream, AccountId); stream.WriteString(AvatarName); stream.WriteVInt(State); if (FriendlySignoffAccountIds == null || FriendlySignoffAccountIds.Count == 0) { stream.WriteVInt(-1); } else { stream.WriteVInt(FriendlySignoffAccountIds.Count); foreach (long accountId in FriendlySignoffAccountIds) { ByteStreamHelper.EncodeLogicLong(stream, accountId); } } } } }