fix urlparams play
single value, questscenemstid
This commit is contained in:
父節點
f289381955
當前提交
0d522b55c5
37
Js/Main.js
37
Js/Main.js
@ -217,18 +217,23 @@ function buildLanguageList() {
|
|||||||
|
|
||||||
function checkQueryParameters() {
|
function checkQueryParameters() {
|
||||||
urlParams = commonFunctions.readQueryParameters();
|
urlParams = commonFunctions.readQueryParameters();
|
||||||
let cust;
|
if (languagesLoaded) {
|
||||||
if (urlParams['custom'] && urlParams['custom'] === "1") {
|
let cust;
|
||||||
cust = CUSTOM.custom;
|
|
||||||
} else {
|
if (urlParams['custom'] && urlParams['custom'] === "1") {
|
||||||
cust = CUSTOM.stock;
|
cust = CUSTOM.custom;
|
||||||
}
|
} else {
|
||||||
let playable = (urlParams['questSceneMstId'] &&
|
cust = CUSTOM.stock;
|
||||||
utage.scenes[cust][urlParams['questSceneMstId']] &&
|
}
|
||||||
utage.sceneTranslations[cust][urlParams['questSceneMstId']] &&
|
|
||||||
utage.sceneTranslations[cust][urlParams['questSceneMstId']].Enabled);
|
let playable = (urlParams['questscenemstid'] &&
|
||||||
if(playable) {
|
utage.scenes[cust][urlParams['questscenemstid']] &&
|
||||||
document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;";
|
utage.sceneTranslations[cust][urlParams['questscenemstid']] &&
|
||||||
|
utage.sceneTranslations[cust][urlParams['questscenemstid']].Enabled);
|
||||||
|
|
||||||
|
if(playable) {
|
||||||
|
document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +244,7 @@ function playFromQuery(event) {
|
|||||||
} else {
|
} else {
|
||||||
cust = CUSTOM.stock;
|
cust = CUSTOM.stock;
|
||||||
}
|
}
|
||||||
sceneSet(urlParams['questSceneMstId'], cust);
|
sceneSet(urlParams['questscenemstid'], cust);
|
||||||
document.getElementById('play-from-query').style.cssText = "display: none;";
|
document.getElementById('play-from-query').style.cssText = "display: none;";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,14 +352,14 @@ function closeModal(event) {
|
|||||||
|
|
||||||
function sceneSet(questSceneMstId, cust) {
|
function sceneSet(questSceneMstId, cust) {
|
||||||
resetPlaylist();
|
resetPlaylist();
|
||||||
let part = document.getElementById('ChapterSelect').value;
|
let part = document.getElementById('ChapterSelect');
|
||||||
utage.scenes[cust][questSceneMstId]['QuestSceneMstId'] = questSceneMstId;
|
utage.scenes[cust][questSceneMstId]['QuestSceneMstId'] = questSceneMstId;
|
||||||
if (part === '{All}') {
|
if (!part || part.value === '{All}') {
|
||||||
scenePlaylist.push(utage.scenes[cust][questSceneMstId]);
|
scenePlaylist.push(utage.scenes[cust][questSceneMstId]);
|
||||||
} else {
|
} else {
|
||||||
currentScene = utage.scenes[cust][questSceneMstId];
|
currentScene = utage.scenes[cust][questSceneMstId];
|
||||||
try {
|
try {
|
||||||
partPlaylist.push.apply(partPlaylist, currentScene.Parts.slice(currentScene.Parts.indexOf(part)));
|
partPlaylist.push.apply(partPlaylist, currentScene.Parts.slice(currentScene.Parts.indexOf(part.value)));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return;
|
return;
|
||||||
|
載入中…
x
新增問題並參考
Block a user