mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Implemented splash screen opcodes
This commit is contained in:
@@ -1171,3 +1171,20 @@ void WorldSession::HandleConversationLineStarted(WorldPackets::Misc::Conversatio
|
||||
if (Conversation* convo = ObjectAccessor::GetConversation(*_player, conversationLineStarted.ConversationGUID))
|
||||
sScriptMgr->OnConversationLineStarted(convo, conversationLineStarted.LineID, _player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRequestLatestSplashScreen(WorldPackets::Misc::RequestLatestSplashScreen& /*requestLatestSplashScreen*/)
|
||||
{
|
||||
UISplashScreenEntry const* splashScreen = nullptr;
|
||||
for (auto itr = sUISplashScreenStore.begin(); itr != sUISplashScreenStore.end(); ++itr)
|
||||
{
|
||||
if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(itr->CharLevelConditionID))
|
||||
if (!ConditionMgr::IsPlayerMeetingCondition(_player, playerCondition))
|
||||
continue;
|
||||
|
||||
splashScreen = *itr;
|
||||
}
|
||||
|
||||
WorldPackets::Misc::SplashScreenShowLatest splashScreenShowLatest;
|
||||
splashScreenShowLatest.UISplashScreenID = splashScreen ? splashScreen->ID : 0;
|
||||
SendPacket(splashScreenShowLatest.Write());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user