Call as
addon.Platform:GetGlyphItemInfo(itemID, classID)
Available directly through addon; no dependency is needed.
What it does
Classify a numeric item as a glyph for the requested class, using guarded native item metadata. Class is optional and defaults to the readable player class. This establishes item classification only, not equipped status or an item-to-glyph-spell ID mapping.
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMPlatform | Rotation Master platform adapter (implicit with colon calls). |
itemID | number | Positive integer glyph item ID stored by the condition; arrays, item-set keys and spell IDs are not item references. |
classID | number | nil | Optional positive class ID; nil queries the current player class under protection. |
Returns
| 1 | table | nil | Readable canonical itemID/classID/subClassID record when the item is a glyph for the requested class; nil for invalid or unavailable metadata. |
|---|---|---|
| 2 | string | nil | Classification, validation or availability reason for a nil result. |
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
- Not available on that edition (the reason is in the tooltip)
- Only while Blizzard's deprecation fallbacks are on
| Game API | |||||
|---|---|---|---|---|---|
UnitClass |
Secret values (Retail and Forever)
On Retail and Forever the game hands addons secret values. This helper checks what it reads (addon.Platform:CanReadValue) and returns nil with a reason such as restricted-value instead of a secret it cannot compare. Treat nil as unavailable, not as false.
How the addon calls it
- Glyph (valid)
return addon.Platform:GetGlyphItemInfo(value.item, unit_class_num) ~= nil
Dependencies
integer→Platform.glyphs.integer
Source
Platform/glyphs.lua, line 26. Read only in game; Duplicate makes an editable copy.
Platform.glyphs.GetGlyphItemInfo(self, itemID, classID)
if not self:CanReadValue(itemID) or not self:CanReadValue(classID) then return nil,'restricted-value' end
if not integer(itemID,1) then return nil,'invalid-item' end
if classID==nil then
if type(UnitClass)~='function' then return nil,'missing-api' end
local ok,tuple=pcall(function() return {UnitClass('player')} end)
if not ok then return nil,'api-error' end
classID=tuple[3]
if not self:CanReadValue(classID) then return nil,'restricted-value' end
if classID==nil then return nil,'class-data-unavailable' end
end
if not integer(classID,1) then return nil,'invalid-class' end
local record,reason=self:GetItemInfoInstant(itemID)
if not record then return nil,reason end
if record.classID~=16 or record.subClassID~=classID then return nil,'invalid-glyph-item' end
return record




