summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-12 17:13:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-12 17:13:38 +0300
commit2390d257d3bd8efcdec33e318fd5d87fbea140a4 (patch)
treea8bb62a09b30f605570cafe3023c616fbc94a566 /src/emap/script_buildins.c
parentac815f32696c415f02c6c5cde1d10c3111d3d28e (diff)
downloadplugin-2390d257d3bd8efcdec33e318fd5d87fbea140a4.tar.gz
plugin-2390d257d3bd8efcdec33e318fd5d87fbea140a4.tar.bz2
plugin-2390d257d3bd8efcdec33e318fd5d87fbea140a4.tar.xz
plugin-2390d257d3bd8efcdec33e318fd5d87fbea140a4.zip
From script function npcwalkto return status code about is moving possible or not.
false mean error happend. true mean moving is working.
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 809e091..e37026d 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -1427,16 +1427,16 @@ BUILDIN(npcWalkTo)
status_calc_npc(nd, SCO_NONE);
}
nd->vd->dead_sit = 0;
- unit->walktoxy(&nd->bl,x,y,0);
+ script_pushint(st, unit->walktoxy(&nd->bl,x,y,0));
+ return true;
}
else
{
ShowWarning("npc not found\n");
script->reportsrc(st);
+ script_pushint(st, 0);
return false;
}
-
- return true;
}
BUILDIN(setBgTeam)