Core/Players: Use PlayerData::VirtualPlayerRealm instead of global GetVirtualRealmAddress() where possible

Port From (https://github.com/TrinityCore/TrinityCore/commit/88fea990ff1408b94076fb9dbd0c974908d6a731)
This commit is contained in:
Hondacrx
2024-09-08 15:23:43 -04:00
parent 92472c20aa
commit 8341244e4d
7 changed files with 23 additions and 13 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ namespace Game.BattlePets
{
BattlePetStruct.BattlePetOwnerInfo battlePetOwnerInfo = new();
battlePetOwnerInfo.Guid = player.GetGUID();
battlePetOwnerInfo.PlayerVirtualRealm = Global.WorldMgr.GetVirtualRealmAddress();
battlePetOwnerInfo.PlayerVirtualRealm = _owner.m_playerData.VirtualPlayerRealm;
battlePetOwnerInfo.PlayerNativeRealm = Global.WorldMgr.GetVirtualRealmAddress();
pet.PacketInfo.OwnerInfo = battlePetOwnerInfo;
}