Core/PacketIO: Implemented splash screen opcodes

Port From (https://github.com/TrinityCore/TrinityCore/commit/14b8d7d8393bb99ef66ec833bf89c3d6ce7683ab)
This commit is contained in:
hondacrx
2021-11-15 22:22:12 -05:00
parent ee8228582b
commit d87e2cd315
5 changed files with 70 additions and 0 deletions
+19
View File
@@ -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)
{