World of Warcraft

1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . 10 . 11 . 12 . 13 . 14 . 15 . 16 . 17 . 18 . 19 . 20
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 0. Upcoming 3.0.x Changes - Concise List   07/18/2008 01:58:50 PM PDT
quote reply
This is a consolidated list of the announced (and sometimes observed) changes in the User Interface API's and functionality for the Wrath of the Lich King expansion (3.0) repease. Please note that this thread is to discuss the upcoming changes and any clarifications or features that are a direct result of those changes.

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 and the UI team could spend their time coding us cool things than moderating this thread!

An 'Actual API changes' thread can be found here:
3.0.8 - http://forums.worldofwarcraft.com/thread.html?topicId=14637474367&sid=1
3.0.2 - http://forums.worldofwarcraft.com/thread.html?topicId=10043170854&sid=1

Significant Changes
* The blizzard UI is being converted to use 'self' and the other local arguments in favor of 'this' and argN. The old style arguments are going to be obsoleted, so AddOn code needs to be updated too. This may mean there are changes in the signatures of Blizzard UI functions - update code that hooks or replaces the blizzard UI where necessary as well. !!!

* The SecureStateHeader has been replaced by a new secure template which allows for a more natural specification of rules in lua rather than via complex state tables. Some initial documentation can be found at: !!!
http://www.iriel.org/wow/docs/SecureHeadersGuide%20-%20pre1.pdf

* Key bindings, macros, and many UI settings are now stored on the server and will be available wherever you play.

* Button objects appear to no longer have their own internal Font objects, and have replaced the various methods to alter them with methods to reference existing Font objects to use for each state (Simple color changes can still be done without creating your own Font objects by using the |c color escape)

* The old crafting API's have finally been retired and enchanting moved onto the more common tradeskill API

Settings and Preferences
* The following functions have been replaced with server-stored cvars: SetAutoLootDefault(), GetAutoLootDefault(), ShowNameplates(), HideNameplates(), ShowFriendNameplates(), HideFriendNameplates()
* Saving the settings on the server can be disabled by setting the "synchronizeSettings" cvar to 0. You can then use the new UploadSettings() and DownloadSettings() functions to manage synchronization manually.
* NEW value = GetCVarBool("cvar") - Returns the value of the cvar as 1 or nil instead of requiring you to compare the cvar value with "0" or "1"
* NEW name, defaultValue, serverStoredAccountWide, serverStoredPerCharacter = GetCVarInfo("cvar") - Returns information about the named cvar
* There is a new FOCUSCAST click modifier (with no default value) which will cause spells to be cast on your focus.

Macros
* You can now maintain a backup copy of your macros and restore them at any time with the following functions: BackupMacros(), RestoreMacros(). These functions can not be called by AddOns while you are in combat.
* The number of account-wide macros has been increased to 36.

continued...

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 1. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 01:59:27 PM PDT
quote reply
Buff Information
* The various GetPlayerBuff functions have been removed and integrated into the appropriate unit functions, adding a new UnitAura function and updating the others:

The new parameters and return values are:
name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitAura("unit", [index] or ["name", "rank"][, "filter"])

UnitBuff() and UnitDebuff() are aliases for UnitAura() with built in helpful/harmful filters.

CancelPlayerBuff([index] or ["name", "rank"][, "filter"]);

GameTooltip:SetUnitAura("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitBuff("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitDebuff("unit", [index] or ["name", "rank"][, "filter"]);

* The "filter" parameter can be any of "HELPFUL", "HARMFUL", "PLAYER", "RAID", "CANCELABLE", "NOT_CANCELABLE". You can also specify several filters separated by a space or | character to chain multiple filters together (e.g. "HELPFUL|RAID" == helpful buffs that you can cast on your raid). By default UnitAura has "HELPFUL" as an implicit filter - you cannot get back BOTH helpful and harmful at the same time. Neither "HELPFUL" or "HARMFUL" have meaning for UnitBuff/UnitDebuff, and will be ignored.
* AddOns displaying remaining time should cache the expiry time and decrement their own counter, do not re-query the information every OnUpdate.
* The untilCanceled return value is true if the buff doesn't have its own duration (e.g. stealth)

Companions
* Mounts and non-combat pets have been changed to be spell rather than item based. There are a number of new API methods to query and use them (See post #57 from slouken for more details)

* NEW count = GetNumCompanions(type) -- Gets the number of a specific type of companion (type is "CRITTER" or "MOUNT")
* NEW creatureID, creatureName, spellID, icon, active = GetCompanionInfo(type, index) -- Gets information abotu a specific companiion
* NEW PickupCompanion(type, index) -- Load a companion onto the cursor for placement into an action bar
* NEW CallCompanion(type, index) -- Summon a specific companion

Also, the PlayerModel frame has a new method

* NEW PlayerModel:SetCreature(creatureID) -- Show the model for the specified creature

Finally, there's a new event COMPANION_UPDATE which has a single argument, type - If this is nil then the UI should update the current companion, if it's non il then it'll be "CRITTER" or "MOUNT" and indicates that the active companion of that type has changed.

Aggro Awareness (aka Threat)
(NOTE: Still very much subject to change -- See slouken's detailed post below (#80) for more details)

* NEW state = UnitThreatSituation(unit[, mob]) -- Determine a unit's threat situation with respect to the given mob (or the mob which has the highest threat for the unit if omitted), the result is one of:
nil = unit not on threat list
0 = 0-99% raw threat (no indicator shown)
1 = 100% or more raw threat (yellow indicator)
2 = tanking, other has 100% or more raw threat (orange indicator -- you may lose primary target)
3 = tanking, all others have less than 100% raw threat (red indicator)

* NEW isTanking, state, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation(unit, mob) -- Returns detailed information about the unit's state on a mob's threat list.
isTanking -- true if the unit is the primary target of the mob (and by definition at 100% threat)
state -- Unit's threat situaton, as above
scaledPercent -- Distance-scaled threat percentage (0-100%)
rawPercent -- Current percentage threat of the unit relative to mob's primary target
threatValue -- Raw 'threat amount' for the unit, roughly approximate to amount of damage and healing done by the unit

* NEW r, g, b = GetThreatStatusColor(state) -- Gets the color to use in the standard UI for a threat situation state

There are also two new events, UNIT_THREAT_LIST_UPDATE is fired when a mob unit's threat list changes, the unit id of the mob is the first event argument. UNIT_THREAT_SITUATION_UPDATE fires when a unit's threat situation changes, the unit in question is the first event argument (Note this only fires for status value changes, not raw threat changes)

continued...

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 2. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:01:11 PM PDT
quote reply
Unit Information
* The unit functions (such as UnitExists) now work for unit names that begin with otherwise valid unit tokens (e.g. for a player named "Petlover")

Container Information
* The GetInventoryItemsForSlot function now correctly finds and returns information for relics, and properly returns the flags for items in bank bags.

Frame API's

Textures
* UPDATED - exists = Texture:SetTexture(path[, tiled]) -- Added a new tiled parameter, if this is true then the texture is tiled in each direction rather than the edge stretching to infinity.

Sliders
* NEW - Slider:Disable() -- Disables the slider
* NEW - Slider:Enable() -- Enables the slider
* NEW - isEnabled = Slider:IsEnabled() -- Returns the status of the slider (1 or nil)

Blizzard UI

Interface Options
* InterfaceOptionsFrame_OpenToPage has been renamed InterfaceOptionsFrame_OpenToCategory !!!
* Panels have a new optional method panel.refresh, which is called by the options frame after the panel is updated with defaults, but before the panel is shown. Use this to sync the state of the panel with the options in case they've been changed outside of the options frame.

Other Observed Changes
* Item strings have changed format to include character level

(Last update 2008-09-21 09:51 Pacific)

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 3. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:02:15 PM PDT
quote reply
Known Issues with 3.0.2
* /cast Mount Name behaves oddly if the 'training item' has the same name as the mount and was learned this session. Log out and in again to fix.
* The achievement dates displayed are a little off (a day ahead, for some of us)

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 4. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:03:03 PM PDT
quote reply
Patch 3.0.3 Changes
In 3.0.3 you will be able to manage macros vs key bindings separately:
/console synchronizeConfig 0
-- turns off synchronization of UI settings
/console synchronizeBindings 0
-- turns off synchronization of key bindings
/console synchronizeMacros 0
-- turns off synchronization of macros

Patch 3.0.8 Changes
* HookScript will now function like SetScript if there is no script currently on the object.
* Both Dropdown menus and the Vehicle Action Bar have been made less susceptible to taint.
* Lua closures can now be directly assigned to frame scripts from XML using the following new format: <OnClick function="FunctionName"/>. The old format will continue to be supported indefinitely.
* Several functions no longer accept unit tokens as parameters, and should now be used in conjunction with UnitName("token") instead. These functions include: AddFriend, RemoveFriend, SetFriendNotes, AddMute, DelMute, AddIgnore, DelIgnore, InviteUnit, UninviteUnit, GuildInvite, GuildUninvite, GuildPromote, GuildDemote, GuildSetLeaderByName, CalenderEventInvite
* The secure handlers system was restricted with respect to OnUpdate/Timer handling and the ability to react to frame visibility. There is a new SetupAnimation method that addresses some of the restrictions. This change unfortunately removed some otherwise useful functionality around auto-hiding frames (and animation) but hopefully a future patch will address this.

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 5. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:03:36 PM PDT
quote reply
(getting there)

UI and Macros Forum MVP - Understand GC!
77
View All Posts by This User Toggle Ignore / Unignore This User
  • 6. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:04:15 PM PDT
quote reply
(Last reserved post)

UI and Macros Forum MVP - Understand GC!
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 7. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:45:18 PM PDT
quote reply
All of the GetPlayerBuff* functions have been removed. In addition, there is a new function called UnitAura and CancelPlayerBuff, UnitBuff, and UnitDebuff are modified slightly.

The functions in question look like so:

Code:

name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitAura("unit", [index] or ["name", "rank"][, "filter"]);
name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitBuff("unit", [index] or ["name", "rank"][, "filter"]);
name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitDebuff("unit", [index] or ["name", "rank"][, "filter"]);
CancelPlayerBuff([index] or ["name", "rank"][, "filter"]);

GameTooltip:SetUnitAura("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitBuff("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitDebuff("unit", [index] or ["name", "rank"][, "filter"]);


Some points of interest:
1) The "filter" parameter is a consolidation of the old GetPlayerBuff filter and the raidFilter parameter from the old UnitBuff/UnitDebuff.
It may have any combination of the following values:
"HELPFUL", "HARMFUL", "RAID", "CANCELABLE", "NOT_CANCELABLE"

Like in GetPlayerBuff, a "|" character delimits multiple filters. For example, UnitAura("HELPFUL|RAID") will return only buffs that you can cast on your raid and UnitAura("HARMFUL|RAID") will return only buffs that you can dispel from your raid. By default, UnitAura will implicitly set "HELPFUL" as part of its filter value, unless you specify "HARMFUL" as part of its filter. You can only get back one or the other. Passing "HELPFUL" or "HARMFUL" as a filter to either UnitBuff or UnitDebuff is meaningless and will be ignored since UnitBuff is essentially a shortcut for UnitAura with "HELPFUL" as an implicit filter and UnitDebuff is a shortcut for UnitAura with "HARMFUL" as an implicit filter.

2) Since there is no more GetPlayerBuffTimeLeft function, you will have to keep your own countdown variable if you want to show a buff countdown on your UI. We decided that there would be too much of a performance hit to call a UnitAuraTimeLeft function in an OnUpdate.

3) The untilCanceled return value is another carry over from GetPlayerBuff*. true basically means the buff doesn't have its own duration (totem buffs and stealth are great examples), false typically means it does have a duration (and therefore a timeLeft).
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 8. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:46:39 PM PDT
quote reply
Key bindings, macros, and many UI settings are now stored on the server and will be available wherever you play (*cheering as the crowd goes wild*).

To facilitate this, many settings have been moved to CVars, eliminating the following functions:
SetAutoLootDefault()
GetAutoLootDefault()
ShowNameplates()
HideNameplates()
ShowFriendNameplates()
HideFriendNameplates()

The following functions have been added:
value = GetCVarBool("cvar") - Returns the value of the cvar as 1 or nil instead of requiring you to compare the cvar value with "0" or "1"
name, defaultValue, serverStoredAccountWide, serverStoredPerCharacter = GetCVarInfo("cvar") - Returns information about the named cvar

Saving the settings on the server can be disabled by setting the "synchronizeSettings" cvar to 0. You can then use the new UploadSettings() and DownloadSettings() functions to manage synchronization manually.

You can now maintain a backup copy of your macros and restore them at any time with the following functions:
BackupMacros()
RestoreMacros()
These functions can not be called by AddOns while you are in combat.

The number of account-wide macros has been increased to 36.
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 9. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:47:02 PM PDT
quote reply
We're working on converting the Blizzard UI to use 'self' and the other local arguments in favor of 'this' and argN. The old style arguments are going to be obsoleted, so we're going to have an extra long PTR phase so AddOn authors can make sure they get all their code converted over to the new style.
You can actually start converting and testing your code in the live 2.4 build. A full list of the new style arguments is available here:
http://forums.worldofwarcraft.com/thread.html?topicId=36975623#5

[ Post edited by Slouken ]

80
View All Posts by This User Toggle Ignore / Unignore This User
  • 11. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 02:59:38 PM PDT
quote reply

Q u o t e:
The number of account-wide macros has been increased to 36.


Has the size of macros using the Blizzard macro interface increased from 255?
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 12. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 03:02:54 PM PDT
quote reply

Q u o t e:


Can we still use the normal GetCVar on boolean vars for shortcuts like SetCVar("blah", 1 - GetCVar("blah")) ?


Yes, GetCVarBool() is just a convenience function.
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 13. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 03:03:43 PM PDT
quote reply

Q u o t e:


Has the size of macros using the Blizzard macro interface increased from 255?


No, it hasn't.
70
View All Posts by This User Toggle Ignore / Unignore This User
  • 14. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 04:30:23 PM PDT
quote reply

Q u o t e:
The number of account-wide macros has been increased to 36.


Any consideration for increasing the number of individual-character macros?


Most of my characters are fine at the current limit, except for my main (a mage, lots of spell casting macros), atm he is useing all of his individual-character macros, and I'm hopeing to keep all my new mage-specific macros I'll be creating along my way to 80 in the individual-character tab.

Another idea to improve my mage's macro situation would be to change the way mage & warlock conjureables work when bound on the UI so that by default one button would do the work of two (click1: use conjured item X/click2: conjure more of item X), that would free up 4 macros for my main (food/water/table/stones), but this might be the wrong place to bring this idea up (or just too complicated for the most casual player).

-Bab
"Let's light 'em up and see how they smoke."
80
View All Posts by This User Toggle Ignore / Unignore This User
  • 15. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 05:13:16 PM PDT
quote reply
Any chance that the default keybindings can work without assuming certain things?

For example, I have, of course, keys 1-9 bound to spells. Now, when I do a shift+3, ctrl+3, or alt+3, why the heck does it ASSUME I want to press 3? If there is no keybind or keymap for it, why is this assumption taken?

7
View All Posts by This User Toggle Ignore / Unignore This User
  • Malfurion
  • 16. Re: Upcoming 3.0 Changes - Concise List   07/18/2008 09:11:45 PM PDT
quote reply
While you're converting Blizzard code to use 'self' instead of 'this', also keep an eye out for places where Blizzard code hooks script handlers and the new function doesn't accept the proper parameters (such as 'self') or pass them on to the original script handler.

One example of this is in the current 2.4.3 version of Blizzard_CombatLog.lua (starting at line 3522).

-- Hook the frame's hide/show events so we can hide/show the quick buttons as appropriate.
local show, hide = COMBATLOG:GetScript("OnShow"), COMBATLOG:GetScript("OnHide")
COMBATLOG:SetScript("OnShow", function()
CombatLogQuickButtonFrame_Custom:Show()
--Blizzard_CombatLog_AdjustCombatLogHeight()
return show and show()
end)
COMBATLOG:SetScript("OnHide", function()
CombatLogQuickButtonFrame_Custom:Hide()
-- Blizzard_CombatLog_AdjustCombatLogHeight()
return hide and hide()
end)

That code hooks the combat chat frame's OnShow and OnHide script handlers, but it doesn't deal with the 'self' value. It should accept a 'self' parameter and pass it on when it calls the original function. The way it is now, if Blizzard's code hooks those script handlers after another addon has already hooked them, then that addon's functions won't receive the expected 'self' value.
66
View All Posts by This User Toggle Ignore / Unignore This User
  • Illidan
  • 17. Re: Upcoming 3.0 Changes - Concise List   07/20/2008 12:22:07 AM PDT
quote reply

Q u o t e:
Key bindings, macros, and many UI settings are now stored on the server and will be available wherever you play (*cheering as the crowd goes wild*).



Will these be character specific?

Unless I'm thinking of the wrong thing, I've noticed graphical options are just computer wide.
80
View All Posts by This User Toggle Ignore / Unignore This User
  • 18. Re: Upcoming 3.0 Changes - Concise List   07/20/2008 12:34:42 AM PDT
quote reply

Q u o t e:

Buff Information
* The various GetPlayerBuff functions have been removed and integrated into the appropriate unit functions, adding a new UnitAura function and updating the others:

name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitAura("unit", [index] or ["name", "rank"][, "filter"]);
name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitBuff("unit", [index] or ["name", "rank"][, "filter"]);
name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = UnitDebuff("unit", [index] or ["name", "rank"][, "filter"]);
CancelPlayerBuff([index] or ["name", "rank"][, "filter"]);

GameTooltip:SetUnitAura("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitBuff("unit", [index] or ["name", "rank"][, "filter"]);
GameTooltip:SetUnitDebuff("unit", [index] or ["name", "rank"][, "filter"]);


Wait wait wait... this mean we can query buff existence on not-the-player units by name now?
80
View All Posts by This User Toggle Ignore / Unignore This User
  • Feathermoon
  • 19. Re: Upcoming 3.0 Changes - Concise List   07/20/2008 08:50:34 PM PDT
quote reply

Q u o t e:
We're working on converting the Blizzard UI to use 'self' and the other local arguments in favor of 'this' and argN. The old style arguments are going to be obsoleted, so we're going to have an extra long PTR phase so AddOn authors can make sure they get all their code converted over to the new style.


What about functions called as a result of ChatFrame_AddMessageEventFilter() and the like? Currently, if I'm not mistaken, the only way to access args other than arg1 from within a filter function is to use the globals. Could this be addressed, please?
1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . 10 . 11 . 12 . 13 . 14 . 15 . 16 . 17 . 18 . 19 . 20
Forum Nav : Jump To This Forum
Blizzard Entertainment