Core: Updated to 11.0.2

Port From (https://github.com/TrinityCore/TrinityCore/commit/df1ec76d54db3a91759fc93f4d6b6828d4ec0f59)
This commit is contained in:
Hondacrx
2024-09-08 15:09:30 -04:00
parent ad461858ca
commit 6bdb8a6c70
28 changed files with 1761 additions and 1712 deletions
@@ -272,6 +272,7 @@ namespace Game.Networking.Packets
data.WriteUInt8(Subclass);
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
data.WriteUInt32(ItemID);
data.WriteUInt32(TransmogrifiedItemID);
}
public uint DisplayId;
@@ -280,6 +281,7 @@ namespace Game.Networking.Packets
public byte InvType;
public byte Subclass;
public uint ItemID;
public uint TransmogrifiedItemID;
}
public struct PetInfo
+8 -18
View File
@@ -133,23 +133,6 @@ namespace Game.Networking.Packets
public int GuildFlags;
}
public class GuildRosterUpdate : ServerPacket
{
public GuildRosterUpdate() : base(ServerOpcodes.GuildRosterUpdate)
{
MemberData = new List<GuildRosterMemberData>();
}
public override void Write()
{
_worldPacket.WriteInt32(MemberData.Count);
MemberData.ForEach(p => p.Write(_worldPacket));
}
public List<GuildRosterMemberData> MemberData;
}
public class GuildUpdateMotdText : ClientPacket
{
public GuildUpdateMotdText(WorldPacket packet) : base(packet) { }
@@ -195,9 +178,16 @@ namespace Game.Networking.Packets
public class GuildDeclineInvitation : ClientPacket
{
public ObjectGuid GuildGuid;
public bool IsAuto;
public GuildDeclineInvitation(WorldPacket packet) : base(packet) { }
public override void Read() { }
public override void Read()
{
GuildGuid = _worldPacket.ReadPackedGuid();
IsAuto = _worldPacket.HasBit();
}
}
public class DeclineGuildInvites : ClientPacket
@@ -312,12 +312,14 @@ namespace Game.Networking.Packets
public GossipOptionRewardType Type;
public int ID;
public int Quantity;
public sbyte ItemContext;
public void Write(WorldPacket data)
{
data.WriteBits((byte)Type, 1);
data.WriteInt32(ID);
data.WriteInt32(Quantity);
data.WriteInt8(ItemContext);
}
}
@@ -388,6 +390,7 @@ namespace Game.Networking.Packets
public uint QuestID;
public uint ContentTuningID;
public int QuestType;
public int Unused1102;
public bool Repeatable;
public bool ResetByScheduler;
public bool Important;
@@ -402,6 +405,7 @@ namespace Game.Networking.Packets
data.WriteUInt32(QuestID);
data.WriteUInt32(ContentTuningID);
data.WriteInt32(QuestType);
data.WriteInt32(Unused1102);
data.WriteUInt32(QuestFlags);
data.WriteUInt32(QuestFlagsEx);
data.WriteUInt32(QuestFlagsEx2);
@@ -961,6 +961,7 @@ namespace Game.Networking.Packets
public ObjectGuid TargetGUID;
public PingSubjectType Type = PingSubjectType.Max;
public uint PinFrameID;
public TimeSpan PingDuration;
public SendPingUnit(WorldPacket packet) : base(packet) { }
@@ -970,6 +971,7 @@ namespace Game.Networking.Packets
TargetGUID = _worldPacket.ReadPackedGuid();
Type = (PingSubjectType)_worldPacket.ReadUInt8();
PinFrameID = _worldPacket.ReadUInt32();
PingDuration = TimeSpan.FromMilliseconds(_worldPacket.ReadInt32());
}
}
@@ -979,6 +981,7 @@ namespace Game.Networking.Packets
public ObjectGuid TargetGUID;
public PingSubjectType Type = PingSubjectType.Max;
public uint PinFrameID;
public TimeSpan PingDuration;
public ReceivePingUnit() : base(ServerOpcodes.ReceivePingUnit) { }
@@ -988,6 +991,7 @@ namespace Game.Networking.Packets
_worldPacket.WritePackedGuid(TargetGUID);
_worldPacket.WriteUInt8((byte)Type);
_worldPacket.WriteUInt32(PinFrameID);
_worldPacket.WriteInt32((int)PingDuration.TotalMilliseconds);
}
}
@@ -999,6 +1003,7 @@ namespace Game.Networking.Packets
public PingSubjectType Type = PingSubjectType.Max;
public uint PinFrameID;
public ObjectGuid Transport;
public TimeSpan PingDuration;
public SendPingWorldPoint(WorldPacket packet) : base(packet) { }
@@ -1010,6 +1015,7 @@ namespace Game.Networking.Packets
Type = (PingSubjectType)_worldPacket.ReadUInt32();
PinFrameID = _worldPacket.ReadUInt32();
Transport = _worldPacket.ReadPackedGuid();
PingDuration = TimeSpan.FromMilliseconds(_worldPacket.ReadInt32());
}
}
@@ -1020,6 +1026,7 @@ namespace Game.Networking.Packets
public Vector3 Point;
public PingSubjectType Type = PingSubjectType.Max;
public uint PinFrameID;
public TimeSpan PingDuration;
public ObjectGuid Transport;
public ReceivePingWorldPoint() : base(ServerOpcodes.ReceivePingWorldPoint) { }
@@ -1032,6 +1039,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt8((byte)Type);
_worldPacket.WriteUInt32(PinFrameID);
_worldPacket.WritePackedGuid(Transport);
_worldPacket.WriteInt32((int)PingDuration.TotalMilliseconds);
}
}
+18 -24
View File
@@ -29,21 +29,6 @@ namespace Game.Networking.Packets
public override void Read() { }
}
class QuestGiverStatusTrackedQuery : ClientPacket
{
public List<ObjectGuid> QuestGiverGUIDs = new();
public QuestGiverStatusTrackedQuery(WorldPacket packet) : base(packet) { }
public override void Read()
{
uint guidCount = _worldPacket.ReadUInt32();
for (uint i = 0; i < guidCount; ++i)
QuestGiverGUIDs.Add(_worldPacket.ReadPackedGuid());
}
}
public class QuestGiverStatusPkt : ServerPacket
{
public QuestGiverStatusPkt() : base(ServerOpcodes.QuestGiverStatus, ConnectionType.Instance)
@@ -196,6 +181,7 @@ namespace Game.Networking.Packets
_worldPacket.WriteInt32(Info.Objectives.Count);
_worldPacket.WriteUInt64(Info.AllowableRaces.RawValue);
_worldPacket.WriteInt32(Info.TreasurePickerID.Count);
_worldPacket.WriteInt32(Info.TreasurePickerID2.Count);
_worldPacket.WriteInt32(Info.Expansion);
_worldPacket.WriteInt32(Info.ManagedWorldStateID);
_worldPacket.WriteInt32(Info.QuestSessionBonus);
@@ -211,6 +197,10 @@ namespace Game.Networking.Packets
foreach (var id in Info.TreasurePickerID)
_worldPacket.WriteInt32(id);
if (!Info.TreasurePickerID2.Empty())
foreach (var id in Info.TreasurePickerID2)
_worldPacket.WriteInt32(id);
_worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9);
_worldPacket.WriteBits(Info.LogDescription.GetByteCount(), 12);
_worldPacket.WriteBits(Info.QuestDescription.GetByteCount(), 12);
@@ -556,6 +546,8 @@ namespace Game.Networking.Packets
public override void Write()
{
_worldPacket.WriteInt32(Collect.Count);
_worldPacket.WriteInt32(Currency.Count);
_worldPacket.WritePackedGuid(QuestGiverGUID);
_worldPacket.WriteUInt32(QuestGiverCreatureID);
_worldPacket.WriteUInt32(QuestID);
@@ -566,8 +558,6 @@ namespace Game.Networking.Packets
_worldPacket.WriteUInt32(QuestFlags[2]);
_worldPacket.WriteUInt32(SuggestPartyMembers);
_worldPacket.WriteInt32(MoneyToGet);
_worldPacket.WriteInt32(Collect.Count);
_worldPacket.WriteInt32(Currency.Count);
_worldPacket.WriteInt32(StatusFlags);
_worldPacket.WriteInt32(QuestInfoID);
@@ -584,6 +574,7 @@ namespace Game.Networking.Packets
}
_worldPacket.WriteBit(AutoLaunched);
_worldPacket.WriteBit(ResetByScheduler);
_worldPacket.FlushBits();
_worldPacket.WriteUInt32(QuestGiverCreatureID);
@@ -606,6 +597,7 @@ namespace Game.Networking.Packets
public uint CompEmoteDelay;
public uint CompEmoteType;
public bool AutoLaunched;
public bool ResetByScheduler;
public uint SuggestPartyMembers;
public int MoneyToGet;
public List<QuestObjectiveCollect> Collect = new();
@@ -1088,6 +1080,7 @@ namespace Game.Networking.Packets
public uint AreaGroupID;
public long TimeAllowed;
public List<int> TreasurePickerID = new();
public List<int> TreasurePickerID2 = new(); // unknown purpose, used only sometimes and only if TreasurePickerID is empty
public int Expansion;
public int ManagedWorldStateID;
public int QuestSessionBonus;
@@ -1262,6 +1255,8 @@ namespace Game.Networking.Packets
{
public void Write(WorldPacket data)
{
Rewards.Write(data); // QuestRewards
data.WriteInt32(Emotes.Count);
data.WritePackedGuid(QuestGiverGUID);
data.WriteUInt32(QuestGiverCreatureID);
data.WriteUInt32(QuestID);
@@ -1270,7 +1265,6 @@ namespace Game.Networking.Packets
data.WriteUInt32(QuestFlags[2]); // FlagsEx2
data.WriteUInt32(SuggestedPartyMembers);
data.WriteInt32(QuestInfoID);
data.WriteInt32(Emotes.Count);
foreach (QuestDescEmote emote in Emotes)
{
@@ -1280,16 +1274,16 @@ namespace Game.Networking.Packets
data.WriteBit(AutoLaunched);
data.WriteBit(false); // Unused
data.WriteBit(ResetByScheduler);
data.FlushBits();
Rewards.Write(data);
}
public ObjectGuid QuestGiverGUID;
public uint QuestGiverCreatureID = 0;
public uint QuestID = 0;
public bool AutoLaunched = false;
public uint SuggestedPartyMembers = 0;
public uint QuestGiverCreatureID;
public uint QuestID;
public bool AutoLaunched;
public bool ResetByScheduler;
public uint SuggestedPartyMembers;
public QuestRewards Rewards = new();
public List<QuestDescEmote> Emotes = new();
public uint[] QuestFlags = new uint[3]; // Flags and FlagsEx
@@ -26,27 +26,6 @@ namespace Game.Networking.Packets
public List<FactionBonusData> Bonuses = new();
}
class RequestForcedReactions : ClientPacket
{
public RequestForcedReactions(WorldPacket packet) : base(packet) { }
public override void Read() { }
}
class SetForcedReactions : ServerPacket
{
public SetForcedReactions() : base(ServerOpcodes.SetForcedReactions, ConnectionType.Instance) { }
public override void Write()
{
_worldPacket.WriteInt32(Reactions.Count);
foreach (ForcedReaction reaction in Reactions)
reaction.Write(_worldPacket);
}
public List<ForcedReaction> Reactions = new();
}
class SetFactionStanding : ServerPacket
{
public SetFactionStanding() : base(ServerOpcodes.SetFactionStanding, ConnectionType.Instance) { }
@@ -95,18 +74,6 @@ namespace Game.Networking.Packets
}
}
struct ForcedReaction
{
public void Write(WorldPacket data)
{
data.WriteInt32(Faction);
data.WriteInt32(Reaction);
}
public int Faction;
public int Reaction;
}
struct FactionStandingData
{
public FactionStandingData(int index, int standing)