Fix 282
This commit is contained in:
parent
2565811266
commit
666d536388
@ -3002,7 +3002,7 @@ events.prototype.setEnemyOnPoint = function (x, y, floorId, name, value, operato
|
|||||||
var enemy = core.material.enemys[block.event.id];
|
var enemy = core.material.enemys[block.event.id];
|
||||||
if (enemy == null) return;
|
if (enemy == null) return;
|
||||||
if (typeof value === 'string' && name == 'name') value = value.replaceAll(/\r/g, '\\r');
|
if (typeof value === 'string' && name == 'name') value = value.replaceAll(/\r/g, '\\r');
|
||||||
value = this._updateValueByOperator(core.calValue(value, prefix), enemy[name], operator);
|
value = this._updateValueByOperator(core.calValue(value, prefix), core.getEnemyValue(enemy, name, x, y, floorId), operator);
|
||||||
flags.enemyOnPoint = flags.enemyOnPoint || {};
|
flags.enemyOnPoint = flags.enemyOnPoint || {};
|
||||||
flags.enemyOnPoint[floorId] = flags.enemyOnPoint[floorId] || {};
|
flags.enemyOnPoint[floorId] = flags.enemyOnPoint[floorId] || {};
|
||||||
flags.enemyOnPoint[floorId][x+","+y] = flags.enemyOnPoint[floorId][x+","+y] || {};
|
flags.enemyOnPoint[floorId][x+","+y] = flags.enemyOnPoint[floorId][x+","+y] || {};
|
||||||
|
|||||||
@ -51,11 +51,11 @@ maps.prototype._setHDCanvasSize = function (ctx, width, height) {
|
|||||||
////// 加载某个楼层(从剧本或存档中) //////
|
////// 加载某个楼层(从剧本或存档中) //////
|
||||||
maps.prototype.loadFloor = function (floorId, map) {
|
maps.prototype.loadFloor = function (floorId, map) {
|
||||||
var floor = core.floors[floorId];
|
var floor = core.floors[floorId];
|
||||||
if (!map) map = floor.map;
|
if (!map) map = core.cloneArray(floor.map);
|
||||||
if (map instanceof Array) {
|
if (map instanceof Array) {
|
||||||
map = {"map": map};
|
map = {"map": map};
|
||||||
}
|
}
|
||||||
if (!map.map) map.map = core.clone(floor.map);
|
if (!map.map) map.map = core.cloneArray(floor.map);
|
||||||
var content = {};
|
var content = {};
|
||||||
var notCopy = this._loadFloor_doNotCopy();
|
var notCopy = this._loadFloor_doNotCopy();
|
||||||
for (var name in floor) {
|
for (var name in floor) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user