Core/PacketIO: Implemented SMSG_BROADCAST_SUMMON_CAST and SMSG_BROADCAST_SUMMON_RESPONSE

Port From (https://github.com/TrinityCore/TrinityCore/commit/a12f93907083c1c7a8e6a33a3c1724625395af7e)
This commit is contained in:
hondacrx
2022-06-02 20:19:55 -04:00
parent 30a287503f
commit 69970e6acd
2 changed files with 62 additions and 3 deletions
+35 -3
View File
@@ -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
{