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:
parent
7787407477
commit
3bb2815da7
1 changed files with 9 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue