diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 18:40:51 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 18:40:51 +0000 |
commit | c4b6d6240249bc0f2abb3b9043983d88ce75da9b (patch) | |
tree | fbc9486b5d8f629e712ac9b0b8cf28bcdc122d05 | |
parent | 6a0dea414c0cad5c7f1df421e39df7733a2e58a8 (diff) | |
download | hercules-c4b6d6240249bc0f2abb3b9043983d88ce75da9b.tar.gz hercules-c4b6d6240249bc0f2abb3b9043983d88ce75da9b.tar.bz2 hercules-c4b6d6240249bc0f2abb3b9043983d88ce75da9b.tar.xz hercules-c4b6d6240249bc0f2abb3b9043983d88ce75da9b.zip |
* Added clif_changed_dir, clif_adopt_process
* updated Backstab
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@756 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog.txt | 2 | ||||
-rw-r--r-- | src/map/clif.c | 63 | ||||
-rw-r--r-- | src/map/clif.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 1 |
4 files changed, 57 insertions, 11 deletions
diff --git a/Changelog.txt b/Changelog.txt index ac9165942..df0e9f718 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,7 @@ Date Added 12/23 + * Added clif_changed_dir, clif_adopt_process [celest] + * updated Backstab to show the target's new direction [celest] * Corrected the file types of several files in the SVN tree to fix the newline issues [MouseJstr] * Updated mapflags (added missing payon_in03,ayo_in01,ayo_in02, que_god01, que_god02) [Lupus] diff --git a/src/map/clif.c b/src/map/clif.c index f5337b846..add56aef9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7007,6 +7007,30 @@ void clif_callpartner(struct map_session_data *sd) } */ /*========================================== + * Adopt baby [Celest] + *------------------------------------------ + */ +void clif_adopt_process(struct map_session_data *sd) +{ + int fd; + nullpo_retv(sd); + + fd=sd->fd; + WFIFOW(fd,0)=0x1f8; + WFIFOSET(fd,packet_len_table[0x1f8]); +} + +/*========================================== + * + *------------------------------------------ + */ +void clif_parse_ReqAdopt(int fd, struct map_session_data *sd) { + nullpo_retv(sd); + + printf ("%d\n", RFIFOL(fd,2)); +} + +/*========================================== * À‚é *------------------------------------------ */ @@ -7854,8 +7878,31 @@ void clif_parse_MapMove(int fd, struct map_session_data *sd) { * *------------------------------------------ */ -void clif_parse_ChangeDir(int fd, struct map_session_data *sd) { +void clif_changed_dir(struct block_list *bl) { unsigned char buf[64]; + struct map_session_data *sd = NULL; + + if (bl->type == BL_PC) + nullpo_retv (sd=(struct map_session_data *)bl); + + WBUFW(buf,0) = 0x9c; + WBUFL(buf,2) = bl->id; + if (sd) + WBUFW(buf,6) = sd->head_dir; + WBUFB(buf,8) = battle_get_dir(bl); + if (sd && sd->disguise > 23 && sd->disguise < 4001) // mob disguises [Valaris] + clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA); + else + clif_send(buf, packet_len_table[0x9c], bl, AREA_WOS); + + return; +} + +/*========================================== + * + *------------------------------------------ + */ +void clif_parse_ChangeDir(int fd, struct map_session_data *sd) { short headdir, dir; nullpo_retv(sd); @@ -7897,15 +7944,8 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd) { pc_setdir(sd, dir, headdir); - WBUFW(buf,0) = 0x9c; - WBUFL(buf,2) = sd->bl.id; - WBUFW(buf,6) = headdir; - WBUFB(buf,8) = dir; - if (sd->disguise > 23 && sd->disguise < 4001) // mob disguises [Valaris] - clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA); - else - clif_send(buf, packet_len_table[0x9c], &sd->bl, AREA_WOS); - + clif_changed_dir(&sd->bl); + return; } /*========================================== @@ -10136,7 +10176,8 @@ static void (*clif_parse_func_table[7][0x220])() = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, clif_parse_sn_doridori, clif_parse_CreateParty2, NULL, NULL, NULL, NULL, clif_parse_sn_explosionspirits, NULL, NULL, // 1f0 - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, clif_parse_ReqAdopt, + NULL, NULL, NULL, NULL, NULL, NULL, // 200 NULL, NULL, clif_parse_friends_list_add, clif_parse_friends_list_remove, NULL, NULL, NULL, NULL, diff --git a/src/map/clif.h b/src/map/clif.h index 01c28a28f..0a61ea052 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -90,6 +90,7 @@ void clif_talkiebox(struct block_list *bl,char* talkie); void clif_wedding_effect(struct block_list *bl); //void clif_sitting(int fd, struct map_session_data *sd); //void clif_callpartner(struct map_session_data *sd); +void clif_adopt_process(struct map_session_data *sd); void clif_sitting(struct map_session_data *sd); void clif_soundeffect(struct map_session_data *sd,struct block_list *bl,char *name,int type); @@ -195,6 +196,7 @@ int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const ch int clif_mvp_effect(struct map_session_data *sd); int clif_mvp_item(struct map_session_data *sd,int nameid); int clif_mvp_exp(struct map_session_data *sd,int exp); +void clif_changed_dir(struct block_list *bl); // vending int clif_openvendingreq(struct map_session_data *sd,int num); diff --git a/src/map/skill.c b/src/map/skill.c index 28fa8f0ce..e32561cef 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2399,6 +2399,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s ((struct map_session_data *)bl)->dir=dir; else if (bl->type == BL_MOB) ((struct mob_data *)bl)->dir=dir; + clif_changed_dir(bl); //skill_blown(src,bl,skill_get_blewcount(skillid,skilllv)); } else if(src->type == BL_PC) |