refactor(Scripts/BloodFurnace): Clean up instance script (#21207)

This commit is contained in:
Andrew
2025-01-19 16:33:19 -03:00
committed by GitHub
parent 9c43adc445
commit b238daa7a8
7 changed files with 34 additions and 139 deletions

View File

@@ -612,6 +612,12 @@ void InstanceScript::DoRespawnGameObject(ObjectGuid uiGuid, uint32 uiTimeToDespa
LOG_DEBUG("scripts", "InstanceScript: DoRespawnGameObject failed");
}
void InstanceScript::DoRespawnGameObject(uint32 type)
{
if (GameObject* go = instance->GetGameObject(GetObjectGuid(type)))
go->Respawn();
}
void InstanceScript::DoRespawnCreature(ObjectGuid guid, bool force)
{
if (Creature* creature = instance->GetCreature(guid))

View File

@@ -203,6 +203,9 @@ public:
//Respawns a GO having negative spawntimesecs in gameobject-table
void DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn = MINUTE);
// Respawns a GO by instance storage index
void DoRespawnGameObject(uint32 type);
// Respawns a creature.
void DoRespawnCreature(ObjectGuid guid, bool force = false);