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:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user