Thread Tools Display Modes
05-19-16, 05:55 PM   #61
Simca
An Aku'mai Servant
 
Simca's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2012
Posts: 33
Here's an example of how TradeSkill stuff changed from Live to Legion. This code was designed to execute an a passed function on every result for a tradeskill.

Before:
Code:
-- Clear the search box focus so the scan will have correct results.
local search_box = _G.TradeSkillFrameSearchBox
search_box:SetText("")

_G.TradeSkillSearch_OnTextChanged(search_box)
search_box:ClearFocus()
search_box:GetScript("OnEditFocusLost")(search_box)

table.wipe(header_list)

-- Save the current state of the TradeSkillFrame so it can be restored after we muck with it.
local have_materials = _G.TradeSkillFrame.filterTbl.hasMaterials
local have_skillup = _G.TradeSkillFrame.filterTbl.hasSkillUp

if have_materials then
    _G.TradeSkillFrame.filterTbl.hasMaterials = false
    _G.TradeSkillOnlyShowMakeable(false)
end

if have_skillup then
    _G.TradeSkillFrame.filterTbl.hasSkillUp = false
    _G.TradeSkillOnlyShowSkillUps(false)
end
_G.SetTradeSkillInvSlotFilter(0, true, true)
_G.TradeSkillUpdateFilterBar()
_G.TradeSkillFrame_Update()

-- Expand all headers so we can see all the recipes there are
for tradeskill_index = 1, _G.GetNumTradeSkills() do
    local name, tradeskill_type, _, is_expanded = _G.GetTradeSkillInfo(tradeskill_index)

    if tradeskill_type == "header" or tradeskill_type == "subheader" then
        if not is_expanded then
            header_list[name] = true
            _G.ExpandTradeSkillSubClass(tradeskill_index)
        end
    elseif iter_func(name, tradeskill_index) then
        break
    end
end

-- Restore the state of the things we changed.
for tradeskill_index = 1, _G.GetNumTradeSkills() do
    local name, tradeskill_type, _, is_expanded = _G.GetTradeSkillInfo(tradeskill_index)

    if header_list[name] then
        _G.CollapseTradeSkillSubClass(tradeskill_index)
    end
end
_G.TradeSkillFrame.filterTbl.hasMaterials = have_materials
_G.TradeSkillOnlyShowMakeable(have_materials)
_G.TradeSkillFrame.filterTbl.hasSkillUp = have_skillup
_G.TradeSkillOnlyShowSkillUps(have_skillup)

_G.TradeSkillUpdateFilterBar()
_G.TradeSkillFrame_Update()
After:
Code:
local recipes = _G.C_TradeSkillUI.GetAllRecipeIDs()

if recipes and (#recipes > 0) then
    for i = 1, #recipes do
        if iter_func(_G.C_TradeSkillUI.GetRecipeInfo(recipes[i]).name, recipes[i]) then
            break
        end
    end
end
If you had trouble working with filters with the old UI like I did, you will love these changes, since there are two main APIs - C_TradeSkillUI.GetAllRecipeIDs() and C_TradeSkillUI.GetFilteredRecipeIDs() (spelling?). The former ignores filters/searching while the latter respects them.
__________________
Assistant admin for MMO-Champion
WoW database file expert - ask me anything
 
05-22-16, 08:50 AM   #62
Kapulani
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Oct 2012
Posts: 3
Originally Posted by icyblade View Post
[*] 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.
Has anyone done a total breakdown of new item links? There seem to be more 'fields' than there were in WoD.
 
05-22-16, 10:01 AM   #63
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Originally Posted by Simca View Post
there are two main APIs - C_TradeSkillUI.GetAllRecipeIDs() and C_TradeSkillUI.GetFilteredRecipeIDs() (spelling?). The former ignores filters/searching while the latter respects them.
The mount journal works this way too but from the other direction. In WoD the indexes were always available. Now there's C_MountJournal.GetMountIDs() and C_MountJournal.GetDisplayedMountInfo() and the WoD index functions were removed.

I'd kill for an equivalent for the pet journal. No new indexing would be needed, just fill the table with petIDs for pets the player owns and speciesIDs otherwise. An addon can work it out from there much easier than:

- hook C_PetJournal.SetSearchFilter and C_PetJournal.ClearSearchFilter to watch the search being changed (because there's no C_PetJournal.GetSearchFilter)
- watch for number of owned pets changing in PET_JOURNAL_LIST_UPDATE
- when that happens:
- backup the collected/uncollected, types, sources filters
- turn on all those filters and clear search
- gather pets into a table
- restore to backup and restore search
 
05-22-16, 12:39 PM   #64
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Tested the animation widget changes. Everything is working fine as far as I can tell.
https://github.com/zorker/rothui/blo...idget/core.lua
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
05-23-16, 05:20 PM   #65
lieandswell
A Cyclonian
 
lieandswell's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 45
Forgive me if this is covered before, but UnitAura() seems to have a new argument related to nameplates:

local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod = UnitAura(unit, i, filter);

Maybe these are the debuffs applied by other players that show on your nameplates?
__________________
1/5 15:55:46.001 UNIT_DIED, 0x0000000000000000, nil, 0x80000000, 0xF130001942161FB7, "Gamon", 0xa28
 
05-26-16, 09:04 PM   #66
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Actionbar cooldown timer has changed or was changed this build

Code:
CooldownFrame_SetTimer(self.cooldown, start, duration, enable)
to

CooldownFrame_Set(self.cooldown, start, duration, enable)
 
06-03-16, 09:31 PM   #67
icyblade
A Deviate Faerie Dragon
 
icyblade's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 13
In this build(21863) .tga textures will not be loaded by addons, use .blp instead.GJ BLIZZARD
__________________
Talk is cheap, show me the shell
 
06-03-16, 09:40 PM   #68
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
And how do you make .BLP, thats a proprietary image format blizzard made.
Blizzard probably broke a ton of addons again. Going to be a PITA now I have to convert my images everytime I update them by a 3rd party. use paint.net, save file, convert, see how it looks in game. And repeat. Hope this is a bug.

Found a converter in the blizzard forums. Glad I found out about this cause I thought my addon was bugged and this saved a lot of time.

Last edited by galvin : 06-03-16 at 09:50 PM.
 
06-03-16, 11:05 PM   #69
Stanzilla
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 34
Just do nothing, it will be fixed in a new build. Don't panic because of stuff like that, it happens and it's not intentional.
 
06-04-16, 03:36 AM   #70
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
DigitalUtopia made an amazing tool. It can convert BLP<->TGA or BLP<->PNG.
http://www.wowinterface.com/download...Converter.html

It converts folders in seconds. Adjust your texture names to work without .tga. Just use the texture name only. WoW will pick tga or blp depending on what it finds first.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
06-04-16, 11:17 AM   #71
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
You don't even need to convert your files, the reason textures aren't loading is because it's replacing the extension with ".blp" in the texture path.

If you rename your texture files to end in .blp it will load them.
 
06-04-16, 02:13 PM   #72
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
Cool, just removed all .TGA extensions from my addon. Then renamed all the tga to blp works fine. Blizzard could of prevented a lot of headaches if they just used a standard image format from the start.
 
06-17-16, 04:32 PM   #73
kaytotes
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 18
ReputationWatchStatusBar seems to have gone the way of the dodo. Anyone got any pointers for how best to resize / move the reputation bar now?

Edit: I'm an idiot for not using /framestack

It's ReputationWatchBar.StatusBar now.

Last edited by kaytotes : 06-17-16 at 04:39 PM.
 
06-18-16, 09:19 PM   #74
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
Originally Posted by Zavian View Post
It seems GetItemTransmogrifyInfo() it's been removed. Occuring here
Lua Code:
  1. local canBeSource = select(3, GetItemTransmogrifyInfo(item))
local canBeChanged, noChangeReason, canBeSource, noSourceReason = C_Transmog.GetItemInfo(itemID|"name"|"itemlink")
 
06-20-16, 04:50 AM   #75
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by ykiigor View Post
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.
Probably fixed a long time ago, but at least GetTime() is not rounded to 1/32 seconds anymore for me

 
06-24-16, 01:32 AM   #76
icyblade
A Deviate Faerie Dragon
 
icyblade's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 13
In today's build (22018), cameraDistanceMax was removed from cvar list.
Since cameraDistanceMaxFactor was restricted from 0 to 1.9, I can't figure out any way to extend the camera distance (except for binary modification).
__________________
Talk is cheap, show me the shell
 
07-04-16, 09:51 AM   #77
whatisxml
A Murloc Raider
 
whatisxml's Avatar
Join Date: Jun 2016
Posts: 9
Originally Posted by lieandswell View Post
Forgive me if this is covered before, but UnitAura() seems to have a new argument related to nameplates:

local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod = UnitAura(unit, i, filter);

Maybe these are the debuffs applied by other players that show on your nameplates?
UnitAura output looks like this:
Code:
local name, rank, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura(unit, i, filter);
nameplateShowAll means the aura is displayed on all nameplates whereas nameplateShowPersonal means it's shown only on you or your pet
 
07-04-16, 12:06 PM   #78
Nitrak
A Deviate Faerie Dragon
 
Nitrak's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 14
Originally Posted by galvin View Post
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),
Though I was using pathnames, as I linked above.

I have a list where the content of my list are an icon followed by the spells name using ACE3.

I don't see how I can put my icons into the string with the change (if at all possible)

EDIT: I fixed it by using: "|T" .. icon .. ":18:18:0:0|t " instead

Last edited by Nitrak : 07-04-16 at 12:30 PM.
 
07-06-16, 10:19 AM   #79
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Texture:GetTexture() doesn't seem to include the ".blp" extension anymore since build 22133 (July 4), maybe they reverted this change?

It was like this since the Beta, at least



(Edit) Another change, the releaseUITextures cvar was removed again
Originally Posted by dssd View Post
In the latest beta build it appears the CVar was removed. The texture paths/ids are now being returned even if the texture is hidden.

Last edited by Ketho : 07-06-16 at 10:34 AM.
 
07-06-16, 11:04 AM   #80
ceylina
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
If anyone cares,

GetTradeSkillSelectionIndex()

has become

TradeSkillFrame.RecipeList:GetSelectedRecipeID()

Also

GetTradeSkillInfo(recipeID)

is replaced by a table produced by

C_TradeSkillUI.GetRecipeInfo(recipeID) so if you want the name for example, just do C_TradeSkillUI.GetRecipeInfo(recipeID).name

GetRecipeInfo provides tons more information. Here is a dump example from an engineering recipe

disabled=false,
type="recipe",
hiddenUnlessLearned=false,
icon=1405810,
craftable=true,
numSkillUps=1,
recipeID=198979,
sourceType=1,
numIndents=1,
difficulty="optimal",
name="Intra-Dalaran Wormhole Generator",
numAvailable=0,
learned=true,
favorite=false,
categoryID=473

Last edited by ceylina : 07-06-16 at 12:18 PM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Notable API changes in Legion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off