|
JubeatPlus 3.9.11
|
A campaign item: an unlockable tune or marker with a rule for earning it. More...
#include <CampaignItemInfo.h>


Instance Methods | |
| (instancetype) | - initWithDictionary: |
| Builds an item from a campaign dictionary. | |
| (BOOL) | - termCheck |
| Evaluates the unlock rule and sets every derived property from it. | |
| (BOOL) | - checkExistPackList:packID: |
| Whether a pack list contains a pack. | |
| (void) | - replaceServerUnlock: |
| Sets the server's unlock flag. | |
| (BOOL) | - checkNewUnlock |
| Whether the item is newly available: unlocked but not yet downloaded. | |
| (BOOL) | - hasItem:itemID: |
| Whether the device already holds an item's data. | |
Properties | |
| int | campaignID |
| The campaign this item belongs to. | |
| NSString * | name |
| The item's display name. | |
| NSString * | itemDescription |
| What the item is. | |
| NSString * | unlockDescription |
| How to unlock it. | |
| NSString * | bannerURL |
| The campaign banner's address. | |
| NSString * | itemImageURL |
| The item artwork's address. | |
| BOOL | bServerUnlock |
| Whether the server says this item is unlocked. | |
| int | itemType |
| What kind of item this is. | |
| int | itemID |
| Which tune or marker the item grants. | |
| BOOL | alreadyDownload |
| Whether the item's data is already on the device. | |
| BOOL | bUnlock |
| Whether the unlock rule is satisfied. | |
| int | buttonType |
| Which button the UI should offer. | |
| int | hideType |
| How the UI should hide the item. | |
| NSURL * | linkURL |
| Where the campaign's banner leads. | |
| NSString * | lisenceText |
| The item's licence text. | |
| NSURL * | sampleURL |
| A sample of the item. | |
A campaign item: an unlockable tune or marker with a rule for earning it.
| - (BOOL) checkExistPackList: | (nullable NSArray *) | packList | |
| packID: | (int) | packID |
Whether a pack list contains a pack.
| packList | The list, whose elements answer -intValue . |
| packID | The pack to look for. |
| - (BOOL) checkNewUnlock |
Whether the item is newly available: unlocked but not yet downloaded.
| - (BOOL) hasItem: | (int) | itemType | |
| itemID: | (int) | itemID |
Whether the device already holds an item's data.
Only two item types are recognised. A tune must be both in the catalogue and present on disc; a marker only has to be installed. Any other type answers NO.
| itemType | The kind of item. |
| itemID | Which one. |
| - (instancetype) initWithDictionary: | (nullable NSDictionary *) | dictionary |
Builds an item from a campaign dictionary.
The entry is split in two: the identifiers and the unlock rule come from the dictionary itself, and everything the player reads from a nested v2 dictionary inside it. The initialiser ends by running -termCheck , so an item is fully evaluated before its caller ever sees it.
| dictionary | The campaign entry. |
| - (void) replaceServerUnlock: | (BOOL) | serverUnlock |
Sets the server's unlock flag.
Writes the ivar behind the read-only bServerUnlock property directly.
| serverUnlock | What the server said. |
| - (BOOL) termCheck |
Evaluates the unlock rule and sets every derived property from it.
There are five rules, chosen by the private unlockType ivar: always unlocked; every named application installed; every named pack bought or pending; and a server-driven flag. A rule that is not satisfied still sets buttonType , to a value that depends on which rule it was.
|
readnonatomicassign |
Whether the item's data is already on the device.
Set by -termCheck .
|
readnonatomicassign |
Whether the server says this item is unlocked.
Only consulted for the server-driven unlock rule. Written through -replaceServerUnlock: rather than by the initialiser.
|
readnonatomicassign |
Whether the unlock rule is satisfied.
Set by -termCheck .
|
readnonatomicassign |
Which button the UI should offer.
Set by -termCheck .
|
readnonatomicassign |
How the UI should hide the item.
Set by -termCheck , and only ever to zero.
|
readnonatomicassign |
What kind of item this is.
Values above one are never unlockable.
|
readnonatomicstrong |
The item's licence text.
The spelling is the binary's own.