summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/parse.c11
-rw-r--r--src/map/parse.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 1b1583a..0b38ed7 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -116,6 +116,7 @@ HPExport void plugin_init (void)
addPacket(0xb12, 9, map_parse_pet_dir, hpClif_Parse);
addPacket(0xb13, -1, map_parse_homun_say, hpClif_Parse);
addPacket(0xb14, 3, map_parse_homun_emote, hpClif_Parse);
+ addPacket(0xb15, 9, map_parse_homun_dir, hpClif_Parse);
addHookPre("pc->readparam", epc_readparam_pre);
addHookPre("pc->setregistry", epc_setregistry);
diff --git a/src/map/parse.c b/src/map/parse.c
index cd33f23..b9c9816 100644
--- a/src/map/parse.c
+++ b/src/map/parse.c
@@ -205,3 +205,14 @@ void map_parse_homun_emote(int fd)
else if (sd->hd && homun_alive(sd->hd))
clif->emotion(&sd->hd->bl, RFIFOB(fd, 2));
}
+
+void map_parse_homun_dir(int fd)
+{
+ struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ if (!sd || !sd->pd)
+ return;
+ if (sd->md && sd->md->db)
+ unit->setdir(&sd->md->bl, RFIFOB(fd, 8));
+ else if (sd->hd && homun_alive(sd->hd))
+ unit->setdir(&sd->hd->bl, RFIFOB(fd, 8));
+}
diff --git a/src/map/parse.h b/src/map/parse.h
index 8bd5454..8d137ad 100644
--- a/src/map/parse.h
+++ b/src/map/parse.h
@@ -15,5 +15,6 @@ void map_parse_pet_move(int fd);
void map_parse_pet_dir(int fd);
void map_parse_homun_say(int fd);
void map_parse_homun_emote(int fd);
+void map_parse_homun_dir(int fd);
#endif // EVOL_MAP_PARSE