aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyrserth <wyrserth@protonmail.com>2019-06-26 22:02:27 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-13 00:42:17 +0100
commit7c7bb95da58bc9621f293c1c4d560f426ae0df64 (patch)
tree4a60820c55f1db007fc584470a05cb3a2c367f2b /src
parentb0ca2ac99701bdf07fcf1da3f95ca48d3e3f0279 (diff)
Core/GameObject: restore old behavior for non-consumable chests with restock timer (make them despawn).
(cherry picked from commit 50c5d30d13fe12af2a2028baf845fb6eab329a57)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 4ed6f10538e..cc0b3a1afba 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -897,7 +897,7 @@ void GameObject::Update(uint32 diff)
bool isPermanentSpawn = m_respawnDelayTime == 0;
if (!GetGOInfo()->IsDespawnAtAction() &&
((GetGoType() == GAMEOBJECT_TYPE_GOOBER && (!isSummonedAndExpired || isPermanentSpawn)) ||
- (GetGoType() == GAMEOBJECT_TYPE_CHEST && !isSummonedAndExpired))) // ToDo: chests with data2 (chestRestockTime) > 0 and data3 (consumable) = 0 should not despawn on loot
+ (GetGoType() == GAMEOBJECT_TYPE_CHEST && !isSummonedAndExpired && GetGOInfo()->chest.chestRestockTime == 0))) // ToDo: chests with data2 (chestRestockTime) > 0 and data3 (consumable) = 0 should not despawn on loot
{
SetLootState(GO_READY);
UpdateObjectVisibility();