mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
Fix checking gSaveContext for used small keys (#5346)
This commit is contained in:
parent
4acbf799cc
commit
b71a0c5803
2 changed files with 3 additions and 2 deletions
|
@ -2244,7 +2244,7 @@ const std::vector<uint8_t>& GetDungeonSmallKeyDoors(SceneID sceneId) {
|
|||
return dungeonSmallKeyDoors[key];
|
||||
}
|
||||
|
||||
int8_t GetUsedSmallKeyCount(SceneID sceneId) {
|
||||
int8_t Logic::GetUsedSmallKeyCount(SceneID sceneId) {
|
||||
const auto& smallKeyDoors = GetDungeonSmallKeyDoors(sceneId);
|
||||
|
||||
// Get the swch value for the scene
|
||||
|
@ -2252,7 +2252,7 @@ int8_t GetUsedSmallKeyCount(SceneID sceneId) {
|
|||
if (gPlayState != nullptr && gPlayState->sceneNum == sceneId) {
|
||||
swch = gPlayState->actorCtx.flags.swch;
|
||||
} else {
|
||||
swch = gSaveContext.sceneFlags[sceneId].swch;
|
||||
swch = mSaveContext->sceneFlags[sceneId].swch;
|
||||
}
|
||||
|
||||
// Count the number of small keys doors unlocked
|
||||
|
|
|
@ -267,6 +267,7 @@ class Logic {
|
|||
bool CheckEquipment(uint32_t item);
|
||||
bool CheckQuestItem(uint32_t item);
|
||||
void SetQuestItem(uint32_t item, bool state);
|
||||
int8_t GetUsedSmallKeyCount(SceneID sceneId);
|
||||
uint8_t GetSmallKeyCount(uint32_t dungeonIndex);
|
||||
void SetSmallKeyCount(uint32_t dungeonIndex, uint8_t count);
|
||||
bool CheckDungeonItem(uint32_t item, uint32_t dungeonIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue