diff --git a/libs/items.js b/libs/items.js index f65e8f54..4f0fa179 100644 --- a/libs/items.js +++ b/libs/items.js @@ -70,6 +70,15 @@ items.prototype.getItemEffect = function (itemId, itemNum) { } } core.status.hero.statistics.hp += core.status.hero.hp - curr_hp; + + if (this.useItemEvent[itemId]) { + try { + core.insertAction(this.useItemEvent[itemId]); + } + catch (e) { + main.log(e); + } + } } else { core.addItem(itemId, itemNum); @@ -90,14 +99,6 @@ items.prototype.getItemEffectTip = function (itemId) { return ""; } } - if (this.useItemEvent[itemId]) { - try { - core.insertAction(this.useItemEvent[itemId]); - } - catch (e) { - main.log(e); - } - } } return ""; }