コード例 #1
0
        private void onDecorationUpdated(PurchaseDecorationOperation operation, HttpResponse httpResponse)
        {
            UpdateDecorationResponse responseBody = operation.ResponseBody;

            Service.Get <EventDispatcher>().DispatchEvent(new IglooServiceEvents.DecorationUpdated(responseBody.decorationId, operation.Count));
            Service.Get <EventDispatcher>().DispatchEvent(new RewardServiceEvents.MyAssetsReceived(responseBody.assets));
            handleCPResponse(responseBody);
        }
コード例 #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
        };
    }