@@ -1586,7 +1586,8 @@ static bool clif_spawn(struct block_list *bl)
15861586 if (sd->bg_id != 0 && map->list[sd->bl.m].flag.battleground)
15871587 clif->sendbgemblem_area(sd);
15881588 for (i = 0; i < sd->sc_display_count; i++) {
1589- clif->sc_continue(&sd->bl, sd->bl.id,AREA,status->dbs->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
1589+ clif->sc_continue(&sd->bl, sd->bl.id, AREA, status->get_sc_icon(sd->sc_display[i]->type), sd->sc_display[i]->val1, sd->sc_display[i]->val2, sd->sc_display[i]->val3);
1590+
15901591 }
15911592 if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0)
15921593 clif->spiritcharm(sd);
@@ -1612,7 +1613,7 @@ static bool clif_spawn(struct block_list *bl)
16121613 else if (nd->size == SZ_MEDIUM)
16131614 clif->specialeffect(&nd->bl,421,AREA);
16141615 if (nd->clan_id > 0)
1615- clif->sc_load(&nd->bl, nd->bl.id, AREA, status->dbs->IconChangeTable[ SC_CLAN_INFO] , 0, nd->clan_id, 0);
1616+ clif->sc_load(&nd->bl, nd->bl.id, AREA, status->get_sc_icon( SC_CLAN_INFO) , 0, nd->clan_id, 0);
16161617 }
16171618 break;
16181619 case BL_PET:
@@ -3873,7 +3874,7 @@ static void clif_arrowequip(struct map_session_data *sd, int val)
38733874 nullpo_retv(sd);
38743875
38753876#if PACKETVER >= 20121128
3876- clif->status_change(&sd->bl, SI_CLIENT_ONLY_EQUIP_ARROW , 1, INVALID_TIMER, 0, 0, 0);
3877+ clif->status_change(&sd->bl, status->get_sc_icon(SC_CLIENT_ONLY_EQUIP_ARROW), status->get_sc_relevant_bl_types(SC_CLIENT_ONLY_EQUIP_ARROW) , 1, INVALID_TIMER, 0, 0, 0);
38773878#endif
38783879 fd=sd->fd;
38793880 WFIFOHEAD(fd, packet_len(0x013c));
@@ -4676,7 +4677,7 @@ static void clif_getareachar_pc(struct map_session_data *sd, struct map_session_
46764677 clif->charm_single(sd->fd, dstsd);
46774678
46784679 for( i = 0; i < dstsd->sc_display_count; i++ ) {
4679- clif->sc_continue(&sd->bl,dstsd->bl.id,SELF,status->dbs->IconChangeTable[ dstsd->sc_display[i]->type], dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
4680+ clif->sc_continue(&sd->bl, dstsd->bl.id, SELF, status->get_sc_icon( dstsd->sc_display[i]->type), dstsd->sc_display[i]->val1, dstsd->sc_display[i]->val2, dstsd->sc_display[i]->val3);
46804681 }
46814682 if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
46824683 (sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
@@ -4757,7 +4758,7 @@ static void clif_getareachar_unit(struct map_session_data *sd, struct block_list
47574758 else if (nd->size == SZ_MEDIUM)
47584759 clif->specialeffect_single(bl,421,sd->fd);
47594760 if (nd->clan_id > 0)
4760- clif->sc_load(&nd->bl, nd->bl.id, AREA, status->dbs->IconChangeTable[ SC_CLAN_INFO] , 0, nd->clan_id, 0);
4761+ clif->sc_load(&nd->bl, nd->bl.id, AREA, status->get_sc_icon( SC_CLAN_INFO) , 0, nd->clan_id, 0);
47614762 }
47624763 break;
47634764 case BL_MOB:
@@ -6041,7 +6042,7 @@ static void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 s
60416042 }
60426043}
60436044
6044- static void clif_status_change_notick(struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3)
6045+ static void clif_status_change_notick(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3)
60456046{
60466047 struct packet_sc_notick p;
60476048 struct map_session_data *sd;
@@ -6051,7 +6052,7 @@ static void clif_status_change_notick(struct block_list *bl, int type, int flag,
60516052 if (type == SI_BLANK) //It shows nothing on the client...
60526053 return;
60536054
6054- if (!(status->type2relevant_bl_types(type)& bl->type)) // only send status changes that actually matter to the client
6055+ if (!(relevant_bl & bl->type)) // only send status changes that actually matter to the client
60556056 return;
60566057
60576058 sd = BL_CAST(BL_PC, bl);
@@ -6070,7 +6071,7 @@ static void clif_status_change_notick(struct block_list *bl, int type, int flag,
60706071/// 08ff <id>.L <index>.W <remain msec>.L { <val>.L }*3 (PACKETVER >= 20111108)
60716072/// 0983 <index>.W <id>.L <state>.B <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618)
60726073/// 0984 <id>.L <index>.W <total msec>.L <remain msec>.L { <val>.L }*3 (PACKETVER >= 20120618)
6073- static void clif_status_change_sub(struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3)
6074+ static void clif_status_change_sub(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3)
60746075{
60756076 struct packet_status_change p;
60766077 struct map_session_data *sd;
@@ -6080,7 +6081,7 @@ static void clif_status_change_sub(struct block_list *bl, int type, int flag, in
60806081
60816082 nullpo_retv(bl);
60826083
6083- if (!(status->type2relevant_bl_types(type)& bl->type)) // only send status changes that actually matter to the client
6084+ if (!(relevant_bl & bl->type)) // only send status changes that actually matter to the client
60846085 return;
60856086
60866087 if ( tick < 0 )
@@ -6107,9 +6108,9 @@ static void clif_status_change_sub(struct block_list *bl, int type, int flag, in
61076108
61086109/// Notifies clients of a status change.
61096110/// @see clif_status_change_sub
6110- static void clif_status_change(struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3)
6111+ static void clif_status_change(struct block_list *bl, int type, int relevant_bl, int flag, int total_tick, int val1, int val2, int val3)
61116112{
6112- clif->status_change_sub(bl, type, flag, total_tick, total_tick, val1, val2, val3);
6113+ clif->status_change_sub(bl, type, relevant_bl, flag, total_tick, total_tick, val1, val2, val3);
61136114}
61146115
61156116/// Send message (modified by [Yor]) (ZC_NOTIFY_PLAYERCHAT).
@@ -10681,11 +10682,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
1068110682 clif->initialstatus(sd);
1068210683
1068310684 if (pc_isfalcon(sd))
10684- clif->status_change(&sd->bl, SI_FALCON , 1, 0, 0, 0, 0);
10685+ clif->status_change(&sd->bl, status->get_sc_icon(SC_FALCON), status->get_sc_relevant_bl_types(SC_FALCON) , 1, 0, 0, 0, 0);
1068510686 if (pc_isridingpeco(sd) || pc_isridingdragon(sd))
10686- clif->status_change(&sd->bl, SI_RIDING , 1, 0, 0, 0, 0);
10687+ clif->status_change(&sd->bl, status->get_sc_icon(SC_RIDING), status->get_sc_relevant_bl_types(SC_RIDING) , 1, 0, 0, 0, 0);
1068710688 else if (pc_isridingwug(sd))
10688- clif->status_change(&sd->bl, SI_WUGRIDER , 1, 0, 0, 0, 0);
10689+ clif->status_change(&sd->bl, status->get_sc_icon(SC_WUGRIDER), status->get_sc_relevant_bl_types(SC_WUGRIDER) , 1, 0, 0, 0, 0);
1068910690
1069010691 if(sd->status.manner < 0)
1069110692 sc_start(NULL,&sd->bl,SC_NOCHAT,100,0,0);
@@ -10709,7 +10710,7 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
1070910710
1071010711 if (map->night_flag && map->list[sd->bl.m].flag.nightenabled) {
1071110712 sd->state.night = 1;
10712- clif->status_change(&sd->bl, SI_SKE , 1, 0, 0, 0, 0);
10713+ clif->status_change(&sd->bl, status->get_sc_icon(SC_SKE), status->get_sc_relevant_bl_types(SC_SKE) , 1, 0, 0, 0, 0);
1071310714 }
1071410715
1071510716 // Notify everyone that this char logged in [Skotlex].
@@ -10761,11 +10762,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
1076110762 //Display night.
1076210763 if( !sd->state.night ) {
1076310764 sd->state.night = 1;
10764- clif->status_change(&sd->bl, SI_SKE , 1, 0, 0, 0, 0);
10765+ clif->status_change(&sd->bl, status->get_sc_icon(SC_SKE), status->get_sc_relevant_bl_types(SC_SKE) , 1, 0, 0, 0, 0);
1076510766 }
1076610767 } else if( sd->state.night ) { //Clear night display.
1076710768 sd->state.night = 0;
10768- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_SKE );
10769+ clif->sc_end(&sd->bl, sd->bl.id, SELF, status->get_sc_icon(SC_SKE) );
1076910770 }
1077010771
1077110772 if( map->list[sd->bl.m].flag.battleground ) {
@@ -10813,7 +10814,7 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd)
1081310814 npc->script_event(sd, NPCE_LOADMAP);
1081410815
1081510816 if (pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd)) //blindness [Komurka]
10816- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_DEVIL1 );
10817+ clif->sc_end(&sd->bl, sd->bl.id, SELF, status->get_sc_icon(SC_DEVIL1) );
1081710818
1081810819 if (sd->sc.opt2) //Client loses these on warp.
1081910820 clif->changeoption(&sd->bl);
0 commit comments