fix bugs......
This commit is contained in:
parent
77e66f849d
commit
d9a4ee1aae
@ -1149,7 +1149,7 @@ events.prototype._action_openDoor = function (data, x, y, prefix) {
|
|||||||
|
|
||||||
events.prototype._action_closeDoor = function (data, x, y, prefix) {
|
events.prototype._action_closeDoor = function (data, x, y, prefix) {
|
||||||
var loc = this.__action_getLoc(data.loc, x, y, prefix);
|
var loc = this.__action_getLoc(data.loc, x, y, prefix);
|
||||||
core.closeDoor(loc[0], loc[1], data.id, core.doAction);
|
this.__action_doAsyncFunc(data.async, core.closeDoor, loc[0], loc[1], data.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype._action_useItem = function (data, x, y, prefix) {
|
events.prototype._action_useItem = function (data, x, y, prefix) {
|
||||||
|
|||||||
10
libs/maps.js
10
libs/maps.js
@ -91,6 +91,9 @@ maps.prototype.initBlock = function (x, y, id, addInfo, eventFloor) {
|
|||||||
else if (core.icons.getTilesetOffset(id)) block.event = {"cls": "tileset", "id": "X" + id, "noPass": true};
|
else if (core.icons.getTilesetOffset(id)) block.event = {"cls": "tileset", "id": "X" + id, "noPass": true};
|
||||||
else block.event = {'cls': 'terrains', 'id': 'none', 'noPass': false};
|
else block.event = {'cls': 'terrains', 'id': 'none', 'noPass': false};
|
||||||
|
|
||||||
|
if (typeof block.event.noPass === 'string')
|
||||||
|
block.event.noPass = JSON.parse(block.event.noPass);
|
||||||
|
|
||||||
if (addInfo) this._addInfo(block);
|
if (addInfo) this._addInfo(block);
|
||||||
if (eventFloor) {
|
if (eventFloor) {
|
||||||
this._addEvent(block, x, y, (eventFloor.events || {})[x + "," + y]);
|
this._addEvent(block, x, y, (eventFloor.events || {})[x + "," + y]);
|
||||||
@ -1447,8 +1450,13 @@ maps.prototype.setBlock = function (number, x, y, floorId) {
|
|||||||
else number = core.getNumberById(number);
|
else number = core.getNumberById(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
var originBlock = core.getBlock(x, y, floorId, true);
|
|
||||||
var block = this.initBlock(x, y, number, true, core.floors[floorId]);
|
var block = this.initBlock(x, y, number, true, core.floors[floorId]);
|
||||||
|
if (block.id == 0 && !block.event.trigger) {
|
||||||
|
// 转变图块为0且该点无事件,视为隐藏
|
||||||
|
core.removeBlock(x, y, floorId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var originBlock = core.getBlock(x, y, floorId, true);
|
||||||
if (floorId == core.status.floorId) {
|
if (floorId == core.status.floorId) {
|
||||||
core.removeGlobalAnimate(x, y);
|
core.removeGlobalAnimate(x, y);
|
||||||
core.clearMap('event', x * 32, y * 32, 32, 32);
|
core.clearMap('event', x * 32, y * 32, 32, 32);
|
||||||
|
|||||||
@ -467,6 +467,11 @@ ui.prototype.drawWindowSelector = function(background, x, y, w, h) {
|
|||||||
|
|
||||||
////// 绘制 WindowSkin
|
////// 绘制 WindowSkin
|
||||||
ui.prototype.drawWindowSkin = function(background, ctx, x, y, w, h, direction, px, py) {
|
ui.prototype.drawWindowSkin = function(background, ctx, x, y, w, h, direction, px, py) {
|
||||||
|
background = background || core.status.textAttribute.background;
|
||||||
|
if (typeof background == 'string') {
|
||||||
|
background = core.getMappedName(background);
|
||||||
|
background = core.material.images.images[background];
|
||||||
|
}
|
||||||
// 仿RM窗口皮肤 ↓
|
// 仿RM窗口皮肤 ↓
|
||||||
var dstImage = core.getContextByName(ctx);
|
var dstImage = core.getContextByName(ctx);
|
||||||
if (!dstImage) return;
|
if (!dstImage) return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user