參考資料

函式參考

內建輔助函式

遊戲中「函式」分頁列為內建的輔助函式。公用輔助函式直接以名稱呼叫;其他輔助函式需繫結為相依項目(選擇自動完成項目,或在「相依項目」中新增),再以其完整名稱呼叫。

240 個輔助函式中的 82 個。 清除篩選

Conditions.bossmod.encounterNote 相依項目Builds the status line the boss-mod condition editors show about the current encounter.
Conditions.bossmod.idEditor 相依項目Builds a full-width edit box for an optional boss-mod ID (such as the encounter ID) and adds it to parent.
Conditions.bossmod.note 相依項目Adds a full-width text label to a boss-mod condition editor; used for the encounter and timer status lines.
Conditions.bossmod.timerNote 相依項目Builds the status line the boss-mod condition editors show about running boss-mod timers.
Conditions.bossmod.validCompare 相依項目Validation check for a boss-mod condition's comparison: true when value.operator is one of addon.operators and value.value is a finite number of zero or more.
Conditions.bossmod.validID 相依項目True when value is a positive whole number below 2^31, the accepted shape of a saved boss-mod encounter or spell ID.
Conditions.build.imbueObservation 相依項目Reads the temporary enchant ID on the main hand, or the off hand when value.offhand is set, for the WEAPON_IMBUE condition.
Conditions.build.setLabel 相依項目Formats an item set ID for the SET_PIECES description: the set name with its ID when addon:GetItemSetName knows it, otherwise "item set N".
Conditions.build.wholeNumber 相依項目True when value is a positive, finite whole number; SET_PIECES uses it to validate the saved item set ID.
Conditions.common.Widget_GetSpellId 公用解析條件中儲存的法術識別碼。啟用精確等級時會保留所提供的 ID;否則在有等級的經典版用戶端上,會透過法術目錄解析目前已知的等級。無法完成解析時傳回 nil 與可用性原因。
Conditions.common.Widget_SpellWidget 公用為自訂條件元件建立一個帶有建議、驗證與法術連結支援的法術輸入框。更新回呼負責儲存所選的值;將傳回的元件新增到回呼的父層。
Conditions.common.Widget_UnitWidget 公用建立一個綁定到條件值記錄的已設定單位選擇器。傳回該元件,由呼叫端將其新增到條件回呼的父層。
Conditions.edition_state.eclipseMeasures 相依項目Lists the two measures of the Eclipse condition with their editor labels.
Conditions.edition_state.validCompare 相依項目Checks that a condition value carries a known comparison operator and a finite, non-negative number to compare against.
Conditions.encounter_state.validCompare 相依項目Checks that a condition value carries a known comparison operator and a finite, non-negative number to compare against.
Conditions.encounter_state.validNumber 相依項目Checks that a value is a finite number of zero or more (not NaN, not infinite).
Conditions.engraving.identifier 相依項目True when value is a positive whole number below 2^31; RUNE_ENGRAVED uses it to validate a saved rune ID.
Conditions.engraving.runeLabel 相依項目Names the rune selected in a RUNE_ENGRAVED condition: the known rune's name when the platform finds it, else the rune spell's name, else "rune spell N" or "rune N".
Conditions.equipment.matches 相依項目Tests one equipment slot record against a WEAPON_TYPE condition: empty slot, shield, any weapon, holdable, one-hand, two-hand, ranged, or a specific weapon subclass.
Conditions.equipment.subclassID 相依項目True when value is a whole number from 0 to 31, the range of weapon subclass IDs WEAPON_TYPE accepts.
Conditions.equipment.subclassName 相依項目Names a weapon subclass for WEAPON_TYPE descriptions, using the client's GetItemSubClassInfo when it returns a readable name, else the addon's built-in name, else "weapon type N".
Conditions.group_state.measureNames 相依項目Lists what the Group Count condition can count, with the editor label of each.
Conditions.group_state.validCompare 相依項目Checks that a Group Count value carries a known operator and a finite, non-negative number, which is at most 100 when the count is a percent of the group.
Conditions.hero_talent.listedSpec 相依項目Returns the specialization ID when it is one of the player's own class's specializations, which are the only ones whose hero talent trees the game can list.
Conditions.hero_talent.treeName 相依項目Names a hero talent tree: the game's own name for it when Platform:GetHeroTreeName can read one, else "hero talent tree" followed by the ID.
Conditions.hero_talent.validTree 相依項目Checks that a value can be a hero talent tree ID: a positive whole number below 2^31.
Conditions.item.get_item_desc 相依項目Describes an item reference for the item condition descriptions: an item set name (white for a profile set, cyan for a global one), or the first item's link or name followed by how many others are listed.
Conditions.item.itemHelp 相依項目Adds the item condition editors' help text to frame: the shared item widget help, a gap, and a note on how item sets, bag counts and restricted observations are evaluated.
Conditions.known_spell.validID 相依項目True when value is a positive, finite whole number; SPELL_KNOWN uses it to validate the saved spell ID.
Conditions.misc.difficultyKind 相依項目Names the kind of group a difficulty is for, from the group GetDifficultyInfo reports.
Conditions.misc.difficultyName 相依項目The display name of an instance difficulty ID: the game's name for it (GetDifficultyInfo) with the kind of group in parentheses when the game gives one.
Conditions.misc.validWhole 相依項目Checks that a value can be a difficulty or instance ID: a whole number from 0 up to 2^31.
Conditions.player_state.stateNames 相依項目Lists the states the Player State condition offers, with the editor label of each.
Conditions.player_state.statePhrase 相依項目The readable sentence for one Player State, such as "you are mounted", worded so a Not flips it to "you are not mounted".
Conditions.raid_marks.markListText 相依項目Formats a valid list of markers in priority order.
Conditions.raid_marks.markName 相依項目Returns the game's localized name for a raid marker, falling back to its English name.
Conditions.raid_marks.modeNames 相依項目Returns the localized labels for the any, none and selected-mark modes.
Conditions.raid_marks.validMark 相依項目Checks a saved marker mode or a comma-separated list of distinct marker names.
Conditions.spatial_stats.aggregate 相依項目Reduces the per-unit readings a PROXIMITY_* condition collected to one statistic: their average, minimum or maximum.
Conditions.spatial_stats.observation 相依項目Reads one health or mana number for a PROXIMITY_* condition through the evaluation cache, protected against errors.
Conditions.spatial_stats.statistic 相依項目Reads one unit's health or mana for the PROXIMITY_* conditions as an absolute value, a percentage of the maximum, or the deficit below the maximum.
Conditions.spatial.booleanRead 相依項目Calls a yes/no game API through the evaluation cache, protected against errors, for the distance conditions.
Conditions.spatial.combatFilter 相依項目Applies the In Combat option of Distance Count to one unit: with the option off every unit passes, with it on the unit must be in combat (UnitAffectingCombat).
Conditions.spatial.finite 相依項目True when value is a number that is neither NaN nor infinite.
Conditions.spatial.nameplateDistanceCount 相依項目Counts units for DISTANCE_COUNT from a nameplate unit snapshot: units that exist, whose hostility matches value.enemy, and that are definitely within value.distance yards.
Conditions.spatial.protectedRead 相依項目來自 Conditions/spatial.lua 的內建輔助函式。
Conditions.spatial.rangeMember 相依項目Decides whether unit is within distance yards from the platform's cached range-check bounds: true when the maximum bound is at or inside distance, false when the minimum bound is beyond it (or equals a nonzero distance), otherwise unavailable.
Conditions.spatial.rcf 相依項目Returns the LibRangeCheck-3.0 range estimate for a unit as minimum and maximum yards.
Conditions.specialization.classChoices 相依項目Builds the specialization choices for one class in the SPECIALIZATION editor.
Conditions.specialization.playerClass 相依項目Returns the player's class file token (such as "MAGE") from UnitClass, or nil when the call fails or the value is restricted.
Conditions.specialization.specClass 相依項目Looks up which class a specialization ID belongs to, from the built-in specialization table or else the platform's specialization display data.
Conditions.specialization.specID 相依項目True when value is a positive, finite whole number, the accepted shape of a saved specialization ID.
Conditions.specialization.specName 相依項目Names a specialization for SPECIALIZATION descriptions: the platform's display name and icon, else the built-in localized name, else "specialization N".
Conditions.talent.block 相依項目Adds a full-width group laid out as icon rows (the icon on the left, the picker rows beside it) to a condition widget.
Conditions.talent.classSpecs 相依項目Lists the specializations of the player's class for the Talent condition's Specialization picker, so a rotation can pick the talents of a specialization other than the one being played.
Conditions.talent.dropdown 相依項目Creates a full-width condition dropdown labeled title for the talent condition editors, forwards each selection to changed, and adds it to parent.
Conditions.talent.gridWidget 相依項目Builds the TALENT editor controls for the tier-and-column grid talent layout: a talent icon and a dropdown of the client's grid talents (up to 18).
Conditions.talent.group 相依項目Returns the talent group to query for spec: spec itself on progression clients when it is a whole number from 1 to 4, otherwise nil so the platform uses its default group.
Conditions.talent.groupLabel 相依項目The heading above one group of talents in the Retail and Forever talent list: class talents, specialization talents, both, one hero tree, or a plain name.
Conditions.talent.icon 相依項目Creates the 44-pixel talent icon for the TALENT editors, showing the referenced talent's icon and, on hover, its spell tooltip (or its name), and adds it to parent.
Conditions.talent.info 相依項目Looks up the talent a TALENT condition refers to, according to its layout: a trait node and entry, a grid index, or a tree and talent index.
Conditions.talent.integer 相依項目True when value is a whole number between minimum and maximum, inclusive.
Conditions.talent.legacySlot 相依項目True when a TALENT condition still uses the historical single-number layout: no layout, tree or talent field, and value.value a whole number from 1 to 21.
Conditions.talent.ownTrees 相依項目Whether the talent trees shown are the player's own class's, so the game can name them, rather than another class's trees from the addon's shipped list.
Conditions.talent.text 相依項目Adds a full-width explanatory label to a talent condition editor.
Conditions.talent.traitFamily 相依項目True when the client uses trait talents, that is the retail or forever client families.
Conditions.talent.traitShape 相依項目True when value.layout is "traits", meaning the TALENT condition names a trait node.
Conditions.talent.traitsWidget 相依項目Builds the TALENT editor controls for trait talents: a talent tree dropdown when there are several, a talent dropdown, Talent Node ID and Choice Entry ID edit boxes, and a Rank comparison.
Conditions.talent.treeExists 相依項目Checks that a talent condition's tree index exists on this client, using the cached platform talent tree count.
Conditions.talent.treeName 相依項目Names the talent tree in a talent tree condition's description: the client's tree name, else "Talent tree N", else "<talent tree>" when no tree is set.
Conditions.talent.treePicker 相依項目Builds the Talent tree dropdown for the TALENT_TREE_POINTS and PRIMARY_TALENT_TREE editors, listing the client's talent trees, storing the selection in value.tree and calling update.
Conditions.talent.treeShape 相依項目True when a TALENT condition uses the tree layout (layout nil or "tree") with both tree and talent set.
Conditions.talent.treeWidget 相依項目Builds the TALENT editor controls for Classic talent trees: a tree dropdown, a talent icon, a talent dropdown for the chosen tree, and a Points comparison.
Conditions.totem.amount 相依項目True when a totem condition's comparison is usable: value.value is a nonnegative finite number and value.operator is one of addon.operators.
Conditions.totem.element 相依項目True when value.spell is a valid spell ID of 4 or less, meaning the condition names a totem element slot rather than a totem spell.
Conditions.totem.findSpecific 相依項目Searches the totem slots for an active totem matching value.spell, by spell ID or name (only the exact spell ID when value.ranked is set).
Conditions.totem.observe 相依項目Calls a totem platform method through the evaluation cache, passing the platform as its self argument.
Conditions.totem.remaining 相依項目Seconds left on a totem slot record at time start (or now): zero when the totem is inactive, and never negative.
Conditions.totem.specific 相依項目True when a totem spell condition names a valid spell ID and value.ranked is nil or a boolean.
Conditions.weapon.enchantObservation 相依項目Reads whether the main hand, or the off hand when value.offhand is set, has a temporary weapon enchant for the weapon conditions, with its expiration and charges.
Conditions.weapon.numericObservation 相依項目Accepts a readable, nonnegative, finite number from a weapon observation and returns it unchanged; anything else becomes nil with a reason.
Conditions.weapon.swingSpeed 相依項目Reads the player's main-hand, or off-hand when value.offhand is set, attack speed from the cached UnitAttackSpeed for the swing timer conditions.