Exemple #1
0
 protected override void SetOfflineData(OfflineDatabase offlineDatabase, IOfflineDefinitionLoader offlineDefinitions)
 {
     QACreateDecorationOperation.AddDecoration(ResponseBody.decorationId, Count, offlineDatabase);
     ClubPenguin.Net.Offline.PlayerAssets value = offlineDatabase.Read <ClubPenguin.Net.Offline.PlayerAssets>();
     value.Assets = ResponseBody.assets;
     offlineDatabase.Write(value);
 }
Exemple #2
0
        protected override void PerformOfflineAction(OfflineDatabase offlineDatabase, IOfflineDefinitionLoader offlineDefinitions)
        {
            DecorationId decorationId = ClubPenguin.Net.Domain.Decoration.DecorationId.FromString(DecorationId);

            QACreateDecorationOperation.AddDecoration(decorationId, Count, offlineDatabase);
            offlineDefinitions.SubtractDecorationCost(decorationId, Count);
            ResponseBody = new UpdateDecorationResponse
            {
                assets       = offlineDatabase.Read <ClubPenguin.Net.Offline.PlayerAssets>().Assets,
                decorationId = decorationId
            };
        }