diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-07-21 05:04:29 +0800 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2019-07-28 19:37:15 +0200 |
commit | 5ac507e88e116e6a11185beace600bde8896c534 (patch) | |
tree | 2ba9972ab9d077aff6e9702c4be8d7d065a80e86 /src/map/homunculus.c | |
parent | 9034007595aa0ef58d28f09253ba15f405a011ab (diff) | |
download | hercules-5ac507e88e116e6a11185beace600bde8896c534.tar.gz hercules-5ac507e88e116e6a11185beace600bde8896c534.tar.bz2 hercules-5ac507e88e116e6a11185beace600bde8896c534.tar.xz hercules-5ac507e88e116e6a11185beace600bde8896c534.zip |
Update Homunculus obtain EXP from master
- homunculus will obtain a portion or full EXP from master.
- fixes #2313
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index f3a4c559a..d3e815872 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -552,6 +552,12 @@ static int homunculus_gainexp(struct homun_data *hd, unsigned int exp) hd->homunculus.exp += exp; + if (hd->master->state.showexp && hd->exp_next > 0) { + char output[256]; + sprintf(output, "Homunculus Experience Gained Base:%u (%.2f%%)", exp, ((float)exp / (float)hd->exp_next * (float)100)); + clif_disp_onlyself(hd->master, output); + } + if(hd->homunculus.exp < hd->exp_next) { clif->hominfo(hd->master,hd,0); return 0; |