summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-21 07:41:52 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-21 07:41:52 +0000
commit8ea7fcb1f388e9049029d2c8c77b5894f95d7b3c (patch)
treeca6cc5e4e6e70bc9796f89cf857f0b2f4590ca27 /src/map/clif.c
parent2da86f6d3ab9e5ed7cdd2d37337f2c5803ddb94e (diff)
downloadhercules-8ea7fcb1f388e9049029d2c8c77b5894f95d7b3c.tar.gz
hercules-8ea7fcb1f388e9049029d2c8c77b5894f95d7b3c.tar.bz2
hercules-8ea7fcb1f388e9049029d2c8c77b5894f95d7b3c.tar.xz
hercules-8ea7fcb1f388e9049029d2c8c77b5894f95d7b3c.zip
- Optimized some code about @size changes in chars.
- Fixed #jailtime (Bug Report 853) crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12117 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3b15f3e1a..ffbc78cb1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -99,6 +99,21 @@ 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)
@@ -3428,15 +3443,15 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
clif_refreshlook(&sd->bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,SELF);
switch (bl->type)
- { // FIXME: 'AREA' causes unneccessary spam since this should be 1:1 communication [ultramage]
+ {
case BL_PC:
{
TBL_PC* tsd = (TBL_PC*)bl;
clif_getareachar_pc(sd, tsd);
if(tsd->state.size==2) // tiny/big players [Valaris]
- clif_specialeffect(bl,423,AREA);
+ clif_specialeffecttoone(bl, &sd->bl, 423);
else if(tsd->state.size==1)
- clif_specialeffect(bl,421,AREA);
+ clif_specialeffecttoone(bl, &sd->bl, 421);
}
break;
case BL_NPC:
@@ -3450,9 +3465,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_specialeffect(bl,423,AREA);
+ clif_specialeffecttoone(bl, &sd->bl, 423);
else if(md->special_state.size==1)
- clif_specialeffect(bl,421,AREA);
+ clif_specialeffecttoone(bl, &sd->bl, 421);
}
break;
case BL_PET: