Patch 10.2.7/API changes

From Warcraft Wiki
Jump to navigation Jump to search

Summary

  • The client now supports comma-delimited Interface versions, allowing addons to declare a TOC file as being compatible with multiple versions or flavors of the game at once.
  • The C_ChatInfo.SendAddonMessage function now more aggressively throttles all addon traffic on a per-prefix level. See Addon messaging changes for more details.
  • The TextStatusBar FrameXML utility has been converted to a mixin. Global functions are retained for compatibility, but will be removed in Patch 11.0.0.
  • The loading of deprecation scripts is now controlled by a new loadDeprecationFallbacks CVar. This CVar defaults to 1 (enabled), and will reset to the default state upon a client restart.
  • The client now emits a Lua warning for a "Duplicate File Load" if an addon loads the same file multiple times in its TOC or XML files.

Resources

Breaking changes

  • The pet stable has been overhauled. Some previously global API functions have moved to the C_StableInfo namespace, and others have been removed.
  • The FontInstance:SetJustifyH and FontInstance:SetJustifyV functions now more strictly validate inputs and will no longer permit "MIDDLE" to be used for horizontal justification, or "CENTER" for vertical.

Addon messaging changes

The C_ChatInfo.SendAddonMessage API and its logged variant now aggressively throttle traffic on all chat types, including whispers. The details of this restriction appear to match previously implemented changes for party and raid communications.

  • Each registered prefix is given an allowance of 10 addon messages that can be sent.
  • Each message sent on a prefix reduces this allowance by 1.
  • If the allowance reaches zero, further attempts to send messages on the same prefix will fail, returning Enum.SendAddonMessageResult.AddonMessageThrottle to the caller.
  • Each prefix regains its allowance at a rate of 1 message per second, up to the original maximum of 10 messages.
  • This restriction does not apply to whispers outside of instanced content.

This restriction does not mean that the global communications throttle is removed. If too much data is being sent simultaneously on separate prefixes, then the client may still be disconnected. For this reason, it is strongly recommended to continue using ChatThrottleLib or AceComm-3.0.

Due to the way that the deprecation wrapper for these APIs has been handled, the C APIs are replaced by Lua functions that shift the enum result to the second return position. A forward-compatible way to reliably access the enum return value is to use a negative select index to grab the last return value.

local result = select(-1, C_ChatInfo.SendAddonMessage(...))