From e4e8ee5e024eb02881db1bab1e683bb8a6c77686 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 24 Jul 2020 16:32:48 -0400 Subject: [PATCH] Core/Scripts: Fixed GAMEOBJECT_TYPE_DOOR closing automatically after being opened with .gobj act Port From (https://github.com/TrinityCore/TrinityCore/commit/ced48202526b32c0eb8e98cb0f713dfa0b94bf64) --- Source/Game/Chat/Commands/GameObjectCommands.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Game/Chat/Commands/GameObjectCommands.cs b/Source/Game/Chat/Commands/GameObjectCommands.cs index 7064d7114..46cb04771 100644 --- a/Source/Game/Chat/Commands/GameObjectCommands.cs +++ b/Source/Game/Chat/Commands/GameObjectCommands.cs @@ -51,9 +51,11 @@ namespace Game.Chat return false; } + uint autoCloseTime = obj.GetGoInfo().GetAutoCloseTime() != 0 ? 10000u : 0u; + // Activate obj.SetLootState(LootState.Ready); - obj.UseDoorOrButton(10000, false, handler.GetSession().GetPlayer()); + obj.UseDoorOrButton(autoCloseTime, false, handler.GetSession().GetPlayer()); handler.SendSysMessage("Object activated!"); return true;