summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/mob.c10
2 files changed, 16 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index b71c8e21c..508f4991e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4139,6 +4139,14 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
clif_specialeffect_single(bl,423,sd->fd);
else if(md->special_state.size==SZ_MEDIUM)
clif_specialeffect_single(bl,421,sd->fd);
+#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 == sd->status.char_id )
+ clif_monster_hp_bar(md, sd->fd);
+ }
+#endif
}
break;
case BL_PET:
diff --git a/src/map/mob.c b/src/map/mob.c
index 88ee88713..9653ba32b 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2083,8 +2083,14 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage)
return;
#if PACKETVER >= 20120404
- if( src->type == BL_PC && !(md->status.mode&MD_BOSS) )
- clif_monster_hp_bar(md, ((TBL_PC*)src)->fd);
+ 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.
+ 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->fd);
+ }
+ }
#endif
if( md->special_state.ai == 2 ) {//LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex]