fix(Core/BattlegroundAV) Irondeep/Coldtooth Supplies never despawning (#8612)

This commit is contained in:
Skjalf
2021-10-21 19:03:47 -03:00
committed by GitHub
parent a009e935ac
commit c2381a5a1c
5 changed files with 16 additions and 5 deletions

View File

@@ -1194,13 +1194,18 @@ bool GameObject::IsInvisibleDueToDespawn() const
void GameObject::SetRespawnTime(int32 respawn)
{
m_respawnTime = respawn > 0 ? time(nullptr) + respawn : 0;
m_respawnDelayTime = respawn > 0 ? respawn : 0;
SetRespawnDelay(respawn);
if (respawn && !m_spawnedByDefault)
{
UpdateObjectVisibility(true);
}
}
void GameObject::SetRespawnDelay(int32 respawn)
{
m_respawnDelayTime = respawn > 0 ? respawn : 0;
}
void GameObject::Respawn()
{
if (m_spawnedByDefault && m_respawnTime > 0)