Esempio n. 1
0
        string GetName()
        {
            string _name     = null;
            uint   stringPtr = 0;

            switch (toolType)
            {
            case ToolType.SpellFocus:
                WoWDb.DbTable t = StyxWoW.Db[Styx.Patchables.ClientDb.SpellFocusObject];
                WoWDb.Row     r = t.GetRow(index);
                stringPtr = r.GetField <uint>(1);
                break;

            case ToolType.AreaTable:
                t         = StyxWoW.Db[Styx.Patchables.ClientDb.AreaTable];
                r         = t.GetRow(index);
                stringPtr = r.GetField <uint>(11);
                break;

            case ToolType.Item:
                _name = TradeSkillFrame.GetItemCacheName(index);
                break;

            case ToolType.Totem:
                t         = StyxWoW.Db[Styx.Patchables.ClientDb.TotemCategory];
                r         = t.GetRow(index);
                stringPtr = r.GetField <uint>(1);
                break;
            }
            if (stringPtr != 0)
            {
                _name = ObjectManager.Wow.Read <string>(stringPtr);
            }
            return(_name);
        }
Esempio n. 2
0
        string GetName()
        {
            string _name = TradeSkillFrame.GetItemCacheName(parent.ID);

            if (_name == null)
            {
                // ok so it couldn't find the item in cache. since we're going to need to force a load
                // might as well do a framelock and try load all the items.
                IEnumerable <uint> ids = parent.masterList.Keys.Where(id => id != parent.ID);

                using (new FrameLock())
                {
                    foreach (var id in ids)
                    {
                        name = TradeSkillFrame.GetItemCacheName(id);
                    }
                }
            }
            return(_name);
        }