fix(Scripts/World): Null check Precious in npc_simone RespawnPet (#25502)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-04-18 08:50:11 -03:00 committed by GitHub
parent 7787407477
commit 3bb2815da7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -574,12 +574,16 @@ public:
void RespawnPet()
{
Creature* precious = Precious();
if (!precious)
return;
Position current = me->GetNearPosition(-5.0f, 0.0f);
Precious()->RemoveCorpse(false, false);
Precious()->SetPosition(current);
Precious()->SetHomePosition(current);
Precious()->setDeathState(DeathState::JustRespawned);
Precious()->UpdateObjectVisibility(true);
precious->RemoveCorpse(false, false);
precious->SetPosition(current);
precious->SetHomePosition(current);
precious->setDeathState(DeathState::JustRespawned);
precious->UpdateObjectVisibility(true);
}
void HandlePetRespawn()