From b84bbf7c0aa914794551a0f5e75b056bec20b90c Mon Sep 17 00:00:00 2001 From: Atemo Date: Thu, 16 Sep 2021 16:23:19 +0200 Subject: [PATCH] Added missing status_calc_npc for unitwalk script command (required for npc) (#6256) Thanks to @aleos89 --- src/map/script.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/script.cpp b/src/map/script.cpp index 17afe663ee..7fd6f6f5b8 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -18944,6 +18944,13 @@ BUILDIN_FUNC(unitwalk) ud = unit_bl2ud(bl); + if (bl->type == BL_NPC) { + if (!((TBL_NPC*)bl)->status.hp) + status_calc_npc(((TBL_NPC*)bl), SCO_FIRST); + else + status_calc_npc(((TBL_NPC*)bl), SCO_NONE); + } + if (!strcmp(cmd,"unitwalk")) { int x = script_getnum(st,3); int y = script_getnum(st,4);