public void HandleStoryPanel(ICommandContext context, [Parameter("Story panel entry to send to character.")] uint storyPanelId) { StoryPanelEntry entry = GameTableManager.Instance.StoryPanel.GetEntry(storyPanelId); if (entry == null) { context.SendError($"Invalid story panel entry {storyPanelId}!"); return; } StoryBuilder.Instance.SendStoryPanel(entry, context.GetTargetOrInvoker <Player>()); }
/// <summary> /// Sends a story panel to the <see cref="Player"/> based on the provided <see cref="StoryPanelEntry"/>. /// </summary> public void SendStoryPanel(StoryPanelEntry entry, Player player) { if (entry == null) { throw new ArgumentNullException(nameof(entry)); } var storyMessage = new StoryMessage { MsgId = entry.Id, GeneralVoId = entry.SoundEventId }; storyMessage.AddPlayer(player); player.Session.EnqueueMessageEncrypted(new ServerStoryPanelHide()); player.Session.EnqueueMessageEncrypted(new ServerStoryPanelShow { StoryMessage = storyMessage }); }