diff options
-rw-r--r-- | src/emap/clif.c | 4 | ||||
-rw-r--r-- | src/emap/init.c | 2 | ||||
-rw-r--r-- | src/emap/parse.c | 8 | ||||
-rw-r--r-- | src/emap/pc.c | 2 | ||||
-rw-r--r-- | src/emap/script_buildins.c | 7 | ||||
-rw-r--r-- | src/emap/skill_targeted.c | 1 | ||||
-rw-r--r-- | src/emap/unit.c | 2 |
7 files changed, 14 insertions, 12 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c index 25cbd31..9fa8239 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -1484,7 +1484,7 @@ void eclif_parse_WalkToXY(int fd, if (sd->ud.state.change_walk_target == 0) { - if (unit->walktoxy(&sd->bl, x, y, 4) && + if (unit->walk_toxy(&sd->bl, x, y, 4) == 0 && sd->ud.state.change_walk_target == 1) { send_walk_fail(sd->fd, x, y); @@ -1492,7 +1492,7 @@ void eclif_parse_WalkToXY(int fd, } else { - unit->walktoxy(&sd->bl, x, y, 4); + unit->walk_toxy(&sd->bl, x, y, 4); } } diff --git a/src/emap/init.c b/src/emap/init.c index d55845e..2151121 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -323,7 +323,7 @@ HPExport void plugin_init (void) addHookPre(itemdb, readdb_additional_fields, eitemdb_readdb_additional_fields_pre); addHookPre(itemdb, destroy_item_data, edestroy_item_data_pre); addHookPre(unit, can_move, eunit_can_move_pre); - addHookPre(unit, walktoxy, eunit_walktoxy_pre); + addHookPre(unit, walk_toxy, eunit_walktoxy_pre); addHookPre(mail, invalid_operation, email_invalid_operation_pre); addHookPre(map, list_final, edo_final_maps_pre); addHookPre(map, cell2gat, emap_cell2gat_pre); diff --git a/src/emap/parse.c b/src/emap/parse.c index 833fe9c..368a5b1 100644 --- a/src/emap/parse.c +++ b/src/emap/parse.c @@ -161,7 +161,7 @@ void map_parse_pet_move(int fd) struct block_list *pdBl = &sd->pd->bl; if (map->getcell(pdBl->m, pdBl, x, y, CELL_CHKPASS)) - unit->walktoxy(pdBl, x, y, 0); + unit->walk_toxy(pdBl, x, y, 0); } void map_parse_pet_dir(int fd) @@ -169,7 +169,7 @@ void map_parse_pet_dir(int fd) TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd || !sd->bl.prev) return; - unit->setdir(&sd->pd->bl, RFIFOB(fd, 8)); + unit->set_dir(&sd->pd->bl, (enum unit_dir)RFIFOB(fd, 8)); } void map_parse_homun_say(int fd) @@ -216,9 +216,9 @@ void map_parse_homun_dir(int fd) if (!sd || !sd->bl.prev) return; if (sd->md && sd->md->db) - unit->setdir(&sd->md->bl, RFIFOB(fd, 8)); + unit->set_dir(&sd->md->bl, (enum unit_dir)RFIFOB(fd, 8)); else if (sd->hd && homun_alive(sd->hd)) - unit->setdir(&sd->hd->bl, RFIFOB(fd, 8)); + unit->set_dir(&sd->hd->bl, (enum unit_dir)RFIFOB(fd, 8)); } void map_clif_parse_useitem2(int fd) diff --git a/src/emap/pc.c b/src/emap/pc.c index fda6818..21e59aa 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -1043,7 +1043,7 @@ int epc_jobchange(struct map_session_data *sd, pc->setoption(sd, i); if (homun_alive(sd->hd) && !pc->checkskill(sd, AM_CALLHOMUN)) - homun->vaporize(sd, HOM_ST_REST); + homun->vaporize(sd, HOM_ST_REST, true); if ((sd->sc.data[SC_SPRITEMABLE] && pc->checkskill(sd, SU_SPRITEMABLE))) status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER); diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 3b917f6..3e1a15a 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -1473,6 +1473,7 @@ BUILDIN(npcWalkTo) if (nd->ud == NULL) { ShowWarning("buildin_npcwalkto: floating NPC don't have unit data.\n"); + script_pushint(st, 0); return false; } @@ -1485,7 +1486,7 @@ BUILDIN(npcWalkTo) status_calc_npc(nd, SCO_NONE); } nd->vd.dead_sit = 0; - script_pushint(st, unit->walktoxy(&nd->bl, x, y, 0)); + script_pushint(st, unit->walk_toxy(&nd->bl, x, y, 0) ^ 1); return true; } else @@ -1524,14 +1525,14 @@ BUILDIN(chatJoin) if (script_hasdata(st, 4)) { if (script_isstringtype(st, 3)) - sd = map->nick2sd(script_getstr(st, 3)); + sd = map->nick2sd(script_getstr(st, 3), false); if (script_isstringtype(st, 4)) password = script_getstr(st, 4); } else if (script_hasdata(st, 3)) { if (script_isstringtype(st, 3)) - sd = map->nick2sd(script_getstr(st, 3)); + sd = map->nick2sd(script_getstr(st, 3), false); } else { diff --git a/src/emap/skill_targeted.c b/src/emap/skill_targeted.c index df9a537..496261a 100644 --- a/src/emap/skill_targeted.c +++ b/src/emap/skill_targeted.c @@ -1,6 +1,7 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 - 2016 Evol developers +#include "common/hercules.h" #include "map/clif.h" #include "map/map.h" #include "map/status.h" diff --git a/src/emap/unit.c b/src/emap/unit.c index e3559ba..4867e7d 100644 --- a/src/emap/unit.c +++ b/src/emap/unit.c @@ -171,5 +171,5 @@ int eunit_walktoxy_pre(struct block_list **blPtr __attribute__ ((unused)), skill->sit(sd, 0); } - return 1; + return 0; } |