From 776755bd02919ea4a5101671c0d86534a2ce8674 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sat, 2 May 2020 04:21:49 +0200 Subject: Implement status icon display for SC_ARMOR_RESIST --- src/map/status.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index d3e85e5be..c502086cf 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8699,6 +8699,32 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl //associated, and yet are not wrong/unknown. [Skotlex] //break; } + case SC_ARMOR_RESIST: + if (val1 > 0) { + int sc_icn = status->get_sc_icon(SC_RESIST_PROPERTY_WATER); + int sc_typ = status->get_sc_relevant_bl_types(SC_RESIST_PROPERTY_WATER); + clif->status_change(bl, sc_icn, sc_typ, 1, total_tick, 0, 0, 0); + } + + if (val2 > 0) { + int sc_icn = status->get_sc_icon(SC_RESIST_PROPERTY_GROUND); + int sc_typ = status->get_sc_relevant_bl_types(SC_RESIST_PROPERTY_GROUND); + clif->status_change(bl, sc_icn, sc_typ, 1, total_tick, 0, 0, 0); + } + + if (val3 > 0) { + int sc_icn = status->get_sc_icon(SC_RESIST_PROPERTY_FIRE); + int sc_typ = status->get_sc_relevant_bl_types(SC_RESIST_PROPERTY_FIRE); + clif->status_change(bl, sc_icn, sc_typ, 1, total_tick, 0, 0, 0); + } + + if (val4 > 0) { + int sc_icn = status->get_sc_icon(SC_RESIST_PROPERTY_WIND); + int sc_typ = status->get_sc_relevant_bl_types(SC_RESIST_PROPERTY_WIND); + clif->status_change(bl, sc_icn, sc_typ, 1, total_tick, 0, 0, 0); + } + + break; case SC_MER_FLEE: case SC_MER_ATK: case SC_MER_HIT: @@ -11056,6 +11082,20 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid, break; } break; + case SC_ARMOR_RESIST: + if (sce->val1 > 0) + clif->sc_end(bl, bl->id, AREA, status->get_sc_icon(SC_RESIST_PROPERTY_WATER)); + + if (sce->val2 > 0) + clif->sc_end(bl, bl->id, AREA, status->get_sc_icon(SC_RESIST_PROPERTY_GROUND)); + + if (sce->val3 > 0) + clif->sc_end(bl, bl->id, AREA, status->get_sc_icon(SC_RESIST_PROPERTY_FIRE)); + + if (sce->val4 > 0) + clif->sc_end(bl, bl->id, AREA, status->get_sc_icon(SC_RESIST_PROPERTY_WIND)); + + break; } opt_flag = 1; -- cgit v1.2.3-70-g09d2