Core/GameObject: restore old behavior for non-consumable chests with restock timer (make them despawn).
Port From (https://github.com/TrinityCore/TrinityCore/commit/7c7bb95da58bc9621f293c1c4d560f426ae0df64)
This commit is contained in:
@@ -806,7 +806,7 @@ namespace Game.Entities
|
|||||||
bool isPermanentSpawn = m_respawnDelayTime == 0;
|
bool isPermanentSpawn = m_respawnDelayTime == 0;
|
||||||
if (!GetGoInfo().IsDespawnAtAction() &&
|
if (!GetGoInfo().IsDespawnAtAction() &&
|
||||||
((GetGoType() == GameObjectTypes.Goober && (!isSummonedAndExpired || isPermanentSpawn)) ||
|
((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);
|
SetLootState(LootState.Ready);
|
||||||
UpdateObjectVisibility();
|
UpdateObjectVisibility();
|
||||||
|
|||||||
Reference in New Issue
Block a user