diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-02 04:21:49 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-05-02 16:50:40 +0200 |
commit | 776755bd02919ea4a5101671c0d86534a2ce8674 (patch) | |
tree | 4e9d2e019ef2775789ca6ea553f1829711d02829 /src/map/status.c | |
parent | f40cc839413cc82aed445d39cc3aa204dce87780 (diff) | |
download | hercules-776755bd02919ea4a5101671c0d86534a2ce8674.tar.gz hercules-776755bd02919ea4a5101671c0d86534a2ce8674.tar.bz2 hercules-776755bd02919ea4a5101671c0d86534a2ce8674.tar.xz hercules-776755bd02919ea4a5101671c0d86534a2ce8674.zip |
Implement status icon display for SC_ARMOR_RESIST
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 40 |
1 files changed, 40 insertions, 0 deletions
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; |