View Single Post
06-13-13, 02:18 AM   #1
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
Assorted 5.4.0 API changes

Legend
New|Modified|Breaking Change|Removed
Changes up to build: 17345 "release"
##Interface: 50400
leaky _ fixed in 17191
Oscarucb was kind enough to forward me a notice about changes to the tradeskill links.
Instead of copy-pasting I'll just add a link to the post on Wowace so discussion can happen in a single place.
5.4 changes to tradeskill hyperlinks

A whole bunch of Arena Team related events, API and widgets have been removed from various parts of the game (guild frame, calendar, unitpopup, petition, itemref, etc,etc)
Might try to go into more details later but essentially if you had any code that relates to arena teams it's broken.

Auction
Code:
local name, texture, count, quality, canUse, level, levelColHeader, minBid, minIncrement,
    buyoutPrice, bidAmount, highBidder, bidderFullName, owner, ownerFullName, 
    saleStatus, itemId, hasAllInfo =  GetAuctionItemInfo("bidder", index)
The 2 colored returns have been inserted before and after 'owner' pushing it to #14 from #13 and the last 3 returns by 2 places.

Auto-complete
Code:
GetAutoCompleteRealms(realms)
Auto-complete works in 2 steps after checking if the player has typed a realm separator '-' it runs this function.
Fills the passed table with realm names (array {"realmName1","realmName2",...}).

Unit Info
Code:
local unitName = GetUnitName(unitid[,showServer]) -- UnitFrame.lua
returns 'name-realm' instead of 'name - realm' (spaces removed) and most commands that accept a unitname now, work with 'name-server' format (/invite, /ginvite, /trade etc)
Code:
local sameServer = UnitIsSameServer("otherUnit")
-- was UnitIsSameServer("unit","otherUnit").
Function now takes only 1 parameter "otherUnit" and checks against "player" by default.
Code:
local isValid = BNIsFriendConversationValid(index)
globalstring
CONVERSATION_INCOMPATIBLE_CLIENT = "This friend is not using a client capable of conversations.";

X-Realms are now called 'Coalesced' and have FOREIGN_SERVER_LABEL enUS: ' (*)' appended to the name when showServer=nil/false (same as in 5.3).
Virtual-Realms are called 'Connected' and have INTERACTIVE_SERVER_LABEL enUS: ' (#)' appended to the name.
Code:
local relationship = UnitRealmRelationship("unit") 
relationship is one of the following constants:
LE_REALM_RELATION_VIRTUAL|LE_REALM_RELATION_COALESCED|LE_REALM_RELATION_SAME
Code:
local guildName, guildRankName, guildRankIndex, realm = GetGuildInfo("unit")
realm is a new return.
REALM_SEPARATORS = "-@#*"; --Interesting globalstring, seems more than just '-' will be used.
'-x' option added to /who -option"searchstring" for exact match (guessing to allow limiting results when you know the fullname to search for 'player-server')

Flex-Raid
New event: "INSTANCE_GROUP_SIZE_CHANGED"
Code:
local name, instanceType, difficultyID, difficultyName, maxPlayers, playerDifficulty,
    isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
'instanceGroupSize' = maxPlayers for fixed size raids, holds the actual raid size for the new flexible raid (between (8?)10 and 25)
'difficultyID' for Flexi raid is (probably placeholder) 14 on first PTR build.
Code:
local id = GetBestFlexRaidChoice()
Code:
local numFlexDungeons = GetNumFlexRaidDungeons()
Code:
local id, name, typeID, subtype, minLevel, maxLevel = GetFlexRaidDungeonInfo(i) 
-- i = 1, GetNumFlexRaidDungeons()
Code:
local name, typeID, subtypeID, minLevel, maxLevel, recLevel, minRecLevel, maxRecLevel, 
   expansionLevel, groupID, textureFilename, difficulty, maxPlayers, description,
    isHoliday, repAmount, forceHide = GetLFGDungeonInfo(dungeonID)
FLEX_RAID_SHOW_LEVEL = 90; --constant
LFG_SUBTYPEID_FLEXRAID = 5; --constant has been added as a possible return for subtypeID.
PLAYER_DIFFICULTY4 = "Flexible"; globalstring

Proving Grounds
Event: "PROVING_GROUNDS_SCORE_UPDATE" Argument: score
CHALLENGE_MEDAL_PLAT -- new constant; used in proving grounds endless mode.
Code:
local diffID, currWave, maxWave, duration = C_Scenario.GetProvingGroundsInfo()
Code:
local inProvingGround = IsInProvingGround() -- UI function (watchframe.lua)
RaidInfo
Code:
local savedWorldBosses = GetNumSavedWorldBosses()
Code:
local bossName, worldBossID, bossReset = GetSavedWorldBossInfo(i); 
-- i = 1,GetNumSavedWorldBosses()
instanceID for worldbosses: 322
globalstrings
WORLD_BOSS_FOUR_CELESTIALS = "The Four Celestials";
WORLD_BOSS_GALLEON = "Galleon";
WORLD_BOSS_NALAK = "Nalak";
WORLD_BOSS_OONDASTA = "Oondasta";
WORLD_BOSS_ORDOS = "Ordos";
WORLD_BOSS_SHA_OF_ANGER = "Sha of Anger";

Code:
local inParty, joined, queued, noPartialClear, achievements, lfgComment, 
    slotCount, category, leader, tank, healer, dps = GetLFGInfoServer(category, lfgID)
Code:
JoinSingleLFG(category, lfgID)
Code:
local mode, submode = GetLFGMode(category, lfgID) -- UIParent
Code:
local inProgress, slots, members, category, lfgID, bgQueue = GetLFGRoleUpdate()
-- bgQueue pushed from #4 to #5.
Code:
local hasData, leaderNeeds, tankNeeds, healerNeeds, dpsNeeds,
totalTanks, totalHealers, totalDPS, instanceType, instanceSubType,
instanceName, averageWait, tankWait, healerWait, damageWait,
myWait, queuedTime, activeID = GetLFGQueueStats(category[, activeID])
Code:
local suspendedPlayers = {}
suspendedPlayers = GetLFGSuspendedPlayers(category)
-- category is one of
-- LE_LFG_CATEGORY_FLEXRAID| LE_LFG_CATEGORY_SCENARIO| LE_LFG_CATEGORY_RF|
-- LE_LFG_CATEGORY_LFR| LE_LFG_CATEGORY_LFD

Timers
Code:
local unknown, elapsedTime, type = GetWorldElapsedTime(timerID)
'type' changed from boolean isChallengeMode to one of
LE_WORLD_ELAPSED_TIMER_TYPE_PROVING_GROUND
LE_WORLD_ELAPSED_TIMER_TYPE_CHALLENGE_MODE
LE_WORLD_ELAPSED_TIMER_TYPE_NONE

Map/MiniMap
Code:
local name, description, textureIndex, x, y, mapLinkID, inBattleMap, 
    graveyardID, areaID, poiID, isObjectIcon = GetMapLandmarkInfo(i)
'isObjectIcon' = new type of POI and
Code:
local x1,x2,y1,y2 = GetObjectIconTextureCoords(textureIndex)
new function to get the poi texture.
* from Semlar
Some new, possibly unintentional api functions regarding the new treasure chest/rare minimap icons:
local numVignettes = C_Vignettes.GetNumVignettes() -- number of visible icons
local vignetteInstanceID = C_Vignettes.GetVignetteInstanceID(i) -- takes 1 - numVignettes
local x, y, name, unknown = C_Vignettes.GetVignetteInfoFromInstanceID(vignetteInstanceID)
x and y coordinates refer to the icon's position relative to the bottom left of the minimap and change based on the size and scale of the minimap as well as (apparently) the window resolution or possibly the aspect ratio.
Event: "VIGNETTE_ADDED" Argument: instanceID
Event: "VIGNETTE_REMOVED" Argument: instanceID
They fire when an icon appears or disappears, respectively.
Both provide the instanceID of the affected vignette.

Archaeology
Event: "ARTIFACT_DIGSITE_COMPLETE" Arguments: researchBranchID
Event: "ARCHAEOLOGY_SURVEY_CAST" Arguments: numFindsCompleted, totalFinds
Event: "ARCHAEOLOGY_FIND_COMPLETE" Arguments: numFindsCompleted, totalFinds
Code:
local canScan = CanScanResearchSite()
Code:
local RaceName, RaceTexture = GetArchaeologyRaceInfoByID(researchBranchID);
-- GetArchaeologyRaceInfo(researchBranchID) seems to still be around but I'd keep an eye out for it getting deprecated/removed shortly.
PvP
Code:
local isWargame = IsWargame()
Code:
local arenarating, seasonPlayed, seasonWon, weeklyPlayed, weeklyWon = GetInspectArenaData(i)
-- i = 1, MAX_ARENA_TEAMS
MAX_ARENA_TEAMS -- moved to constants.lua so it's available on client start (was in LoD addon)

Code:
RequestRatedInfo() -- server request, "PVP_RATED_STATS_UPDATE" for reply?
RequestRated[Arena|Battleground]Info(i) seem to have been removed.
Code:
local rating, seasonBest, weeklyBest, seasonPlayed, seasonWon, 
    weeklyPlayed, weeklyWon, cap = GetPersonalRatedInfo(id)
-- id =1-4 (1:Arena2v2,2:Arena3v3,3:Arena5v5,4:RatedBG) the individual GetPersonalRated[Arena|BG]Info(i) seem to have been removed.
Code:
local pointsThisWeek, maxPointsThisWeek, tier2Quantity, tier2Limit, tier1Quantity, 
    tier1Limit, randomPointsThisWeek, maxRandomPointsThisWeek, arenaReward, ratedBGReward = GetPVPRewards()
-- 2 returns added. The values they provide used to be at #3 and #5 tier2Quantity,tier1Quantity.
Code:
StartWarGame("target"[, area]) 
-- "target" unitid was unitName previously
Combat
Code:
local myCurrentHealAbsorb = UnitGetTotalHealAbsorbs("unitid")
New widgets on all unitframes for showing overhealAbsorb and healAbsorb.
Code:
local isUnconscious = UnitIsUnconscious("unitid")
-- new type of "death"? it appears to be a new state of UnitHealth("unitid") == 0.
A fontstring has been added to all unitframes as well to display the unconscious status.
Event: "UNIT_HEAL_ABSORB_AMOUNT_CHANGED"
Event: "COMBAT_LOG_EVENT_UNFILTERED"
Base parameters remain unchanged.
SubEvents
"SPELL_INSTAKILL" -- has gotten a new suffix parameter arg15 (it had none)
"PARTY_KILL", "UNIT_DIED", "UNIT_DESTROYED","UNIT_DISSIPATES"
-- have gotten a new prefix parameter arg12 (they had none)
The new parameter in all cases is unconsciousOnDeath type:number 0|1
Globalstrings enUS.
ACTION_PARTY_KILL_UNCONSCIOUS = "knocked out";
ACTION_PARTY_KILL_UNCONSCIOUS_FULL_TEXT = "%1$s has knocked out %4$s!";
ACTION_PARTY_KILL_UNCONSCIOUS_POSSESSIVE = "0";
ACTION_SPELL_INSTAKILL_UNCONSCIOUS = "knocked out";
ACTION_SPELL_INSTAKILL_UNCONSCIOUS_FULL_TEXT = "%1$s %2$s knocks out %4$s.";
ACTION_SPELL_INSTAKILL_UNCONSCIOUS_FULL_TEXT_NO_SOURCE = "%2$s knocks out %4$s.";
ACTION_SPELL_INSTAKILL_UNCONSCIOUS_POSSESSIVE = "1";
ACTION_UNIT_BECCOMES_UNCONSCIOUS = "collapses";
ACTION_UNIT_BECOMES_UNCONSCIOUS_FULL_TEXT = "%4$s collapses.";
ACTION_UNIT_BECOMES_UNCONSCIOUS_POSSESSIVE = "0";
Code:
TimeoutResurrect()
Items
Code:
local specs = {}
specs = GetItemSpecInfo(itemLink, specs)
-- fills and returns the passed 'specs' table with an array of specs the item with itemLink is flagged for;
-- example {103,104} 'feral', 'guardian' spec ids as returned by GetSpecialization()
Code:
C_NewItems.* 
.IsNewItem(bag,slot) 
.RemoveNewItem(bag,slot) 
.ClearAll()
-- at a guess used to highlight newly acquired items in the bags until you mouseover them 
-- like Rift and other modern mmos are doing
Code:
local isBattlePayItem = IsBattlePayItem(bag,slot)
More loot patterns of interest to loot parsers.
LOOT_ITEM_BONUS_ROLL = "%s receives bonus loot: %s.";
LOOT_ITEM_BONUS_ROLL_MULTIPLE = "%s receives bonus loot: %sx%d.";
LOOT_ITEM_BONUS_ROLL_SELF = "You receive bonus loot: %s.";
LOOT_ITEM_BONUS_ROLL_SELF_MULTIPLE = "You receive bonus loot: %sx%d.";
LOOT_ITEM_PUSHED = "%s receives item: %s.";
LOOT_ITEM_PUSHED_MULTIPLE = "%s receives item: %sx%d.";

Combat Pets
Event: "PET_BATTLE_PET_TYPE_CHANGED" Arguments: petOwner, petIndex

AddOns
New event: "SAVED_VARIABLES_TOO_LARGE" Arguments: "addonName"
Globalstring: SAVED_VARIABLES_TOO_LARGE = "Your computer does not have enough memory to load settings from the following AddOn. Please disable some AddOns.\n\n|cffffd200%s|r";
Code:
StaticPopupDialogs["SAVED_VARIABLES_TOO_LARGE"] = {
	text = SAVED_VARIABLES_TOO_LARGE,
	button1 = OKAY,
	timeout = 0,
	showAlertGear = 1,
	hideOnEscape = 1
}
Addon: Blizzard_ShopUI renamed to Blizzard_StoreUI
Event: "STORE_PRODUCT_DELIVERED" arguments: "icon"
New file: SecureCapsule.lua used to remove things from the global environment (C_PurchaseAPI.* and a bunch of globalstrings related to in-game store atm) and import them for use in the new isolated Blizzard_ShopUI
"StoreMicroButton" added to MICRO_BUTTONS

Lua
Code:
local num = securerandom([lower,[upper]])
Code:
local isForbidden = button:IsForbidden()
-- This appears to be in place to restrict the functionality of /click macros, secure attributes, on specific buttons.
-- Probably to prevent "spoofing" store buttons?
StatusBars
Code:
local val = GetSmoothProgressChange(value, displayedValue, range, elapsed, minPerSecond, maxPerSecond) -- UIParent
Was defined in UnitPowerBarAlt and the added parameters were inaccessible locals defined outside the function.

Last edited by Dridzt : 08-30-13 at 09:38 PM. Reason: builds:17093>17124>17161>17169>17191>17205>17227>17247>17252 >17299>17314>17321>17331>17337>17345
  Reply With Quote