Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-31-16, 08:52 PM   #1
nicarao
A Defias Bandit
Join Date: Oct 2016
Posts: 3
get ItemLinks from GetItemInfo()

Hi people,

it is 3:30 am here and i am still having this issue, maybe you guys can help me out:

Goal

I want to make an Addon based on Ashran Commander. It should have Buttons which on click send messages in the chat (RAID_WARNING + INSTANCE_CHAT). The idea is to include Links for Items and Spells in the commands, so that people can click on the links and understand better how to play in Ashran(or later in other BGs).

Problem

Right now i fetch the spell link with this code (spellID 2825 = bloodlust):
spellLink1 = select(1,GetSpellLink(2825));
And output the link with
SendChatMessage("Use your cooldowns! like "..spellLink1.." and so on","RAID_WARNING");
specc: http://wowprogramming.com/docs/api/GetSpellLink

This works fine for spells, but for items it doesnt work (itemID 114982 = song flower) ->
itemLink1 = select(2,GetItemInfo(114982));
SendChatMessage("Rebuff! Use Bufffood and "..itemLink1.." please.","RAID_WARNING");
specc: http://wowprogramming.com/docs/api/GetItemInfo

Or i should say: it works sometimes for a couple of items, then it returns again nil. I know this has to do with the Cache/Server response for getItemInfo() but i dont know how to solve this problem in my Addon.

Please help me out. Any kind of information can bring me foward, i can also post more informations about my Addon if necessary.

Sinc. Nicarao/Priskah

Edit: If you want to see the whole code:
http://www.nicarao.eu/downloads/Ashr...kahEdition.zip

Last edited by nicarao : 10-31-16 at 09:09 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » get ItemLinks from GetItemInfo()


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