Core/GameObject: restore old behavior for non-consumable chests with restock timer (make them despawn).

(cherry picked from commit 50c5d30d13)
This commit is contained in:
Wyrserth
2019-06-26 22:02:27 +02:00
committed by Shauren
parent b0ca2ac997
commit 7c7bb95da5

View File

@@ -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();