summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-04 12:33:15 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-04 12:33:15 -0300
commit71739ecc37b1081ee0a18a04082402c9ca603b7c (patch)
tree936f0acca9e2c35dc2eacc3f23850a75c2b0378a
parent814ee0a60503d3d22bd83c291eb7b9a0a67ac9d4 (diff)
downloadevol-hercules-71739ecc37b1081ee0a18a04082402c9ca603b7c.tar.gz
evol-hercules-71739ecc37b1081ee0a18a04082402c9ca603b7c.tar.bz2
evol-hercules-71739ecc37b1081ee0a18a04082402c9ca603b7c.tar.xz
evol-hercules-71739ecc37b1081ee0a18a04082402c9ca603b7c.zip
When homunculus is not active, it cannot receive EXP.
This is a pre-hook, so it tries to send the EXP packet BEFORE checks are conducted. This is a quick-and-dirty solution, as the script have other cases where the EXP gain is cancelled (eg. max level reached).
-rw-r--r--src/emap/homunculus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emap/homunculus.c b/src/emap/homunculus.c
index df9bafb..23c9ab6 100644
--- a/src/emap/homunculus.c
+++ b/src/emap/homunculus.c
@@ -19,6 +19,7 @@ int ehomunculus_gainexp_pre(struct homun_data **hdPtr,
nullpo_ret(hd);
const int exp = *expPtr;
- send_homun_exp(hd, exp);
+ if (hd->homunculus.vaporize == HOM_ST_ACTIVE)
+ send_homun_exp(hd, exp);
return 0;
}