From 6b314c0d8592f760fac82e9460e47fe359d6c320 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Thu, 3 Jan 2019 14:41:38 +0800 Subject: [PATCH] Fix Book Detail --- libs/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ui.js b/libs/ui.js index cd8063ac..39b7d928 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1688,7 +1688,9 @@ ui.prototype.drawBook = function (index) { ////// 绘制怪物属性的详细信息 ////// ui.prototype.drawBookDetail = function (index) { - var enemys = core.enemys.getCurrentEnemys(core.floorIds[(core.status.event.selection||{}).index]); + var floorId = core.floorIds[(core.status.event.ui||{}).index] || core.status.floorId; + var enemys = core.enemys.getCurrentEnemys(floorId); + if (enemys.length==0) return; if (index<0) index=0; if (index>=enemys.length) index=enemys.length-1;