void _wmoSelect_MapLocalWMO_Selected(object sender, Entry entry) { WowDatabase database = Engine.Instance.WowDatabase; string path = database.GetWMOFileName((uint)entry.Id, false); WMOSceneNode node = ModelSceneService.Instance.SetMainWMOSceneNode(path); ModelEditorService.Instance.SetWireFrame(node); //update doodad names _wmoSelect.UpdateDoodadM2Names(node); //update property if (node != null) { ShellService.Instance.PropertyContent.UpdateWmoNode(node); } }
public void FillData() { WMOLocalNames.Clear(); WowDatabase database = Engine.Instance.WowDatabase; for (uint i = 0; i < database.WmoCount; ++i) { WMOLocalNames.Add(new Entry() { Name = database.GetWMOFileName(i, true), Id = (int)i }); } wmoLocalNamesView = CollectionViewSource.GetDefaultView(WMOLocalNames); m2NamesView = CollectionViewSource.GetDefaultView(M2Names); }
private void GetWmoTreeItemFiles(string path, TreeNodeEntry node) { WowEnvironment env = Engine.Instance.WowEnvironment; env.ClearOwnCascFiles(); WowDatabase database = Engine.Instance.WowDatabase; for (uint i = 0; i < database.WmoCount; ++i) { env.AddOwnCascFile(database.GetWMOFileName(i, false)); } env.FinishOwnCascFiles(); TreeViewFiles.Clear(); TreeNodeEntry treeNode = TreeViewEntry.TraverseAllUseOwn(path, "*", node); for (int i = 0; i < treeNode.NodeEntrys.Count; i++) { TreeViewFiles.Add(treeNode.NodeEntrys[i]); } }