Kingsoul/White Fragment fix

This commit is contained in:
ReznoRMichael 2020-09-28 17:55:13 +02:00
parent 8105d2ad62
commit d4a7f1439e
2 changed files with 20 additions and 12 deletions

View file

@ -834,7 +834,14 @@ function CheckGeo(divId, geoValue) {
*/ */
function CheckIfDataTrue(divId, dataObject, playerData) { function CheckIfDataTrue(divId, dataObject, playerData) {
for (let i in dataObject) { for (let i in dataObject) {
switch (i) {
case "gotCharm_36":
// prevents green checkbox and adding 1% when only got one white fragment
(playerData.gotQueenFragment === true && playerData.gotKingFragment === true) ? CurrentDataTrue(divId): CurrentDataFalse();
break;
default:
(playerData[i] === true) ? CurrentDataTrue(divId): CurrentDataFalse(); (playerData[i] === true) ? CurrentDataTrue(divId): CurrentDataFalse();
}
FillHTML(divId, dataObject[i][0], dataObject[i][1]); FillHTML(divId, dataObject[i][0], dataObject[i][1]);
} }
} }

View file

@ -2,16 +2,17 @@ var jsonObj = "";
// save file names list in the save/ folder // save file names list in the save/ folder
var fileName = [ var fileName = [
"reznor0.json", "reznor0.json", // 0
"reznor1beforegruz.json", "reznor1beforegruz.json", // 1
"reznor2aftergruz.json", "reznor2aftergruz.json", // 2
"reznor5hornet.json", "reznor5hornet.json", // 3
"reznor29ss.json", "reznor29ss.json", // 4
"ext48.json", "ext48.json", // 5
"reznor88banish.json", "reznor88banish.json", // 6
"reznor100.json", "reznor99whitefragment.json", // 7
"reznor103ss.json", "reznor100.json", // 8
"reznor112grimm.json", "reznor103ss.json", // 9
"reznor112grimm.json", // 10
]; ];
/** /**
@ -44,7 +45,7 @@ function loadJSON(filename, callback) {
xobj.send(null); xobj.send(null);
} }
loadJSON("save/" + fileName[4], loadJSON("save/" + fileName[7],
function JSONparse(response) { function JSONparse(response) {
// Parse JSON string into object // Parse JSON string into object
jsonObj = JSON.parse(response); jsonObj = JSON.parse(response);