From 7bad06ab75e028152fd86188cf0dcbda30364967 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Wed, 11 Sep 2019 11:25:30 +0800 Subject: [PATCH] Fix getItem hint with shop --- libs/events.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/events.js b/libs/events.js index 4d786341..9e3b2888 100644 --- a/libs/events.js +++ b/libs/events.js @@ -467,11 +467,13 @@ events.prototype.getItem = function (id, num, x, y, callback) { try { hint = core.replaceText(hint); } catch (e) {} - core.insertAction("\t["+core.material.items[id].name+","+id+"]" + hint + "\n" - + (itemCls == 'keys' || id == 'greenKey' || id == 'steelKey' ? "(钥匙类道具,遇到对应的门时自动打开)" - : itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)" - : itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)" - : itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : "")) + if (!core.status.event.id || core.status.event.id=='action') { + core.insertAction("\t["+core.material.items[id].name+","+id+"]" + hint + "\n" + + (itemCls == 'keys' || id == 'greenKey' || id == 'steelKey' ? "(钥匙类道具,遇到对应的门时自动打开)" + : itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)" + : itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)" + : itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : "")); + } itemHint.push(id); }