From f4b7c48aa0382dc9665e7da16a5864228ad5ac6f Mon Sep 17 00:00:00 2001 From: tocque <364004564@qq.com> Date: Fri, 14 Sep 2018 08:22:29 +0800 Subject: [PATCH] one more.... --- libs/items.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/items.js b/libs/items.js index 2185b513..66fb6f0c 100644 --- a/libs/items.js +++ b/libs/items.js @@ -98,7 +98,8 @@ items.prototype.hasItem = function (itemId) { ////// 是否装备某件装备 ////// items.prototype.hasEquip = function (equipId) { - return core.status.hero.equipment.indexOf(equipId) != -1 ; + var equiptype = core.material.items[equipId].equiptype; + return core.status.hero.equipment[equiptype] == equipId; } ////// 设置某个物品的个数 //////