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)

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


All times are GMT -6. The time now is 03:57 PM.

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