summaryrefslogtreecommitdiff
path: root/src/map/parse.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-22 14:50:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-22 14:50:44 +0300
commit9ecd36f5dd308aac9bfd673474774bd3a727df53 (patch)
treebcfa2d7fc7075ed0763adfcc4f76802a506a223d /src/map/parse.c
parent7dfeba7f6f050e3f624291a97c7a82de57c54980 (diff)
downloadevol-hercules-9ecd36f5dd308aac9bfd673474774bd3a727df53.tar.gz
evol-hercules-9ecd36f5dd308aac9bfd673474774bd3a727df53.tar.bz2
evol-hercules-9ecd36f5dd308aac9bfd673474774bd3a727df53.tar.xz
evol-hercules-9ecd36f5dd308aac9bfd673474774bd3a727df53.zip
Allow move pet by packet from client.
Diffstat (limited to 'src/map/parse.c')
-rw-r--r--src/map/parse.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/parse.c b/src/map/parse.c
index 3cef1f9..0a7faf1 100644
--- a/src/map/parse.c
+++ b/src/map/parse.c
@@ -13,6 +13,8 @@
#include "../../../map/channel.h"
#include "../../../map/clif.h"
#include "../../../map/pc.h"
+#include "../../../map/pet.h"
+#include "../../../map/unit.h"
#include "map/parse.h"
#include "map/send.h"
@@ -136,3 +138,16 @@ void map_parse_get_online_list(int fd)
{
emap_online_list(fd);
}
+
+void map_parse_pet_move(int fd)
+{
+ struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ if (!sd || !sd->pd)
+ return;
+ short x = RFIFOW(fd, 6);
+ short y = RFIFOW(fd, 8);
+
+ struct block_list *pdBl = &sd->pd->bl;
+ if (map->getcell(pdBl->m, x, y, CELL_CHKPASS))
+ unit->walktoxy(pdBl, x, y, 0);
+}