From 3006212c5a9d9a5388d70f4590276167d8f59b3b Mon Sep 17 00:00:00 2001 From: RioMcBoo <26213257+RioMcBoo@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:56:14 +0200 Subject: [PATCH] Core/PacketIO: Fix some inconsistencies with TC (#61) Co-authored-by: RioMcBoo --- .../Game/Networking/Packets/AuctionHousePackets.cs | 4 ++-- .../Game/Networking/Packets/BattleGroundPackets.cs | 8 ++++---- Source/Game/Networking/Packets/GarrisonPackets.cs | 12 ++++++------ Source/Game/Networking/Packets/MiscPackets.cs | 8 ++++---- Source/Game/Networking/Packets/PartyPackets.cs | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Source/Game/Networking/Packets/AuctionHousePackets.cs b/Source/Game/Networking/Packets/AuctionHousePackets.cs index 718ec2411..1190e969d 100644 --- a/Source/Game/Networking/Packets/AuctionHousePackets.cs +++ b/Source/Game/Networking/Packets/AuctionHousePackets.cs @@ -489,7 +489,7 @@ namespace Game.Networking.Packets { public ulong? TotalPrice; public uint? Quantity; - public int? QuoteDuration; + public long? QuoteDuration; public int ItemID; public uint DesiredDelay; @@ -510,7 +510,7 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(Quantity.Value); if (QuoteDuration.HasValue) - _worldPacket.WriteInt32(QuoteDuration.Value); + _worldPacket.WriteInt64(QuoteDuration.Value); } } diff --git a/Source/Game/Networking/Packets/BattleGroundPackets.cs b/Source/Game/Networking/Packets/BattleGroundPackets.cs index b0faafcb7..a3b0d7fc5 100644 --- a/Source/Game/Networking/Packets/BattleGroundPackets.cs +++ b/Source/Game/Networking/Packets/BattleGroundPackets.cs @@ -473,7 +473,7 @@ namespace Game.Networking.Packets _worldPacket.WriteUInt32(MapID); _worldPacket.WriteUInt8((byte)State); _worldPacket.WriteInt64(StartTime); - _worldPacket.WriteInt32(Duration); + _worldPacket.WriteInt64(Duration); _worldPacket.WriteUInt8(ArenaFaction); _worldPacket.WriteUInt32(BattlemasterListID); _worldPacket.WriteBit(Registered); @@ -488,7 +488,7 @@ namespace Game.Networking.Packets public uint MapID; public PVPMatchState State = PVPMatchState.Inactive; public long StartTime; - public int Duration; + public long Duration; public RatedMatchDeserterPenalty DeserterPenalty; public byte ArenaFaction; public uint BattlemasterListID; @@ -518,7 +518,7 @@ namespace Game.Networking.Packets public override void Write() { _worldPacket.WriteUInt8(Winner); - _worldPacket.WriteInt32(Duration); + _worldPacket.WriteInt64(Duration); _worldPacket.WriteBit(LogData != null); _worldPacket.WriteBits(SoloShuffleStatus, 2); _worldPacket.FlushBits(); @@ -528,7 +528,7 @@ namespace Game.Networking.Packets } public byte Winner; - public int Duration; + public long Duration; public PVPMatchStatistics LogData; public uint SoloShuffleStatus; } diff --git a/Source/Game/Networking/Packets/GarrisonPackets.cs b/Source/Game/Networking/Packets/GarrisonPackets.cs index 75ed836e1..fe8c054ab 100644 --- a/Source/Game/Networking/Packets/GarrisonPackets.cs +++ b/Source/Game/Networking/Packets/GarrisonPackets.cs @@ -444,10 +444,10 @@ namespace Game.Networking.Packets public ulong DbID; public int MissionRecID; public long OfferTime; - public uint OfferDuration; + public long OfferDuration; public long StartTime = 2288912640; - public uint TravelDuration; - public uint MissionDuration; + public long TravelDuration; + public long MissionDuration; public int MissionState = 0; public int SuccessChance = 0; public uint Flags = 0; @@ -462,10 +462,10 @@ namespace Game.Networking.Packets data.WriteUInt64(DbID); data.WriteInt32(MissionRecID); data.WriteInt64(OfferTime); - data.WriteUInt32(OfferDuration); + data.WriteInt64(OfferDuration); data.WriteInt64(StartTime); - data.WriteUInt32(TravelDuration); - data.WriteUInt32(MissionDuration); + data.WriteInt64(TravelDuration); + data.WriteInt64(MissionDuration); data.WriteInt32(MissionState); data.WriteInt32(SuccessChance); data.WriteUInt32(Flags); diff --git a/Source/Game/Networking/Packets/MiscPackets.cs b/Source/Game/Networking/Packets/MiscPackets.cs index 9bb99776a..4cab6c7e5 100644 --- a/Source/Game/Networking/Packets/MiscPackets.cs +++ b/Source/Game/Networking/Packets/MiscPackets.cs @@ -1265,13 +1265,13 @@ namespace Game.Networking.Packets public override void Write() { - _worldPacket.WriteUInt32(TotalTime); - _worldPacket.WriteUInt32(TimeLeft); + _worldPacket.WriteInt64(TotalTime); + _worldPacket.WriteInt64(TimeLeft); _worldPacket.WriteInt32((int)Type); } - public uint TotalTime; - public uint TimeLeft; + public long TotalTime; + public long TimeLeft; public TimerType Type; } diff --git a/Source/Game/Networking/Packets/PartyPackets.cs b/Source/Game/Networking/Packets/PartyPackets.cs index 9311c1383..dde7fa4bb 100644 --- a/Source/Game/Networking/Packets/PartyPackets.cs +++ b/Source/Game/Networking/Packets/PartyPackets.cs @@ -633,13 +633,13 @@ namespace Game.Networking.Packets _worldPacket.WriteInt8(PartyIndex); _worldPacket.WritePackedGuid(PartyGUID); _worldPacket.WritePackedGuid(InitiatorGUID); - _worldPacket.WriteUInt32(Duration); + _worldPacket.WriteInt64(Duration); } public sbyte PartyIndex; public ObjectGuid PartyGUID; public ObjectGuid InitiatorGUID; - public uint Duration; + public long Duration; } class ReadyCheckResponseClient : ClientPacket