mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Core/Pets): Improved Revive Pet should affect dead despawned pet. (#9625)
* fix(Core/Pets): Improved Revive Pet should affect dead despawned pet. Fixes #9589
This commit is contained in:
@@ -222,7 +222,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint8 asynchLoadType, uint32 petentry, ui
|
||||
{
|
||||
// process only if player is in world (teleport crashes?)
|
||||
// otherwise wait with result till he logs in
|
||||
uint8 loadResult = mySess->HandleLoadPetFromDBFirstCallback(result, asynchLoadType);
|
||||
uint8 loadResult = mySess->HandleLoadPetFromDBFirstCallback(result, asynchLoadType, info);
|
||||
|
||||
if (loadResult != PET_LOAD_OK)
|
||||
Pet::HandleAsynchLoadFailed(info, owner, asynchLoadType, loadResult);
|
||||
@@ -2328,6 +2328,11 @@ void Pet::HandleAsynchLoadFailed(AsynchPetSummon* info, Player* player, uint8 as
|
||||
//owner->PetSpellInitialize();
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT, false);
|
||||
}
|
||||
|
||||
if (info->m_healthPct)
|
||||
{
|
||||
pet->SetHealth(pet->CountPctFromMaxHealth(info->m_healthPct));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user