public void OnObjectGroupCreated(IScriptObjectGroup group) { try { if (sObjectGroupCreated) { return; } sObjectGroupCreated = true; if (sDelayedSkillBooks.Count > 0) { BooterLogger.AddTrace("OnWorldLoadStarted: " + sDelayedSkillBooks.Count); foreach (XmlDbData bookData in sDelayedSkillBooks) { LoadSkillBookData(bookData, "BookSkill"); } sDelayedSkillBooks.Clear(); Bookstore.mItemDictionary.Clear(); Bookstore.LoadData(); } } catch (Exception exception) { Common.Exception("OnWorldLoadStarted", exception); } }
protected override void PerformFile(BooterHelper.BootFile file) { BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile; if (dataFile == null) { return; } sDelayedSkillBooks.Add(dataFile.Data); BookData.LoadBookData(dataFile.Data, "BookGeneral", BookData.BookType.General); BookData.LoadBookData(dataFile.Data, "BookRecipe", BookData.BookType.Recipe); BookData.LoadBookData(dataFile.Data, "MedicalJournal", BookData.BookType.MedicalJournal); BookData.LoadBookData(dataFile.Data, "SheetMusic", BookData.BookType.SheetMusic); BookData.LoadBookData(dataFile.Data, "BookToddler", BookData.BookType.Toddler); BookData.LoadBookData(dataFile.Data, "BookAlchemyRecipe", BookData.BookType.AlchemyRecipe); LoadWrittenBookTitles(dataFile.Data); LoadWrittenBookMaterials(dataFile.Data); BookData.LoadBookData(dataFile.Data, "BookFish", BookData.BookType.FishBook); XmlDbTable table = dataFile.GetTable("OmniJournal"); if (table != null) { BooterLogger.AddTrace(file.ToString() + ": Found OmniJournal = " + table.Rows.Count.ToString()); int rowIndex = 0; foreach (XmlDbRow row in table.Rows) { new OmniJournalData(row, rowIndex); rowIndex++; } } else { BooterLogger.AddTrace(file.ToString() + ": No OmniJournal"); } Bookstore.mItemDictionary.Clear(); Bookstore.LoadData(); }
public static void ParseBooks() { string text = "BooksSewable"; XmlDbData xmlDbData = XmlDbData.ReadData(text); if (xmlDbData != null && xmlDbData.Tables != null) { sDelayedSkillBooks.Add(xmlDbData); BookData.LoadBookData(xmlDbData, "BookSkill", BookData.BookType.Skill); bool loaded = true; if (loaded) { Bookstore.mItemDictionary.Clear(); Bookstore.LoadData(); } } else { SimpleMessageDialog.Show("[DEBUG] Arsil's CustomBookLoader", "Resource " + text + " of type _XML not found or with no data defined!"); } }