Core/PacketIO: Updated packet structures to 9.0.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/f2202869f71f5a1a35191de303ee5166e4275884)
This commit is contained in:
@@ -189,6 +189,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(progress.DateCreated);
|
||||
_worldPacket.WriteUInt32(progress.DateStarted);
|
||||
_worldPacket.WritePackedTime(progress.DateUpdated);
|
||||
_worldPacket.WriteUInt32(0); // this is a hack. this is a packed time written as int64 (progress.DateUpdated)
|
||||
_worldPacket.WriteUInt64(progress.Quantity);
|
||||
_worldPacket.WritePackedGuid(progress.PlayerGUID);
|
||||
_worldPacket.WriteInt32(progress.Flags);
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.Entities;
|
||||
using Game.Groups;
|
||||
using System;
|
||||
using Framework.Dynamic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
@@ -269,11 +270,16 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WriteInt32(EmoteID);
|
||||
_worldPacket.WriteUInt32(EmoteID);
|
||||
_worldPacket.WriteInt32(SpellVisualKitIDs.Count);
|
||||
|
||||
foreach (var id in SpellVisualKitIDs)
|
||||
_worldPacket.WriteUInt32(id);
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
public int EmoteID;
|
||||
public uint EmoteID;
|
||||
public List<uint> SpellVisualKitIDs = new();
|
||||
}
|
||||
|
||||
public class CTextEmote : ClientPacket
|
||||
@@ -285,11 +291,16 @@ namespace Game.Networking.Packets
|
||||
Target = _worldPacket.ReadPackedGuid();
|
||||
EmoteID = _worldPacket.ReadInt32();
|
||||
SoundIndex = _worldPacket.ReadInt32();
|
||||
|
||||
SpellVisualKitIDs = new uint[_worldPacket.ReadUInt32()];
|
||||
for (var i = 0; i < SpellVisualKitIDs.Length; ++i)
|
||||
SpellVisualKitIDs[i] = _worldPacket.ReadUInt32();
|
||||
}
|
||||
|
||||
public ObjectGuid Target;
|
||||
public int EmoteID;
|
||||
public int SoundIndex;
|
||||
public uint[] SpellVisualKitIDs;
|
||||
}
|
||||
|
||||
public class STextEmote : ServerPacket
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
class GameObjectUILink : ServerPacket
|
||||
{
|
||||
public GameObjectUILink() : base(ServerOpcodes.GameObjectUILink, ConnectionType.Instance) { }
|
||||
public GameObjectUILink() : base(ServerOpcodes.GameObjectUiLink, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
|
||||
@@ -405,12 +405,12 @@ namespace Game.Networking.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(DbID);
|
||||
data.WriteUInt32(MissionRecID);
|
||||
data.WriteUInt32((uint)OfferTime);
|
||||
data.WriteUInt32(OfferDuration);
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteUInt32(MissionRecID);
|
||||
data.WriteUInt32(MissionState);
|
||||
data.WriteUInt32(SuccessChance);
|
||||
data.WriteUInt32(Flags);
|
||||
@@ -462,8 +462,8 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(GarrMssnBonusAbilityID);
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
data.WriteUInt32(GarrMssnBonusAbilityID);
|
||||
}
|
||||
|
||||
public uint GarrMssnBonusAbilityID;
|
||||
@@ -533,12 +533,12 @@ namespace Game.Networking.Packets
|
||||
struct GarrisonEventEntry
|
||||
{
|
||||
public int EntryID;
|
||||
public int EventValue;
|
||||
public long EventValue;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt64(EventValue);
|
||||
data.WriteInt32(EntryID);
|
||||
data.WriteInt32(EventValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -578,6 +578,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(ArchivedMissions.Count);
|
||||
data.WriteUInt32(NumFollowerActivationsRemaining);
|
||||
data.WriteUInt32(NumMissionsStartedToday);
|
||||
data.WriteInt32(MinAutoTroopLevel);
|
||||
|
||||
foreach (GarrisonPlotInfo plot in Plots)
|
||||
plot.Write(data);
|
||||
@@ -634,6 +635,7 @@ namespace Game.Networking.Packets
|
||||
public uint GarrSiteLevelID;
|
||||
public uint NumFollowerActivationsRemaining;
|
||||
public uint NumMissionsStartedToday; // might mean something else, but sending 0 here enables follower abilities "Increase success chance of the first mission of the day by %."
|
||||
public int MinAutoTroopLevel;
|
||||
public List<GarrisonPlotInfo> Plots = new();
|
||||
public List<GarrisonBuildingInfo> Buildings = new();
|
||||
public List<GarrisonFollower> Followers = new();
|
||||
|
||||
@@ -78,25 +78,24 @@ namespace Game.Networking.Packets
|
||||
|
||||
class AvailableHotfixes : ServerPacket
|
||||
{
|
||||
public AvailableHotfixes(uint virtualRealmAddress, uint hotfixCount, List<HotfixRecord> hotfixes) : base(ServerOpcodes.AvailableHotfixes)
|
||||
public AvailableHotfixes(uint virtualRealmAddress, MultiMap<int, HotfixRecord> hotfixes) : base(ServerOpcodes.AvailableHotfixes)
|
||||
{
|
||||
VirtualRealmAddress = virtualRealmAddress;
|
||||
HotfixCount = hotfixCount;
|
||||
Hotfixes = hotfixes;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(VirtualRealmAddress);
|
||||
_worldPacket.WriteUInt32(HotfixCount);
|
||||
_worldPacket.WriteInt32(Hotfixes.Count);
|
||||
|
||||
foreach (HotfixRecord hotfixRecord in Hotfixes)
|
||||
hotfixRecord.Write(_worldPacket);
|
||||
foreach (var pair in Hotfixes)
|
||||
_worldPacket.WriteInt32(pair.Key);
|
||||
}
|
||||
|
||||
public uint VirtualRealmAddress;
|
||||
public uint HotfixCount;
|
||||
public List<HotfixRecord> Hotfixes;
|
||||
public MultiMap<int, HotfixRecord> Hotfixes;
|
||||
}
|
||||
|
||||
class HotfixRequest : ClientPacket
|
||||
@@ -110,16 +109,12 @@ namespace Game.Networking.Packets
|
||||
|
||||
uint hotfixCount = _worldPacket.ReadUInt32();
|
||||
for (var i = 0; i < hotfixCount; ++i)
|
||||
{
|
||||
HotfixRecord hotfixRecord = new();
|
||||
hotfixRecord.Read(_worldPacket);
|
||||
Hotfixes.Add(hotfixRecord);
|
||||
}
|
||||
Hotfixes.Add(_worldPacket.ReadInt32());
|
||||
}
|
||||
|
||||
public uint ClientBuild;
|
||||
public uint DataBuild;
|
||||
public List<HotfixRecord> Hotfixes = new();
|
||||
public List<int> Hotfixes = new();
|
||||
}
|
||||
|
||||
class HotfixConnect : ServerPacket
|
||||
|
||||
@@ -1162,7 +1162,14 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public MountSpecial(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
public override void Read()
|
||||
{
|
||||
SpellVisualKitIDs = new int[_worldPacket.ReadUInt32()];
|
||||
for (var i = 0; i < SpellVisualKitIDs.Length; ++i)
|
||||
SpellVisualKitIDs[i] = _worldPacket.ReadInt32();
|
||||
}
|
||||
|
||||
public int[] SpellVisualKitIDs;
|
||||
}
|
||||
|
||||
class SpecialMountAnim : ServerPacket
|
||||
@@ -1172,9 +1179,13 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteInt32(SpellVisualKitIDs.Count);
|
||||
foreach (var id in SpellVisualKitIDs)
|
||||
_worldPacket.WriteInt32(id);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
public List<int> SpellVisualKitIDs = new();
|
||||
}
|
||||
|
||||
class CrossedInebriationThreshold : ServerPacket
|
||||
|
||||
@@ -209,6 +209,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteFloat(Pos.Y);
|
||||
_worldPacket.WriteUInt32(Icon);
|
||||
_worldPacket.WriteUInt32(Importance);
|
||||
_worldPacket.WriteUInt32(Unknown905);
|
||||
_worldPacket.WriteBits(Flags, 14);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -220,6 +221,7 @@ namespace Game.Networking.Packets
|
||||
public Vector2 Pos;
|
||||
public uint Icon;
|
||||
public uint Importance;
|
||||
public uint Unknown905;
|
||||
public string Name;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ namespace Game.Networking.Packets
|
||||
foreach (var c in Cases)
|
||||
{
|
||||
_worldPacket.WriteInt32(c.CaseID);
|
||||
_worldPacket.WriteInt32(c.CaseOpened);
|
||||
_worldPacket.WriteUInt32(c.CaseOpened);
|
||||
_worldPacket.WriteInt32(c.CaseStatus);
|
||||
_worldPacket.WriteInt16(c.CfgRealmID);
|
||||
_worldPacket.WriteInt64(c.CharacterID);
|
||||
_worldPacket.WriteUInt16(c.CfgRealmID);
|
||||
_worldPacket.WriteUInt64(c.CharacterID);
|
||||
_worldPacket.WriteInt32(c.WaitTimeOverrideMinutes);
|
||||
|
||||
_worldPacket.WriteBits(c.Url.GetByteCount(), 11);
|
||||
@@ -80,10 +80,10 @@ namespace Game.Networking.Packets
|
||||
public struct GMTicketCase
|
||||
{
|
||||
public int CaseID;
|
||||
public int CaseOpened;
|
||||
public uint CaseOpened;
|
||||
public int CaseStatus;
|
||||
public short CfgRealmID;
|
||||
public long CharacterID;
|
||||
public ushort CfgRealmID;
|
||||
public ulong CharacterID;
|
||||
public int WaitTimeOverrideMinutes;
|
||||
public string Url;
|
||||
public string WaitTimeOverrideMessage;
|
||||
|
||||
@@ -42,27 +42,27 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteInt32(AuctionableTokenAuctionableList.Count);
|
||||
|
||||
foreach (AuctionableTokenAuctionable auctionableTokenAuctionable in AuctionableTokenAuctionableList)
|
||||
foreach (AuctionableTokenInfo auctionableTokenAuctionable in AuctionableTokenAuctionableList)
|
||||
{
|
||||
_worldPacket.WriteUInt64(auctionableTokenAuctionable.UnkInt1);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.UnkInt2);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.Owner);
|
||||
_worldPacket.WriteUInt64(auctionableTokenAuctionable.BuyoutPrice);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.EndTime);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.Owner);
|
||||
_worldPacket.WriteUInt32(auctionableTokenAuctionable.DurationLeft);
|
||||
}
|
||||
}
|
||||
|
||||
public uint UnkInt; // send CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST
|
||||
public TokenResult Result;
|
||||
List<AuctionableTokenAuctionable> AuctionableTokenAuctionableList =new();
|
||||
List<AuctionableTokenInfo> AuctionableTokenAuctionableList = new();
|
||||
|
||||
struct AuctionableTokenAuctionable
|
||||
struct AuctionableTokenInfo
|
||||
{
|
||||
public ulong UnkInt1;
|
||||
public uint UnkInt2;
|
||||
public uint Owner;
|
||||
public ulong BuyoutPrice;
|
||||
public uint EndTime;
|
||||
public uint DurationLeft;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user