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

@@ -1610,7 +1610,7 @@ Creature* Battleground::GetBGCreature(uint32 type)
return creature;
}
void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
void Battleground::SpawnBGObject(uint32 type, uint32 respawntime, uint32 forceRespawnDelay)
{
if (Map* map = FindBgMap())
if (GameObject* obj = map->GetGameObject(BgObjects[type]))
@@ -1622,6 +1622,11 @@ void Battleground::SpawnBGObject(uint32 type, uint32 respawntime)
obj->SetLootState(GO_READY);
obj->SetRespawnTime(respawntime);
map->AddToMap(obj);
if (forceRespawnDelay)
{
obj->SetRespawnDelay(forceRespawnDelay);
}
}
}