public BroadcastTextEditor(gossip_menu_option o, bool boxText = false) { InitializeComponent(); Util.AssignDefine(language, LegacyToolBox.Data.Language); Util.AssignDefine(emote0, LegacyToolBox.Data.Emotes); Util.AssignDefine(emote1, LegacyToolBox.Data.Emotes); Util.AssignDefine(emote2, LegacyToolBox.Data.Emotes); if (boxText) { _Text = WorldWorker.GetBroadCastText(o.BoxBroadcastTextID); } else { _Text = WorldWorker.GetBroadCastText(o.OptionBroadcastTextID); } if (_Text == null || _Text.ID == 0) { _Text = WorldWorker.CreateNewBroadCastText(); if (boxText) { o.BoxBroadcastTextID = _Text.ID; } else { o.OptionBroadcastTextID = _Text.ID; } } bctGrid.DataContext = _Text; }
private void gossipText7New_Click(object sender, RoutedEventArgs e) { broadcast_text t = WorldWorker.CreateNewBroadCastText(); _bct7 = t; bct7.DataContext = t; _SelectedNpcText.BroadcastTextID7 = t.ID; }