Core/Objects: Keep current WMO info on position updates and use it in party member state packets

Port From (https://github.com/TrinityCore/TrinityCore/commit/d397b636d48f55b5e76d77c36ded33b2c8bbe295)
This commit is contained in:
hondacrx
2024-03-12 23:06:29 -04:00
parent ccf73e23e3
commit 6ae8362013
2 changed files with 11 additions and 2 deletions
@@ -280,8 +280,13 @@ namespace Game.Networking.Packets
MemberStats.SpecID = (ushort)player.GetPrimarySpecialization();
MemberStats.PartyType[0] = player.m_playerData.PartyType[0];
MemberStats.PartyType[1] = player.m_playerData.PartyType[1];
MemberStats.WmoGroupID = 0;
MemberStats.WmoDoodadPlacementID = 0;
var wmoLocation = player.GetCurrentWmo();
if (wmoLocation != null)
{
MemberStats.WmoGroupID = (ushort)wmoLocation.GroupId;
MemberStats.WmoDoodadPlacementID = wmoLocation.UniqueId;
}
// Vehicle
Vehicle vehicle = player.GetVehicle();