Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 236 lines (169 sloc) 16.782 kB
82fe087 @hadarhod87 Added/fixed inline docs and documentation.md
hadarhod87 authored
1 /*
2 Copyright (C) 2012-2014 Soomla Inc.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
79aab4e @refaelos Added ios example
refaelos authored
17 #import "MuffinRushAssets.h"
18 #import "VirtualCategory.h"
19 #import "VirtualCurrency.h"
20 #import "VirtualGood.h"
21 #import "VirtualCurrencyPack.h"
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
22 #import "SingleUseVG.h"
23 #import "PurchaseWithMarket.h"
24 #import "PurchaseWithVirtualItem.h"
506b24a @refaelos Fixed naming of events and objects to match all SOOMLA plugins
refaelos authored
25 #import "MarketItem.h"
14dce83 @refaelos fixed issue with equipping
refaelos authored
26 #import "LifetimeVG.h"
27 #import "EquippableVG.h"
28 #import "SingleUsePackVG.h"
29 #import "UpgradeVG.h"
79aab4e @refaelos Added ios example
refaelos authored
30
14dce83 @refaelos fixed issue with equipping
refaelos authored
31 // Currencies
79aab4e @refaelos Added ios example
refaelos authored
32 NSString* const MUFFINS_CURRENCY_ITEM_ID = @"currency_muffin";
33
14dce83 @refaelos fixed issue with equipping
refaelos authored
34 // Goods
35 NSString* const LEVEL_1_GOOD_ITEM_ID = @"mc1";
36 NSString* const LEVEL_2_GOOD_ITEM_ID = @"mc2";
37 NSString* const LEVEL_3_GOOD_ITEM_ID = @"mc3";
38 NSString* const LEVEL_4_GOOD_ITEM_ID = @"mc4";
39 NSString* const LEVEL_5_GOOD_ITEM_ID = @"mc5";
40 NSString* const LEVEL_6_GOOD_ITEM_ID = @"mc6";
41 NSString* const _LEVEL_1_GOOD_ITEM_ID = @"pav1";
42 NSString* const _LEVEL_2_GOOD_ITEM_ID = @"pav2";
43 NSString* const _LEVEL_3_GOOD_ITEM_ID = @"pav3";
44 NSString* const _LEVEL_4_GOOD_ITEM_ID = @"pav4";
45 NSString* const _LEVEL_5_GOOD_ITEM_ID = @"pav5";
46 NSString* const _LEVEL_6_GOOD_ITEM_ID = @"pav6";
47 NSString* const MARRIAGE_GOOD_ITEM_ID = @"marriage_lt";
1d6abfe @dimanem Removed class NonConsumableItem.
dimanem authored
48 NSString* const MARRIAGE_PRODUCT_ID = @"noncons.ltvg.marriage";
14dce83 @refaelos fixed issue with equipping
refaelos authored
49 NSString* const JERRY_GOOD_ITEM_ID = @"jerry_character";
50 NSString* const GEORGE_GOOD_ITEM_ID = @"george_character";
51 NSString* const KRAMER_GOOD_ITEM_ID = @"kramer_character";
52 NSString* const ELAINE_GOOD_ITEM_ID = @"elaine_character";
53 NSString* const _20_CHOCOLATE_CAKES_GOOD_ITEM_ID = @"sup_20_cc";
54 NSString* const _50_CHOCOLATE_CAKES_GOOD_ITEM_ID = @"sup_50_cc";
55 NSString* const _100_CHOCOLATE_CAKES_GOOD_ITEM_ID = @"sup_100_cc";
56 NSString* const _200_CHOCOLATE_CAKES_GOOD_ITEM_ID = @"sup_200_cc";
57 NSString* const CHOCOLATE_CAKE_GOOD_ITEM_ID = @"chocolate_cake";
79aab4e @refaelos Added ios example
refaelos authored
58 NSString* const CREAM_CUP_GOOD_ITEM_ID = @"cream_cup";
14dce83 @refaelos fixed issue with equipping
refaelos authored
59 NSString* const MUFFIN_CAKE_GOOD_ITEM_ID = @"muffin_cake";
60 NSString* const PAVLOVA_GOOD_ITEM_ID = @"pavlova";
79aab4e @refaelos Added ios example
refaelos authored
61
14dce83 @refaelos fixed issue with equipping
refaelos authored
62 // Currency Packs
79aab4e @refaelos Added ios example
refaelos authored
63 NSString* const _10_MUFFINS_PACK_ITEM_ID = @"muffins_10";
14dce83 @refaelos fixed issue with equipping
refaelos authored
64 NSString* const _10_MUFFINS_PRODUCT_ID = @"android.test.refunded";
79aab4e @refaelos Added ios example
refaelos authored
65 NSString* const _50_MUFFINS_PACK_ITEM_ID = @"muffins_50";
14dce83 @refaelos fixed issue with equipping
refaelos authored
66 NSString* const _50_MUFFINS_PRODUCT_ID = @"android.test.canceled";
79aab4e @refaelos Added ios example
refaelos authored
67 NSString* const _400_MUFFINS_PACK_ITEM_ID = @"muffins_400";
14dce83 @refaelos fixed issue with equipping
refaelos authored
68 NSString* const _400_MUFFINS_PRODUCT_ID = @"android.test.purchased";
79aab4e @refaelos Added ios example
refaelos authored
69 NSString* const _1000_MUFFINS_PACK_ITEM_ID = @"muffins_1000";
75e34f2 @refaelos Added refreshMarketItemsDetails which refreshes prices for purchsable…
refaelos authored
70 NSString* const _1000_MUFFINS_PRODUCT_ID = @"2500_pack";
79aab4e @refaelos Added ios example
refaelos authored
71
72 @implementation MuffinRushAssets
73
14dce83 @refaelos fixed issue with equipping
refaelos authored
74 VirtualCategory* _MUFFINS_CATEGORY;
75 VirtualCategory* MUFFIN_CAKE_UPGRADES_CATEGORY;
76 VirtualCategory* PAVLOVA_UPGRADES_CATEGORY;
77 VirtualCategory* CHARACTERS_CATEGORY;
78 VirtualCategory* LIFETIME_THINGS_CATEGORY;
79 VirtualCategory* PACKS_OF_CHOCOLATE_CAKES_CATEGORY;
79aab4e @refaelos Added ios example
refaelos authored
80 VirtualCurrency* MUFFINS_CURRENCY;
14dce83 @refaelos fixed issue with equipping
refaelos authored
81 VirtualGood* LEVEL_1_GOOD;
82 VirtualGood* LEVEL_2_GOOD;
83 VirtualGood* LEVEL_3_GOOD;
84 VirtualGood* LEVEL_4_GOOD;
85 VirtualGood* LEVEL_5_GOOD;
86 VirtualGood* LEVEL_6_GOOD;
87 VirtualGood* _LEVEL_1_GOOD;
88 VirtualGood* _LEVEL_2_GOOD;
89 VirtualGood* _LEVEL_3_GOOD;
90 VirtualGood* _LEVEL_4_GOOD;
91 VirtualGood* _LEVEL_5_GOOD;
92 VirtualGood* _LEVEL_6_GOOD;
93 VirtualGood* MARRIAGE_GOOD;
94 VirtualGood* JERRY_GOOD;
95 VirtualGood* GEORGE_GOOD;
96 VirtualGood* KRAMER_GOOD;
97 VirtualGood* ELAINE_GOOD;
98 VirtualGood* _20_CHOCOLATE_CAKES_GOOD;
99 VirtualGood* _50_CHOCOLATE_CAKES_GOOD;
100 VirtualGood* _100_CHOCOLATE_CAKES_GOOD;
101 VirtualGood* _200_CHOCOLATE_CAKES_GOOD;
102 VirtualGood* CHOCOLATE_CAKE_GOOD;
103 VirtualGood* CREAM_CUP_GOOD;
104 VirtualGood* MUFFIN_CAKE_GOOD;
105 VirtualGood* PAVLOVA_GOOD;
79aab4e @refaelos Added ios example
refaelos authored
106 VirtualCurrencyPack* _10_MUFFINS_PACK;
107 VirtualCurrencyPack* _50_MUFFINS_PACK;
108 VirtualCurrencyPack* _400_MUFFINS_PACK;
109 VirtualCurrencyPack* _1000_MUFFINS_PACK;
110
14dce83 @refaelos fixed issue with equipping
refaelos authored
111 + (void)initialize{
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
112
14dce83 @refaelos fixed issue with equipping
refaelos authored
113 /** Virtual Currencies **/
79aab4e @refaelos Added ios example
refaelos authored
114 MUFFINS_CURRENCY = [[VirtualCurrency alloc] initWithName:@"Muffins" andDescription:@"" andItemId:MUFFINS_CURRENCY_ITEM_ID];
115
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
116
14dce83 @refaelos fixed issue with equipping
refaelos authored
117 /** Virtual Currency Packs **/
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
118
e463d2c @refaelos removed Consumable struct from MarketItem
refaelos authored
119 _10_MUFFINS_PACK = [[VirtualCurrencyPack alloc] initWithName:@"10 Muffins" andDescription:@"Test refund of an item" andItemId:_10_MUFFINS_PACK_ITEM_ID andCurrencyAmount:10 andCurrency:MUFFINS_CURRENCY_ITEM_ID andPurchaseType:[[PurchaseWithMarket alloc] initWithMarketItem:[[MarketItem alloc] initWithProductId:_10_MUFFINS_PRODUCT_ID andPrice:0.99]]];
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
120
e463d2c @refaelos removed Consumable struct from MarketItem
refaelos authored
121 _50_MUFFINS_PACK = [[VirtualCurrencyPack alloc] initWithName:@"50 Muffins" andDescription:@"Test cancellation of an item" andItemId:_50_MUFFINS_PACK_ITEM_ID andCurrencyAmount:50 andCurrency:MUFFINS_CURRENCY_ITEM_ID andPurchaseType:[[PurchaseWithMarket alloc] initWithMarketItem:[[MarketItem alloc] initWithProductId:_50_MUFFINS_PRODUCT_ID andPrice:1.99]]];
14dce83 @refaelos fixed issue with equipping
refaelos authored
122
e463d2c @refaelos removed Consumable struct from MarketItem
refaelos authored
123 _400_MUFFINS_PACK = [[VirtualCurrencyPack alloc] initWithName:@"400 Muffins" andDescription:@"Test purchase of an item" andItemId:_400_MUFFINS_PACK_ITEM_ID andCurrencyAmount:400 andCurrency:MUFFINS_CURRENCY_ITEM_ID andPurchaseType:[[PurchaseWithMarket alloc] initWithMarketItem:[[MarketItem alloc] initWithProductId:_400_MUFFINS_PRODUCT_ID andPrice:4.99]]];
14dce83 @refaelos fixed issue with equipping
refaelos authored
124
e463d2c @refaelos removed Consumable struct from MarketItem
refaelos authored
125 _1000_MUFFINS_PACK = [[VirtualCurrencyPack alloc] initWithName:@"1000 Muffins" andDescription:@"Test item unavailable" andItemId:_1000_MUFFINS_PACK_ITEM_ID andCurrencyAmount:1000 andCurrency:MUFFINS_CURRENCY_ITEM_ID andPurchaseType:[[PurchaseWithMarket alloc] initWithMarketItem:[[MarketItem alloc] initWithProductId:_1000_MUFFINS_PRODUCT_ID andPrice:8.99]]];
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
126
127
79aab4e @refaelos Added ios example
refaelos authored
128 /** Virtual Goods **/
129
14dce83 @refaelos fixed issue with equipping
refaelos authored
130 /* SingleUseVGs */
131
132 CHOCOLATE_CAKE_GOOD = [[SingleUseVG alloc] initWithName:@"Chocolate Cake" andDescription:@"A classic cake to maximize customer satisfaction" andItemId:CHOCOLATE_CAKE_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:250]];
133
134 CREAM_CUP_GOOD = [[SingleUseVG alloc] initWithName:@"Cream Cup" andDescription:@"Increase bakery reputation with this original pastry" andItemId:CREAM_CUP_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:50]];
135
136 MUFFIN_CAKE_GOOD = [[SingleUseVG alloc] initWithName:@"Muffin Cake" andDescription:@"Customers buy a double portion on each purchase of this cake" andItemId:MUFFIN_CAKE_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:225]];
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
137
3f2e671 @refaelos all pointers between domain objects were converted to String itemId
refaelos authored
138 PAVLOVA_GOOD = [[SingleUseVG alloc] initWithName:@"Pavlova" andDescription:@"Gives customers a sugar rush and they call their friends" andItemId:PAVLOVA_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:175]];
79aab4e @refaelos Added ios example
refaelos authored
139
14dce83 @refaelos fixed issue with equipping
refaelos authored
140 /* LifetimeVGs */
79aab4e @refaelos Added ios example
refaelos authored
141
e463d2c @refaelos removed Consumable struct from MarketItem
refaelos authored
142 MARRIAGE_GOOD = [[LifetimeVG alloc] initWithName:@"Marriage" andDescription:@"This is a LIFETIME thing." andItemId:MARRIAGE_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithMarket alloc] initWithMarketItem:[[MarketItem alloc] initWithProductId:MARRIAGE_PRODUCT_ID andPrice:9.99]]];
14dce83 @refaelos fixed issue with equipping
refaelos authored
143
144 /* EquippableVGs */
145
146 JERRY_GOOD = [[EquippableVG alloc] initWithName:@"Jerry" andDescription:@"Your friend Jerry" andItemId:JERRY_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:250] andEquippingModel:kCategory];
147
148 GEORGE_GOOD = [[EquippableVG alloc] initWithName:@"George" andDescription:@"The best muffin eater in the north" andItemId:GEORGE_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:350] andEquippingModel:kCategory];
149
150 KRAMER_GOOD = [[EquippableVG alloc] initWithName:@"Kramer" andDescription:@"Knows how to get muffins" andItemId:KRAMER_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:450] andEquippingModel:kCategory];
151
152 ELAINE_GOOD = [[EquippableVG alloc] initWithName:@"Elaine" andDescription:@"Kicks muffins like superman" andItemId:ELAINE_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1000] andEquippingModel:kCategory];
153
154 /* SingleUsePackVGs */
155
156 _20_CHOCOLATE_CAKES_GOOD = [[SingleUsePackVG alloc] initWithName:@"20 chocolate cakes" andDescription:@"A pack of 20 chocolate cakes" andItemId:_20_CHOCOLATE_CAKES_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:34] andSingleUseGood:CHOCOLATE_CAKE_GOOD_ITEM_ID andAmount:20];
157
158 _50_CHOCOLATE_CAKES_GOOD = [[SingleUsePackVG alloc] initWithName:@"50 chocolate cakes" andDescription:@"A pack of 50 chocolate cakes" andItemId:_50_CHOCOLATE_CAKES_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:340] andSingleUseGood:CHOCOLATE_CAKE_GOOD_ITEM_ID andAmount:50];
159
160 _100_CHOCOLATE_CAKES_GOOD = [[SingleUsePackVG alloc] initWithName:@"100 chocolate cakes" andDescription:@"A pack of 100 chocolate cakes" andItemId:_100_CHOCOLATE_CAKES_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:3410] andSingleUseGood:CHOCOLATE_CAKE_GOOD_ITEM_ID andAmount:100];
161
162 _200_CHOCOLATE_CAKES_GOOD = [[SingleUsePackVG alloc] initWithName:@"200 chocolate cakes" andDescription:@"A pack of 200 chocolate cakes" andItemId:_200_CHOCOLATE_CAKES_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:4000] andSingleUseGood:CHOCOLATE_CAKE_GOOD_ITEM_ID andAmount:200];
163
164 /* UpgradeVGs */
165
166 LEVEL_1_GOOD = [[UpgradeVG alloc] initWithName:@"Level 1" andDescription:@"Muffin Cake Level 1" andItemId:LEVEL_1_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:50] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:@"" andNextUpgrade:LEVEL_2_GOOD_ITEM_ID];
167
168 LEVEL_2_GOOD = [[UpgradeVG alloc] initWithName:@"Level 2" andDescription:@"Muffin Cake Level 2" andItemId:LEVEL_2_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:250] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:LEVEL_1_GOOD_ITEM_ID andNextUpgrade:LEVEL_3_GOOD_ITEM_ID];
169
170 LEVEL_3_GOOD = [[UpgradeVG alloc] initWithName:@"Level 3" andDescription:@"Muffin Cake Level 3" andItemId:LEVEL_3_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:500] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:LEVEL_2_GOOD_ITEM_ID andNextUpgrade:LEVEL_4_GOOD_ITEM_ID];
171
172 LEVEL_4_GOOD = [[UpgradeVG alloc] initWithName:@"Level 4" andDescription:@"Muffin Cake Level 4" andItemId:LEVEL_4_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1000] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:LEVEL_3_GOOD_ITEM_ID andNextUpgrade:LEVEL_5_GOOD_ITEM_ID];
173
174 LEVEL_5_GOOD = [[UpgradeVG alloc] initWithName:@"Level 5" andDescription:@"Muffin Cake Level 5" andItemId:LEVEL_5_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1250] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:LEVEL_4_GOOD_ITEM_ID andNextUpgrade:LEVEL_6_GOOD_ITEM_ID];
175
176 LEVEL_6_GOOD = [[UpgradeVG alloc] initWithName:@"Level 6" andDescription:@"Muffin Cake Level 6" andItemId:LEVEL_6_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1500] andLinkedGood:MUFFIN_CAKE_GOOD_ITEM_ID andPreviousUpgrade:LEVEL_5_GOOD_ITEM_ID andNextUpgrade:@""];
177
178 _LEVEL_1_GOOD = [[UpgradeVG alloc] initWithName:@"Level 1" andDescription:@"Pavlova Level 1" andItemId:_LEVEL_1_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:150] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:@"" andNextUpgrade:_LEVEL_2_GOOD_ITEM_ID];
179
180 _LEVEL_2_GOOD = [[UpgradeVG alloc] initWithName:@"Level 2" andDescription:@"Pavlova Level 2" andItemId:_LEVEL_2_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:350] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:_LEVEL_1_GOOD_ITEM_ID andNextUpgrade:_LEVEL_3_GOOD_ITEM_ID];
181
182 _LEVEL_3_GOOD = [[UpgradeVG alloc] initWithName:@"Level 3" andDescription:@"Pavlova Level 3" andItemId:_LEVEL_3_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:700] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:_LEVEL_2_GOOD_ITEM_ID andNextUpgrade:_LEVEL_4_GOOD_ITEM_ID];
183
184 _LEVEL_4_GOOD = [[UpgradeVG alloc] initWithName:@"Level 4" andDescription:@"Pavlova Level 4" andItemId:_LEVEL_4_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1200] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:_LEVEL_3_GOOD_ITEM_ID andNextUpgrade:_LEVEL_5_GOOD_ITEM_ID];
185
186 _LEVEL_5_GOOD = [[UpgradeVG alloc] initWithName:@"Level 5" andDescription:@"Pavlova Level 5" andItemId:_LEVEL_5_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:1850] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:_LEVEL_4_GOOD_ITEM_ID andNextUpgrade:_LEVEL_6_GOOD_ITEM_ID];
187
188 _LEVEL_6_GOOD = [[UpgradeVG alloc] initWithName:@"Level 6" andDescription:@"Pavlova Level 6" andItemId:_LEVEL_6_GOOD_ITEM_ID andPurchaseType:[[PurchaseWithVirtualItem alloc] initWithVirtualItem:MUFFINS_CURRENCY_ITEM_ID andAmount:2500] andLinkedGood:PAVLOVA_GOOD_ITEM_ID andPreviousUpgrade:_LEVEL_5_GOOD_ITEM_ID andNextUpgrade:@""];
79aab4e @refaelos Added ios example
refaelos authored
189
190
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
191 /** Virtual Categories **/
192
14dce83 @refaelos fixed issue with equipping
refaelos authored
193 _MUFFINS_CATEGORY = [[VirtualCategory alloc] initWithName:@"Muffins" andGoodsItemIds:@[MUFFIN_CAKE_GOOD_ITEM_ID, CHOCOLATE_CAKE_GOOD_ITEM_ID, PAVLOVA_GOOD_ITEM_ID, MUFFIN_CAKE_GOOD_ITEM_ID]];
194
195 MUFFIN_CAKE_UPGRADES_CATEGORY = [[VirtualCategory alloc] initWithName:@"Muffin Cake Upgrades" andGoodsItemIds:@[LEVEL_1_GOOD_ITEM_ID, LEVEL_2_GOOD_ITEM_ID, LEVEL_3_GOOD_ITEM_ID, LEVEL_4_GOOD_ITEM_ID, LEVEL_5_GOOD_ITEM_ID, LEVEL_6_GOOD_ITEM_ID]];
196
197 PAVLOVA_UPGRADES_CATEGORY = [[VirtualCategory alloc] initWithName:@"Pavlova Upgrades" andGoodsItemIds:@[_LEVEL_1_GOOD_ITEM_ID, _LEVEL_2_GOOD_ITEM_ID, _LEVEL_3_GOOD_ITEM_ID, _LEVEL_4_GOOD_ITEM_ID, _LEVEL_5_GOOD_ITEM_ID, _LEVEL_6_GOOD_ITEM_ID]];
198
199 CHARACTERS_CATEGORY = [[VirtualCategory alloc] initWithName:@"Characters" andGoodsItemIds:@[JERRY_GOOD_ITEM_ID, GEORGE_GOOD_ITEM_ID, KRAMER_GOOD_ITEM_ID, ELAINE_GOOD_ITEM_ID]];
200
201 LIFETIME_THINGS_CATEGORY = [[VirtualCategory alloc] initWithName:@"Lifetime things" andGoodsItemIds:@[MARRIAGE_GOOD_ITEM_ID]];
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
202
14dce83 @refaelos fixed issue with equipping
refaelos authored
203 PACKS_OF_CHOCOLATE_CAKES_CATEGORY = [[VirtualCategory alloc] initWithName:@"Packs of Chocolate Cakes" andGoodsItemIds:@[_20_CHOCOLATE_CAKES_GOOD_ITEM_ID, _50_CHOCOLATE_CAKES_GOOD_ITEM_ID, _100_CHOCOLATE_CAKES_GOOD_ITEM_ID, _200_CHOCOLATE_CAKES_GOOD_ITEM_ID]];
10ce8da @refaelos First bulk of model V3 logic
refaelos authored
204
205
5deb23c @refaelos now suporting non-consumable items
refaelos authored
206
79aab4e @refaelos Added ios example
refaelos authored
207 }
208
7509865 @refaelos versioning & Non Consumables
refaelos authored
209 - (int)getVersion {
210 return 0;
211 }
212
79aab4e @refaelos Added ios example
refaelos authored
213 - (NSArray*)virtualCurrencies{
214 return @[MUFFINS_CURRENCY];
215 }
216
217 - (NSArray*)virtualGoods{
14dce83 @refaelos fixed issue with equipping
refaelos authored
218 return @[
219 /* SingleUseVGs --> */ CHOCOLATE_CAKE_GOOD, CREAM_CUP_GOOD, MUFFIN_CAKE_GOOD, PAVLOVA_GOOD,
220 /* LifetimeVGs --> */ MARRIAGE_GOOD,
221 /* EquippableVGs --> */ JERRY_GOOD, GEORGE_GOOD, KRAMER_GOOD, ELAINE_GOOD,
222 /* SingleUsePackVGs --> */ _20_CHOCOLATE_CAKES_GOOD, _50_CHOCOLATE_CAKES_GOOD, _100_CHOCOLATE_CAKES_GOOD, _200_CHOCOLATE_CAKES_GOOD,
223 /* UpgradeVGs --> */ LEVEL_1_GOOD, LEVEL_2_GOOD, LEVEL_3_GOOD, LEVEL_4_GOOD, LEVEL_5_GOOD, LEVEL_6_GOOD, _LEVEL_1_GOOD, _LEVEL_2_GOOD, _LEVEL_3_GOOD, _LEVEL_4_GOOD, _LEVEL_5_GOOD, _LEVEL_6_GOOD,
224 ];
79aab4e @refaelos Added ios example
refaelos authored
225 }
226
227 - (NSArray*)virtualCurrencyPacks{
228 return @[_10_MUFFINS_PACK, _50_MUFFINS_PACK, _400_MUFFINS_PACK, _1000_MUFFINS_PACK];
229 }
230
231 - (NSArray*)virtualCategories{
14dce83 @refaelos fixed issue with equipping
refaelos authored
232 return @[_MUFFINS_CATEGORY, MUFFIN_CAKE_UPGRADES_CATEGORY, PAVLOVA_UPGRADES_CATEGORY, CHARACTERS_CATEGORY, LIFETIME_THINGS_CATEGORY, PACKS_OF_CHOCOLATE_CAKES_CATEGORY];
79aab4e @refaelos Added ios example
refaelos authored
233 }
234
5deb23c @refaelos now suporting non-consumable items
refaelos authored
235
79aab4e @refaelos Added ios example
refaelos authored
236 @end
Something went wrong with that request. Please try again.