From beec1c2766e40f7a215142662e6a49727afd8d48 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 19 Dec 2019 17:02:19 -0500 Subject: [PATCH] Corrected Enchant Arms for older clients (#4484) * Follow up to 754274b. * Resolved the status icon not clearing for each element. Thanks to @Daegaladh! --- src/map/clif.cpp | 5 ----- src/map/status.cpp | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/map/clif.cpp b/src/map/clif.cpp index f7b97e503e..dde5e40c69 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -5999,11 +5999,6 @@ void clif_status_change_sub(struct block_list *bl, int id, int type, int flag, t nullpo_retv(bl); -#if PACKETVER < 20151104 - if (type == EFST_WEAPONPROPERTY) - type = EFST_ATTACK_PROPERTY_NOTHING + val1; // Assign status icon for older clients -#endif - #if PACKETVER >= 20120618 if (flag && battle_config.display_status_timers) WBUFW(buf,0) = 0x983; diff --git a/src/map/status.cpp b/src/map/status.cpp index 2d54e07ad2..97bd7ab091 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -11731,8 +11731,16 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty calc_flag&=~SCB_BODY; }*/ - if(!(flag&SCSTART_NOICON) && !(flag&SCSTART_LOADED && StatusDisplayType[type])) - clif_status_change(bl,StatusIconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0); + if (!(flag&SCSTART_NOICON) && !(flag&SCSTART_LOADED && StatusDisplayType[type])) { + int status_icon = StatusIconChangeTable[type]; + +#if PACKETVER < 20151104 + if (status_icon == EFST_WEAPONPROPERTY) + status_icon = EFST_ATTACK_PROPERTY_NOTHING + val1; // Assign status icon for older clients +#endif + + clif_status_change(bl, status_icon, 1, tick, (val_flag & 1) ? val1 : 1, (val_flag & 2) ? val2 : 0, (val_flag & 4) ? val3 : 0); + } // Used as temporary storage for scs with interval ticks, so that the actual duration is sent to the client first. if( tick_time ) @@ -12830,7 +12838,14 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const }*/ // On Aegis, when turning off a status change, first goes the sc packet, then the option packet. - clif_status_change(bl,StatusIconChangeTable[type],0,0,0,0,0); + int status_icon = StatusIconChangeTable[type]; + +#if PACKETVER < 20151104 + if (status_icon == EFST_WEAPONPROPERTY) + status_icon = EFST_ATTACK_PROPERTY_NOTHING + sce->val1; // Assign status icon for older clients +#endif + + clif_status_change(bl,status_icon,0,0,0,0,0); if( opt_flag&8 ) // bugreport:681 clif_changeoption2(bl);