From f5553dfb59b9a3076c2d39b8c4355ae11aa6cb05 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 23 Oct 2020 00:38:22 +0800 Subject: [PATCH] Better handling of TypeNPC initialization, kaetemi/ryzomclassic#87 --- ryzom/common/data_common/r2/r2_ui_displayer_npc.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua b/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua index 2d0bbb70a..cc4b12c33 100644 --- a/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua +++ b/ryzom/common/data_common/r2/r2_ui_displayer_npc.lua @@ -399,9 +399,9 @@ function r2:initTypeUI(instance) end end - if tostring(instance.TypeNPC)=="-1" then - -- TypeNPC - debugInfo("FIXME: TypeNPC is not initialized, it should be a local value only as it's a convenience switch, verify against older versions"); + if instance.TypeNPC != place then + -- TypeNPC does not remain valid between versions, it actually shouldn't be saved... + debugInfo("Initialize or update TypeNPC"); r2.requestSetGhostNode(instance.InstanceId, "TypeNPC", place) end end