summaryrefslogtreecommitdiff
path: root/src/emap
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-07-13 20:30:43 +0000
committerJesusaves <cpntb1@ymail.com>2020-09-12 13:31:17 -0300
commit02963c54fa43b41ed8346e243c415e777e9caa4c (patch)
tree7ebe474c232fc3693e2bb2e6778418a44e91eec0 /src/emap
parent3eb00403ab423a415c3ed53dbc56f00bc9cb44b3 (diff)
downloadevol-hercules-02963c54fa43b41ed8346e243c415e777e9caa4c.tar.gz
evol-hercules-02963c54fa43b41ed8346e243c415e777e9caa4c.tar.bz2
evol-hercules-02963c54fa43b41ed8346e243c415e777e9caa4c.tar.xz
evol-hercules-02963c54fa43b41ed8346e243c415e777e9caa4c.zip
update the call syntax of some internal functions
Diffstat (limited to 'src/emap')
-rw-r--r--src/emap/clif.c4
-rw-r--r--src/emap/init.c2
-rw-r--r--src/emap/parse.c8
-rw-r--r--src/emap/pc.c2
-rw-r--r--src/emap/script_buildins.c7
-rw-r--r--src/emap/skill_targeted.c1
-rw-r--r--src/emap/unit.c2
7 files changed, 14 insertions, 12 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c
index 9bdb6b8..660e23a 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -1483,7 +1483,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);
@@ -1491,7 +1491,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 c321823..91d1a58 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -352,7 +352,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 5e8b3b0..fd78bcb 100644
--- a/src/emap/pc.c
+++ b/src/emap/pc.c
@@ -975,7 +975,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 28fc0e5..9fc1c90 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -1547,6 +1547,7 @@ BUILDIN(npcWalkTo)
if (nd->ud == NULL)
{
ShowWarning("buildin_npcwalkto: floating NPC don't have unit data.\n");
+ script_pushint(st, 0);
return false;
}
@@ -1559,7 +1560,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
@@ -1598,14 +1599,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;
}