diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-17 20:31:03 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-17 20:31:03 -0300 |
commit | e81f9d181143d788038334f33d53e997f2abbafd (patch) | |
tree | b959254255291f950e46cea2e3a2815e9f98f0ed /src/emap/script_buildins.c | |
parent | 7b99973735a7f216b1862da0dcc2cef430bfb6cd (diff) | |
download | evol-hercules-e81f9d181143d788038334f33d53e997f2abbafd.tar.gz evol-hercules-e81f9d181143d788038334f33d53e997f2abbafd.tar.bz2 evol-hercules-e81f9d181143d788038334f33d53e997f2abbafd.tar.xz evol-hercules-e81f9d181143d788038334f33d53e997f2abbafd.zip |
Get Homunculus EXP command (Homunculus need to be alive)
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r-- | src/emap/script_buildins.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index ff33a5f..01982a8 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -15,6 +15,7 @@ #include "map/chat.h" #include "map/chrif.h" #include "map/guild.h" +#include "map/homunculus.h" #include "map/instance.h" #include "map/mapreg.h" #include "map/npc.h" @@ -2541,3 +2542,31 @@ BUILDIN(getguildmember) return true; } +/*========================================== + * Give homunculus exp + *------------------------------------------*/ +BUILDIN(gethomunexp) +{ + int base=0; + struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL || sd->hd == NULL) + return true; + + base = script_getnum(st,2); + if (base < 0) + return true; + + // Cannot give EXP to inactive homunculus + /* + if (sd->hd->homunculus.vaporize == HOM_ST_ACTIVE) + return true; + */ + + //pc->gainexp(sd, &sd->bl, base, job, true); + homun->gainexp(sd->hd, base); + // send_homun_exp(sd->hd, base); + + return true; +} + + |