summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/clif.c63
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/skill.c1
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)