diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-10 18:37:18 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-10 18:37:18 +0000 |
commit | 8e61279b161a6603d494275ee0b07746a585deb8 (patch) | |
tree | 7de4956c09c83fdb9b3a0fb9804ccb30a84f1210 /src/map/clif.c | |
parent | f29db4aa23c04c611f353a2ac004dc8c7a57be60 (diff) | |
download | hercules-8e61279b161a6603d494275ee0b07746a585deb8.tar.gz hercules-8e61279b161a6603d494275ee0b07746a585deb8.tar.bz2 hercules-8e61279b161a6603d494275ee0b07746a585deb8.tar.xz hercules-8e61279b161a6603d494275ee0b07746a585deb8.zip |
- Updated a bit the pet_db.txt, added info for Xmas Goblin and Rice Cake. Since little is known about them, most of the info is custom!
- Fixed @whogm not updating count for GMs which you can only see their name.
- Added unit_data.state.speed_changed, now when an object changes speed, the old move-packet will be used on the next movement, which should update the object's speed from that point and on-wards. This is done since there appears to be no way to tell the client a given object's speed has changed.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10209 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index a4ba467ed..09b2d4623 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1519,6 +1519,43 @@ int clif_walkok(struct map_session_data *sd) return 0; } +static void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *ud) { + unsigned char buf[256]; + int len; + + len = clif_set007b(bl,vd,ud,buf); + clif_send(buf,len,bl,AREA_WOS); + if (disguised(bl)) + clif_setdisguise((TBL_PC*)bl, buf, len, 0); + + if(vd->cloth_color) + clif_refreshlook(bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,AREA_WOS); + + switch(bl->type) + { + case BL_PC: + { + TBL_PC *sd = ((TBL_PC*)bl); +// clif_movepc(sd); + if(sd->state.size==2) // tiny/big players [Valaris] + clif_specialeffect(&sd->bl,423,AREA); + else if(sd->state.size==1) + clif_specialeffect(&sd->bl,421,AREA); + } + break; + case BL_MOB: + { + TBL_MOB *md = ((TBL_MOB*)bl); + if(md->special_state.size==2) // tiny/big mobs [Valaris] + clif_specialeffect(&md->bl,423,AREA); + else if(md->special_state.size==1) + clif_specialeffect(&md->bl,421,AREA); + } + break; + } + return; +} + /// Move the unit (does nothing if the client has no info about the unit) /// Note: unit must not be self void clif_move(struct unit_data *ud) @@ -1530,6 +1567,14 @@ void clif_move(struct unit_data *ud) if (!vd || vd->class_ == INVISIBLE_CLASS) return; //This performance check is needed to keep GM-hidden objects from being notified to bots. + if (ud->state.speed_changed) { + // Since we don't know how to update the speed of other objects, + // use the old walk packet to update the data. + ud->state.speed_changed = 0; + clif_move2(bl, vd, ud); + return; + } + WBUFW(buf,0)=0x86; WBUFL(buf,2)=bl->id; WBUFPOS2(buf,6,bl->x,bl->y,ud->to_x,ud->to_y,8,8); |