Core/BattlePets: Misc fixes

Port From (https://github.com/TrinityCore/TrinityCore/commit/0cfd14d2a0a52ceb0d8203c31c7c6c487775bcee)
This commit is contained in:
hondacrx
2021-10-03 20:27:14 -04:00
parent 1de76c0662
commit a5066c8b68
8 changed files with 71 additions and 20 deletions
+8 -1
View File
@@ -183,7 +183,14 @@ namespace Game.Entities
SetCritterGUID(minion.GetGUID());
Player thisPlayer = ToPlayer();
if (thisPlayer != null)
minion.SetBattlePetCompanionGUID(thisPlayer.m_activePlayerData.SummonedBattlePetGUID);
{
var pet = thisPlayer.GetSession().GetBattlePetMgr().GetPet(thisPlayer.m_activePlayerData.SummonedBattlePetGUID);
if (pet != null)
{
minion.SetBattlePetCompanionGUID(thisPlayer.m_activePlayerData.SummonedBattlePetGUID);
minion.SetWildBattlePetLevel(pet.PacketInfo.Level);
}
}
}
// PvP, FFAPvP