- Added preventing sending packet clif_clearchar_id when the character in question is invisible.
- Added packet 0x7c in clif_spawn which was supposed to be used for non-players. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5869 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
ed9f08388d
commit
eb6eaff618
@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
2006/04/02
|
2006/04/02
|
||||||
|
* Added preventing sending packet clif_clearchar_id when the character in
|
||||||
|
question is invisible. [Skotlex]
|
||||||
|
* Added packet 0x7c in clif_spawn which was supposed to be used for
|
||||||
|
non-players (this fixes pets/mobs/npcs spawning as if they just teleported
|
||||||
|
into view) [Skotlex]
|
||||||
* Some cleanups to clif.c, removed some excess/broken packets/functions.
|
* Some cleanups to clif.c, removed some excess/broken packets/functions.
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
* Merged Larry's fix of using a timer to get rid of the glow-issue when you
|
* Merged Larry's fix of using a timer to get rid of the glow-issue when you
|
||||||
|
@ -1235,25 +1235,44 @@ int clif_spawn(struct block_list *bl)
|
|||||||
vd = status_get_viewdata(bl);
|
vd = status_get_viewdata(bl);
|
||||||
if (!vd || vd->class_ == INVISIBLE_CLASS)
|
if (!vd || vd->class_ == INVISIBLE_CLASS)
|
||||||
return 0;
|
return 0;
|
||||||
clif_set0078(bl, vd, buf);
|
|
||||||
|
|
||||||
|
if (pcdb_checkid(vd->class_))
|
||||||
|
{ //Player spawn packet.
|
||||||
|
clif_set0078(bl, vd, buf);
|
||||||
#if PACKETVER > 3
|
#if PACKETVER > 3
|
||||||
if (WBUFW(buf,0)==0x78) {
|
if (WBUFW(buf,0)==0x78) {
|
||||||
WBUFW(buf, 0) = 0x79;
|
WBUFW(buf, 0) = 0x79;
|
||||||
WBUFW(buf,51) = WBUFW(buf,52); //Lv is placed on offset 52
|
WBUFW(buf,51) = WBUFW(buf,52); //Lv is placed on offset 52
|
||||||
clif_send(buf, packet_len_table[0x79], bl, AREA_WOS);
|
clif_send(buf, packet_len_table[0x79], bl, AREA_WOS);
|
||||||
if (disguised(bl))
|
if (disguised(bl))
|
||||||
clif_setdisguise((TBL_PC*)bl, buf, packet_len_table[0x79], 0);
|
clif_setdisguise((TBL_PC*)bl, buf, packet_len_table[0x79], 0);
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
WBUFW(buf, 0) = 0x1d9;
|
WBUFW(buf, 0) = 0x1d9;
|
||||||
WBUFW(buf,51) = WBUFW(buf,52); //Lv is placed on offset 52
|
WBUFW(buf,51) = WBUFW(buf,52); //Lv is placed on offset 52
|
||||||
clif_send(buf, packet_len_table[0x1d9], bl, AREA_WOS);
|
clif_send(buf, packet_len_table[0x1d9], bl, AREA_WOS);
|
||||||
if (disguised(bl))
|
if (disguised(bl))
|
||||||
clif_setdisguise((TBL_PC*)bl, buf, packet_len_table[0x1d9], 0);
|
clif_setdisguise((TBL_PC*)bl, buf, packet_len_table[0x1d9], 0);
|
||||||
#if PACKETVER > 3
|
#if PACKETVER > 3
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} else { //Mob spawn packet.
|
||||||
|
struct status_change *sc = status_get_sc(bl);
|
||||||
|
WBUFW(buf,0)=0x7c;
|
||||||
|
WBUFL(buf,2)=bl->id;
|
||||||
|
WBUFW(buf,6)=status_get_speed(bl);
|
||||||
|
WBUFW(buf,8)=sc?sc->opt1:0;
|
||||||
|
WBUFW(buf,10)=sc?sc->opt2:0;
|
||||||
|
WBUFW(buf,12)=sc?sc->option:0;
|
||||||
|
WBUFW(buf,20)=vd->class_;
|
||||||
|
WBUFPOS(buf,36,bl->x,bl->y);
|
||||||
|
clif_send(buf,packet_len_table[0x7c],bl,AREA_WOS);
|
||||||
|
if (disguised(bl)) {
|
||||||
|
WBUFL(buf,2)=-bl->id;
|
||||||
|
clif_send(buf,packet_len_table[0x7c],bl,SELF);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (vd->cloth_color)
|
if (vd->cloth_color)
|
||||||
clif_refreshlook(bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,AREA_WOS);
|
clif_refreshlook(bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,AREA_WOS);
|
||||||
@ -3906,6 +3925,7 @@ int clif_01ac(struct block_list *bl)
|
|||||||
int clif_outsight(struct block_list *bl,va_list ap)
|
int clif_outsight(struct block_list *bl,va_list ap)
|
||||||
{
|
{
|
||||||
struct block_list *tbl;
|
struct block_list *tbl;
|
||||||
|
struct view_data *vd;
|
||||||
TBL_PC *sd, *tsd;
|
TBL_PC *sd, *tsd;
|
||||||
tbl=va_arg(ap,struct block_list*);
|
tbl=va_arg(ap,struct block_list*);
|
||||||
if(bl == tbl) return 0;
|
if(bl == tbl) return 0;
|
||||||
@ -3916,7 +3936,8 @@ int clif_outsight(struct block_list *bl,va_list ap)
|
|||||||
{ //tsd has lost sight of the bl object.
|
{ //tsd has lost sight of the bl object.
|
||||||
switch(bl->type){
|
switch(bl->type){
|
||||||
case BL_PC:
|
case BL_PC:
|
||||||
clif_clearchar_id(bl->id,0,tsd->fd);
|
if (((TBL_PC*)bl)->vd.class_ != INVISIBLE_CLASS)
|
||||||
|
clif_clearchar_id(bl->id,0,tsd->fd);
|
||||||
if(sd->chatID){
|
if(sd->chatID){
|
||||||
struct chat_data *cd;
|
struct chat_data *cd;
|
||||||
cd=(struct chat_data*)map_id2bl(sd->chatID);
|
cd=(struct chat_data*)map_id2bl(sd->chatID);
|
||||||
@ -3933,14 +3954,14 @@ int clif_outsight(struct block_list *bl,va_list ap)
|
|||||||
clif_clearchar_skillunit((struct skill_unit *)bl,tsd->fd);
|
clif_clearchar_skillunit((struct skill_unit *)bl,tsd->fd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (status_get_viewdata(bl))
|
if ((vd=status_get_viewdata(bl)) && vd->class_ != INVISIBLE_CLASS)
|
||||||
clif_clearchar_id(bl->id,0,tsd->fd);
|
clif_clearchar_id(bl->id,0,tsd->fd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sd && sd->fd)
|
if (sd && sd->fd)
|
||||||
{ //sd is watching tbl go out of view.
|
{ //sd is watching tbl go out of view.
|
||||||
if (status_get_viewdata(tbl))
|
if ((vd=status_get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS)
|
||||||
clif_clearchar_id(tbl->id,0,sd->fd);
|
clif_clearchar_id(tbl->id,0,sd->fd);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user