Core/PacketIO: Implemented splash screen opcodes
Port From (https://github.com/TrinityCore/TrinityCore/commit/14b8d7d8393bb99ef66ec833bf89c3d6ce7683ab)
This commit is contained in:
@@ -464,6 +464,25 @@ namespace Game
|
||||
Global.ScriptMgr.OnConversationLineStarted(convo, conversationLineStarted.LineID, _player);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.RequestLatestSplashScreen)]
|
||||
void HandleRequestLatestSplashScreen(RequestLatestSplashScreen requestLatestSplashScreen)
|
||||
{
|
||||
UISplashScreenRecord splashScreen = null;
|
||||
foreach (var itr in CliDB.UISplashScreenStorage.Values)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(itr.CharLevelConditionID);
|
||||
if (playerCondition != null)
|
||||
if (!ConditionManager.IsPlayerMeetingCondition(_player, playerCondition))
|
||||
continue;
|
||||
|
||||
splashScreen = itr;
|
||||
}
|
||||
|
||||
SplashScreenShowLatest splashScreenShowLatest = new();
|
||||
splashScreenShowLatest.UISplashScreenID = splashScreen != null ? splashScreen.Id : 0;
|
||||
SendPacket(splashScreenShowLatest);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.ChatUnregisterAllAddonPrefixes)]
|
||||
void HandleUnregisterAllAddonPrefixes(ChatUnregisterAllAddonPrefixes packet)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user