diff --git a/Source/Framework/Constants/ItemConst.cs b/Source/Framework/Constants/ItemConst.cs index 7b5aa1258..a16d616da 100644 --- a/Source/Framework/Constants/ItemConst.cs +++ b/Source/Framework/Constants/ItemConst.cs @@ -458,6 +458,17 @@ namespace Framework.Constants ItemHistorySlot = 38, } + public enum ItemCollectionType : byte + { + None = 0, + Toy = 1, + Heirloom = 2, + Transmog = 3, + TransmogSetFavorite = 4, + RuneforgeLegendaryAbility = 5, + TransmogIllusion = 6, + } + public enum ItemContext : byte { None = 0, diff --git a/Source/Game/Handlers/AuctionHandler.cs b/Source/Game/Handlers/AuctionHandler.cs index 53af8bc4c..d89034f95 100644 --- a/Source/Game/Handlers/AuctionHandler.cs +++ b/Source/Game/Handlers/AuctionHandler.cs @@ -994,7 +994,7 @@ namespace Game return; AuctionHelloResponse auctionHelloResponse = new(); - auctionHelloResponse.Guid = guid; + auctionHelloResponse.Auctioneer = guid; auctionHelloResponse.OpenForBusiness = true; SendPacket(auctionHelloResponse); } diff --git a/Source/Game/Handlers/CollectionsHandler.cs b/Source/Game/Handlers/CollectionsHandler.cs index 5f8925734..a9f94b34b 100644 --- a/Source/Game/Handlers/CollectionsHandler.cs +++ b/Source/Game/Handlers/CollectionsHandler.cs @@ -14,10 +14,10 @@ namespace Game { switch (collectionItemSetFavorite.Type) { - case CollectionType.Toybox: + case ItemCollectionType.Toy: GetCollectionMgr().ToySetFavorite(collectionItemSetFavorite.Id, collectionItemSetFavorite.IsFavorite); break; - case CollectionType.Appearance: + case ItemCollectionType.Transmog: { var pair = GetCollectionMgr().HasItemAppearance(collectionItemSetFavorite.Id); if (!pair.Item1 || pair.Item2) @@ -26,7 +26,7 @@ namespace Game GetCollectionMgr().SetAppearanceIsFavorite(collectionItemSetFavorite.Id, collectionItemSetFavorite.IsFavorite); break; } - case CollectionType.TransmogSet: + case ItemCollectionType.TransmogSetFavorite: break; default: break; diff --git a/Source/Game/Handlers/SocialHandler.cs b/Source/Game/Handlers/SocialHandler.cs index f18d0792c..bdc71a438 100644 --- a/Source/Game/Handlers/SocialHandler.cs +++ b/Source/Game/Handlers/SocialHandler.cs @@ -52,7 +52,7 @@ namespace Game uint gmLevelInWhoList = WorldConfig.GetUIntValue(WorldCfg.GmLevelInWhoList); WhoResponsePkt response = new(); - response.RequestID = whoRequest.RequestID; + response.Token = whoRequest.Token; List whoList = Global.WhoListStorageMgr.GetWhoList(); foreach (WhoListPlayerInfo target in whoList) diff --git a/Source/Game/Networking/Packets/AuctionHousePackets.cs b/Source/Game/Networking/Packets/AuctionHousePackets.cs index 9acc0997d..9ee03f6fa 100644 --- a/Source/Game/Networking/Packets/AuctionHousePackets.cs +++ b/Source/Game/Networking/Packets/AuctionHousePackets.cs @@ -512,18 +512,18 @@ namespace Game.Networking.Packets class AuctionHelloResponse : ServerPacket { - public ObjectGuid Guid; - public uint PurchasedItemDeliveryDelay; - public uint CancelledItemDeliveryDelay; + public ObjectGuid Auctioneer; + public uint PurchaseDeliveryDelay; + public uint CancelDeliveryDelay; public bool OpenForBusiness = true; public AuctionHelloResponse() : base(ServerOpcodes.AuctionHelloResponse) { } public override void Write() { - _worldPacket.WritePackedGuid(Guid); - _worldPacket.WriteUInt32(PurchasedItemDeliveryDelay); - _worldPacket.WriteUInt32(CancelledItemDeliveryDelay); + _worldPacket.WritePackedGuid(Auctioneer); + _worldPacket.WriteUInt32(PurchaseDeliveryDelay); + _worldPacket.WriteUInt32(CancelDeliveryDelay); _worldPacket.WriteBit(OpenForBusiness); _worldPacket.FlushBits(); } diff --git a/Source/Game/Networking/Packets/BattleGroundPackets.cs b/Source/Game/Networking/Packets/BattleGroundPackets.cs index 5e3face1e..943008ddc 100644 --- a/Source/Game/Networking/Packets/BattleGroundPackets.cs +++ b/Source/Game/Networking/Packets/BattleGroundPackets.cs @@ -2,7 +2,6 @@ // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. using Framework.Constants; -using Framework.Dynamic; using Game.Entities; using System; using System.Collections.Generic; @@ -147,6 +146,7 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(StartTimer); _worldPacket.WriteBit(ArenaFaction != 0); _worldPacket.WriteBit(LeftEarly); + _worldPacket.WriteBit(Brawl); _worldPacket.FlushBits(); } @@ -154,6 +154,7 @@ namespace Game.Networking.Packets public uint ShutdownTimer; public byte ArenaFaction; public bool LeftEarly; + public bool Brawl; public uint StartTimer; public uint Mapid; } diff --git a/Source/Game/Networking/Packets/CollectionPackets.cs b/Source/Game/Networking/Packets/CollectionPackets.cs index afbac4c8f..da88a4ac1 100644 --- a/Source/Game/Networking/Packets/CollectionPackets.cs +++ b/Source/Game/Networking/Packets/CollectionPackets.cs @@ -1,29 +1,23 @@ // Copyright (c) CypherCore All rights reserved. // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. +using Framework.Constants; + namespace Game.Networking.Packets { - public enum CollectionType - { - None = -1, - Toybox = 1, - Appearance = 3, - TransmogSet = 4 - } - class CollectionItemSetFavorite : ClientPacket { public CollectionItemSetFavorite(WorldPacket packet) : base(packet) { } public override void Read() { - Type = (CollectionType)_worldPacket.ReadUInt32(); + Type = (ItemCollectionType)_worldPacket.ReadUInt32(); Id = _worldPacket.ReadUInt32(); IsFavorite = _worldPacket.HasBit(); } - public CollectionType Type; + public ItemCollectionType Type; public uint Id; public bool IsFavorite; } -} +} \ No newline at end of file diff --git a/Source/Game/Networking/Packets/MovementPackets.cs b/Source/Game/Networking/Packets/MovementPackets.cs index ea3f68d2b..064028eab 100644 --- a/Source/Game/Networking/Packets/MovementPackets.cs +++ b/Source/Game/Networking/Packets/MovementPackets.cs @@ -608,6 +608,8 @@ namespace Game.Networking.Packets _worldPacket.WriteXYZ(OldMapPosition); _worldPacket.WriteBit(Ship.HasValue); _worldPacket.WriteBit(TransferSpellID.HasValue); + _worldPacket.FlushBits(); + if (Ship.HasValue) { _worldPacket.WriteUInt32(Ship.Value.Id); @@ -616,8 +618,6 @@ namespace Game.Networking.Packets if (TransferSpellID.HasValue) _worldPacket.WriteInt32(TransferSpellID.Value); - - _worldPacket.FlushBits(); } public int MapID = -1; @@ -1225,7 +1225,7 @@ namespace Game.Networking.Packets public float InitVertSpeed; } - public class SpeedRange + public class StateChangeRangeInfo { public float Min; public float Max; @@ -1244,7 +1244,7 @@ namespace Game.Networking.Packets data.WriteUInt32((uint)MessageID); data.WriteUInt32(SequenceIndex); data.WriteBit(Speed.HasValue); - data.WriteBit(SpeedRange != null); + data.WriteBit(Range != null); data.WriteBit(KnockBack.HasValue); data.WriteBit(VehicleRecID.HasValue); data.WriteBit(CollisionHeight.HasValue); @@ -1260,10 +1260,10 @@ namespace Game.Networking.Packets if (Speed.HasValue) data.WriteFloat(Speed.Value); - if (SpeedRange != null) + if (Range != null) { - data.WriteFloat(SpeedRange.Min); - data.WriteFloat(SpeedRange.Max); + data.WriteFloat(Range.Min); + data.WriteFloat(Range.Max); } if (KnockBack.HasValue) @@ -1297,7 +1297,7 @@ namespace Game.Networking.Packets public ServerOpcodes MessageID; public uint SequenceIndex; public float? Speed; - public SpeedRange SpeedRange; + public StateChangeRangeInfo Range; public KnockBackInfo? KnockBack; public int? VehicleRecID; public CollisionHeightInfo? CollisionHeight; diff --git a/Source/Game/Networking/Packets/WhoPackets.cs b/Source/Game/Networking/Packets/WhoPackets.cs index f543c5910..0621d4643 100644 --- a/Source/Game/Networking/Packets/WhoPackets.cs +++ b/Source/Game/Networking/Packets/WhoPackets.cs @@ -42,10 +42,10 @@ namespace Game.Networking.Packets public override void Read() { uint areasCount = _worldPacket.ReadBits(4); - IsFromAddOn = _worldPacket.HasBit(); + IsAddon = _worldPacket.HasBit(); Request.Read(_worldPacket); - RequestID = _worldPacket.ReadUInt32(); + Token = _worldPacket.ReadUInt32(); Origin = _worldPacket.ReadUInt8(); for (int i = 0; i < areasCount; ++i) @@ -53,9 +53,9 @@ namespace Game.Networking.Packets } public WhoRequest Request = new(); - public uint RequestID; + public uint Token; public byte Origin; // 1 = Social, 2 = Chat, 3 = Item - public bool IsFromAddOn; + public bool IsAddon; public List Areas= new(); } @@ -65,14 +65,14 @@ namespace Game.Networking.Packets public override void Write() { - _worldPacket.WriteUInt32(RequestID); + _worldPacket.WriteUInt32(Token); _worldPacket.WriteBits(Response.Count, 6); _worldPacket.FlushBits(); Response.ForEach(p => p.Write(_worldPacket)); } - public uint RequestID; + public uint Token; public List Response = new(); }