summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-25 01:52:30 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-25 01:52:30 +0300
commit505d310c38ab4c2ce80edb082a609959ee0ec5e6 (patch)
tree97ebe470cc15429a305d962ae8d50657066c1e41 /src/emap/script_buildins.c
parentebd03c49cf2196bfe6cc10e64d9249b0e9b4a08e (diff)
downloadevol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.gz
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.bz2
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.xz
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.zip
Hercules update.
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 78fb940..02b26cd 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -1094,6 +1094,9 @@ BUILDIN(failedRefIndex)
if (sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0)
return false;
+ // Call before changing refine to 0.
+ achievement->validate_refine(sd, n, false);
+
sd->status.inventory[n].refine = 0;
if (sd->status.inventory[n].equip)
pc->unequipitem(sd, n, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
@@ -1124,6 +1127,9 @@ BUILDIN(downRefIndex)
clif->delitem(sd, n, 1, DELITEM_MATERIALCHANGE);
logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[n], sd->inventory_data[n]);
clif->additem(sd, n, 1, 0);
+
+ achievement->validate_refine(sd, n, false); // Achievements [Smokexyz/Hercules]
+
clif->misceffect(&sd->bl, 2);
return true;
}
@@ -1152,6 +1158,7 @@ BUILDIN(successRefIndex)
logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[n],sd->inventory_data[n]);
clif->additem(sd, n, 1, 0);
clif->misceffect(&sd->bl, 3);
+ achievement->validate_refine(sd, i, true); // Achievements [Smokexyz/Hercules]
if (sd->status.inventory[n].refine == 10 &&
sd->status.inventory[n].card[0] == CARD0_FORGE &&