diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 52d314eef..a4b1ed8c2 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -2082,7 +2082,16 @@ namespace Game.Entities summonRequest.SummonerVirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress(); summonRequest.AreaID = (int)summoner.GetZoneId(); SendPacket(summonRequest); + + Group group = GetGroup(); + if (group != null) + { + BroadcastSummonCast summonCast = new(); + summonCast.Target = GetGUID(); + group.BroadcastPacket(summonCast, false, -1, GetGUID()); + } } + public bool IsInAreaTriggerRadius(AreaTriggerRecord trigger) { if (trigger == null) @@ -2114,15 +2123,31 @@ namespace Game.Entities public void SummonIfPossible(bool agree) { + void broadcastSummonResponse(bool accepted) + { + Group group = GetGroup(); + if (group != null) + { + BroadcastSummonResponse summonResponse = new(); + summonResponse.Target = GetGUID(); + summonResponse.Accepted = accepted; + group.BroadcastPacket(summonResponse, false, -1, GetGUID()); + } + } + if (!agree) { m_summon_expire = 0; + broadcastSummonResponse(false); return; } // expire and auto declined if (m_summon_expire < GameTime.GetGameTime()) + { + broadcastSummonResponse(false); return; + } // stop taxi flight at summon FinishTaxiFlight(); @@ -2140,6 +2165,8 @@ namespace Game.Entities m_summon_location.SetOrientation(GetOrientation()); TeleportTo(m_summon_location); + + broadcastSummonResponse(true); } public override void OnPhaseChange() diff --git a/Source/Game/Networking/Packets/PartyPackets.cs b/Source/Game/Networking/Packets/PartyPackets.cs index b83c998f4..ec6edbcc0 100644 --- a/Source/Game/Networking/Packets/PartyPackets.cs +++ b/Source/Game/Networking/Packets/PartyPackets.cs @@ -16,7 +16,7 @@ */ using Framework.Constants; -using Framework.Dynamic; +using Game.DataStorage; using Game.Entities; using Game.Groups; using Game.Spells; @@ -285,8 +285,13 @@ namespace Game.Networking.Packets MemberStats.WmoDoodadPlacementID = 0; // Vehicle - if (player.GetVehicle() && player.GetVehicle().GetVehicleInfo() != null) - MemberStats.VehicleSeat = player.GetVehicle().GetVehicleInfo().SeatID[player.m_movementInfo.transport.seat]; + Vehicle vehicle = player.GetVehicle(); + if (vehicle != null) + { + VehicleSeatRecord vehicleSeat = vehicle.GetSeatForPassenger(player); + if (vehicleSeat != null) + MemberStats.VehicleSeat = (int)vehicleSeat.Id; + } // Auras foreach (AuraApplication aurApp in player.GetVisibleAuras()) @@ -874,6 +879,33 @@ namespace Game.Networking.Packets public ObjectGuid Victim; } + class BroadcastSummonCast : ServerPacket + { + public ObjectGuid Target; + + public BroadcastSummonCast() : base(ServerOpcodes.BroadcastSummonCast) { } + + public override void Write() + { + _worldPacket.WritePackedGuid(Target); + } + } + + class BroadcastSummonResponse : ServerPacket + { + public ObjectGuid Target; + public bool Accepted; + + public BroadcastSummonResponse() : base(ServerOpcodes.BroadcastSummonResponse) { } + + public override void Write() + { + _worldPacket.WritePackedGuid(Target); + _worldPacket.WriteBit(Accepted); + _worldPacket.FlushBits(); + } + } + //Structs public struct PartyMemberPhase {