Hidden API changes

UI and Macro
I really wish blizz would have announced these changes..

MAX_BATTLEFIELD_QUEUES is now GetMaxBattlefieldID()

AuctionDressUpFrame is now SideDressUpFrame

GetTime() has changed
I did some additional Tests and it seems that with 4.3 GetTime() only changes every Frame (or "OnUpdate"). On Live (4.2) GetTime() can return different results when called by "OnUpdate" scripts. This makes a couple of other checks in while-loops in "WeakAuraOptions.lua" kinda pointless.

Apparently this returns at different intervals for people with slower/faster computers

Possible routes of solution:
Remove the code-block throttling altogether (Could introduce client lockups)
Use time() instead of GetTime() (If there is any difference)
Apply heavy artillery by using coroutines (If they are available in wow)

GetAuctionItemInfo() now returns an additional value:
name, texture, count, quality, canUse, level, ??new??, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner, saleStatus Blizz should have added this new value to the end instead of right in the middle. It would have prevented a few addons from breaking.

Dividing by zero has been disabled. Use inf = math.huge instead of inf = 1/0

New function: get sheath state
GetSheathState() - Returns the sheath state of the player's weapons.

Raid Finder Functions
The Raid Finder was added in Patch 4.3.0

Encounter Journal Functions
Dungeon Journal was added in Patch 4.2.0; its FrameXML components were moved to a LoadOnDemand AddOn in Patch 4.3.0.

Transmogrification Functions
Transmogrification was added in Patch 4.3.0
ApplyTransmogrifications() - Applies all pending transmogrifications, and pays for the cost
ClearTransmogrifySlot([slotId]) - Clears the specified transmogrify slot
ClickTransmogrifySlot(slotId) - Facilitates clicking transmogrify slots depending on transmogrify state
GetTransmogrifyCost() - Returns cost, numChanges
GetTransmogrifySlotInfo(slotId) - Returns isTransmogrified, canTransmogrify, cannotTransmogrifyReason, hasPending, hasUndo, visibleItemID, textureName
UseItemForTransmogrify(bag, slot, id)

Void Storage Functions
Void Storage was added in Patch 4.3.0

A lot of this info was taken from; http://www.wowpedia.org/World_of_Warcraft_API
Some of this info I found myself, the rest came from searching on google.
Blizzard does seem to enjoy adding new return values in the middle of the existing list.
I hope the GetTime() change was accidental, as there's no good way that I can see to yield in my background coroutine threads when doing long optimizations in Outfitter. time() won't work very well since its resolution is one second and yielding only once per second makes the client unusable.

In a coroutine GetTime() will never change since the client will never get to draw the next frame. This causes my coroutine to run to completion with no yields at all :(
By the way, another undocumented change is that the Equipment Manager now stores the outfit icon as a string instead of a number. The string is the file name of the icon from the interface/icons folder, without the extension. This is set via SaveEquipmentSet() and is returned by GetEquipmentSetInfoByName()
11/30/2011 06:06 AMPosted by Choonster
Blizzard does seem to enjoy adding new return values in the middle of the existing list.

Choonster already knows the following, but for people reading this in the future: Their reasoning for adding new parameter values in the middle goes like this:

  • Argument lists should be consistent. If you have "(foo1, bar1, baz1)" then adding "foo2" to the end might be convenient now, but a year from now is going to be weird and confusing, especially to new coders. Changing it to "(foo1, foo2, bar1, baz1)" trades short-term inconvenience for longer-term ease of use.
  • Nearly all existing affected addons would have to be changed and edited anyhow. We usually don't get new parameters or return values that don't need to be involved in existing code (e.g., raid icon flags being moved into new CLEU arguments). Requiring authors to edit the code is not a burden if they were editing the same code already.

The really stable way to do parameters would have been to have a single table argument with named keys. Adding new keys to the table wouldn't have done anything to argument order, etc. The downside is that creating and freeing tables for each nontrivial function call *destroys* the garbage collector performance; it's been tried before and results in the "stutter lag" complaints you see from time to time.

setAlphaGradient() has changes somehow; it doesn't accept zero as the length argument. Any idea how it works now?
I don't like the removal of the getmacroiconinfo function :(

it is very important to my addon >_<

(nobody wants to read macro buttons with just "Arcane Blast" or "Shadowmeld" text on them..)

Join the Conversation

Return to Forum