Thread Tools Display Modes
11-02-07, 01:50 PM   #1
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Upcoming 2.3 API Changes - Concise List

Actual Changes

From Iriel's post on the Blizzard UI forum:

This is a consolidated list of the announced (and sometimes observed) changes in the User Interface API's and functionality for the 2.3 release. Please note that this thread is to discuss the upcoming changes and any clarifications or features that are a direct result of those changes, or things which we've been asked to remind slouken of.

IMPORTANT: Off-topic or entirely redundant posts are liable to get deleted. It is however in everyone's best interest to not post them in the first place - We'd rather slouken could spend his time coding us cool things than moderating this thread!

Last Updated: 2007-11-06 20:44 Pacific

Important Changes
* The spell casting mechanism will be improved to remove the need for /stopcasting workarounds on high-latency connections or 'fallthrough' instant cast macros. In 2.3 chat channels are rate limited on the client in the same way whispers are now.
* Each chat channel is limited separately, at a rate of 10 messages in 10 seconds. This means that you can send one message every second without ever seeing delays, or a burst of 10 messages every 10 seconds without seeing delays. Messages that exceed this rate are not dropped, but simply delayed in order until they can be sent. (This does not affect SendAddonMessage() or party/raid/guild chat. )

Macro Commands
* NEW - /petautocasttoggle <slot or spell name>
* NEW - /targetlastenemy, /targetlastfriend
* NEW - /targetexact <name>
* UPDATED - /cancelform will be recognized instantly (as /dismount is currently)
* Added the following macro conditional abbreviations; modifier -> mod, button -> btn, actionbar -> bar, equipped -> worn , stance -> form(e.g. [mod:SELFCAST])

Frame methods
* You should no longer need to call ScrollFrame:UpdateScrollChildRect(). If a child frame, texture or fontstring has changed, the scroll parent will automatically recalculate it's scroll rect and dispatch events appropriately. Of course, please test this out on the test realm when it goes live, and report any bugs.

* NEW - registered = Frame:IsEventRegistered("event")
* NEW - FontString:SetFormattedText(format, ...) -- Like setting the text to be the result of a string.format call, but without the garbage overhead of creating a temporary lua string for the result.
* NEW - Button:SetFormattedText(format, ...)
* NEW - height = FontString:GetStringHeight()
* UPDATED - width = FontString:GetWidth([explicitOnly]) -- Added new optional parameter which, if provided and true, returns 0 if the width has not been explicitly set rather than returning the effective width. Defaults to false.
* UPDATED - height = FontString:GetHeight([explicitOnly]) -- as above, but for height
* NEW - EditBox:SetCursorPosition(position)
* NEW - position = EditBox:GetCursorPosition()
* NEW - ScrollingMessageFrame:SetInsertMode("mode") -- Sets the location into which new strings are added to the frame, mode is one of "TOP" or "BOTTOM". (There's an insertMode XML attribute also)
* NEW - mode = ScrollingMessageFrame:GetInsertMode() -- Gets the current insert mode for a frame
* RENAMED - ScrollingMessageFrame:SetScrollFromBottom(offset) is now ScrollingMessageFrame:SetScrollOffset(offset)


Frame Support
* NEW - frame1, frame2, ... = GetFramesRegisteredForEvent("event")

API Methods
* Explicit calls to message(string) will show the window even if lua errors are turned off in the UI options.

* NEW - PickupItem(itemID or "item")
* UPDATED - count = GetItemCount(item, includeBank,[ includeUses]) -- new includeUses flag that returns the same value that GetActionCount() would for that item
* NEW - count = GetSpellCount("name" or slot [,book]) -- Returns the same value that GetActionCount() would return for that spell
* NEW - selected = IsSelectedSpell(slot) -- Replaces IsCurrentCast()
* REMOVED - IsCurrentCast(slot) -- Replaced with IsSelectedSpell
* NEW - current = IsCurrentSpell("name" or slot [,book]) -- Consistent with IsCurrentAction
* NEW - isConsumable = IsConsumableSpell("name" or slot [,book]) -- Consistent with IsConsumableAction
* NEW - helpful = IsHelpfulItem(item) - Contains a right click ability that targets friendly units (Note that a few spells are neither helpful nor harmful and can be cast on anyone.)
* NEW - harmful = IsHarmfulItem(item) - Contains a right click ability that targets enemy units (See note above)
* NEW - helpful = IsHelpfulSpell("name" or slot,"book") - The spell targets friendly units (See note above)
* NEW - harmful = IsHarmfulSpell("name" or slot,"book") - The spell targets enemy units (See note above)
* NEW - item, link = GetMacroItem(macro)
* NEW - spell, rank = GetMacroSpell(macro)

Garbage Collection
* in 2.3 the game will be performing extra garbage collection outside of combat to keep memory use down.

As always, the game will perform better if you don't generate any garbage, and here are some tips to do that:
* If you're composing a formatted string to display in a button or font string, use the new FontString:SetFormattedText(fmt, ...) API
* If you write a function that returns many values, consider returning them directly instead of creating a table and returning that table.
* If returning a table from a function really is most convenient, have the caller of that function pass in the table to be filled out instead of creating a new table inside the function so that the caller can re-cycle that table later.

Auction API
* UPDATED - QueryAuctionItems(name, minLevel, maxLevel, invType, class, subClass, page, isUsable, quality, [getAll]) -- Added a new boolean argument, setting it to true will retrieve all auction house data (not just 50 items). This can only be used once every 15 minutes. This is intended to reduce our load from add-ons such as auctioneer that are going to download the entire auction house anyways.
* UPDATED - canQuery, canQueryAll = CanSendAuctionQuery() -- Now returns two results. First (bool) is if you can send a regular query, second (bool) is if you can ask for all auction house data.
* UPDATED - isReversed, isReversedUsed = IsAuctionSortReversed() -- Now returns two results. First (bool) is true if the sort is reversed, second (bool) is true if the current sort supports reversal
* NEW - sort, reversed = GetAuctionSort(type, index) -- Enumerates what sorts are being currently used on the table and in what order.
. o 'type' – string – which table to retrieve the sort for (ie. “owner”, “bidder” or “list”).
. o 'index' - number – the index of the sort to retrieve (1 for the first sort, 2 for the second sort, etc).
. o 'sort' – string - the sort being used (nil if there isn’t a sort at this index)
. o 'reversed' – bool – true if the sort is reversed
* NEW - SortAuctionClearSort(type) -- Clears all sorts on a specific table.
* NEW - SortAuctionSetSort(type, sort, reverse) -- Prepends a new sort to an auction table pushing all other sorts down (the new sort is not applied automatically).
. o 'type' – string – which table to clear the sorts on (ie. “owner”, “bidder”, or “list”).
. o 'sort' – string – the sort to add (ie. “quality”, “level”, “duration”, “status”, “bid”, “name”, “buyout”, “seller”, “buyoutthenbid”, “quantity”).
. o 'reverse' – bool – true if this sort should be applied in reverse order.
* NEW - SortAuctionApplySort(type) - Applies the sort that has been configured for a specific table.

NOTE: There is a new sort type “quantity”, which allows sorts by the number of items.

Mail API
When composing mail, there are now “slots”, that you can drag items into (1 is the first slot, 2 is the second slot, etc). Once the mail arrives, you use an “index” to refer to each attachment.

* UPDATED - ClickSendMailItemButton(attachSlot) -- Added a numeric “attachSlot” argument to this existing function specifying which slot was clicked on.
* UPDATED - GetSendMailItem(attachSlot) -- Added the new attachSlot argument
* UPDATED - GetSendMailItemLink(attachSlot) -- Added th new attachSlot argument
* NOTE - GetSendMailPrice() -- The price of mail depends on how many items are attached
* UPDATED - GetInboxItem(messageIndex, attachIndex) -- Added the new attachSlot argument
* UPDATED - GetInboxItemLink(messageIndex, attachIndex) -- Added the new attachSlot argument
* UPDATED - TakeInboxItem(messageIndex, attachIndex) -- Added the new attachSlot argument

Development Support
* The way taint spreads during code execution is changing so that taint caused by executing AddOn code takes priority over taint from variables, this should result in more intuitive attribution of taint to code.
* There will be a new way to log taint spreading through global variables and functions.
* To turn taint logging off: /console taintLog 0
* To turn action taint logging on: /console taintLog 1
* To turn full taint logging on: /console taintLog 2
* The taint log is saved in Logs\taint.log
* 'Action taint' logging creates an entry for each action blocked error, with details about where in the code the taint was detected. Full taint logging creates entries for every global that is tainted, and each time Blizzard code becomes tainted by reading a tainted global variable. (Keep in mind that taint is normally fine, it only becomes a problem when it's introduced into the code path of secure code.)

Spell Casting
* By default any spell that requires you to leave your current form will automatically cancel your form before casting. This applies to shadowform and stealth as well. You can disable this with /console autoUnshift 0
* Spells in /cast and /castsequence will no longer toggle. This means that a macro like: /cast Auto Shot will no longer be exactly equivalent to putting Auto Shot on your action bar, instead it will always try to cast Auto Shot.


Information
* The player's level will be available via UnitLevel("player") upon UI startup, rather than only after PLAYER_ENTERING_WORLD

Tainting
* Using UIDropDownMenu_CreateInfo() should no longer cause taint issues to spread to other dropdowns.

Bug Fixes
* The accidental change in handling of UnitName on non-existing units has been fixed.

Last edited by Cairenn : 11-15-07 at 01:08 AM.
  Reply With Quote
11-02-07, 02:04 PM   #2
Icecoldcoke
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 132
* UPDATED - /cancelform will be recognized instantly (as /dismount is currently)
=Instant form switching with macros.
  Reply With Quote
11-07-07, 07:24 AM   #3
lingering
A Cliff Giant
 
lingering's Avatar
Join Date: Dec 2006
Posts: 72
you always could instant for switch with macros
  Reply With Quote
11-07-07, 03:59 PM   #4
Icecoldcoke
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 132
Originally Posted by lingering
you always could instant for switch with macros
No, as in you don't even go into human form. It just goes cat -> travel form or w/e.
  Reply With Quote

WoWInterface » Site Forums » News » Upcoming 2.3 API Changes - Concise List


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off