View Single Post
09-24-10, 05:53 PM   #16
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I like the idea. Would be only possible if a table with all displayIDs for that type is in the background. Otherwise the calculation of the pages would be impossible.

Just checked. I think have an even easier solution. What I did is
Code:
    print(displayid..": "..self:GetModel())
Now what's interesting is the string that is returned from getmodel. It contains the complete path to the model used for the skin. The path could be splitted into pieces. My suggestion is to get rid of the navigation depth and just use every single foldername as a tag.

Example for displayid: 17120
Character\Human\female\humanfemale.m2

This would basically would add sth like this to the savedvariables:

Code:
[tags] = {
  [character] = {
    "17210" = true,
  },
  [human] = {
    "17210" = true,
  },
  [female] = {
    "17210" = true,
  },

}
Sth like that. Later I create a temporary table based on selected tags.

If you would like to generate that list feel free to do so. I will edit the viewer once that is in place. Maybe it's even possible to gather all data, save it to a temp table aswell and when that is done calculate all the tags and save stuff to the savedvariable.



Code for the addon would be sth like this:

for i=1; i<40000 do
local self = mymodel --etc...
self:SetModel("Interface\\Buttons\\talktomequestionmark.mdx") --in case setdisplayinfo fails
self:SetDisplayInfo(i)
--print(id..": "..self:GetModel())
--do stuff
end
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 09-24-10 at 06:45 PM.
  Reply With Quote