Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

Patch 10.0.0/API changes

Last wiki revision 2023-06-29

  • The settings interface and its related APIs have undergone significant changes. Refer to the Settings API section for more details.
  • A new set of unit tokens have been added to accommodate automatic soft-targeting.
  • A new set of unit aura APIs have been added and the payload of UNIT_AURA altered to allow more fine-grained tracking and processing of individual aura updates. Refer to the Unit Aura Changes section for more details.
  • The Blizzard_APIDocumentation addon now additionally contains automatically-generated Widget API documentation.
  • LayeredRegion objects such as Textures and FontStrings now all inherit ScriptObject and support a subset of widget scripts such as OnEnter and OnShow.
  • The and APIs are now implemented in native code rather than Lua. This may break addons that were previously inspecting internal fields on timer objects, or those that are passing non-function types as callbacks to these functions.
  • A new UI escape sequence has been added that will render a text string with a named global color.
  • Widget APIs now strictly validate supplied parameters, erroring if invalid values are supplied.
  • Region creation functions such as and will error if supplied invalid draw layer names.
  • Functions such as and will error in cases where nil values are supplied in-place of expected parameters.
  • errors if the argument is not between 0.0 and 1.0.
  • The client will generate additional runtime warnings for unrecognized or unexpected XML attributes and elements.
  • 10.0.0 TOC:
  • Diffs: wow-ui-source, BlizzardInterfaceResources
  • Deprecated API: Blizzard_Deprecated
  • Official patch notes: Dragonflight HUD and UI Revamp

The interface options interface and APIs have changed significantly in 10.0. A small subset of the existing API remains as deprecated functions, along with a set of deprecated XML templates for various options controls.

The new settings API permits registering nestable categories that fit one of two layout archetypes;

  • A "Canvas" layout wherein a frame has full manual control over the placement and behavior of its child widgets. This concept matches what addon authors are already acquainted with through the existing InterfaceOptions_AddCategory API.
  • A "Vertical" layout wherein controls will be automatically positioned and stacked in vertically in a list. The controls can be configured to automatically read and write their values to a destination table.

A minimal example of the "Canvas" layout registration API can be found below. This example will register a custom frame that consists of a single full-size texture within the "AddOns" tab of the Settings interface.

A minimal example of the "Vertical" layout registration API can be found below. This will create three controls - a checkbox, slider, and dropdown - and configure them to automatically read and write their values to a global table named.

The UNIT_AURA event is now capable of delivering information in its payload about which specific auras on a unit have been added, changed, or removed since the last aura update.

Auras now have an "instance ID" which uniquely refers to an instance of an aura for the duration of its lifetime on a unit. The instance ID is expected to remain stable and suitable for use as a table key between successive updates of auras on a unit until a full aura update occurs.

Three new APIs are provided to query information about auras and will return structured tables:

  • C_UnitAuras.GetAuraDataByAuraInstanceID can be used to obtain aura information given a unit token and an aura instance ID.
  • C_UnitAuras.GetAuraDataBySlot can be used as an alternative to UnitAuraBySlot to access aura information by filtered slot indices.
  • C_UnitAuras.GetPlayerAuraBySpellID queries for aura information on the player unit by a given spell ID.

From each of these APIs the returned aura structure is expected to contain the same return values as are obtainable through the existing UnitAura APIs, however note that some field names may not line up with the documented return value names. The returned information will also include the instance ID of the aura.

The below example will demonstrate how the payload from UNIT_AURA can be processed to collect information about the players' auras into a table for both the full-update and incremental-update cases.

Show and Hide events have been streamlined into /Hide, for example:

DeprecatedTemplates.xml OptionsBaseCheckButtonTemplate InterfaceOptionsCheckButtonTemplate InterfaceOptionsBaseCheckButtonTemplate OptionsSliderTemplate OptionsFrameTabButtonTemplate OptionsListButtonTemplate

Replacements HorizontalSliderTemplate -> UISliderTemplate

OptionsBoxTemplate was removed without a direct replacement, a Lua fix could be similar to this:

- arg 3: <font color="#ff6767">scriptCVar - arg 4: <font color="#ff6767">scriptCVar ,, + arg 1: <font color="#00b400">optionID - arg 1: <font color="#ff6767">index + ret 1: <font color="#00b400">itemGUID - ret 1: <font color="#ff6767">itemGuid # ret 2: <font color="#ecbc2a">description, Type: string -> table , + ret 13: <font color="#00b400">isForDragonriding + arg 3: <font color="#00b400">craftingReagents - arg 3: <font color="#ff6767">optionalReagents # ret 1: <font color="#ecbc2a">statusCode, Nilable: false -> true + arg 3: <font color="#00b400">disableMasking

  • and similar changed to.
  • changed to, etc.
  • merged into.
  • [[Image:Widget_Hierarchy.png|thumb|none|Widget Hierarchy]]

, + 1: <font color="#00b400">gossipID - 1: <font color="#ff6767">gossipIndex + 4: <font color="#00b400">ratedSoloShuffle + 2: <font color="#00b400">reportType + 2: <font color="#00b400">updateInfo - 2: <font color="#ff6767">isFullUpdate - 3: <font color="#ff6767">updatedAuras

Enum.CurrencySource + 53: <font color="#00b400">PlayerTrait + 54: <font color="#00b400">PhBuffer_53 + 55: <font color="#00b400">PhBuffer_54 + 56: <font color="#00b400">RenownRepGain Enum.EventToastEventType + 22: <font color="#00b400">SpellLearned + 23: <font color="#00b400">TreasureItem Enum.HolidayFlags + 6: <font color="#00b400">DurationUseMinutes Enum.InventoryType + 30: <font color="#00b400">IndexProfessionToolType + 31: <font color="#00b400">IndexProfessionGearType + 32: <font color="#00b400">IndexEquipablespellOffensiveType + 33: <font color="#00b400">IndexEquipablespellUtilityType + 34: <font color="#00b400">IndexEquipablespellDefensiveType + 35: <font color="#00b400">IndexEquipablespellMobilityType Enum.ItemClass + 20: <font color="#00b400">Profession Enum.ItemGemColor + 25: <font color="#00b400">Tinker Enum.ItemSocketType + 25: <font color="#00b400">Tinker Enum.LFGListDisplayType + 6: <font color="#00b400">Comment Enum.MountType + 4: <font color="#00b400">Dragonriding Enum.MountTypeFlag + 3: <font color="#00b400">IsDragonRidingMount Enum.PowerType + 22: <font color="#00b400">Essence + 23: <font color="#00b400">RuneBlood + 24: <font color="#00b400">RuneFrost + 25: <font color="#00b400">RuneUnholy Enum.UIWidgetVisualizationType + 25: <font color="#00b400">FillUpFrames Enum.UnitSex + 5: <font color="#00b400">Neutral Enum.ValidateNameResult + 1: <font color="#00b400">Success + 2: <font color="#00b400">Failure + 3: <font color="#00b400">NoName + 4: <font color="#00b400">TooShort + 5: <font color="#00b400">TooLong + 6: <font color="#00b400">InvalidCharacter + 7: <font color="#00b400">MixedLanguages + 8: <font color="#00b400">Profane + 9: <font color="#00b400">Reserved + 10: <font color="#00b400">InvalidApostrophe + 11: <font color="#00b400">MultipleApostrophes + 12: <font color="#00b400">ThreeConsecutive + 13: <font color="#00b400">InvalidSpace + 14: <font color="#00b400">ConsecutiveSpaces + 15: <font color="#00b400">RussianConsecutiveSilentCharacters + 16: <font color="#00b400">RussianSilentCharacterAtBeginningOrEnd + 17: <font color="#00b400">DeclensionDoesntMatchBaseName + 18: <font color="#00b400">SpacesDisallowed - 1: <font color="#ff6767">NameSuccess - 2: <font color="#ff6767">NameFailure - 3: <font color="#ff6767">NameNoName - 4: <font color="#ff6767">NameTooShort - 5: <font color="#ff6767">NameTooLong - 6: <font color="#ff6767">NameInvalidCharacter - 7: <font color="#ff6767">NameMixedLanguages - 8: <font color="#ff6767">NameProfane - 9: <font color="#ff6767">NameReserved - 10: <font color="#ff6767">NameInvalidApostrophe - 11: <font color="#ff6767">NameMultipleApostrophes - 12: <font color="#ff6767">NameThreeConsecutive - 13: <font color="#ff6767">NameInvalidSpace - 14: <font color="#ff6767">NameConsecutiveSpaces - 15: <font color="#ff6767">NameRussianConsecutiveSilentCharacters - 16: <font color="#ff6767">NameRussianSilentCharacterAtBeginningOrEnd - 17: <font color="#ff6767">NameDeclensionDoesntMatchBaseName - 18: <font color="#ff6767">NameSpacesDisallowed

BarberShopRaceData + 4: <font color="#00b400">createScreenIconAtlas CharCustomizationChoice + 7: <font color="#00b400">showLocked + 8: <font color="#00b400">lockedTooltip CharCustomizationOption # 6: <font color="#ecbc2a">currentChoiceIndex, Nilable: false -> true + 8: <font color="#00b400">isSound CurrencyInfo + 2: <font color="#00b400">description ExpansionDisplayInfo + 4: <font color="#00b400">highResBackgroundID + 5: <font color="#00b400">lowResBackgroundID GossipOptionUIInfo + 1: <font color="#00b400">gossipOptionID + 3: <font color="#00b400">icon + 7: <font color="#00b400">flags + 8: <font color="#00b400">overrideIconID + 9: <font color="#00b400">selectOptionWhenOnlyOption + 10: <font color="#00b400">orderIndex - 2: <font color="#ff6767">type GroupFinderActivityInfo + 19: <font color="#00b400">useDungeonRoleExpectations LfgSearchResultData + 9: <font color="#00b400">hasSelf PVPPersonalRatedInfo + 12: <font color="#00b400">roundsSeasonPlayed + 13: <font color="#00b400">roundsSeasonWon + 14: <font color="#00b400">roundsWeeklyPlayed + 15: <font color="#00b400">roundsWeeklyWon PvpBrawlInfo + 6: <font color="#00b400">minLevel + 7: <font color="#00b400">maxLevel + 8: <font color="#00b400">groupsAllowed TextureAndTextRowVisualizationInfo + 4: <font color="#00b400">fixedWidth UIWidgetSpellInfo + 8: <font color="#00b400">borderColor + 12: <font color="#00b400">isLootObject UiMapExplorationInfo + 6: <font color="#00b400">isDrawOnTopLayer

APIs deprecated during 9.x were removed with patch 10.0.0

{| class="wikitable" style="min-width: 600px" ! Deprecated 9.x API

  • - class="mw-customtoggle-deprecated" style="cursor: pointer"
  • - class="mw-collapsible" id="mw-customcollapsible-deprecated"
  • ->
  • ->
  • ->
  • -> ,
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • ->
  • }

Source

https://warcraft.wiki.gg/wiki/Patch_10.0.0/API_changes · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.