浏览代码

Update atreasurechest.lua

Fixed treasure chests in AoM client being pre-opened.  They now swing open rather quickly when opened, but not sure we have any control over the speed of the animation.  This is closer to how DoF behaves in far journey.
Image 3 年之前
父节点
当前提交
31f74f7e34
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua

+ 8 - 3
server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua

@@ -6,9 +6,13 @@
                    : 
 --]]
 
+function prespawn(NPC)
+	SpawnSet(NPC, "visual_state", 0) -- default visual state of 0, we set the visual state when we open it
+end
+
 function spawn(NPC)
 	ChangeHandIcon(NPC, 0)
-	SpawnSet(NPC, "targetable", 0, true, true)
+	SpawnSet(NPC, "targetable", 0)
 end
 
 function respawn(NPC)
@@ -26,10 +30,11 @@ function open(NPC, Player)
 	else
 		DisplayText(Player, 12, "This box is empty.")
 		ChangeHandIcon(NPC, 0)
-		SpawnSet(NPC, "targetable", 0, true, true)
+		SpawnSet(NPC, "targetable", 0)
 	end
 end
 
 function finished_open_animation(NPC)
+	SpawnSet(NPC, "visual_state", 11903) -- this swings open right in DoF, in AoM its really quick but better, not aware of any time we can expose
 	SendStateCommand(NPC, 400)
-end
+end