mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
feat(Core/Packets): SMSG_WORLD_STATE_UI_TIMER_UPDATE (#11047)
This commit is contained in:
committed by
GitHub
parent
546c4f8942
commit
66f301bcea
@@ -35,6 +35,7 @@
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "MapMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -1570,9 +1571,9 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
|
||||
// empty opcode
|
||||
LOG_DEBUG("network", "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
|
||||
|
||||
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
|
||||
data << uint32(GameTime::GetGameTime().count());
|
||||
SendPacket(&data);
|
||||
WorldPackets::Misc::UITime response;
|
||||
response.Time = GameTime::GetGameTime().count();
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/)
|
||||
|
||||
@@ -118,3 +118,10 @@ WorldPacket const* WorldPackets::Misc::CrossedInebriationThreshold::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::UITime::Write()
|
||||
{
|
||||
_worldPacket << uint32(Time);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,16 @@ namespace WorldPackets
|
||||
uint32 ItemID = 0;
|
||||
|
||||
};
|
||||
|
||||
class UITime final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
UITime() : ServerPacket(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 Time = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user