diff options
author | shennetsind <ind@henn.et> | 2013-11-26 17:21:47 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-26 17:21:47 -0200 |
commit | 7ee782c0d3df09ed494dd310489d3512f4e87ad0 (patch) | |
tree | 6d738b0ed9a3113d98a16ecdcd872b337557e460 /src/map/mob.c | |
parent | 7ac467bea614f81f1c4cb1050233fe46c2a748aa (diff) | |
download | hercules-7ee782c0d3df09ed494dd310489d3512f4e87ad0.tar.gz hercules-7ee782c0d3df09ed494dd310489d3512f4e87ad0.tar.bz2 hercules-7ee782c0d3df09ed494dd310489d3512f4e87ad0.tar.xz hercules-7ee782c0d3df09ed494dd310489d3512f4e87ad0.zip |
Fixed Bug 7794
monster's healing now refreshes their hp bar accordingly.
Special Thanks to Beret.
http://hercules.ws/board/tracker/issue-7794-healing-in-monsters/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index b41dedac1..35c9ed1aa 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2764,6 +2764,19 @@ void mob_heal(struct mob_data *md,unsigned int heal) { if (battle_config.show_mob_info&3) clif->charnameack (0, &md->bl); + +#if PACKETVER >= 20120404 + if( !(md->status.mode&MD_BOSS) ){ + int i; + for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob. + if( md->dmglog[i].id ) { + struct map_session_data *sd = map->charid2sd(md->dmglog[i].id); + if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range + clif->monster_hp_bar(md,sd); + } + } + } +#endif } /*========================================== |