Issue information

Issue ID
#5812
Status
Fixed
Severity
None
Started
Hercules Elf Bot
May 25, 2012 8:47
Last Post
Hercules Elf Bot
Jun 9, 2012 21:23
Confirmation
Yes (3)
No (0)

Hercules Elf Bot - May 25, 2012 8:47

Originally posted by [b]QQfoolsorellina[/b]
When other ppl re-login ,the appearance of garments/robes dispear until re-equip it

client :2011-11-16
server revision : 16147
[youtube]http://www.youtube.com/watch?v=sLN3Pi8IX58&feature=youtu.be"]http://www.youtube.c...eature=youtu.be[/youtube]

This post has been edited by QQfoolsorellina on May 25, 2012 8:54

Hercules Elf Bot - May 25, 2012 21:55

Originally posted by [b]megabox[/b]
I had the same problem on my server and i fix it using this:

clif.c search on line

[CODE]
if (vd->cloth_color)
clif_refreshlook(&sd->bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,SELF);
[/CODE]

and add this before

[CODE]
clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe); //Fix Robe's View by [B.O.X]
[/CODE]

and should look like this...
[CODE]
void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
{
uint8 buf[128];
struct unit_data *ud;
struct view_data *vd;
int len;

vd = status_get_viewdata(bl);
if (!vd || vd->class_ == INVISIBLE_CLASS)
return;

/**
* Hide NPC from maya purple card.
**/
if(bl->type == BL_NPC && !((TBL_NPC*)bl)->chat_id && (((TBL_NPC*)bl)->sc.option&OPTION_INVISIBLE))
return;
ud = unit_bl2ud(bl);
len = ( ud && ud->walktimer != INVALID_TIMER ) ? clif_set_unit_walking(bl,ud,buf) : clif_set_unit_idle(bl,buf,false);
clif_send(buf,len,&sd->bl,SELF);

clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe); //Fix Robe's View by [B.O.X]

if (vd->cloth_color)
clif_refreshlook(&sd->bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,SELF);
switch (bl->type)
{
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_single(bl,423,sd->fd);
else if(tsd->state.size==1)
clif_specialeffect_single(bl,421,sd->fd);
if( tsd->bg_id && map[tsd->bl.m].flag.battleground )
clif_sendbgemblem_single(sd->fd,tsd);
}
break;
case BL_MER: // Devotion Effects
if( ((TBL_MER*)bl)->devotion_flag )
clif_devotion(bl, sd);
break;
case BL_NPC:
{
TBL_NPC* nd = (TBL_NPC*)bl;
if( nd->chat_id )
clif_dispchat((struct chat_data*)map_id2bl(nd->chat_id),sd->fd);
if( nd->size == SZ_BIG )
clif_specialeffect_single(bl,423,sd->fd);
else if( nd->size == SZ_MEDIUM )
clif_specialeffect_single(bl,421,sd->fd);
}
break;
case BL_MOB:
{
TBL_MOB* md = (TBL_MOB*)bl;
if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif_specialeffect_single(bl,423,sd->fd);
else if(md->special_state.size==SZ_MEDIUM)
clif_specialeffect_single(bl,421,sd->fd);
}
break;
case BL_PET:
if (vd->head_bottom)
clif_pet_equip(sd, (TBL_PET*)bl); // needed to display pet equip properly
break;
}
}
[/CODE]

i use that code in eathena emu 1 year ago, i think it still working.

Hercules Elf Bot - May 26, 2012 0:08

Originally posted by [b]QQfoolsorellina[/b]
thank you for providing that code /thx

Hercules Elf Bot - May 31, 2012 19:09

Originally posted by [b]Ind[/b]
seems to be a problem with your client version or older, one i tested (april) worked fine. added with a #packetver check. Fixed in [rev=16187]

Hercules Elf Bot - May 31, 2012 21:32

Originally posted by [b]sizenine[/b]
[quote name='Ind' timestamp='1338491380' post='9867']
seems to be a problem with your client version or older, one i tested (april) worked fine. added with a #packetver check. Fixed in [rev=16187]
[/quote]

I use client 2012-02-07 and the problem still exists.

Hercules Elf Bot - May 31, 2012 22:08

Originally posted by [b]Ind[/b]
thanks for providing your client version I've adjusted it in [rev=16191]

Hercules Elf Bot - Jun 2, 2012 0:01

Originally posted by [b]sizenine[/b]
your fix doesn't seem to work, maybe clif_refreshlook isn't doing the job.

megabox's fix works:


[color=#000000]clif_changelook[/color][color=#666600](&[/color][color=#000000]sd[/color][color=#666600]->[/color][color=#000000]bl[/color][color=#666600],[/color][color=#000000]LOOK_ROBE[/color][color=#666600],[/color][color=#000000]sd[/color][color=#666600]->[/color][color=#000000]status[/color][color=#666600].[/color][color=#000000]robe[/color][color=#666600]);[/color][color=#000000] [/color][color=#880000]//Fix Robe's View by [B.O.X]
[/color]