Esempio n. 1
0
        public void FillData()
        {
            M2Names.Clear();

            WowDatabase database = Engine.Instance.WowDatabase;

            for (uint i = 0; i < database.WorldModelCount; ++i)
            {
                M2Names.Add(new Entry()
                {
                    Name = database.GetWorldModelName(i, false), Id = (int)i
                });
            }

            m2NamesView = CollectionViewSource.GetDefaultView(M2Names);
        }
Esempio n. 2
0
        public void FillADTData(FileADT fileadt)
        {
            M2Names.Clear();
            for (uint i = 0; i < fileadt.M2Count; ++i)
            {
                M2Names.Add(new Entry()
                {
                    Name = fileadt.GetM2FileName(i, true), Id = (int)i
                });
            }

            WMOLocalNames.Clear();
            for (uint i = 0; i < fileadt.WMOCount; ++i)
            {
                WMOLocalNames.Add(new Entry()
                {
                    Name = fileadt.GetWMOFileName(i, true), Id = (int)i
                });
            }

            m2NamesView       = CollectionViewSource.GetDefaultView(M2Names);
            wmoLocalNamesView = CollectionViewSource.GetDefaultView(WMOLocalNames);
        }
Esempio n. 3
0
        public void UpdateDoodadM2Names(WMOSceneNode node)
        {
            M2Names.Clear();

            if (node == null)
            {
                _m2Grid.Visibility = Visibility.Collapsed;
                return;
            }

            uint num = node.FileWMO.numDoodads;

            for (int i = 0; i < (int)num; ++i)
            {
                string name  = node.GetDoodadName(i);
                bool   bFind = false;
                for (int k = 0; k < M2Names.Count; ++k)
                {
                    if (M2Names[k].Name == name)
                    {
                        bFind = true;
                        break;
                    }
                }

                if (!bFind && name.Length > 0)
                {
                    M2Names.Add(new Entry()
                    {
                        Name = name, Id = (int)i
                    });
                }
            }

            _m2Grid.Visibility = M2Names.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
        }