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

Edit: Iriel's ACTUAL API Changes - 2.3.3 to 2.4.1 thread is posted here.

As usual, Iriel's post from the Blizz 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.4 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 2008-02-28 12:26 Pacific)

Significant Changes
* The combat logging mechanism is completely overhauled with explicit data instead of text strings delivered to the UI. See slouken's post below for a sneak-peak at some of the current details. Highlights include detailed flags indicating relationship of involved units to player, unique identifiers for units with the same name within the combat log -- great for log analysis.

http://forums.worldofwarcraft.com/th...3291&sid=1#177
http://forums.worldofwarcraft.com/th...6158&sid=1#200
http://forums.worldofwarcraft.com/th...8659&sid=1#207
http://forums.worldofwarcraft.com/th...3100&sid=1#231

* The combat log range is now everything you can see.

* The In-game Interface Options screen is being revamped and the new architecture should allow AddOn authors to modify its contents without the taint issues presented by the current system. Additionally this system will contain an area for AddOn authors to present their own configuration options. Authors interested in this feature should be sure to experiment on the PTRs before patch 2.4 is released so that any issues can be surfaced and discussed. Basic details on how to use this system can be found in code comments in the 2.4 UIOptionsPanel.lua.

http://forums.worldofwarcraft.com/th...3945&sid=1#156
http://forums.worldofwarcraft.com/th...3120&sid=1#294

Font String Display
* Textures can now be included in FontStrings locally using a new | escape code: |T<path>:<width>[:<height>:<xOffset>:<yOffset>]|t
* Selected textures can also be included in Chat messages and sent to other users, the current available textures are represented in a form like: {star}

http://forums.worldofwarcraft.com/th...3081&sid=1#293

Visual Settings
* There's a new cVar unitHighlights; 0 = no model highlighting with Alt-Z, 1 = model highlighting on with Alt-Z. (e.g. /console unitHighlights 1)
* Players can now toggle the display of Friendly and Enemy player names, as well as their pets and creations. You can toggle cosmetic pet names too. :)

Inventory Management
* NEW - freeSlots, bagType = GetContainerNumFreeSlots(bagIndex) -- Returns the number of free slots in a bag, and the type of items that can go in the bag. For bagType, 0 means any item can go in the bag.
* NEW - bagType = GetItemFamily(itemID | "name" | "itemLink") -- When used with a container, this returns the type of container. When used with an item, it returns the type of container the item can go in. However, bagType is a bitflag, so GetItemFamily for something that could go in a quiver (bagType 1) and an ammo pouch (bagType 2) would return 3. A bag that can hold both arrows and bullets would also return 3.

Information
* NEW - icon = GetItemIcon(item) -- Returns the icon for an item (as long as the item is valid), even if GetItemInfo returns nil.
* NEW - inRange = UnitInRange(unit) -- Determines if a unit is within a (fixed by Blizzard) useful range based on flash heal/cure range) This is now used by the Blizzard Raid UI (Confirmed to only apply to party/raid units)
* NEW - guid = UnitGUID("unit") - Returns a string representing a unique identifier for the given unit. This is the same string that is used in the combat log to identify a unit.

Events
* PARTY_MEMBER_ENABLE and PARTY_MEMBER_DISABLE will no longer provide information about which party member was enabled or disabled.
* There is a new event, UPDATE_INVENTORY_DURABILITY which will fire whenever the durability of an item in your inventory changes. (UPDATE_INVENTORY_ALERTS has not changed, and is sent in conjunction with UPDATE_INVENTORY_DURABILITY when appropriate.)

Secure Templates
* The SecureStateHeader now provides a mechanism to change its own attributes in response to state changes.

Debugging
* In 2.4, you'll be able to pass a coroutine as a first (optional) parameter to debugstack()

[More]

Last edited by Cairenn : 04-13-08 at 03:45 PM.
  Reply With Quote
03-02-08, 01:54 PM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
As per Slouken:

Combat Log Revamp!

In 2.4 the combat log is being completely reimplemented so that it sends events with arguments instead of text strings to the UI code.

It's still in development, so nothing is final, but here is a raw sneak preview:


-- Object type constants

-- Affiliation

COMBATLOG_OBJECT_AFFILIATION_MINE = 0x00000001;

COMBATLOG_OBJECT_AFFILIATION_PARTY = 0x00000002;

COMBATLOG_OBJECT_AFFILIATION_RAID = 0x00000004;

COMBATLOG_OBJECT_AFFILIATION_OUTSIDER = 0x00000008;

COMBATLOG_OBJECT_AFFILIATION_MASK = 0x0000000F;

-- Reaction

COMBATLOG_OBJECT_REACTION_FRIENDLY = 0x00000010;

COMBATLOG_OBJECT_REACTION_NEUTRAL = 0x00000020;

COMBATLOG_OBJECT_REACTION_HOSTILE = 0x00000040;

COMBATLOG_OBJECT_REACTION_MASK = 0x000000F0;

-- Ownership

COMBATLOG_OBJECT_CONTROL_PLAYER = 0x00000100;

COMBATLOG_OBJECT_CONTROL_NPC = 0x00000200;

COMBATLOG_OBJECT_CONTROL_MASK = 0x00000300;

-- Unit type

COMBATLOG_OBJECT_TYPE_PLAYER = 0x00000400;

COMBATLOG_OBJECT_TYPE_NPC = 0x00000800;

COMBATLOG_OBJECT_TYPE_PET = 0x00001000;

COMBATLOG_OBJECT_TYPE_GUARDIAN = 0x00002000;

COMBATLOG_OBJECT_TYPE_OBJECT = 0x00004000;

COMBATLOG_OBJECT_TYPE_MASK = 0x0000FC00;

-- Special cases (non-exclusive)

COMBATLOG_OBJECT_TARGET = 0x00010000;

COMBATLOG_OBJECT_FOCUS = 0x00020000;

COMBATLOG_OBJECT_MAINTANK = 0x00040000;

COMBATLOG_OBJECT_MAINASSIST = 0x00080000;

COMBATLOG_OBJECT_RAIDTARGET1 = 0x00100000;

COMBATLOG_OBJECT_RAIDTARGET2 = 0x00200000;

COMBATLOG_OBJECT_RAIDTARGET3 = 0x00400000;

COMBATLOG_OBJECT_RAIDTARGET4 = 0x00800000;

COMBATLOG_OBJECT_RAIDTARGET5 = 0x01000000;

COMBATLOG_OBJECT_RAIDTARGET6 = 0x02000000;

COMBATLOG_OBJECT_RAIDTARGET7 = 0x04000000;

COMBATLOG_OBJECT_RAIDTARGET8 = 0x08000000;

COMBATLOG_OBJECT_NONE = 0x80000000;

COMBATLOG_OBJECT_SPECIAL_MASK = 0xFFFF0000;



COMBATLOG = ChatFrame2;



-- Process the event and add it to the combat log

function CombatLog_AddEvent(...)

local info = ChatTypeInfo["COMBAT_MISC_INFO"];

local timestamp, type, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags = select(1, ...);

local message = format("%s> %s, %s, %s, 0x%x, %s, %s, 0x%x",

date("%H:%M:%S", timestamp), type,

srcGUID, srcName or "nil", srcFlags,

dstGUID, dstName or "nil", dstFlags);

for i = 9, select("#", ...) do

message = message..", "..(select(i, ...) or "nil");

end

COMBATLOG:AddMessage(message, info.r, info.g, info.b);

end



-- Save the original event handler

local original_OnEvent = COMBATLOG:GetScript("OnEvent");

COMBATLOG:SetScript("OnEvent",

function(self, event, ...)

if ( event == "COMBAT_LOG_EVENT" ) then

CombatLog_AddEvent(...);

return;

end

original_OnEvent(self, event, ...);

end

);

COMBATLOG:RegisterEvent("COMBAT_LOG_EVENT");


.

New API functions:
CombatLogResetFilter()
CombatLogAddFilter("events", "srcGUID" or srcMask, "dstGUID" or dstMask)
CombatLogSetRetentionTime(seconds)
seconds = CombatLogGetRetentionTime()
count = CombatLogGetNumEntries()
CombatLogSetCurrentEntry(index)
timestamp, type, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, ... = CombatLogGetCurrentEntry()
hasEntries = CombatLogAdvanceEntry(count)
CombatLogClearEntries()

Note that you can change filters on the fly and re-query previous combat log entries, which are retained for 5 minutes by default.

Last edited by Dolby : 03-18-08 at 08:29 PM.
  Reply With Quote
03-18-08, 07:11 PM   #3
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
*hip check to the top for rss feeds*
  Reply With Quote

WoWInterface » Site Forums » News » Upcoming 2.4 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