summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-17 05:10:45 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-17 05:10:45 +0000
commitf5ded9b1d612e0b21ca993303289cffa8aae9180 (patch)
treeb448e656b9dc76b9bebfd4df896aacb543fc96d1 /src/map/clif.c
parent147d068dc417591b39755c627e7b957db1b9d9e2 (diff)
downloadhercules-f5ded9b1d612e0b21ca993303289cffa8aae9180.tar.gz
hercules-f5ded9b1d612e0b21ca993303289cffa8aae9180.tar.bz2
hercules-f5ded9b1d612e0b21ca993303289cffa8aae9180.tar.xz
hercules-f5ded9b1d612e0b21ca993303289cffa8aae9180.zip
* 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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c21
1 files changed, 9 insertions, 12 deletions
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);
}
/*==========================================