fix getTempleKeysFound

This commit is contained in:
gymnast86
2026-06-13 20:57:32 -04:00
parent 544964c1a5
commit f8c5a8988b
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -153,7 +153,7 @@ int numMirrorShards() {
return numMirrorShards;
}
int getTempleKeysFound(int stage) {
int getTempleKeysFound(int saveId) {
static std::unordered_map<int, std::vector<int>> keyDoorFlags = {
{0xA, {0x0}},
{0x10, {0x7, 0xB, 0x2B, 0x3E}},
@@ -167,11 +167,10 @@ int getTempleKeysFound(int stage) {
{0x18, {0x4C, 0x6F, 0x7C}}
};
int count = dComIfGs_getKeyNum(stage);
int saveId = getStageSaveId(stage);
int count = dComIfGs_getKeyNum(saveId);
// Add number of unlocked key doors for this dungeon to current key count
for (auto flag : keyDoorFlags[stage]) {
for (auto flag : keyDoorFlags[saveId]) {
if (tracker_isStageSwitch(saveId, flag)) {
count += 1;
}
+1 -1
View File
@@ -17,7 +17,7 @@ u16 getItemMessageID(u8 itemId);
int numCompletedDungeons();
int numFusedShadows();
int numMirrorShards();
int getTempleKeysFound(int stage);
int getTempleKeysFound(int saveId);
/*
* Reads the current player inventory and returns an ItemPool that can be used for logic searches