Reference › Function reference › Conditions

Conditions.talent.traitShape

dependency

Call as

Conditions.talent.traitShape(value)

Record the dependency Conditions.talent.traitShape, 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

True when value.layout is "traits", meaning the TALENT condition names a trait node.

Arguments

NameTypeWhat it does
valuetableSaved TALENT condition settings.

Returns

1booleanTrue when the value passes the check.

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

  • Talent (evaluate)
    if traitShape(value) then
  • Conditions.talent.info
    if traitShape(value) then return integer(value.node,1,2147483647) and platform:GetTraitTalentIdentity(value.node,value.entry,value.spell) or nil end
  • Conditions.talent.traitsWidget
    if not traitShape(value) and (value.tree~=nil or value.value~=nil) then

Source

Conditions/talent.lua, line 74. Read only in game; Duplicate makes an editable copy.

Conditions.talent.traitShape(value)
 return value.layout=="traits"

Back to Function reference