mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Packets: Added SMSG_TUTORIAL_FLAGS
This commit is contained in:
@@ -41,3 +41,11 @@ WorldPacket const* WorldPackets::Misc::UITime::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::TutorialFlags::Write()
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
||||
_worldPacket << TutorialData[i];
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,16 @@ namespace WorldPackets
|
||||
|
||||
uint32 Time = 0;
|
||||
};
|
||||
|
||||
class TutorialFlags : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TutorialFlags() : ServerPacket(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 32) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 TutorialData[8];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "BattlenetServerManager.h"
|
||||
#include "CharacterPackets.h"
|
||||
#include "ClientConfigPackets.h"
|
||||
#include "MiscPackets.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -767,10 +768,9 @@ void WorldSession::LoadTutorialsData()
|
||||
|
||||
void WorldSession::SendTutorialsData()
|
||||
{
|
||||
WorldPacket data(SMSG_TUTORIAL_FLAGS, 4 * MAX_ACCOUNT_TUTORIAL_VALUES);
|
||||
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
||||
data << m_Tutorials[i];
|
||||
SendPacket(&data);
|
||||
WorldPackets::Misc::TutorialFlags packet;
|
||||
memcpy(packet.TutorialData, m_Tutorials, sizeof(packet.TutorialData));
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
|
||||
void WorldSession::SaveTutorialsData(SQLTransaction &trans)
|
||||
|
||||
Reference in New Issue
Block a user