diff --git a/project/functions.js b/project/functions.js index 8ce11fa8..b562f286 100644 --- a/project/functions.js +++ b/project/functions.js @@ -522,6 +522,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = var guards = []; // 检查光环缓存 var index = x != null && y != null ? (x + "," + y) : "floor"; + if (!core.status.checkBlock) core.status.checkBlock = {}; + if (!core.status.checkBlock.cache) core.status.checkBlock.cache = {}; var cache = core.status.checkBlock.cache[index]; if (!cache) { // 没有该点的缓存,则遍历每个图块 @@ -553,7 +555,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } }); - // 放入缓存中 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: {} // clear cache }; }, "moveOneStep": function (x, y) {