summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-30 23:02:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-30 23:02:11 +0300
commitb226c685421a78ddb8b7d3c29ec693fd9688e7db (patch)
tree7b6706848102c8657ffa615a39ea839fd4fad045 /src/emap/script.c
parent3d76d08ce39ea9f4d4d4e0f015eec74ec6653cd3 (diff)
downloadevol-hercules-b226c685421a78ddb8b7d3c29ec693fd9688e7db.tar.gz
evol-hercules-b226c685421a78ddb8b7d3c29ec693fd9688e7db.tar.bz2
evol-hercules-b226c685421a78ddb8b7d3c29ec693fd9688e7db.tar.xz
evol-hercules-b226c685421a78ddb8b7d3c29ec693fd9688e7db.zip
Simplify npctalk3 script command.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r--src/emap/script.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index d2281d6..6d879ce 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -441,22 +441,12 @@ BUILDIN(restoreCam)
BUILDIN(npcTalk3)
{
- const char *str;
char *msg;
- TBL_NPC *nd = NULL;
getSD();
- if (script_hasdata(st, 3))
- {
- nd = npc->name2id (script_getstr(st, 2));
- str = script_getstr(st, 3);
- }
- else
- {
- nd = map->id2nd(st->oid);
- str = script_getstr(st, 2);
- }
+ TBL_NPC *nd = map->id2nd(st->oid);
+ const char *str = script_getstr(st, 2);
if (!nd)
{