Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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]);
            }
        }