summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-22 16:42:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-22 16:42:52 +0300
commitf97c4884316bfe3c5f59c1271dfbf0e19ca716bc (patch)
tree9ed4aa53f11d8b2c44950d6af4038dd9be5b6f3a /src/map
parent9ecd36f5dd308aac9bfd673474774bd3a727df53 (diff)
downloadplugin-f97c4884316bfe3c5f59c1271dfbf0e19ca716bc.tar.gz
plugin-f97c4884316bfe3c5f59c1271dfbf0e19ca716bc.tar.bz2
plugin-f97c4884316bfe3c5f59c1271dfbf0e19ca716bc.tar.xz
plugin-f97c4884316bfe3c5f59c1271dfbf0e19ca716bc.zip
Allow change pet direction by packet from client.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/parse.c8
-rw-r--r--src/map/parse.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 0253ffa..09b315a 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -112,6 +112,7 @@ HPExport void plugin_init (void)
addPacket(0xb0e, 4, map_parse_set_status, hpClif_Parse);
addPacket(0xb0f, 2, map_parse_get_online_list, hpClif_Parse);
addPacket(0xb11, 10, map_parse_pet_move, hpClif_Parse);
+ addPacket(0xb12, 9, map_parse_pet_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 0a7faf1..1b905ea 100644
--- a/src/map/parse.c
+++ b/src/map/parse.c
@@ -151,3 +151,11 @@ void map_parse_pet_move(int fd)
if (map->getcell(pdBl->m, x, y, CELL_CHKPASS))
unit->walktoxy(pdBl, x, y, 0);
}
+
+void map_parse_pet_dir(int fd)
+{
+ struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ if (!sd || !sd->pd)
+ return;
+ unit->setdir(&sd->pd->bl, RFIFOB(fd, 8));
+}
diff --git a/src/map/parse.h b/src/map/parse.h
index 3ad9f6c..8db1fca 100644
--- a/src/map/parse.h
+++ b/src/map/parse.h
@@ -12,5 +12,6 @@ void map_parse_pet_emote(int fd);
void map_parse_set_status(int fd);
void map_parse_get_online_list(int fd);
void map_parse_pet_move(int fd);
+void map_parse_pet_dir(int fd);
#endif // EVOL_MAP_PARSE