Core/PacketIO: Updated packet structures to 9.2.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/d3c4216de8e1dcb9f62d2fcc1b9b72852e5409c9)
This commit is contained in:
@@ -347,6 +347,13 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
class AuctionRequestFavoriteList : ClientPacket
|
||||
{
|
||||
public AuctionRequestFavoriteList(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
class AuctionSellCommodity : ClientPacket
|
||||
{
|
||||
public ObjectGuid Auctioneer;
|
||||
|
||||
@@ -400,34 +400,29 @@ namespace Game.Networking.Packets
|
||||
public string CustomName = "";
|
||||
}
|
||||
|
||||
class GarrisonMission
|
||||
class GarrisonEncounter
|
||||
{
|
||||
public int GarrEncounterID;
|
||||
public List<int> Mechanics = new();
|
||||
public int GarrAutoCombatantID;
|
||||
public int Health;
|
||||
public int MaxHealth;
|
||||
public int Attack;
|
||||
public sbyte BoardIndex;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(DbID);
|
||||
data.WriteInt64(OfferTime);
|
||||
data.WriteUInt32(OfferDuration);
|
||||
data.WriteInt64(StartTime);
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteUInt32(MissionRecID);
|
||||
data.WriteUInt32(MissionState);
|
||||
data.WriteUInt32(SuccessChance);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteFloat(MissionScalar);
|
||||
}
|
||||
data.WriteInt32(GarrEncounterID);
|
||||
data.WriteInt32(Mechanics.Count);
|
||||
data.WriteInt32(GarrAutoCombatantID);
|
||||
data.WriteInt32(Health);
|
||||
data.WriteInt32(MaxHealth);
|
||||
data.WriteInt32(Attack);
|
||||
data.WriteInt8(BoardIndex);
|
||||
|
||||
public ulong DbID;
|
||||
public uint MissionRecID;
|
||||
public long OfferTime;
|
||||
public uint OfferDuration;
|
||||
public long StartTime = 2288912640;
|
||||
public uint TravelDuration;
|
||||
public uint MissionDuration;
|
||||
public uint MissionState;
|
||||
public uint SuccessChance;
|
||||
public uint Flags;
|
||||
public float MissionScalar = 1.0f;
|
||||
if (!Mechanics.Empty())
|
||||
Mechanics.ForEach(id => data.WriteInt32(id));
|
||||
}
|
||||
}
|
||||
|
||||
struct GarrisonMissionReward
|
||||
@@ -458,6 +453,53 @@ namespace Game.Networking.Packets
|
||||
public ItemInstance ItemInstance;
|
||||
}
|
||||
|
||||
class GarrisonMission
|
||||
{
|
||||
public ulong DbID;
|
||||
public int MissionRecID;
|
||||
public long OfferTime;
|
||||
public uint OfferDuration;
|
||||
public long StartTime = 2288912640;
|
||||
public uint TravelDuration;
|
||||
public uint MissionDuration;
|
||||
public int MissionState = 0;
|
||||
public int SuccessChance = 0;
|
||||
public uint Flags = 0;
|
||||
public float MissionScalar = 1.0f;
|
||||
public int ContentTuningID = 0;
|
||||
public List<GarrisonEncounter> Encounters = new();
|
||||
public List<GarrisonMissionReward> Rewards = new();
|
||||
public List<GarrisonMissionReward> OvermaxRewards = new();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(DbID);
|
||||
data.WriteInt32(MissionRecID);
|
||||
data.WriteInt64(OfferTime);
|
||||
data.WriteUInt32(OfferDuration);
|
||||
data.WriteInt64(StartTime);
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteInt32(MissionState);
|
||||
data.WriteInt32(SuccessChance);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteFloat(MissionScalar);
|
||||
data.WriteInt32(ContentTuningID);
|
||||
data.WriteInt32(Encounters.Count);
|
||||
data.WriteInt32(Rewards.Count);
|
||||
data.WriteInt32(OvermaxRewards.Count);
|
||||
|
||||
foreach (GarrisonEncounter encounter in Encounters)
|
||||
encounter.Write(data);
|
||||
|
||||
foreach (GarrisonMissionReward missionRewardItem in Rewards)
|
||||
missionRewardItem.Write(data);
|
||||
|
||||
foreach (GarrisonMissionReward missionRewardItem in OvermaxRewards)
|
||||
missionRewardItem.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
struct GarrisonMissionBonusAbility
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
|
||||
@@ -1638,6 +1638,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt8(Level);
|
||||
data.WriteUInt8(ClassID);
|
||||
data.WriteUInt8(Gender);
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WriteUInt8(RaceID);
|
||||
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteBits(Note.GetByteCount(), 8);
|
||||
@@ -1670,6 +1672,8 @@ namespace Game.Networking.Packets
|
||||
public byte Level;
|
||||
public byte ClassID;
|
||||
public byte Gender;
|
||||
public ulong GuildClubMemberID;
|
||||
public byte RaceID;
|
||||
public bool Authenticated;
|
||||
public bool SorEligible;
|
||||
public GuildRosterProfessionData[] Profession = new GuildRosterProfessionData[2];
|
||||
|
||||
@@ -762,6 +762,8 @@ namespace Game.Networking.Packets
|
||||
Id = data.ReadUInt32();
|
||||
Type = (RideType)data.ReadUInt32();
|
||||
Time = data.ReadInt64();
|
||||
Unknown925 = data.HasBit();
|
||||
data.ResetBitPos();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
@@ -770,12 +772,15 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteUInt32((uint)Type);
|
||||
data.WriteInt64(Time);
|
||||
data.WriteBit(Unknown925);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid RequesterGuid;
|
||||
public uint Id;
|
||||
public RideType Type;
|
||||
public long Time;
|
||||
public bool Unknown925;
|
||||
}
|
||||
|
||||
public enum RideType
|
||||
|
||||
@@ -342,12 +342,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
data.WriteUInt32(movementForce.TransportID);
|
||||
data.WriteFloat(movementForce.Magnitude);
|
||||
data.WriteInt32(movementForce.Unused910);
|
||||
data.WriteBits((byte)movementForce.Type, 2);
|
||||
data.WriteBit(movementForce.Unused910 != 0);
|
||||
data.FlushBits();
|
||||
|
||||
if (movementForce.Unused910 != 0)
|
||||
data.WriteInt32(movementForce.Unused910);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1084,6 +1084,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt8(Flags);
|
||||
data.WriteUInt8(RolesAssigned);
|
||||
data.WriteUInt8(Class);
|
||||
data.WriteUInt8(FactionGroup);
|
||||
data.WriteString(Name);
|
||||
if (!VoiceStateID.IsEmpty())
|
||||
data.WriteString(VoiceStateID);
|
||||
@@ -1097,6 +1098,7 @@ namespace Game.Networking.Packets
|
||||
public byte Subgroup;
|
||||
public byte Flags;
|
||||
public byte RolesAssigned;
|
||||
public byte FactionGroup;
|
||||
public bool FromSocialQueue;
|
||||
public bool VoiceChatSilenced;
|
||||
}
|
||||
|
||||
@@ -169,6 +169,26 @@ namespace Game.Networking.Packets
|
||||
public QualifiedGUID Player;
|
||||
}
|
||||
|
||||
class SocialContractRequest : ClientPacket
|
||||
{
|
||||
public SocialContractRequest(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
class SocialContractRequestResponse : ServerPacket
|
||||
{
|
||||
public bool ShowSocialContract;
|
||||
|
||||
public SocialContractRequestResponse() : base(ServerOpcodes.SocialContractRequestResponse) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(ShowSocialContract);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
//Structs
|
||||
public class ContactInfo
|
||||
{
|
||||
|
||||
@@ -129,8 +129,10 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
Header.Read(_worldPacket);
|
||||
TargetCharacterGUID = _worldPacket.ReadPackedGuid();
|
||||
ReportType = _worldPacket.ReadInt32();
|
||||
MajorCategory = _worldPacket.ReadInt32();
|
||||
MinorCategoryFlags = _worldPacket.ReadInt32();
|
||||
ChatLog.Read(_worldPacket);
|
||||
ComplaintType = _worldPacket.ReadBits<byte>(5);
|
||||
|
||||
uint noteLength = _worldPacket.ReadBits<uint>(10);
|
||||
bool hasMailInfo = _worldPacket.HasBit();
|
||||
@@ -209,7 +211,9 @@ namespace Game.Networking.Packets
|
||||
public SupportTicketHeader Header;
|
||||
public SupportTicketChatLog ChatLog;
|
||||
public ObjectGuid TargetCharacterGUID;
|
||||
public byte ComplaintType;
|
||||
public int ReportType;
|
||||
public int MajorCategory;
|
||||
public int MinorCategoryFlags;
|
||||
public string Note;
|
||||
public SupportTicketHorusChatLog HorusChatLog;
|
||||
public SupportTicketMailInfo? MailInfo;
|
||||
@@ -578,10 +582,12 @@ namespace Game.Networking.Packets
|
||||
MapID = packet.ReadUInt32();
|
||||
Position = packet.ReadVector3();
|
||||
Facing = packet.ReadFloat();
|
||||
Program = packet.ReadInt32();
|
||||
}
|
||||
|
||||
public uint MapID;
|
||||
public Vector3 Position;
|
||||
public float Facing;
|
||||
public int Program;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user