Thread Tools Display Modes
01/30/16, 01:35 PM   #1
Agathorn
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Did GetLootItemLink() Change?

Hey all,

Coming back to ESO and looking to update my addon for the current version. So far most everything appears to still be working, at least the important bits, but one thing I noticed right away is that my addon isn't getting item links anymore?

I get the item link from items looted to display in the chat log (if enabled) but they are all coming out as just "[]" now.

Code:
local link = GetLootItemLink(lootId,LINK_STYLE_BRACKETS)
d("got link: "..link)
I couldn't find any mention of this changing in the API changelogs.

EDIT to add: I'm fairly certain my lootId is correct because I later go on to use that id to actually loot the item and that is working.

Last edited by Agathorn : 01/30/16 at 01:39 PM.
  Reply With Quote
01/30/16, 01:47 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
GetLootItemLink expects the lootID instead of the lootIndex.
To get the lootID, you can use GetLootItemInfo:

Lua Code:
  1. GetLootItemLink( GetLootItemInfo( lootIndex ), LINK_STYLE_DEFAULT )
  Reply With Quote
01/30/16, 02:19 PM   #3
Agathorn
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Originally Posted by Shinni View Post
GetLootItemLink expects the lootID instead of the lootIndex.
To get the lootID, you can use GetLootItemInfo:

Lua Code:
  1. GetLootItemLink( GetLootItemInfo( lootIndex ), LINK_STYLE_DEFAULT )
I already have the lootId. That is what I am passing in.
  Reply With Quote
01/30/16, 02:29 PM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
What has been changed is that LINK_STYLE_BRACKETS does (currently) not work.
Use LINK_STYLE_DEFAULT or omit the parameter.

Last edited by votan : 01/30/16 at 02:32 PM.
  Reply With Quote
01/31/16, 01:04 PM   #5
Agathorn
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Originally Posted by votan View Post
What has been changed is that LINK_STYLE_BRACKETS does (currently) not work.
Use LINK_STYLE_DEFAULT or omit the parameter.
Thanks! I think that is it, though I am getting some mixed results. Need more testing.

Odd that it used to work. They just broke it I guess?
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Did GetLootItemLink() Change?

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