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:
@@ -464,7 +464,26 @@ namespace Game
|
||||
splashScreenShowLatest.UISplashScreenID = splashScreen != null ? splashScreen.Id : 0;
|
||||
SendPacket(splashScreenShowLatest);
|
||||
}
|
||||
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.QueryCountdownTimer, Processing = PacketProcessing.Inplace)]
|
||||
void HandleQueryCountdownTimer(QueryCountdownTimer queryCountdownTimer)
|
||||
{
|
||||
Group group = _player.GetGroup();
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
CountdownInfo info = group.GetCountdownInfo(queryCountdownTimer.TimerType);
|
||||
if (info == null)
|
||||
return;
|
||||
|
||||
StartTimer startTimer = new();
|
||||
startTimer.Type = queryCountdownTimer.TimerType;
|
||||
startTimer.TimeLeft = info.GetTimeLeft();
|
||||
startTimer.TotalTime = info.GetTotalTime();
|
||||
|
||||
_player.SendPacket(startTimer);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.ChatUnregisterAllAddonPrefixes)]
|
||||
void HandleUnregisterAllAddonPrefixes(ChatUnregisterAllAddonPrefixes packet)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user