From 85d81d39fc23c8247ea4119d6367b7c1fdba1959 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 24 Dec 2021 21:08:08 -0500 Subject: [PATCH] Core/GameObject: restore old behavior for non-consumable chests with restock timer (make them despawn). Port From (https://github.com/TrinityCore/TrinityCore/commit/7c7bb95da58bc9621f293c1c4d560f426ae0df64) --- Source/Game/Entities/GameObject/GameObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index c798014b1..b5ab08851 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -806,7 +806,7 @@ namespace Game.Entities bool isPermanentSpawn = m_respawnDelayTime == 0; if (!GetGoInfo().IsDespawnAtAction() && ((GetGoType() == GameObjectTypes.Goober && (!isSummonedAndExpired || isPermanentSpawn)) || - (GetGoType() == GameObjectTypes.Chest && !isSummonedAndExpired))) // ToDo: chests with data2 (chestRestockTime) > 0 and data3 (consumable) = 0 should not despawn on loot + (GetGoType() == GameObjectTypes.Chest && !isSummonedAndExpired && GetGoInfo().Chest.chestRestockTime == 0))) // ToDo: chests with data2 (chestRestockTime) > 0 and data3 (consumable) = 0 should not despawn on loot { SetLootState(LootState.Ready); UpdateObjectVisibility();