Fix Replay Time

This commit is contained in:
oc 2018-01-25 02:29:29 +08:00
parent 32c9d58b65
commit 875fdc8be8
2 changed files with 18 additions and 12 deletions

View File

@ -3603,7 +3603,7 @@ core.prototype.replay = function () {
core.useItem(itemId, function () {
core.replay();
});
}, 500);
}, 1000);
}
return;
}
@ -3621,7 +3621,7 @@ core.prototype.replay = function () {
core.changeFloor(floorId, stair, null, null, function () {
core.replay();
});
}, 500);
}, 1000);
return;
}
}
@ -3634,22 +3634,27 @@ core.prototype.replay = function () {
if (core.isset(shop) && shop.visited) { // 商店可用
var choices = shop.choices;
var topIndex = 6 - parseInt(choices.length / 2);
core.status.event.selection = parseInt(selections.shift());
core.events.openShop(shopId, false);
var shopInterval = setInterval(function () {
if (!core.events.clickShop(6, topIndex+core.status.event.selection)) {
clearInterval(shopInterval);
core.stopReplay();
core.drawTip("录像文件出错");
return;
}
if (selections.length==0) {
clearInterval(shopInterval);
core.events.clickShop(6, topIndex+choices.length);
core.replay();
return;
}
var selection = parseInt(selections.shift());
if (isNaN(selection) || selection<0 || selection>=choices.length || !core.events.clickShop(6, topIndex+selection)) {
clearInterval(shopInterval);
core.stopReplay();
core.drawTip("录像文件出错");
return;
}
}, 500);
core.status.event.selection = parseInt(selections.shift());
core.events.openShop(shopId, false);
}, 1000);
return;
}
}

View File

@ -286,7 +286,7 @@ events.prototype.doAction = function() {
core.status.event.data.type=data.type;
switch (data.type) {
case "text": // 文字/对话
if (core.status.replay.isreplaying)
if (core.status.replay.replaying)
core.events.doAction();
else
core.ui.drawTextBox(data.data);
@ -377,6 +377,7 @@ events.prototype.doAction = function() {
case "openShop": // 打开一个全局商店
if (core.status.replay.replaying) { // 正在播放录像简单将visited置为true
core.status.shops[data.id].visited=true;
core.status.event.data.list = [];
this.doAction();
}
else
@ -477,7 +478,7 @@ events.prototype.doAction = function() {
core.status.route.push("choices:"+index);
core.events.insertAction(data.choices[index].action);
core.events.doAction();
}, 500)
}, 1000)
}
else {
core.stopReplay();