WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Notable API changes in Legion (https://www.wowinterface.com/forums/showthread.php?t=53248)

icyblade 03-22-16 07:32 PM

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. :-)
  • animationGroup:SetChange() has been removed
    This one occurs in such circustance:
    Lua Code:
    1. local flash = item:CreateAnimationGroup()
    2. for i = 1, 3 do
    3.     local fade = flash:CreateAnimation('Alpha')
    4.     fade:SetDuration(.2)
    5.     fade:SetChange(-.8)
    6.     fade:SetOrder(i * 2)
    7.  
    8.  
    9.     local fade = flash:CreateAnimation('Alpha')
    10.     fade:SetDuration(.3)
    11.     fade:SetChange(.8)
    12.     fade:SetOrder(i * 2 + 1)
    13. end
  • GetAuctionItemClasses() has been removed
    This one occurs in such circustance:
    Lua Code:
    1. local QUEST = select(10, GetAuctionItemClasses())
    In fact, QUEST == "Quest" in enUS, just a string indicating quest items.
  • SetTradeSkillItem() has been removed
    This one occurs in such circustance:
    Lua Code:
    1. hooksecurefunc(tooltip, 'SetTradeSkillItem', OnTradeSkill)
  • UnitIsTapped()/UnitIsTappedByPlayer() has been removed
    This one occurs in such circustance:
    Lua Code:
    1. if not isName and (dead or (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit))) then
    2.     return 0.5, 0.5, 0.5
  • UnitPowerMax()/UnitPower() should specify power type now, not an optional one
    We use this code now:
    Lua Code:
    1. local value = UnitPowerMax(unit)
    In Legion we should do something like this:
    Lua Code:
    1. local value = UnitPowerMax(unit, UnitPowerType(unit))
  • texture:SetTexture(r, g, b, a) changes into texture:SetColorTexture(r, g, b, a)
    texture:SetTexture(texture_path) is working as well, but Blizzard creates as new SetColorTexture to cover texture:SetTexture(r, g, b, a) function.
    In Legion if you want to specify texture by a texture path, use SetTexure. For RGBA value, use SetColorTexture instead.
  • item:125794:::::::::: is allowed now
    For item link, we use something like "item:125794:0:0:0:0:0:0" before.
    But in Legion, we can dismiss these zeros.
    For user who wants to regex an item link, this is useful.
  • We can use texture:SetTexture(file_id) now, so GetSpellInfo will not return a texture path as the 3rd return value
    We use this code to set an icon now:
    Lua Code:
    1. local _, _, icon = GetSpellInfo(spell_id)
    2. texture:SetTexture(icon)
    In Legion, that's easier:
    Lua Code:
    1. file_id = GetSpellTexture(spell_id)
    2. texture:SetTexture(file_id)
Here is what I'm using in alpha realm:
https://github.com/icyblade/wow_addons
I did some changes to these addons so they will work in alpha environment.

p3lim 03-23-16 04:51 AM

Quote:

Originally Posted by icyblade (Post 313723)
UnitPowerMax()/UnitPower() should specify power type now
We use this code now:
Lua Code:
  1. local value = UnitPowerMax(unit)
In Legion we should do something like this:
Lua Code:
  1. local value = UnitPowerMax(unit, UnitPowerType(unit))

Not new, this has been in for a few expansions now. Maybe you meant it's not optional any more?

Gello 03-23-16 07:03 AM

Quote:

All of them have been tested in current alpha realm
Are scripts in some capacity working on alpha realms? Or are these just observed in the alpha UI?

icyblade 03-23-16 08:19 AM

Quote:

Originally Posted by p3lim (Post 313730)
Not new, this has been in for a few expansions now. Maybe you meant it's not optional any more?

Yes, it's not optional now

icyblade 03-23-16 08:20 AM

Quote:

Originally Posted by Gello (Post 313731)
Are scripts in some capacity working on alpha realms? Or are these just observed in the alpha UI?



Here is what I'm using in alpha
https://github.com/icyblade/wow_addons

Lombra 03-23-16 08:31 AM

Quote:

Originally Posted by icyblade (Post 313723)
We can use texture:SetTexture(spellId) now, so GetSpellInfo will not return a texture path as the 3rd return value
We use this code to set an icon now:
Lua Code:
  1. local _, _, icon = GetSpellInfo(spell_id)
  2. texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
  1. texture:SetTexuture(spell_id)

This seems weird...

Gethe 03-23-16 08:31 AM

Quote:

Originally Posted by Gello (Post 313731)
Are scripts in some capacity working on alpha realms? Or are these just observed in the alpha UI?

Not officially, there are ways to hack the exe and enable addons.

JDoubleU00 03-23-16 01:48 PM

Quote:

Originally Posted by Gethe (Post 313735)
Not officially, there are ways to hack the exe and enable addons.

I've been playing the Alpha (not as a developer) and the Addon button is active and does go to the addon list (I have two libraries for some reason).

Gethe 03-23-16 11:51 PM

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.

galvin 03-24-16 02:44 PM

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.

icyblade 03-24-16 06:54 PM

Quote:

Originally Posted by galvin (Post 313759)
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.

Yes that's SetChange, thanks for pointing out that

galvin 03-25-16 01:54 PM

After looking at WorldMapFrame.lua. My best guess until someone tests.
SetFromAlpha() is where you start from.
SetToAlpha() is where you end at.

Blazeflack 04-11-16 03:56 PM

Quote:

Originally Posted by icyblade (Post 313723)

We can use texture:SetTexture(spellId) now, so GetSpellInfo will not return a texture path as the 3rd return value
We use this code to set an icon now:
Lua Code:
  1. local _, _, icon = GetSpellInfo(spell_id)
  2. texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
  1. texture:SetTexuture(spell_id)

Quote:

Originally Posted by Lombra (Post 313734)
This seems weird...

If it does accept spellID, then it isn't limited to spellID only. I think they may have introduced textureIDs too or something like that. The first return of GetLootSlotInfo is now a number and no longer a string path to the texture. This number does not match the itemID of the item in that loot slot, and you can use this number in :SetTexture() as well.

I'm guessing they have made :SetTexture really dynamic.

jeffy162 04-11-16 04:53 PM

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.

ykiigor 04-13-16 03:58 PM

Quote:

Originally Posted by icyblade (Post 313723)
local value = UnitPowerMax(unit)
In Legion we should do something like this:
Lua Code:
  1. local value = UnitPowerMax(unit, UnitPowerType(unit))

Power type isn't mandatory, you can use UnitPowerMax(unit) as before

Quote:

Originally Posted by icyblade (Post 313723)
[*] We can use texture:SetTexture(spellId) now, so GetSpellInfo will not return a texture path as the 3rd return value
We use this code to set an icon now:
Lua Code:
  1. local _, _, icon = GetSpellInfo(spell_id)
  2. texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
  1. texture:SetTexuture(spell_id)

That is not spellID, it's FileID. So it's only easer if you know exact fileID for texture, otherwise you still need call GetSpellTexture. You can use string path as before.

ObbleYeah 04-14-16 06:38 AM

Quote:

Originally Posted by icyblade (Post 313723)
  • UnitIsTapped()/UnitIsTappedByPlayer() has been removed
    This one occurs in such circustance:
    Lua Code:
    1. if not isName and (dead or (UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit))) then
    2.     return 0.5, 0.5, 0.5

does this mean tapped mobs no longer exist in legion?

sirann 04-14-16 10:14 AM

Correct, tagging is no longer a thing, I'm unsure of members of the opposite faction tagging tho.

Gethe 04-14-16 11:51 AM

Tagging is still a thing, but it has changed and the api was consolidated to a single function: UnitIsTapDenied()

ObbleYeah 04-14-16 04:30 PM

that is such a weird call name to choose over just consolidating it all into UnitIsTapped

Fizzlemizz 04-14-16 05:07 PM

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.

ObbleYeah 04-15-16 02:11 AM

ah, okay! (10chars)

Lombra 04-15-16 05:24 AM

Quote:

Originally Posted by ObbleYeah (Post 314080)
that is such a weird call name to choose over just consolidating it all into UnitIsTapped

I could agree with the new function sounding a bit complicated, but it should make more sense. What the current UnitIsTapped actually means is... "UnitIsTappedBySomeoneElse". Had to look that up actually, thought it meant "UnitIsNotYetTappedBySomeoneElse".

galvin 04-24-16 11:12 AM

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.

TOM_RUS 04-24-16 07:14 PM

Quote:

Originally Posted by galvin (Post 314325)
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.

You can't. Unless you want to use hardcoded table with id->name that can be exported from db2 file...

galvin 04-24-16 11:44 PM

So anyway I can exclude profession spells?

TOM_RUS 04-25-16 01:50 AM

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?

ObbleYeah 04-25-16 02:56 AM

could you compare against type with GetSpellBookItemInfo?

edit: heh, just saw your own post edit

galvin 04-25-16 05:15 PM

I want it to scan all spells, not just player.

galvin 05-01-16 04:22 PM

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

galvin 05-04-16 05:23 PM

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.

TOM_RUS 05-04-16 10:14 PM

Quote:

Originally Posted by galvin (Post 314580)
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.

I guess parameter is spellID, not TradeSkillID then?

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.

galvin 05-05-16 01:04 AM

I just run a spellID thru it. but in some of their code they call it tradeskillid. But its still a spellID.

Ketho 05-12-16 10:56 PM

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...

Gethe 05-12-16 10:59 PM

They moved the global strings to a db file.

SinusPi 05-13-16 04:37 AM

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)

Zavian 05-13-16 09:21 AM

It seems GetItemTransmogrifyInfo() it's been removed. Occuring here
Lua Code:
  1. local canBeSource = select(3, GetItemTransmogrifyInfo(item))

VincentSDSH 05-13-16 10:50 AM

Quote:

Originally Posted by icyblade (Post 313723)
  • We can use texture:SetTexture(file_id) now, so GetSpellInfo will not return a texture path as the 3rd return value
We use this code to set an icon now:
Lua Code:
  1. local _, _, icon = GetSpellInfo(spell_id)
  2. texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
  1. file_id = GetSpellTexture(spell_id)
  2. texture:SetTexuture(file_id)

Ok, guess I'll be muggins here but can you get the file path somehow or other? From my testing, bgFile doesn't take those index numbers well. (nb: result is a green frame)

lua Code:
  1. local _, _, _, _, _, _, _, _, _, itemTexture = GetItemInfo(v)
  2. hFrame:SetBackdrop( { bgFile = itemTexture })

SinusPi 05-13-16 06:01 PM

GetNumDungeonMapLevels() now - contrary to its name! - returns not the total number, but a list of valid floor numbers on the current map.

lua Code:
  1. local dungeonLevels = { GetNumDungeonMapLevels() };
  2.     for id, floorNum in ipairs(dungeonLevels) do
  3.         ...
  4.     end

MunkDev 05-13-16 06:15 PM

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:
  1. local QUEST = select(10, GetAuctionItemClasses())

syncrow 05-13-16 11:28 PM

New 7th parameter for GetGossipAvailableQuests() - isIgnored

Lua Code:
  1. for i = 1, GetNumGossipAvailableQuests() do
  2.     local name, level, isTrivial, frequency, isRepeatable, isLegendary, isIgnored = select(i*7-6, GetGossipAvailableQuests())
  3.     print(name, level, ...)
  4. end

TOM_RUS 05-14-16 02:07 AM

Quote:

Originally Posted by MunkDev (Post 314739)
Does someone know how to get the localized string for items now that GetAuctionItemClasses has been removed?

GetItemClassInfo, GetItemSubClassInfo. Also GetItemInfo has 2 new returns itemClassId and itemSubClassId.

siweia 05-14-16 03:37 AM

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
local onUpdate = function(self, elapsed)
        self.Timer = self.Timer + elapsed
        if self.Timer > 0 then
                self.Timer = 0
                CleanUp()
                UpdateCD()
                for _, value in pairs(UnitIDTable) do
                        UpdateAura(value)
                end
        end
end
Event:SetScript("OnUpdate", onUpdate)

if I change "self.Timer > 0" to "self.Timer > 0.1", it would work but flashing.

Nitrak 05-14-16 05:02 AM

Quote:

Originally Posted by VincentSDSH (Post 314719)
Ok, guess I'll be muggins here but can you get the file path somehow or other? From my testing, bgFile doesn't take those index numbers well. (nb: result is a green frame)

lua Code:
  1. local _, _, _, _, _, _, _, _, _, itemTexture = GetItemInfo(v)
  2. hFrame:SetBackdrop( { bgFile = itemTexture })

I would also like to know.

In my UI I have an inline Icon like this:

Code:

local spellname, _, icon = GetSpellInfo(spellID)

name = "\124T" .. icon .. ":24\124t" .. spellname

And with the change, icon returns a value to the icon ID, which is something I'm unable to use here.

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.

Ketho 05-14-16 01:48 PM

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#L3178
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.

siweia 05-14-16 10:07 PM

Quote:

Originally Posted by MunkDev (Post 314739)
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:
  1. local QUEST = select(10, GetAuctionItemClasses())

https://github.com/Gethe/wow-ui-sour...uctionData.lua

Go check the file, you would get something like "AUCTION_CATEGORY_CONSUMABLES, AUCTION_CATEGORY_GLYPHS, AUCTION_CATEGORY_RECIPES, AUCTION_CATEGORY_MISCELLANEOUS".

galvin 05-15-16 01:56 AM

Quote:

Originally Posted by Nitrak (Post 314752)
I would also like to know.

In my UI I have an inline Icon like this:

Code:

local spellname, _, icon = GetSpellInfo(spellID)

name = "\124T" .. icon .. ":24\124t" .. spellname

And with the change, icon returns a value to the icon ID, which is something I'm unable to use here.
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.

You shouldn't have to change anything unless you were doing something with pathnames.
Code snippet below uses Icon the same was as live.

Code:

  local Name, _, Icon = GetSpellInfo(SpellID)

  -- Check if the spell was removed from the game.
  if Name == nil then
    Name = format('%s removed from the game', SpellID)
    Icon = [[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]
  end

  TO.args[AuraGroup] = {
    type = 'group',
    name = format('|T%s:20:20:0:5|t |cFFFFFFFF%s|r (%s)', Icon, Name, SpellID),


Edik 05-15-16 06:00 AM

Quote:

Originally Posted by siweia (Post 314802)
https://github.com/Gethe/wow-ui-sour...uctionData.lua

Go check the file, you would get something like "AUCTION_CATEGORY_CONSUMABLES, AUCTION_CATEGORY_GLYPHS, AUCTION_CATEGORY_RECIPES, AUCTION_CATEGORY_MISCELLANEOUS".

Is easy, there is new function for it. By example:

_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

lucro 05-15-16 01:42 PM

Quote:

Originally Posted by SinusPi (Post 314715)
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)

There's a new line widget that may be what you're looking for. It can be animated to scale along the line. It's used in the artifact UI and the new flight map.
Code:

        <Frame name="FlightMap_HighlightFlightLineTemplate" virtual="true">
                <Layers>
                        <Layer level="BACKGROUND" textureSubLevel="-1">
                                <Line parentKey="Fill" file="Interface/TaxiFrame/UI-Taxi-Line" thickness="28" alpha="0" alphaMode="ADD" />
                        </Layer>
                </Layers>
                <Animations>
                        <AnimationGroup parentKey="RevealAnim" setToFinalAlpha="true">
                                <Alpha parentKey="Alpha" childKey="Fill" duration=".15" fromAlpha="0" toAlpha="1" order="1"/>
                                <LineScale parentKey="Scale" childKey="Fill" duration=".15" order="1" fromScaleX="0" fromScaleY="1" toScaleX="1" toScaleY="1">
                                        <Origin point="LEFT">
                                                <Offset x="1" y="0"/>
                                        </Origin>
                                </LineScale>
                        </AnimationGroup>
                        <AnimationGroup parentKey="FadeAnim" setToFinalAlpha="true">
                                <Alpha parentKey="Alpha" childKey="Fill" duration=".1" fromAlpha="1" toAlpha="0" order="1"/>
                        </AnimationGroup>
                </Animations>
        </Frame>


zork 05-15-16 02:35 PM

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?

Rainrider 05-16-16 07:18 AM

Quote:

Originally Posted by MunkDev (Post 314739)
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:
  1. local QUEST = select(10, GetAuctionItemClasses())

GetItemInfo has 2 new returns:
[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).

TOM_RUS 05-16-16 07:53 AM

Quote:

Originally Posted by Rainrider (Post 314862)
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).

It's a bug. Theirs DB2 lookup code fails looking for 0 index (LE_ITEM_CLASS_CONSUMABLE is 0). I doubt it will ever be fixed... Also GetItemSubClassInfo works for consumable (the reason for this is that it enumerates all DB2 rows instead of using lookup by id).

sezz 05-16-16 08:31 AM

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 ;)

siweia 05-16-16 09:58 AM

Quote:

Originally Posted by sezz (Post 314866)
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 ;)

What's wrong with tooltip scanning?

ykiigor 05-16-16 10:02 AM

OnUpdate changed to only 4 calls per second for anyone else?

Ketho 05-16-16 10:37 AM

For me it's at least more than 4 times per second

https://gfycat.com/IgnorantThankfulArabianwildcat

sezz 05-16-16 10:58 AM

Quote:

Originally Posted by siweia (Post 314870)
What's wrong with tooltip scanning?

Nothing, but if there's a more efficient way I'd prefer using that instead.

Quote:

Originally Posted by ykiigor (Post 314871)
OnUpdate changed to only 4 calls per second for anyone else?

I also had that issue in the last build before it went beta, it also affect Blizzard stuff (like the big zone text in the middle of the screen when you change zones) but it works fine now without changing anything. (Had to remove my cache folder because of other problems, but I don't think the limit is somewere in the data files)

ykiigor 05-16-16 11:23 AM

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.

ceylina 05-16-16 11:35 AM

Looks like GetTradeSkillSelectionIndex has changed in legion to C_TradeSkillUI.GetTradeSkillLine

Full arguments are

local tradeSkillID, skillLineName, skillLineRank, skillLineMaxRank, skillLineModifier = C_TradeSkillUI.GetTradeSkillLine();

Simca 05-18-16 02:33 AM

Quote:

Originally Posted by ceylina (Post 314876)
Looks like GetTradeSkillSelectionIndex has changed in legion to C_TradeSkillUI.GetTradeSkillLine

Full arguments are

local tradeSkillID, skillLineName, skillLineRank, skillLineMaxRank, skillLineModifier = C_TradeSkillUI.GetTradeSkillLine();

TradeSkill functions have been radically changed, yes. You can also no longer iterate recipes by 'tradeSkillIndex' like before, you have to 'GetAllIDs' and then use IDs.

Nevcairiel 05-19-16 08:13 AM

Quote:

Originally Posted by zork (Post 314834)
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?

Its really not that complicated. SetChange used an offset and SetFromAlpha/SetToAlpha use absolute values - which IMHO makes for clearer logic either way. You can easily rewrite it using that.


All times are GMT -6. The time now is 12:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI