I'm not able to check the list of functions to make sure, but I don't think such a function exists. But you could mimic such a function pretty easily.Paraphrased code:
Local styles ={}
for I=1, getnumstyles() do
Styles[getItemLinkItemId(getstyleitemlink(I))] = getStyle(I)
End
Function getitemlinkstyle(link)
Return styles [getItemLinkItemId]
End
I'm not able to check the list of functions to make sure, but I don't think such a function exists. But you could mimic such a function pretty easily.Paraphrased code:
Local styles ={}
for I=1, getnumstyles() do
Styles[getItemLinkItemId(getstyleitemlink(I))] = getStyle(I)
End
Function getitemlinkstyle(link)
Return styles [getItemLinkItemId]
End
Thanks! Thats the missing piece to finish my tooptips
Crafty.myStyles = {}
function Crafty.BuildStyleTable()
Crafty.DB("Crafty: BuildStyleTable")
for i=1, GetNumValidItemStyles() do
Crafty.myStyles[i] = GetItemStyleName(i)
end
end
function Crafty.ReturnStyle(arg)
Crafty.DB("Crafty: ReturnStyle")
return Crafty.myStyles[arg]
end
local icon,sellPrice,meetsUsageRequirement,equipType,itemStyleId = GetItemLinkInfo(itemLink)
Crafty.DB(Crafty.ReturnStyle(itemStyleId))