diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-05-13 18:47:36 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-05-13 18:47:36 -0400 |
commit | 4b79c22885a32b50b9aa0846eb89961543b5a59e (patch) | |
tree | 462f3aa3bc54370137fd98e205905edc479d9241 /src/map/script-fun.cpp | |
parent | ceb7acf8291867d56b53c3f696a39e91fd79da59 (diff) | |
parent | 6707cc577dcd2ec06d6936036b93d75cda71c6b3 (diff) | |
download | tmwa-4b79c22885a32b50b9aa0846eb89961543b5a59e.tar.gz tmwa-4b79c22885a32b50b9aa0846eb89961543b5a59e.tar.bz2 tmwa-4b79c22885a32b50b9aa0846eb89961543b5a59e.tar.xz tmwa-4b79c22885a32b50b9aa0846eb89961543b5a59e.zip |
Merge pull request #224 from mekolat/npctalk
Npctalk modifications
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 98c07ed..8ec0d4a 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -4252,9 +4252,9 @@ void builtin_npctalk(ScriptState *st) dumb_ptr<npc_data> nd; RString str = conv_str(st, &AARG(1)); - dumb_ptr<npc_data> nd_ = npc_name2id(stringish<NpcName>(ZString(conv_str(st, &AARG(0))))); - assert (nd_ && nd_->npc_subtype == NpcSubtype::SCRIPT); - nd = nd_->is_script(); + nd = npc_name2id(stringish<NpcName>(ZString(conv_str(st, &AARG(0))))); + if (nd == nullptr) + return; if(HARG(2)){ |