Call as
Conditions.misc.difficultyKind(group)
Record the dependency Conditions.misc.difficultyKind, 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
Names the kind of group a difficulty is for, from the group GetDifficultyInfo reports.
Arguments
| Name | Type | What it does |
|---|---|---|
group | string | nil | The group of a difficulty: "party", "raid" or "scenario". |
Returns
| 1 | string | nil | The localized word Dungeon, Raid or Scenario; nil for any other group. |
|---|
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
Conditions.misc.difficultyNamelocal kind = addon.Platform:CanReadValue(group) and difficultyKind(group)
Source
Conditions/misc.lua, line 286. Read only in game; Duplicate makes an editable copy.
Conditions.misc.difficultyKind(group)
if group == "party" then return L["Dungeon"] end
if group == "raid" then return L["Raid"] end
if group == "scenario" then return L["Scenario"] end