Exemple #1
0
 public static void SaveInteractionData()
 {
     if (currentObject.GetType() == typeof(InteractionQuests))
     {
     }
     else if (currentObject.GetType() == typeof(InteractionDialogue))
     {
         text.Visible = false;
         save.Visible = false;
         ((InteractionDialogue)currentObject).displayText = text.Text;
     }
     else if (currentObject.GetType() == typeof(InteractionPath))
     {
         if (pars[0].Text.Length != 0)
         {
             ((InteractionPath)currentObject).pathName = pars[0].Text;
             displayTree.SelectedNode.Text             = pars[0].Text;
         }
         if (nodeBase[displayTree.SelectedNode.Parent].GetType() == typeof(InteractionQuests))
         {
             InteractionQuests que = (InteractionQuests)nodeBase[displayTree.SelectedNode.Parent];
             if (tmpInt != -1)
             {
                 if (que.questTags.Count > tmpInt)
                 {
                     que.questTags[tmpInt] = pars[1].Text;
                 }
                 if (que.questInts.Count > tmpInt)
                 {
                     if (!int.TryParse(pars[2].Text, out int vbs))
                     {
                         vbs = 0;
                     }
                     que.questInts[tmpInt] = vbs;
                 }
             }
         }
     }
     toolButton.DropDown.Items[0].Visible = false;
     toolButton.DropDown.Items[2].Visible = false;
     toolButton.DropDown.Items[3].Visible = false;
     currentObject.ModificationAction();
 }