From eff452fa3526250e9c64da55bb260b274add67d3 Mon Sep 17 00:00:00 2001 From: Daegaladh Date: Thu, 16 Jun 2022 18:59:02 +0200 Subject: [PATCH] Fixed intimacy reduction for Vanilmirth Self-destruction and S.B.R.44 (#6400) * Fixed homun intimacy reduction for S.B.R.44 and Self-destruction * Self-destruction must lower intimacy even if doesn't hit any enemies * Fixed intimacy for SBR44 * Added extra checks as suggested by @aleos89 Thanks to @Daraen1, @Lemongrass3110 and @aleos89! Co-authored-by: Lemongrass3110 --- src/map/skill.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 34f495e88a..95691ba2fe 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -2517,12 +2517,13 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * sc_start(src,src,SC_BLIND,2*skill_lv,skill_lv,skill_get_time2(skill_id,skill_lv)); break; case HFLI_SBR44: //[orn] - case HVAN_EXPLOSION: if(src->type == BL_HOM){ - TBL_HOM *hd = (TBL_HOM*)src; - hd->homunculus.intimacy = (skill_id == HFLI_SBR44) ? 200 : 100; // hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION) - if (hd->master) - clif_send_homdata(hd->master,SP_INTIMATE,hd->homunculus.intimacy/100); + struct homun_data *hd = (struct homun_data *)src; + if (hd != nullptr) { + hd->homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION); + if (hd->master) + clif_send_homdata(hd->master,SP_INTIMATE,hd->homunculus.intimacy / 100); + } } break; case CR_GRANDCROSS: @@ -8411,6 +8412,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui return 1; } status_damage(src, src, sstatus->max_hp,0,0,1, skill_id); + if(skill_id == HVAN_EXPLOSION && src->type == BL_HOM) { + struct homun_data *hd = (struct homun_data *)src; + if (hd != nullptr) { + hd->homunculus.intimacy = hom_intimacy_grade2intimacy(HOMGRADE_HATE_WITH_PASSION); + if (hd->master) + clif_send_homdata(hd->master,SP_INTIMATE,hd->homunculus.intimacy / 100); + } + } break; case AL_ANGELUS: #ifdef RENEWAL