Thread Tools Display Modes
02/08/17, 10:23 PM   #1
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
AchievementID

From the API:
GetAchievementInfo(number achievementId)
GetAchievementItemLink(number achievementId, number LinkStyle linkStyle)

If I do GetAchievementInfo(11) I get "Elden Hollow I Vanquisher" and all of its info.

If I do GetAchievementItemLink(11) I get an empty string.

It's probably simple but I can't see the problem.
  Reply With Quote
02/09/17, 01:07 AM   #2
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Does it only return a link if the achievement actually gives you an item reward?
  Reply With Quote
02/09/17, 02:13 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Phinix View Post
Does it only return a link if the achievement actually gives you an item reward?
If one looks at the only place this function is used, it looks like that:
Lua Code:
  1. local function GetAchievementRewardLink(achievementRewardItem, linkStyle)
  2.     local achievementId = ZO_Inventory_GetBagAndIndex(achievementRewardItem)
  3.  
  4.     local hasRewardItem = GetAchievementRewardItem(achievementId)
  5.     if hasRewardItem then
  6.         return GetAchievementItemLink(achievementId, linkStyle)
  7.     end
  8. end
@Rhyono: You may want to use GetAchievementLink ?

Last edited by votan : 02/09/17 at 02:35 AM.
  Reply With Quote
02/09/17, 06:37 PM   #4
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
That was indeed the problem; I hadn't noticed the variant without the word "Item" in it. Thanks.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » AchievementID

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