public EmpireFetchMessage(Empire empire) : this()
 {
     empireRef = new EmpireRef(empire);
     buildings = new List <BuildingRef>();
     foreach (var building in empire.buildings)
     {
         buildings.Add(new BuildingRef(building));
     }
 }
        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            empireRef = new EmpireRef {
                name = reader.ReadString()
            };
            buildings = new List <BuildingRef>();
            var buildingCount = reader.ReadInt32();

            for (var i = 0; i < buildingCount; i++)
            {
                var building = reader.readBuilding();
                buildings.Add(building);
            }
        }