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, Auto-complete Code:
GetAutoCompleteRealms(realms) Fills the passed table with realm names (array {"realmName1","realmName2",...}). Unit Info Code:
local unitName = GetUnitName(unitid[,showServer]) -- UnitFrame.lua Code:
local sameServer = UnitIsSameServer("otherUnit") Code:
local isValid = BNIsFriendConversationValid(index) 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") Code:
local guildName, guildRankName, guildRankIndex, realm = GetGuildInfo("unit") 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, '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) Code:
local name, typeID, subtypeID, minLevel, maxLevel, recLevel, minRecLevel, maxRecLevel, 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) Code:
local savedWorldBosses = GetNumSavedWorldBosses() Code:
local bossName, worldBossID, bossReset = GetSavedWorldBossInfo(i); 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, Code:
JoinSingleLFG(category, lfgID) Code:
local mode, submode = GetLFGMode(category, lfgID) -- UIParent Code:
local inProgress, slots, members, category, lfgID, bgQueue = GetLFGRoleUpdate() Code:
local hasData, leaderNeeds, tankNeeds, healerNeeds, dpsNeeds, Code:
local suspendedPlayers = {} -- 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) 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, Code:
local x1,x2,y1,y2 = GetObjectIconTextureCoords(textureIndex) * 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); Code:
local isWargame = IsWargame() Code:
local arenarating, seasonPlayed, seasonWon, weeklyPlayed, weeklyWon = GetInspectArenaData(i) Code:
RequestRatedInfo() -- server request, "PVP_RATED_STATS_UPDATE" for reply? Code:
local rating, seasonBest, weeklyBest, seasonPlayed, seasonWon, Code:
local pointsThisWeek, maxPointsThisWeek, tier2Quantity, tier2Limit, tier1Quantity, Code:
StartWarGame("target"[, area]) Code:
local myCurrentHealAbsorb = UnitGetTotalHealAbsorbs("unitid") Code:
local isUnconscious = UnitIsUnconscious("unitid") 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() Code:
local specs = {} -- example {103,104} 'feral', 'guardian' spec ids as returned by GetSpecialization() Code:
C_NewItems.* Code:
local isBattlePayItem = IsBattlePayItem(bag,slot) 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"] = { 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() Code:
local val = GetSmoothProgressChange(value, displayedValue, range, elapsed, minPerSecond, maxPerSecond) -- UIParent |
Feels like there are a gazillion ways to get the amount of people/difficulty of an instance by now, and they just keep changing it :p
|
Thanks for posting this Dridzt. :)
|
Quote:
Which means I have to either hardcode them and update each time something is added or loop to an arbitrary higher number and skip non-implemented ids in hopes that they won't exceed it. Previously it was possible to make self-maintaining code with (as an example) Code:
local diffs,id = {},1 |
Hmm, would GROUP_ROSTER_UPDATE still fire for flexi-raids? Based on the new event, then I'd guess no, at least without testing. Just wondering how GetNumGroupMembers will work...
|
Judging by the feature's description, I'd guess that INSTANCE_GROUP_SIZE_CHANGED would fire when the amount of people inside the actual raid instance changes out of combat.
I doubt it will change anything for GROUP_ROSTER_UPDATE, which fires not only when people join/ leave the group but also on role changes and group changes and probably a few other things I forget. |
Ty i'll add these to my project aswell :)
|
I'm getting a global is nil error for UnitPVPRank(). Not sure what's going on here as it's still included in Blizzards HonorFrame.lua.
|
Thanks Dridzt.
Interesting, did rank icons disappear at some stage? It's the only place DUF uses UnitPVPRank() but I didn't start following API changes until late 4.x. I'll have a rummage around Wowpedia. Edit: I'm not sure it's intentional as GetPVPRankInfo() seems to still available and it pretty much requires UnitPVPRank(). Edit2: My bad, GetPVPRankInfo() is gone also so addons can't display rank information while the Blizzard UI can. Seems odd. Quote:
|
Just to finish my portion of this thread, the personal PVP ranking system did die with TBC to be replaced later by titles. I just hadn't realised given I didn't have to think about it until now.
The removal of these PVP functions is no longer a mystery, to me :p. |
I'm getting errors from lines of HybridScrollFrame.lua that don't exist in the live version of FrameXml (the addon works with no errors on Live):
Code:
Message: Interface\FrameXML\HybridScrollFrame.lua:183: attempt to perform arithmetic on local 'buttonHeight' (a nil value) |
Quote:
Is this your own addon or are you a user? It would help if you posted a link to the addon or the relevant lines of code where it errors, because without them all I can do is guess. Anyway if that addon has an "OnValueChanged" script handler you'll need to remove any self:GetParent() from the script handler and just pass self. Example: HybridScrollFrame_OnValueChanged(self:GetParent(), value) to HybridScrollFrame_OnValueChanged(self, value) If you want to post a version that won't break in 5.4 but retains compatibility with 5.3 you'll need to branch your code inside a client version check. One simple and cheap way to do that is by checking for the existence of one of the new constants. Example (assuming from error the addon is RestoShamanStat) Code:
HybridScrollFrame_OnValueChanged(LFG_SUBTYPEID_FLEXRAID and self or self:GetParent(),value) |
Quote:
Is there a way I could have discovered the change to HybridScrollFrame:OnValueChanged for myself? I searched the web for an hour or two, finding nothing, before posting here... |
Something seems to be up with editbox:SetAltArrowKeyMode(). I used this on the chat edit box so I could browse through history without holding alt, but the function doesn't appear to do anything anymore. You have to press alt now.
|
I've not seen it mentioned in this thread but it looks like they have implemented [shapeshift] for temporary shapeshift scenarios like the last boss in Draktharon Keep. I tested it the other day with a very basic action bar addon and it worked as a visibility macro conditional to make a new bar appear when you are shapeshifted.
A screen shot and my mini addon is in one of the last few posts in the nUI thread here : http://www.wowinterface.com/forums/s...260#post283260 |
@Xrystal:
I can't find anything new regarding [shapeshift] in the 5.4.0 restricted environment files vs 5.3.0 so no idea what's happening there. |
It was something Scott was telling me about because we noticed that we couldn't implement the tempshapeshiftbar scenario into nUI. And seeing as I have never seen any mention of the other bar macro conditionals in the framexml I assumed it was changed behind the scenes with the other stuff.
|
On looking at the tempshapeshift scenario in drak keep the other day it looks like they did get it working in 5.3 using that macro conditional. Tested it with a simple action bar addon and it switched as expected, so not a new feature for 5.4. But perhaps a sneak fix for 5.3.
|
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. They come with a couple events VIGNETTE_ADDED and VIGNETTE_REMOVED which fire when an icon appears or disappears, respectively. Both provide the instanceID of the affected vignette. |
Given that I'm writing LibMapPins-1.0, which won't be ready for 5.4 (least not by patch day), I'm guessing I don't need to accommodate the new vignettes, as they show up on the minimap by default, correct?
|
All times are GMT -6. The time now is 10:48 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI