Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Player: fixed a logic mistake that was causing pets getting desp…
Browse files Browse the repository at this point in the history
…awned on every save cycle
  • Loading branch information
Ovahlord committed Sep 29, 2023
1 parent 6e2d93c commit 417667e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19828,7 +19828,9 @@ void Player::_SavePets(CharacterDatabaseTransaction& trans)
if (petData->Status == PlayerPetDataStatus::UpToDate)
continue;

bool isActive = _activeClassPetDataKey.has_value() && _activeClassPetDataKey->first == pair.first.first && _activeClassPetDataKey->second == pair.first.second;
bool isActive = petData->SavedHealth != 0 &&
_activeClassPetDataKey.has_value() && _activeClassPetDataKey->first == pair.first.first &&
_activeClassPetDataKey->second == pair.first.second;

if (petData->Status == PlayerPetDataStatus::New)
{
Expand Down

0 comments on commit 417667e

Please sign in to comment.