From 3bb2815da79f78118559c0a28e6fb1796b72e6dd Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 18 Apr 2026 08:50:11 -0300 Subject: [PATCH] fix(Scripts/World): Null check Precious in npc_simone RespawnPet (#25502) Co-authored-by: Claude Opus 4.6 --- src/server/scripts/World/npc_stave_of_ancients.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/World/npc_stave_of_ancients.cpp b/src/server/scripts/World/npc_stave_of_ancients.cpp index af9fbc41a..2d45d2e7b 100644 --- a/src/server/scripts/World/npc_stave_of_ancients.cpp +++ b/src/server/scripts/World/npc_stave_of_ancients.cpp @@ -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()