Esempio n. 1
0
        // Handle script reload
        private void comboBox_script_type_SelectedIndexChanged(object sender, EventArgs e)
        {
            // close all editors
            foreach (Form item in MdiChildren)
            {
                if (item is NPCEditor)
                {
                    (item as NPCEditor).Close();
                }
            }

            // creature_ai_scripts
            if (comboBox_script_type.SelectedIndex == 0)
            {
                Datastores.ReloadDB();
            }
            else
            {
                Datastores.LoadDBScripts(Info.ScriptTemplate[comboBox_script_type.SelectedIndex, 1]);
                Datastores.LoadDBScriptTexts();
            }


            UpdateNPCListBox();
        }
Esempio n. 2
0
 private void reloadDatabaseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form item in MdiChildren)
     {
         item.Close();
     }
     creatures.npcList.Clear();
     creatures.npcsAvailable.Clear();
     summons.map.Clear();
     localized_texts.map.Clear();
     Datastores.ReloadDB();
     UpdateNPCListBox();
 }