This commit is contained in:
ckcz123 2020-01-04 19:45:03 +08:00
parent 7108e3a786
commit 4bc69f5b27

View File

@ -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 "";
}