Call as
Conditions.specialization.specClass(id)
Record the dependency Conditions.specialization.specClass, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Looks up which class a specialization ID belongs to, from the built-in specialization table or else the platform's specialization display data.
Arguments
| Name | Type | What it does |
|---|---|---|
id | number | Specialization ID. |
Returns
| 1 | string | nil | Class file token, or nil when the ID is unknown. |
|---|
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.
It reads no game API directly.
How the addon calls it
- Specialization (evaluate)
local wanted = specClass(value.spec)
Dependencies
SPECS(builtin:Conditions/specialization.lua:SPECS)
Source
Conditions/specialization.lua, line 140. Read only in game; Duplicate makes an editable copy.
Conditions.specialization.specClass(id)
local known=SPECS[id]
if known then return known[1] end
local display=addon.Platform.GetSpecializationDisplay and addon.Platform:GetSpecializationDisplay(id)
return display and display.class