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

View File

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