Fix bugs: cannotEquip & heroMoving & hideBlock

This commit is contained in:
oc 2019-03-12 23:29:26 +08:00
parent ecd6ff76b4
commit 476bf71490
4 changed files with 6 additions and 3 deletions

View File

@ -427,10 +427,12 @@ function (enemy, hero_hp, hero_atk, hero_def, hero_mdef, x, y, floorId) {
``` js
////// 点击楼层传送器时的打开操作 //////
control.prototype.useFly = function (need) {
if (!core.status.heroStop) {
if (!core.status.heroStop || core.status.heroMoving > 0) {
core.drawTip("请先停止勇士行动");
return;
}
if (core.status.lockControl || core.status.event.id != null) return;
if (core.canUseItem('fly')) core.useItem('fly');
else core.drawTip("当前无法使用"+core.material.items.fly.name);
}

View File

@ -320,6 +320,7 @@ items.prototype.loadEquip = function (equipId, callback) {
var type = this.getEquipTypeById(equipId);
if (type < 0) {
core.drawTip("当前没有"+loadEquip.equip.type+"的空位!");
if (core.isset(callback)) callback();
return;
}

View File

@ -1377,7 +1377,7 @@ maps.prototype.hideBlock = function (x, y, floorId) {
core.clearMap('event2', x * 32, y * 32 +32-height, 32, height-32);
}
block.disable = true;
block.block.disable = true;
core.updateStatusBar();
}

View File

@ -745,7 +745,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 可以在这里任意增加或编辑每个按键的行为
// 如果处于正在行走状态,则不处理
if (!core.status.heroStop)
if (!core.status.heroStop || core.status.heroMoving > 0)
return;
// Alt+0~9快捷换上套装