Merge branch 'v2.x' of https://github.com/ckcz123/mota-js into v2.x

This commit is contained in:
ckcz123 2021-08-02 21:38:19 +08:00
commit 6d2bb39489
2 changed files with 3 additions and 3 deletions

View File

@ -665,7 +665,7 @@ events.prototype._canGetNextItem = function (direction) {
var nx = core.getHeroLoc('x') + core.utils.scan[direction].x;
var ny = core.getHeroLoc('y') + core.utils.scan[direction].y;
var block = core.getBlock(nx, ny);
return block != null && !block.event.script && block.event.trigger == 'getItem';
return block != null && !block.event.script && !block.event.event && block.event.trigger == 'getItem';
}
events.prototype._getNextItem = function (direction, noRoute) {

View File

@ -856,7 +856,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
var index = x + "," + y;
var block = blocksObj[index];
// 该点是否不可通行或有脚本
if (block && !block.disable && (block.event.noPass || block.event.script))
if (block && !block.disable && (block.event.noPass || block.event.script || block.event.event))
return false;
// 该点是否是绿点可触发
if (block && !block.disable && block.event.trigger) {
@ -1032,7 +1032,7 @@ maps.prototype._drawBlockInfo_shouldBlurFg = function (x, y) {
if (main.mode == 'play' && !core.flags.blurFg) return false;
var block = this.getBlock(x, y);
if (block == null || block.id == 0) return false;
if (block.event.cls == 'autotile' || block.event.cls == 'tileset') return block.event.script;
if (block.event.cls == 'autotile' || block.event.cls == 'tileset') return block.event.script || block.event.event;
return true;
}