Core/PacketIO: Handle QueryCountdownTimer

* Add it to battleground
* Base implementation countdowns in Group
* Fix timer sync between groups in battlegrounds
Port From (https://github.com/TrinityCore/TrinityCore/commit/6ed8b5c9077aba788ff5bc51f2652109bfea6175)
This commit is contained in:
hondacrx
2024-02-06 15:51:24 -05:00
parent 95c3dd2a66
commit 43db82ae61
6 changed files with 109 additions and 50 deletions
+19 -7
View File
@@ -394,7 +394,7 @@ namespace Game.Networking.Packets
public bool IsTournamentRealm;
public bool XRealmPvpAlert;
public bool BlockExitingLoadingScreen; // when set to true, sending SMSG_UPDATE_OBJECT with CreateObject Self bit = true will not hide loading screen
// instead it will be done after this packet is sent again with false in this bit and SMSG_UPDATE_OBJECT Values for player
// instead it will be done after this packet is sent again with false in this bit and SMSG_UPDATE_OBJECT Values for player
public uint? RestrictedAccountMaxLevel;
public ulong? RestrictedAccountMaxMoney;
public uint? InstanceGroupSize;
@@ -797,7 +797,7 @@ namespace Game.Networking.Packets
public EnableBarberShop() : base(ServerOpcodes.EnableBarberShop) { }
public override void Write()
public override void Write()
{
_worldPacket.WriteUInt8(CustomizationScope);
}
@@ -1156,9 +1156,9 @@ namespace Game.Networking.Packets
Enable = _worldPacket.HasBit();
}
public bool Enable;
public bool Enable;
}
class AccountHeirloomUpdate : ServerPacket
{
public AccountHeirloomUpdate() : base(ServerOpcodes.AccountHeirloomUpdate, ConnectionType.Instance) { }
@@ -1277,7 +1277,19 @@ namespace Game.Networking.Packets
public long TotalTime;
public long TimeLeft;
public TimerType Type;
public CountdownTimerType Type;
}
class QueryCountdownTimer : ClientPacket
{
public CountdownTimerType TimerType;
public QueryCountdownTimer(WorldPacket packet) : base(packet) { }
public override void Read()
{
TimerType = (CountdownTimerType)_worldPacket.ReadInt32();
}
}
class ConversationLineStarted : ClientPacket
@@ -1357,7 +1369,7 @@ namespace Game.Networking.Packets
_worldPacket.FlushBits();
}
}
class DisplayGameError : ServerPacket
{
public DisplayGameError(GameError error) : base(ServerOpcodes.DisplayGameError)
@@ -1441,7 +1453,7 @@ namespace Game.Networking.Packets
public ObjectGuid SourceGuid;
}
//Structs
struct PhaseShiftDataPhase
{