Skip to content

Commit

Permalink
Player/Pet: Do not respawn pet when dying while mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jun 28, 2022
1 parent 05f79fa commit 0a6384c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game/Entities/Player.cpp
Expand Up @@ -1733,8 +1733,11 @@ void Player::SetDeathState(DeathState s)

ClearResurrectRequestData();

bool petAlive = true; // PET_SAVE_REAGENTS when pet is unsummoned
if (Pet* pet = GetPet())
RemovePet(pet->IsAlive() ? PET_SAVE_REAGENTS : PET_SAVE_AS_CURRENT);
petAlive = pet->IsAlive();

RemovePet(petAlive ? PET_SAVE_REAGENTS : PET_SAVE_AS_CURRENT);

// Remove guardians (only players are supposed to have pets/guardians removed on death)
RemoveGuardians();
Expand Down

0 comments on commit 0a6384c

Please sign in to comment.