From 7aa6c7ed957887558b4e240408f31207378a3f75 Mon Sep 17 00:00:00 2001 From: oc Date: Tue, 10 Jul 2018 00:23:13 +0800 Subject: [PATCH] Fix page bug --- libs/actions.js | 4 ++-- libs/ui.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index 8ac8964f..4c0e2d67 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -1188,8 +1188,8 @@ actions.prototype.clickToolbox = function(x,y) { } // 下一页 if ((x == 8 || x == 9) && y == 12) { - var toolPage = parseInt(Object.keys(core.status.hero.items.tools).length/12)+1, - constantPage = parseInt(Object.keys(core.status.hero.items.constants).length/12)+1; + var toolPage = Math.ceil(Object.keys(core.status.hero.items.tools).length/12), + constantPage = Math.ceil(Object.keys(core.status.hero.items.constants).length/12); if (page