JubeatPlus 3.9.11
Loading...
Searching...
No Matches
CampaignItemInfo Class Reference

A campaign item: an unlockable tune or marker with a rule for earning it. More...

#include <CampaignItemInfo.h>

Inheritance diagram for CampaignItemInfo:
Collaboration diagram for CampaignItemInfo:

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.

Detailed Description

A campaign item: an unlockable tune or marker with a rule for earning it.

Method Documentation

◆ checkExistPackList:packID:

- (BOOL) checkExistPackList: (nullable NSArray *) packList
packID: (int) packID 

Whether a pack list contains a pack.

Parameters
packListThe list, whose elements answer -intValue .
packIDThe pack to look for.
Returns
YES when it is there.
Ghidra address:
0xc5bc

◆ checkNewUnlock

- (BOOL) checkNewUnlock

Whether the item is newly available: unlocked but not yet downloaded.

Returns
YES when there is something new to fetch.
Ghidra address:
0xc738
Ghidra address:
0xc738

◆ hasItem:itemID:

- (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.

Parameters
itemTypeThe kind of item.
itemIDWhich one.
Returns
YES when the data is present.
Ghidra address:
0xc778
Ghidra address:
0xc778

◆ initWithDictionary:

- (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.

Parameters
dictionaryThe campaign entry.
Returns
The initialised item.
Ghidra address:
0xbca0

◆ replaceServerUnlock:

- (void) replaceServerUnlock: (BOOL) serverUnlock

Sets the server's unlock flag.

Writes the ivar behind the read-only bServerUnlock property directly.

Parameters
serverUnlockWhat the server said.
Ghidra address:
0xc728
Ghidra address:
0xc728

◆ termCheck

- (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.

Returns
Whether the item came out unlocked.
Ghidra address:
0xc16c
Ghidra address:
0xc16c

Property Documentation

◆ alreadyDownload

- (BOOL) alreadyDownload
readnonatomicassign

Whether the item's data is already on the device.

Set by -termCheck .

◆ bServerUnlock

- (BOOL) bServerUnlock
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.

◆ bUnlock

- (BOOL) bUnlock
readnonatomicassign

Whether the unlock rule is satisfied.

Set by -termCheck .

◆ buttonType

- (int) buttonType
readnonatomicassign

Which button the UI should offer.

Set by -termCheck .

◆ hideType

- (int) hideType
readnonatomicassign

How the UI should hide the item.

Set by -termCheck , and only ever to zero.

◆ itemType

- (int) itemType
readnonatomicassign

What kind of item this is.

Values above one are never unlockable.

◆ lisenceText

- (NSString*) lisenceText
readnonatomicstrong

The item's licence text.

The spelling is the binary's own.


The documentation for this class was generated from the following files: