World of Warcraft

1 . 2 . 3 . 5 . 7 . 9 . 11 . 13 . 15 . 17 . 19 . 21 . 23 . 25 . 27 . 29 . 31 . 33 . 35 . 37 . 39 . 41 . 43 . 44
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 0. 2.0.0 Changes - Concise List   09/01/2006 08:12:11 PM PDT
quote locked
This is a consolidated list of the announced (and sometimes observed) changes in the User Interface API's and functionality for the Burning Crusade expansion (2.0) 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!

WoW 2.0 represents a major change in the UI code, and as such ALL AddOns will need to be updated before they will work, if for no other reason than the Lua 5.0 to Lua 5.1 changes. Some AddOns will be more seriously affected, and a few will have to be redesigned.

Interface AddOn Kit
The WoW 2.0 *BETA* Interface AddOn Kit is now available for download here (For use with the Beta only):
http://www.worldofwarcraft.com/downloads/expansion-bc/addonkit.zip

Significant Changes
The expansion will be using Lua version 5.1.1, which provides a number of useful features, most notably incremental garbage collection and memory-efficient variable arguments. There ARE some incompatible changes with Lua 5.0 and authors are advised to familiarize themselves with http://www.lua.org/manual/5.1
* There is a new unit "focus" which behaves like target, the "PLAYER_FOCUS_CHANGED" event is fired when it is changed, and you receive unit events for this unit.

The protected code mechanism introduced in 1.10 has been extended to cover more functions. Blizzard code is considered secure, all other code is untrusted. The following function types are restricted for AddOns:
* Movement is never allowed.
* Spell casting is allowed outside of combat when initiated interactively. In combat it requires use of the secure templates.
* Targeting is allowed only using secure templates.
* Programatic modification of macros, key bindings, and the action bar page only allowed outside of combat.
* Trading and reloading the UI only allowed interactively.
* Action buttons and targeting frames are now "protected". Protected frames cannot be programmatically moved, shown or hidden, or have their attributes (unit, action, etc) changed during combat.

In addition:
* Script handlers defined in SecureXML templates remain secure when they are inherited, unless overridden by AddOn code.
* The parent of a protected frame is implicitly protected also, as are any frames which it is anchored to.

Lua environment
* The Lua coroutine library is now available - Coroutines create a new Lua state and should be used sparingly to conserve memory.

Slash Commands
The following new slash commands will be available:
* Targeting: /targetlasttarget
* Items and equipment: /use <itemname>, /use <slot>, /use <bagid> <bagslot>, /equip <itemname>, /equipslot <slot> <itemname>
* Pet control: /petattack, /petfollow, /petstay, /petpassive, /petdefensive, /petaggressive
* Casting: /stopcasting will cancel the spell that is currently being cast
* Action bar: /changeactionbar <num> and /swapactionbar <num1> <num2>
* Attacking: /startattack [unit], /stopattack
* Buffs/Auras: /cancelaura name - cancels an aura as if it were right clicked
* /target, /focus, and /startattack take all valid unit ids as well as entity names. Where applicable they default to target if no unit is specified.
* In WoW 2.0, feeding your pet, poisons, etc. will be even easier to macro: /cast Feed Pet then /use Dry Pork Ribs. You will also be able to click on food in your action bar when you are targeting Feed Pet and other item targeting spells.

Spell Casting
* When casting a ranked buff spell that's too high a level for a friendly target the game will automatically use the highest appropriate rank of the spell instead.

Secure Templates
There are several secure templates that AddOns can use to create new functional buttons:
* SecureActionButtonTemplate
* SecureUnitButtonTemplate
* SecureRaidGroupHeaderTemplate
* SecurePartyHeaderTemplate
* SecureStateHeaderTemplate
* SecureStanceStateDriverTemplate
* SecureAnchorButtonTemplate
* SecureAnchorEnterTemplate
* SecureAnchorUpDownTemplate
* The secure button templates have support for pre-loaded items which are used as spell targets for feeding, poisoning, etc.

Actions
* The old CURRENT_ACTIONBAR_PAGE variable is no longer used. There's a new slash command /changeactionbar <num>. Macros that used to do /script CURRENT_ACTIONBAR_PAGE=2 ChangeActionBarChange() can now simply do /changeactionbar 2

(continued...)

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 1. Re: Expansion Changes - Concise List   09/01/2006 08:14:06 PM PDT
quote locked
API Changes
* You no longer need to strip special codes from item links before passing them to item information functions.
* Item information functions accept an item ID, an item link, or the name of an item in your inventory.
* Inventory functions will accept a slot name in addition to a slot number.
* Spell information functions take a spell name, or the spell ID followed by "pet" or "spell"; e.g. IsSpellInRange("Growl") or IsSpellInRange(2, "pet"); (Updated 10/13)

API Changes: Strings
* NEW ... = strsplit("delimiters", "string" [,"limit"]) -- Split a string on any of the delimiter characters.
* NEW string = strjoin("separator", ...) -- Join strings with a separator
* NEW string = strconcat(...) -- Join strings without a separator

API Changes: Bindings
* NEW SetBindingSpell("KEY", "Spell Name") -- Set a key binding directly to a spell, uses the same spell name syntax as /cast
* NEW SetBindingClick("KEY", "ButtonName" [,"mouseButton"]) -- Set a key binding directly to a Button object. The click sends a mouse down when the key is pressed, and a mouse up when it is released.
* NEW SetOverrideBinding(owner, isPriority, "KEY" [,"COMMAND"]) -- Set (or clear) an override key binding.
* NEW SetOverrideBindingSpell(owner, isPriority, "KEY", "spellname")
* NEW SetOverrideBindingClick(owner, isPriority, "KEY", "ButtoName"[,"mouseButton"])
* NEW ClearOverrideBindings(owner) -- Reset all overrides belonging to an owner.
* UPDATED action = GetBindingAction("KEY" [,checkOverride])
* NEW IsModifierKeyDown() -- equivalent to (IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown())

API Changes: Security and Protection
* NEW isSecure = issecure() -- Determine if the current environment is secure
* NEW isSecure = issecurevariable([table,] "name") -- Determine if the specified variable is secure.
* NEW ... = securecall(function or "functionName", ...) -- Call a function from a secure environment without risking secure status.
* NEW hooksecurefunc([table,] "functionName", hookfunc) -- Creates a secure 'post hook' for the named function. The hookfunc is invoked after the original function, and receives the same parameters. Return values from hookfunc are discarded. This is the only safe way to hook functions that execute protected functionality.
* NEW locked = InCombatLockdown() -- Returns true if the in-combat AddOn restrictions are active.

API Changes: Information
* NEW GetCritChance()
* NEW GetRangedCritChance()
* NEW GetSpellCritChance(school)
* UPDATED itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, invTexture = GetItemInfo(itemID|"itemLink") -- Now returns item level WARNING - This change is not backward compatible
* NEW spell, rank, displayName, icon, startTime, endTime = UnitCastingInfo("unit")
* NEW spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo("unit")
* NEW type, id, subtype = GetActionInfo(slot)
* NEW startTime, duration, enable = GetItemCooldown(item)
* NWE usable, noMana = IsUsableItem(item)
* NEW consumable = IsConsumableItem(item)
* NEW equipped = IsEquippedItem(item)
* NEW casting = IsCurrentItem(item)
* NEW hasRange = ItemHasRange(item)
* NEW result = IsItemInRange(item, [unit]) - nil for no valid target, 0 for out of range, 1 for in range
* UPDATED result = IsActionInRange([unit])

API Changes: Spell Information
* RENAMED isPassive = IsPassiveSpell(spell) -- Formerly IsSpellPassive(spell)
* NEW isAttack = IsAttackSpell(spell)
* NEW isAutoRepeating = IsAutoRepeatSpell(spell)
* NEW usable, noMana = IsUsableSpell(spell)
* NEW hasRange = SpellHasRange(spell)
* NEW result = IsSpellInRange(spell, [unit]) - is nil for no valid target, 0 for out of range, 1 for in range

API Changes: Spell Casting
* NEW SetActionSelfCastKey("SHIFT" or "CTRL" or "ALT")
* NEW key = GetActionSelfCastKey()
* NEW down = IsActionSelfCastKeyDown()

API Changes: Auto Looting
* NEW SetAutoLootDefault(enabled)
* NEW enabled = GetAutoLootDefault()
* NEW SetAutoLootToggleKey("SHIFT" or "CTRL" or "ALT")
* NEW key = GetAutoLootToggleKey()
* NEW down = IsAutoLootKeyDown()

API Changes: Attacking
* NEW StopAttack()

API Changes: Active Buffs/Auras
* UPDATED texture = GetPlayerBuffTexture(id or "name"[,"rank"]) - Added name/rank
* UPDATED type = GetPlayerBuffDispelType(id or "name"[,"rank"]) - as above
* UPDATED count = GetPlayerBuffApplications(id or "name"[,"rank"]) - as above
* UPDATED CancelPlayerBuff(id or "name"[,"rank"]) - as above
* NEW count = UnitHasBuff("unit", "name"[, "rank"])
* NEW count = UnitHasDebuff("unit", "name"[, "rank"])

API Changes: Party Management
* NEW InviteUnit("unit" or "name") - Replaces InviteByName/InviteToParty
* NEW UninviteUnit("unit" or "name") - Replaces UninviteByName/UninviteFromParty

(continued...)

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 2. Re: Expansion Changes - Concise List   09/01/2006 08:27:38 PM PDT
quote locked
Frame Features
* Frames can now specify multiple comma separated templates in the inherits XML attribute, and will inherit each of them in the order they appear
* Frame handlers now are passed parameters in addition to setting the global variables when executed. Accessing these parameters locally is faster than accessing the globals, and is recommended.
* Frames no longer share a single virtual metatable, instead each type has its own metatable with a pre-populated index for faster method lookups.
* In addition to OnClick, Button frames also have PreClick and PostClick handlers, invoked before and after the OnClick respectively.
* Script handlers defined in XML are implicitly wrapped with a function declaration (and trailing end) as follows (NOTE: AddOns that hook script handlers must now pass these parameters):
* default: function(self)
* OnAttributeChanged: function(self,name,value)
* OnChar: function(self,text)
* OnCharComposition: function(self,text)
* OnClick: function(self,button)
* OnColorSelect: function(self,r,g,b)
* OnCursorChanged: function(self,x,y,w,h)
* OnDoubleClick: function(self,button)
* OnDragStart: function(self,button)
* OnEnter: function(self, motion)
* OnEvent: function(self,event,...)
* OnHorizontalScroll: function(self,offset)
* OnHyperlinkClick: function(self,link,text,button)
* OnHyperlinkEnter: function(self,link,text)
* OnHyperlinkLeave: function(self,link,text)
* OnInputLanguageChanged: function(self,language)
* OnKeyDown: function(self,key)
* OnKeyUp: function(self,key)
* OnLeave: function(self, motion)
* OnMouseDown: function(self,button)
* OnMouseUp: function(self,button)
* OnMouseWheel: function(self,delta)
* OnMovieShowSubtitle: function(self,text)
* OnScrollRangeChanged: function(self,xrange,yrange)
* OnSizeChanged: function(self,w,h)
* OnTooltipAddMoney: function(self,cost)
* OnUpdate: function(self,elapsed)
* OnValueChanged: function(self,value)
* OnVerticalScroll: function(self,offset)
* PostClick: function(self,button)
* PreClick: function(self,button)

Frame Methods
* NEW minx,miny,width,height = Region:GetRect()
* NEW minx,miny,width,height = Frame:GetBoundsRect()
* NEW isProtected = Frame:IsProtected()
* NEW canChange = Frame:CanChangeProtectedState()
* NEW Frame:SetAttribute("name", value) -- Set an attribute on a frame, for protected frames this method is protected in combat.
* NEW value = Frame:GetAttribute("name")
* NEW Frame:AllowAttributeChanges() -- Temporarily allow attribute changes during combat, this function is protected.

Event Changes
There are a number of new events:
* UNIT_TARGET, "unit" is fired when a unit's target changes (primary units only)
* PLAYER_FOCUS_CHANGED is fired when the focus unit is changed
* UNIT_SPELLCAST_SENT, "player", spell, rank, target
* UNIT_SPELLCAST_START, unit
* UNIT_SPELLCAST_STOP, unit
* UNIT_SPELLCAST_FAILED, unit
* UNIT_SPELLCAST_INTERRUPTED, unit
* UNIT_SPELLCAST_DELAYED, unit
* UNIT_SPELLCAST_SUCCEEDED, "player", spell, rank
* UNIT_SPELLCAST_CHANNEL_START, unit
* UNIT_SPELLCAST_CHANNEL_UPDATE, unit
* UNIT_SPELLCAST_CHANNEL_STOP, unit
* The old SPELLCAST_* and SPELLCAST_CHANNEL_* events are obsolete.
* PLAYER_REGEN_DISABLED is sent before protected frames are locked down
* PLAYER_REGEN_ENABLED is sent after protected frames are unlocked
* MACRO_ACTION_FORBIDDEN: sent when a macro tries use actions that are always forbidden (movement, targeting, etc.). The first argument is the name of the protected function that was called.
* ADDON_ACTION_FORBIDDEN: sent when an addon tries use actions that are always forbidden (movement, targeting, etc.). The first argument is the name of the addon that was last involved in the execution path, and the second argument is the protected function that was called.
* MACRO_ACTION_BLOCKED: sent when a macro tries use actions that are blocked in combat or require interactive input (spell casting, trading, etc.). The first argument is the name of the protected function that was called.
* ADDON_ACTION_BLOCKED: sent when an addon tries use actions that are blocked in combat or require interactive input (spell casting, trading, etc.). The first argument is the name of the addon that was last involved in the execution path, and the second argument is the protected function that was called.

Bug Fixes
* Fixed missing CHAT_MSG_SPELL_SELF_BUFF messages (Opening, Mining, Gathering)

Last updated 2006-10-18 14:35 pacific

[ Post edited by Iriel ]


UI and Macros Forum MVP - Understand GC!
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 6. Re: Expansion Changes - Concise List   09/02/2006 04:09:22 PM PDT
quote locked
WoW 2.0 will be using Lua 5.1.

The main advantage of Lua 5.1 is the incremental garbage collection, and the full functionality of the 5.1 collectgarbage() function is available to the WoW scripting system.

For the most part, this is a seamless transition, but there are two syntax changes that will need to be made in a lot of addons:
for k,v in table do stuff end
changes to:
for k,v in pairs(table) do stuff end
and
function foo(...) for i=1, arg.n do local v = arg[i] end end
changes to:
function foo(...) for i=1, select("#", ...) do local v = select(i, ...) end end

WoW Lua 5.1 is currently compiled with these options:

#define LUAI_GCPAUSE 200
#define LUAI_GCMUL 200
#undef LUA_COMPAT_GETN
#undef LUA_COMPAT_VARARG
#undef LUA_COMPAT_MOD
#undef LUA_COMPAT_LSTR
#undef LUA_COMPAT_GFIND

There are also these changes:
Added difftime()
Added gmatch() as an alias for str.gmatch()
Added strmatch as an alias for str.match()
Added strrev() as an alias for str.reverse()
The alias mod() now maps to math.fmod()

[ Post edited by Slouken ]

60
View All Posts by This User Toggle Ignore / Unignore This User
  • 7. Re: Expansion Changes - Concise List   09/02/2006 04:24:43 PM PDT
quote locked
I don't understand half of what that means, but it still looks good. Thanks for the informative thread.

http://www.ctprofiles.net/886556


Q u o t e:
If you're rowing upstream in a canoe and a wheel falls off, how many pancakes fit in a dog house? None! Ice cream doesn't have bones!
1
View All Posts by This User Toggle Ignore / Unignore This User
Zg
  • Shattered Hand
  • 8. Re: Expansion Changes - Concise List   09/02/2006 07:52:01 PM PDT
quote locked
I cant wait for the expansion.
60
View All Posts by This User Toggle Ignore / Unignore This User
  • Warsong
  • 9. Re: Expansion Changes - Concise List   09/02/2006 11:19:49 PM PDT
quote locked
Thanks for the annoucement.

Does this mean we won´t be able to use 1.12 addons at expansion? (assuming there is no 1.13)
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 10. Re: Expansion Changes - Concise List   09/02/2006 11:54:43 PM PDT
quote locked

Q u o t e:
Thanks for the annoucement.

Does this mean we won´t be able to use 1.12 addons at expansion? (assuming there is no 1.13)


You can use your old 1.12 mods, however, like with any patch, some mods may need minor updates.

AtlasLoot Enhanced:
http://www.daviesh.com/atlasloot_enhanced/
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 12. Re: Expansion Changes - Concise List   09/04/2006 09:53:11 AM PDT
quote locked
The following slash commands have been added for WoW 2.0:
/targetlasttarget
/use <itemname>
/equip <itemname>
/equipslot <slot> <itemname>
/petattack
/petfollow
/petstay
/petpassive
/petdefensive
/petaggressive

[ Post edited by Slouken ]

Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 13. Re: Expansion Changes - Concise List   09/04/2006 09:54:59 AM PDT
quote locked
In WoW 2.0, you will be able to bind keys directly to spells, using the scripting interface, e.g.
/script SetBinding("[", "Holy Light")

[ Post edited by Slouken ]

60
View All Posts by This User Toggle Ignore / Unignore This User
  • 14. Re: Expansion Changes - Concise List   09/04/2006 10:24:36 AM PDT
quote locked
OMG Slouken you rule! RULE I tells ya!

Customer Service Forum MVP
Green means it's good!
Greatest Race of Hunters: http://gallery.filefront.com/DeadlyKris//283797/
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 15. Re: Expansion Changes - Concise List   09/04/2006 11:13:56 AM PDT
quote locked

Q u o t e:
The following slash commands have been added for WoW 2.0:
/targetlasttarget
/use <itemname>
/equip <itemname>
/equipslot <slot> <itemname>
/petattack
/petfollow
/petstay
/petpassive
/petdefensive
/petaggressive


This. Absolutely. Rocks.


Q u o t e:
In WoW 2.0, you will be able to bind keys directly to spells, using the scripting interface, e.g.
/script SetBinding("[", "Holy Light")


This is pretty cool too. Will this work even if the skill isn't on any action bars/button? If so, that'd be neato.


Steelfistv: 60 Dwarven Male Hunter
Constantharm: 60 Human Female Priest
Dolosus: 52 Undead Female Rogue
Blizzard Entertainment
View All Posts by This User ignore-inactive
Slouken
Blizzard Poster
  • 16. Re: Expansion Changes - Concise List   09/04/2006 11:15:22 AM PDT
quote locked

Q u o t e:

This is pretty cool too. Will this work even if the skill isn't on any action bars/button? If so, that'd be neato.



Yep. :)
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 17. Re: Expansion Changes - Concise List   09/04/2006 11:21:47 AM PDT
quote locked

Q u o t e:


Yep. :)


Sweet! ..to quote a MVP:


Q u o t e:
OMG Slouken you rule! RULE I tells ya!

Steelfistv: 60 Dwarven Male Hunter
Constantharm: 60 Human Female Priest
Dolosus: 52 Undead Female Rogue
60
View All Posts by This User Toggle Ignore / Unignore This User
  • Sargeras
  • 18. Re: Expansion Changes - Concise List   09/04/2006 11:46:41 AM PDT
quote locked

Q u o t e:
The following slash commands have been added for WoW 2.0:
/targetlasttarget
/use <itemname>
/equip <itemname>
/equipslot <slot> <itemname>
/petattack
/petfollow
/petstay
/petpassive
/petdefensive
/petaggressive


I take it this means we get API functions like:
UseItemByName(itemName)
EquipItemByName(itemName [, slot])

"Changing the interface art is fine. Everything else is off limits." -- slouken
60
View All Posts by This User Toggle Ignore / Unignore This User
  • 19. Re: Expansion Changes - Concise List   09/04/2006 12:05:39 PM PDT
quote locked
Will BC do compiling of LUA code instead of interpreting it?
1 . 2 . 3 . 5 . 7 . 9 . 11 . 13 . 15 . 17 . 19 . 21 . 23 . 25 . 27 . 29 . 31 . 33 . 35 . 37 . 39 . 41 . 43 . 44
Forum Nav : Jump To This Forum
Blizzard Entertainment