Notable API changes in Legion
Hi everyone, I'd like to share some notable API changes in Legion. All of them have been tested in current alpha realm and I'm pretty sure you guys may in need of them. :-)
https://github.com/icyblade/wow_addons I did some changes to these addons so they will work in alpha environment. |
Quote:
|
Quote:
|
Quote:
|
Quote:
Here is what I'm using in alpha https://github.com/icyblade/wow_addons |
Quote:
|
Quote:
|
Quote:
|
Yeah the game recognizes that you have addons installed, but it won't run them.
I currently have RealUI installed on my alpha client (mostly because addons were legit active for that first public build), so if addons were being run it would be very obvious for me. |
animationGroup:SetCharge()
I think you mean SetChange? What do we use now, the SetChange is what creates the fade over time. Is there a setting some place else for this. Was looking thru the code and found SetToAlpha() and SetFromAlpha(). Think these are new animationgroup functions. I wonder if this fixes a bug from live. If you fade out a parent frame, and its children are also fading out at the same time. You can cause the child frames to be stuck in faded state. Only way is to reloadUI. I had to do some complicated coding in my addon to work around this bug. Be awesome if it was fixed. |
Quote:
|
After looking at WorldMapFrame.lua. My best guess until someone tests.
SetFromAlpha() is where you start from. SetToAlpha() is where you end at. |
Quote:
Quote:
I'm guessing they have made :SetTexture really dynamic. |
Yeah, they're using a "texture atlas" now, but I don't know if that's what is being discussed here. You can find out a very little bit about that HERE.
|
Quote:
Quote:
|
Quote:
|
Correct, tagging is no longer a thing, I'm unsure of members of the opposite faction tagging tho.
|
Tagging is still a thing, but it has changed and the api was consolidated to a single function: UnitIsTapDenied()
|
that is such a weird call name to choose over just consolidating it all into UnitIsTapped
|
Not really because most mobs will be tapable by more than one player ie. UnitIsTapped would return true but you can still kill the mob and get reward. What you will be checking for is the odd occaision you are denied the tap and reward.
|
ah, okay! (10chars)
|
Quote:
|
Anyway to turn a fileID back into a path name?
GetSpellInfo now returns a fileID instead of path on the 3rd parm. I have a spell scanner, and it excludes spells that are professions, by looking at the path name. Also is there anyway to quickly find out if a spell with a cast time returns a resource. Like Lava Burst spellID 51505. This returns 12 maeslstrom. Balance druids have a few spells that return resource as well. Edit: Took the hard way and scanned the spell book for spells with cast times that return power. |
Quote:
|
So anyway I can exclude profession spells?
|
I don't think this information is exposed through the API, you can make a suggestion for blizzard... Few lines of code to make someone happy, may be they consider it worthy?
|
|
I want it to scan all spells, not just player.
|
Fonts can get really large now, some where around 180 to 190 is the max size. And even at huge size they look really good, they stay smooth, doesn't get pixelated. It wouldn't throw an error so I have no way to find out the max value. 31 or 32 has always been the max size on live.
font size video https://www.youtube.com/watch?v=jYGA5qFDqGc |
Found out how to filter out trade skills when looking thru spells.
local TradeSkillID = C_TradeSkillUI.GetTradeSkillLineForRecipe(TradeSkillID) Comes back nil then its not a spell that belongs to any crafting. |
Quote:
In blizz UI they call it "recipeID", and use that value for both C_TradeSkillUI.GetTradeSkillLineForRecipe and GetSpellInfo, so it's safe to assume it's spell id after all. |
I just run a spellID thru it. but in some of their code they call it tradeskillid. But its still a spellID.
|
Why are GlobalStrings.lua and GlueStrings.lua gone from the FrameXML?
Is it a bug with extracting the game files or are they now defining it in C? https://github.com/Gethe/wow-ui-sour...a14341ad01c955 Edit: Ow, okay... |
They moved the global strings to a db file.
|
DrawLine isn't exactly anything revolutionary, sadly. It's just a shortcut to rotating and resizing texture A on top of texture B so that it resembles a line. It's actually Iriel's code, congratulations on getting featured :)
Code:
DrawLine(texture, canvasFrame, startX, startY, endX, endY, lineWidth, lineFactor, relPoint) |
It seems GetItemTransmogrifyInfo() it's been removed. Occuring here
Lua Code:
|
Quote:
lua Code:
|
GetNumDungeonMapLevels() now - contrary to its name! - returns not the total number, but a list of valid floor numbers on the current map.
lua Code:
|
Does someone know how to get the localized string for items now that GetAuctionItemClasses has been removed?
This is what I used to have: Lua Code:
|
New 7th parameter for GetGossipAvailableQuests() - isIgnored
Lua Code:
|
Quote:
|
Are there any changes in Statusbar functions?
I used to create a bar to monitor some auras, but it is no longer changing its value in BETA and staying at the end. https://github.com/siweia/NDui/blob/.../AuraWatch.lua ---------------------------------- I just find out the problem is those lines: Code:
Event.Timer = 0 |
Quote:
In my UI I have an inline Icon like this: Code:
local spellname, _, icon = GetSpellInfo(spellID) Anyone have a workaround, or should I fundamentally change my code for Legion? I'm also using ACE3 in my code, where I create a list from a key which is spells, and filling in the icon parameter ACE recieves with the Icon path, though hopefully once ACE3 adapts to the changes, the new ID will be sufficient. |
Spell Links have an extra parameter glyphId.
It's required to include it when used in chat channels, otherwise the link won't show up. Code:
/run SendChatMessage("\124cff71d5ff\124Hspell:133:0\124h[Fireball]\124h\124r") Code:
TEXT_MODE_A_STRING_SPELL = "|Hspell:%s:%s:%s|h%s|h" Code:
local _, spellId, glyphId, event = strsplit(":", link); https://github.com/Gethe/wow-ui-sour...tLog.lua#L3533 Only the number 0 seems to work for normal spell links. Haven't checked it with any glyphs on yet. Ofcourse we can still just use GetSpellLink() if the glyphId is not important. Not sure if this was already documented by someone else. |
Quote:
Go check the file, you would get something like "AUCTION_CATEGORY_CONSUMABLES, AUCTION_CATEGORY_GLYPHS, AUCTION_CATEGORY_RECIPES, AUCTION_CATEGORY_MISCELLANEOUS". |
Quote:
Code snippet below uses Icon the same was as live. Code:
local Name, _, Icon = GetSpellInfo(SpellID) |
Quote:
_G.GetItemClassInfo(LE_ITEM_CLASS_QUESTITEM) is now equal to old select(10, GetAuctionItemClasses()) BTW value for LE_ITEM_CLASS_QUESTITEM is now 12. I have problems with textures and fontstring. It seems taht somehow don't work as is. Tested my code from 6.2.x on 7.0.x and no textures in back and font don't changing. Will try place some nispets and more testing. OK here is piece of code what really works on 6.2.x but don't on 7.0.x local MF = CreateFrame("Frame", "TEST_FRAME", UIParent); MF:SetSize(200,200); MF:SetPoint("CENTER",UIParent,"CENTER",0,0) MF.texture = MF:CreateTexture(nil,"BACKGROUND"); MF.texture:SetTexture(0,0,0,1); MF.texture:SetAllPoints(MF) MF:Show() Actually I think problem is change in SetTexture function it seems 2nd variant with only RGBA don't working or need different arguments), As I reading thru SetTexture now taking path or ID not RGBA, valid. So it shall use SetColorTexture now for Legion. Am I right? (yes tested) shees |
Quote:
Code:
<Frame name="FlightMap_HighlightFlightLineTemplate" virtual="true"> |
Btw...the new API does not support AnimationGroup:SetChange() any more. They introduced setToFinalAlpha sort of. Does anyone have an example on how to do frame flashing with animation groups in legion?
|
Quote:
[12] - itemClassID (number) [13] - itemSubClassID (number) You could get their values (localized strings) by either the 6th and the 7th return of GetItemInfo or by: GetItemClassInfo(itemClassID) GetItemSubClassInfo(itemClassID, itemSubClassID) You could also compare the itemClassIDs directly to LE_ITEM_CLASS_* (LE_ITEM_CLASS_QUESTITEM in your case as Edik pointed out above) There is one case which is somewhat inconsistent and that is LE_ITEM_CLASS_CONSUMABLE. GetItemClassInfo(LE_ITEM_CLASS_CONSUMABLE) returns nil, but the 6th return of GetItemInfo for consumable items is "" (an empty string). |
Quote:
|
Did anyone find out how to get the correct item level of all those scalable quest rewards without tooltip scanning?
GetItemInfo(140722) for example returns the base itemlevel of 680 - the itemlevel for 110 is in the returned link when I query it at level 110, but when I try to get it with a level 100 character is shows 254 in the link, which seems too low ;) |
Quote:
|
OnUpdate changed to only 4 calls per second for anyone else?
|
|
Quote:
Quote:
|
Thanks, I found problem. GetTime is rounded to 0.25 for me, no idea why. (debugprofilestop works as intended, no problem with GetTime on live client)
Seems it is rounded on that gif too, but more accurate. |
Looks like GetTradeSkillSelectionIndex has changed in legion to C_TradeSkillUI.GetTradeSkillLine
Full arguments are local tradeSkillID, skillLineName, skillLineRank, skillLineMaxRank, skillLineModifier = C_TradeSkillUI.GetTradeSkillLine(); |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 07:29 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI