From 795eb7e51203db91594b659e54b133a585aa38cb Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 25 Aug 2019 20:03:54 +0200 Subject: Fix Steal not showing HP bar right away but only when the target leaves/enters sight range Signed-off-by: Haru --- src/map/mob.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/map') diff --git a/src/map/mob.c b/src/map/mob.c index 2ea189c23..44ee47640 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2237,6 +2237,14 @@ static void mob_log_damage(struct mob_data *md, struct block_list *src, int dama md->dmglog[minpos].flag= flag; md->dmglog[minpos].dmg = damage; } +#if (PACKETVER >= 20120404 && PACKETVER < 20131223) + // Show HP bar to all chars who hit the mob (fixes TF_STEAL not showing HP bar right away but only when target leaves/re-enters sight range) + if (battle_config.show_monster_hp_bar != 0 && (md->status.mode & MD_BOSS) == 0) { + struct map_session_data *sd = map->charid2sd(char_id); + if (sd != NULL && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE)) // check if in range + clif->monster_hp_bar(md, sd); + } +#endif } return; } -- cgit v1.2.3-60-g2f50 From 22b946b2db0374164697ba57b64abb11551b0ff3 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 25 Aug 2019 20:27:34 +0200 Subject: Fix Steal accidentally being able to steal cards from certain mobs Cards are now blocked by item type rather than item drop slot position, since cards no longer have a fixed position in the drop list (regression in ed72a947a6c97804c1eef5b80bfa49d99f7d7586) Signed-off-by: Haru --- src/map/mob.h | 1 - src/map/pc.c | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/mob.h b/src/map/mob.h index 9b0f6ffe0..6c3aa938b 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -40,7 +40,6 @@ struct hplugin_data_store; //The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from. #define MAX_MOB_DROP 10 #define MAX_MVP_DROP 3 -#define MAX_STEAL_DROP 7 //Min time between AI executions #define MIN_MOBTHINKTIME 100 diff --git a/src/map/pc.c b/src/map/pc.c index a8ff661e8..56a00b5ce 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5583,15 +5583,17 @@ static int pc_steal_item(struct map_session_data *sd, struct block_list *bl, uin // Try dropping one item, in the order from first to last possible slot. // Droprate is affected by the skill success rate. - for (i = 0; i < MAX_STEAL_DROP; i++) { + for (i = 0; i < MAX_MOB_DROP; i++) { if (md->db->dropitem[i].nameid == 0) continue; if ((data = itemdb->exists(md->db->dropitem[i].nameid)) == NULL) continue; + if (data->type == IT_CARD) + continue; if (rnd() % 10000 < apply_percentrate(md->db->dropitem[i].p, rate, 100)) break; } - if (i == MAX_STEAL_DROP) + if (i == MAX_MOB_DROP) return 0; itemid = md->db->dropitem[i].nameid; -- cgit v1.2.3-60-g2f50