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

Owns and persists the challenge-mission sheet table. More...

#include <ChallengeMissionFileManager.h>

Inheritance diagram for ChallengeMissionFileManager:
Collaboration diagram for ChallengeMissionFileManager:

Instance Methods

(instancetype) - init
 Loads every saved sheet, sorts the table, and dumps it for debugging.
(nullable NSString *) - sheetDataDirectoryPath
 The sheet-data directory, creating it when it does not yet exist.
(nullable NSString *) - sheetDataFilePath:
 Joins a file name onto the sheet-data directory.
(nullable NSString *) - sheetDataFileName:
 The file name for a sheet id.
(void) - saveChallengeMission:
 Writes a sheet's ciphered save data to its file, replacing any existing one.
(void) - loadChallengeMission
 Rebuilds the sheet table from every stmps<id>.dat file in the directory.
(void) - cleanMissionSheet:
 Deletes every stored sheet that is absent from a server sheet list.
(void) - deleteMissionSheet:
 Removes a sheet's file from disk.
(BOOL) - addMissionSheet:
 Persists a sheet and inserts it into the table in ascending-id order.
(void) - confirmedMissionSheet:
 Marks a stored sheet confirmed, re-saving it when the flag actually changed.
(nullable ChallengeMissionSheet *) - getChallengeSheet:
 Looks a sheet up in the table by id.
(BOOL) - isExistMissionSheet:count:updateTime:
 Tests whether a stored sheet matches a server manifest entry, purging it when stale.
(BOOL) - isExistEventMissionSheet
 Whether an event sheet is stored.
(void) - printSheetData
 Dumps the sheet table for debugging.

Class Methods

(instancetype) + sharedManager
 The shared manager, created once on first access.

Properties

int selectedSheetID
 The id of the sheet the player last selected.

Detailed Description

Owns and persists the challenge-mission sheet table.

Method Documentation

◆ addMissionSheet:

- (BOOL) addMissionSheet: (nullable ChallengeMissionSheet *) sheet

Persists a sheet and inserts it into the table in ascending-id order.

When a sheet with the same id is already present it is replaced in place.

Parameters
sheetThe sheet to add.
Returns
YES, always.
Ghidra address:
0x1beb24

◆ cleanMissionSheet:

- (void) cleanMissionSheet: (nullable NSArray< ChallengeMissionSheet * > *) missionSheets

Deletes every stored sheet that is absent from a server sheet list.

Parameters
missionSheetsThe sheets the server still offers.
Ghidra address:
0x1be858

◆ confirmedMissionSheet:

- (void) confirmedMissionSheet: (int) sheetID

Marks a stored sheet confirmed, re-saving it when the flag actually changed.

Parameters
sheetIDThe sheet's identifier.
Ghidra address:
0x1bec98
Ghidra address:
0x1bec98

◆ deleteMissionSheet:

- (void) deleteMissionSheet: (int) sheetID

Removes a sheet's file from disk.

Parameters
sheetIDThe sheet's identifier.
Ghidra address:
0x1bea70
Ghidra address:
0x1bea70

◆ getChallengeSheet:

- (ChallengeMissionSheet *) getChallengeSheet: (int) sheetID

Looks a sheet up in the table by id.

Parameters
sheetIDThe sheet's identifier.
Returns
The matching sheet, or nil when none is stored.
Ghidra address:
0x1bed94
Ghidra address:
0x1bed94

◆ init

- (instancetype) init

Loads every saved sheet, sorts the table, and dumps it for debugging.

Returns
The initialised manager.
Ghidra address:
0x1bdff8
Ghidra address:
0x1bdff8

◆ isExistEventMissionSheet

- (BOOL) isExistEventMissionSheet

Whether an event sheet is stored.

Returns
NO, always, in this build.
Ghidra address:
0x1bf0f8
Ghidra address:
0x1bf0f8

◆ isExistMissionSheet:count:updateTime:

- (BOOL) isExistMissionSheet: (int) sheetID
count: (int) count
updateTime: (nullable NSString *) updateTime 

Tests whether a stored sheet matches a server manifest entry, purging it when stale.

A stored sheet whose count or update time differs from the manifest is removed from the table and deleted from disk.

Parameters
sheetIDThe sheet's identifier.
countThe mission count the server reports.
updateTimeThe version tag the server reports.
Returns
YES when a current, matching sheet is already stored.
Ghidra address:
0x1beee4

◆ loadChallengeMission

- (void) loadChallengeMission

Rebuilds the sheet table from every stmps<id>.dat file in the directory.

Each file is deciphered into a ChallengeMissionSheet ; files that fail to load are deleted. The resulting table is sorted by ascending sheet id.

Ghidra address:
0x1be394
Ghidra address:
0x1be394
Ghidra address:
0x1be758

◆ printSheetData

- (void) printSheetData

Dumps the sheet table for debugging.

Ghidra address:
0x1bf100

◆ saveChallengeMission:

- (void) saveChallengeMission: (nullable ChallengeMissionSheet *) sheet

Writes a sheet's ciphered save data to its file, replacing any existing one.

Parameters
sheetThe sheet to persist.
Ghidra address:
0x1be260

◆ sharedManager

+ (instancetype) sharedManager

The shared manager, created once on first access.

Returns
The singleton instance.
Ghidra address:
0x1bdf78
Ghidra address:
0x1bdf78
Ghidra address:
0x1bdfb8

◆ sheetDataDirectoryPath

- (NSString *) sheetDataDirectoryPath

The sheet-data directory, creating it when it does not yet exist.

Returns
The Documents/sheet path.
Ghidra address:
0x1be0d0
Ghidra address:
0x1be0d0

◆ sheetDataFileName:

- (NSString *) sheetDataFileName: (int) sheetID

The file name for a sheet id.

Parameters
sheetIDThe sheet's identifier.
Returns
A name of the form stmps<id>.dat .
Ghidra address:
0x1be228
Ghidra address:
0x1be228

◆ sheetDataFilePath:

- (nullable NSString *) sheetDataFilePath: (nullable NSString *) fileName

Joins a file name onto the sheet-data directory.

Parameters
fileNameThe sheet file's base name.
Returns
The full path.
Ghidra address:
0x1be1a4

Property Documentation

◆ selectedSheetID

- (int) selectedSheetID
readnonatomicassign

The id of the sheet the player last selected.

Ghidra address:
0x1bf104

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