ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Did GetLootItemLink() Change? (https://www.esoui.com/forums/showthread.php?t=6056)

Agathorn 01/30/16 01:35 PM

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.

Shinni 01/30/16 01:47 PM

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 )

Agathorn 01/30/16 02:19 PM

Quote:

Originally Posted by Shinni (Post 25797)
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.

votan 01/30/16 02:29 PM

What has been changed is that LINK_STYLE_BRACKETS does (currently) not work.
Use LINK_STYLE_DEFAULT or omit the parameter.

Agathorn 01/31/16 01:04 PM

Quote:

Originally Posted by votan (Post 25800)
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? :p


All times are GMT -6. The time now is 09:39 AM.

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