hideInReplay
This commit is contained in:
parent
90179a9eb0
commit
1e2238985a
@ -42,6 +42,12 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
|
||||
"_type": "textarea",
|
||||
"_data": "装备属性设置,仅对cls为equips有效。\n如果此项不为null,需要是一个对象,里面可含\"type\",\"atk\",\"def\",\"mdef\",\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档(元件说明-装备)和已有的几个装备的写法。"
|
||||
},
|
||||
"hideInReplay": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_bool": "bool",
|
||||
"_data": "是否回放时绘制道具栏。\n如果此项为true,则在回放录像时使用本道具将不会绘制道具栏页面,而是直接使用。\n此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"itemEffect": {
|
||||
|
||||
@ -1909,27 +1909,36 @@ control.prototype.replay = function () {
|
||||
else if (action.indexOf("item:")==0) {
|
||||
var itemId = action.substring(5);
|
||||
if (core.canUseItem(itemId)) {
|
||||
var tools = Object.keys(core.status.hero.items.tools).sort();
|
||||
var constants = Object.keys(core.status.hero.items.constants).sort();
|
||||
var index=-1;
|
||||
if ((index=tools.indexOf(itemId))>=0) {
|
||||
core.status.event.data = {"toolsPage":Math.floor(index/12)+1, "constantsPage":1, "selectId":null};
|
||||
index = index%12;
|
||||
}
|
||||
else if ((index=constants.indexOf(itemId))>=0) {
|
||||
core.status.event.data = {"toolsPage":1, "constantsPage":Math.floor(index/12)+1, "selectId":null};
|
||||
index = index%12+12;
|
||||
}
|
||||
if (index>=0) {
|
||||
core.ui.drawToolbox(index);
|
||||
setTimeout(function () {
|
||||
core.ui.closePanel();
|
||||
core.useItem(itemId, function () {
|
||||
core.replay();
|
||||
});
|
||||
}, 750 / Math.max(1, core.status.replay.speed));
|
||||
// 是否绘制道具栏
|
||||
if (core.material.items[itemId].hideInReplay) {
|
||||
core.useItem(itemId, function () {
|
||||
core.replay();
|
||||
});
|
||||
return;
|
||||
}
|
||||
else {
|
||||
var tools = Object.keys(core.status.hero.items.tools).sort();
|
||||
var constants = Object.keys(core.status.hero.items.constants).sort();
|
||||
var index=-1;
|
||||
if ((index=tools.indexOf(itemId))>=0) {
|
||||
core.status.event.data = {"toolsPage":Math.floor(index/12)+1, "constantsPage":1, "selectId":null};
|
||||
index = index%12;
|
||||
}
|
||||
else if ((index=constants.indexOf(itemId))>=0) {
|
||||
core.status.event.data = {"toolsPage":1, "constantsPage":Math.floor(index/12)+1, "selectId":null};
|
||||
index = index%12+12;
|
||||
}
|
||||
if (index>=0) {
|
||||
core.ui.drawToolbox(index);
|
||||
setTimeout(function () {
|
||||
core.ui.closePanel();
|
||||
core.useItem(itemId, function () {
|
||||
core.replay();
|
||||
});
|
||||
}, 750 / Math.max(1, core.status.replay.speed));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (action.indexOf("unEquip:")==0) {
|
||||
|
||||
@ -184,7 +184,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"fly": {
|
||||
"cls": "constants",
|
||||
"name": "楼层传送器",
|
||||
"text": "可以自由往来去过的楼层"
|
||||
"text": "可以自由往来去过的楼层",
|
||||
"hideInReplay": true
|
||||
},
|
||||
"coin": {
|
||||
"cls": "constants",
|
||||
@ -299,7 +300,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"skill1": {
|
||||
"cls": "constants",
|
||||
"name": "技能:二倍斩",
|
||||
"text": "可以打开或关闭主动技能二倍斩"
|
||||
"text": "可以打开或关闭主动技能二倍斩",
|
||||
"hideInReplay": true
|
||||
}
|
||||
},
|
||||
"itemEffect": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user