From f5ded9b1d612e0b21ca993303289cffa8aae9180 Mon Sep 17 00:00:00 2001 From: eathenabot Date: Tue, 17 Jan 2012 05:10:45 +0000 Subject: * Merged changes up to eAthena 15053. [ai4rei] - clif cleanup: Changed clif_changestatus so that it takes sd instead of bl, since it only accepts BL_PC bls anyway. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15471 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 1681294ed..fc859497f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2726,30 +2726,27 @@ void clif_updatestatus(struct map_session_data *sd,int type) WFIFOSET(fd,len); } -void clif_changestatus(struct block_list *bl,int type,int val) +void clif_changestatus(struct map_session_data* sd,int type,int val) { unsigned char buf[12]; - struct map_session_data *sd = NULL; - nullpo_retv(bl); + nullpo_retv(sd); - if(bl->type == BL_PC) - sd = (struct map_session_data *)bl; + WBUFW(buf,0)=0x1ab; + WBUFL(buf,2)=sd->bl.id; + WBUFW(buf,6)=type; - if(sd){ - WBUFW(buf,0)=0x1ab; - WBUFL(buf,2)=bl->id; - WBUFW(buf,6)=type; - switch(type){ + switch(type) + { case SP_MANNER: WBUFL(buf,8)=val; break; default: ShowError("clif_changestatus : unrecognized type %d.\n",type); return; - } - clif_send(buf,packet_len(0x1ab),bl,AREA_WOS); } + + clif_send(buf,packet_len(0x1ab),&sd->bl,AREA_WOS); } /*========================================== -- cgit v1.2.3-70-g09d2