summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-21 11:02:21 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-21 11:02:21 +0000
commitf473fd8efada1697eb9e55cc0523801f2bdd629d (patch)
tree7d8daaf651877f6021cb261771bb0acc6d427cf5 /src/map/clif.c
parent2448a5c498f13b1da358ddf46c40ed9ca6456fe8 (diff)
downloadhercules-f473fd8efada1697eb9e55cc0523801f2bdd629d.tar.gz
hercules-f473fd8efada1697eb9e55cc0523801f2bdd629d.tar.bz2
hercules-f473fd8efada1697eb9e55cc0523801f2bdd629d.tar.xz
hercules-f473fd8efada1697eb9e55cc0523801f2bdd629d.zip
Fixed/cleaned r12114 and 12117.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12119 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ffbc78cb1..fd8b2e076 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -99,21 +99,6 @@ static int max_char_id = DEFAULT_MAX_CHAR_ID;
int clif_parse (int fd);
/*==========================================
- * Send specials effect to tarjet
- *------------------------------------------*/
-int clif_specialeffecttoone(struct block_list *bl, struct block_list *dst, int type)
-{
- struct map_session_data *sd = (struct map_session_data *)dst;
-
- WFIFOW(sd->fd,0) = 0x1f3;
- WFIFOL(sd->fd,2) = bl->id;
- WFIFOL(sd->fd,6) = type;
- WFIFOSET(sd->fd, packet_len(0x1f3));
-
- return 0;
-}
-
-/*==========================================
* mapŽI‚ÌipÝ’è
*------------------------------------------*/
int clif_setip(const char* ip)
@@ -3449,9 +3434,9 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
TBL_PC* tsd = (TBL_PC*)bl;
clif_getareachar_pc(sd, tsd);
if(tsd->state.size==2) // tiny/big players [Valaris]
- clif_specialeffecttoone(bl, &sd->bl, 423);
+ clif_specialeffect_single(bl, 423, sd->fd);
else if(tsd->state.size==1)
- clif_specialeffecttoone(bl, &sd->bl, 421);
+ clif_specialeffect_single(bl, 421, sd->fd);
}
break;
case BL_NPC:
@@ -3465,9 +3450,9 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
{
TBL_MOB* md = (TBL_MOB*)bl;
if(md->special_state.size==2) // tiny/big mobs [Valaris]
- clif_specialeffecttoone(bl, &sd->bl, 423);
+ clif_specialeffect_single(bl, 423, sd->fd);
else if(md->special_state.size==1)
- clif_specialeffecttoone(bl, &sd->bl, 421);
+ clif_specialeffect_single(bl, 421, sd->fd);
}
break;
case BL_PET:
@@ -7057,6 +7042,15 @@ int clif_specialeffect(struct block_list* bl, int type, enum send_target target)
return 0;
}
+void clif_specialeffect_single(struct block_list* bl, int type, int fd)
+{
+ WFIFOHEAD(fd,10);
+ WFIFOW(fd,0) = 0x1f3;
+ WFIFOL(fd,2) = bl->id;
+ WFIFOL(fd,6) = type;
+ WFIFOSET(fd,10);
+}
+
// messages (from mobs/npcs) [Valaris]
int clif_message(struct block_list* bl, const char* msg)
{