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 /src/map/clif.c | |
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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 63 |
1 files changed, 52 insertions, 11 deletions
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, |