From d17edc2fb98f6c2e177a6252bade155ee88f5979 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 12 May 2016 14:18:48 -0400 Subject: allow to use npctalk on non-script npcs --- src/map/script-fun.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 nd; RString str = conv_str(st, &AARG(1)); - dumb_ptr nd_ = npc_name2id(stringish(ZString(conv_str(st, &AARG(0))))); - assert (nd_ && nd_->npc_subtype == NpcSubtype::SCRIPT); - nd = nd_->is_script(); + nd = npc_name2id(stringish(ZString(conv_str(st, &AARG(0))))); + if (nd == nullptr) + return; if(HARG(2)){ -- cgit v1.2.3-60-g2f50