summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-07-21 05:04:29 +0800
committerHaru <haru@dotalux.com>2019-07-28 19:37:15 +0200
commit5ac507e88e116e6a11185beace600bde8896c534 (patch)
tree2ba9972ab9d077aff6e9702c4be8d7d065a80e86 /src/map/pc.c
parent9034007595aa0ef58d28f09253ba15f405a011ab (diff)
downloadhercules-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/pc.c')
-rw-r--r--src/map/pc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 6caafa806..84d49e1db 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7143,6 +7143,11 @@ static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint
clif_disp_onlyself(sd, output);
}
+ // Share master EXP to homunculus
+ if (sd->hd != NULL && battle_config.hom_bonus_exp_from_master > 0) {
+ homun->gainexp(sd->hd, apply_percentrate((int)base_exp, battle_config.hom_bonus_exp_from_master, 100));
+ }
+
return true;
}