Esempio n. 1
0
        public void Rebuild__npc_basic()
        {
            string origPath    = Utility.GetFullPath(@"chunk0/common/npc/npc_basic.nbsc");
            string rebuildPath = "rebuild__npc_basic.nbsc";

            NBSC nbsc = new NBSC(origPath);

            nbsc.Save(rebuildPath);

            if (!Utility.CheckFilesAreSame(origPath, rebuildPath))
            {
                Assert.Fail("Hash doesn't match!");
            }
        }
Esempio n. 2
0
        public override void Save(string path)
        {
            // Copy edited item (from vm) into NBSC context
            for (int i = 0; i < _context.Items.Count; i++)
            {
                _context.Items[i] = Items[i].Item;
            }

            try
            {
                _context.Save(path);
            }
            catch (Exception ex)
            {
                Log.Error(ex.Message);
                MessageBox.Show(ex.Message, "Error");
            }
        }