From d2fcc88b41a3508cf96feb24b09b35d94621cf77 Mon Sep 17 00:00:00 2001 From: dljgs1 <906348668@qq.com> Date: Sat, 13 Apr 2019 22:31:08 +0800 Subject: [PATCH] =?UTF-8?q?checkblock=E5=8F=AF=E8=83=BD=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/functions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project/functions.js b/project/functions.js index 8ce11fa8..28c1e768 100644 --- a/project/functions.js +++ b/project/functions.js @@ -522,7 +522,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = var guards = []; // 检查光环缓存 var index = x != null && y != null ? (x + "," + y) : "floor"; - var cache = core.status.checkBlock.cache[index]; + var cache = ((core.status.checkBlock||{}).cache||{})[index]; if (!cache) { // 没有该点的缓存,则遍历每个图块 core.status.maps[floorId].blocks.forEach(function (block) { @@ -554,6 +554,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = }); // 放入缓存中 + core.status.checkBlock.cache = core.status.checkBlock.cache || {}; core.status.checkBlock.cache[index] = { "hp_buff": hp_buff, "atk_buff": atk_buff, "def_buff": def_buff, "guards": guards }; } else { // 直接使用缓存数据 @@ -1219,7 +1220,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = type: type, snipe: snipe, ambush: ambush, - cache: {} + cache: (core.status.checkBlock||{}).cache||{} }; }, "moveOneStep": function (x, y) {