Reference › Function reference › Conditions

Conditions.specialization.specClass

dependency

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

NameTypeWhat it does
idnumberSpecialization ID.

Returns

1string | nilClass 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

Dependencies

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

Back to Function reference