I am trying to figure out how to tell if a belt has an ebonsteel belt buckle on it.
i have been using
if itemlink~=nil then
--get enchantid based off item
enchantId = select(3,strsplit(":",itemString))
to check for enchantments, but this does not seem to see the buckle.
There is no way to get an empty additional gem socket, expect YOU wear that item and you do tooltip scanning (which is language depended).
(Tooltip scanning for inspect units does not work, because the tooltip from other units is the same for: belt without 'Ebonsteel Belt Buckle' and belt with 'Ebonsteel Belt Buckle' but no gem in it.)
The only way to detect a 'Ebonsteel Belt Buckle' or similar item enhancements is by checking the added gems.
Reason: The itemID from a waist slot does not change if you add an additional gem socket with 'Ebonsteel Belt Buckle'. The itemID is only changing if such a belt has a gem added to this additional socket. By the way: the same is true for an additional gem socket on hand items (blacksmiths only).
You can compare the default return values from GetItemStats (eg. one EMPTY_SOCKET_BLUE) with default itemID (eg. "item:70545") against the complete itemID (eg.: "item:70544:0:4029:4000:0:0:0:0:85:0") and check the 4 gem slots if there are more gems used as by default possible. If this is the case someone use a 'Ebonsteel Belt Buckle' or a similar item enhancements.
You can a look at CharScanner code http://www.wowace.com/addons/charscanner/. (CharScanner does not explicitly check if there was an addition gem socket applied, because ingame it's not 100% possible to get the profession from inpected chars and therefor it's not possible to detect if some blacksmith has his hands enhanced with an additional gem socket or not - but it's necessary to check for addition gems to know if there are missing gems. anyway...)