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): Quote:
Quote:
This works fine for spells, but for items it doesnt work (itemID 114982 = song flower) -> Quote:
Quote:
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 |
Easiest way would probably be to hardcode the whole link. I think that will work every time.
Code:
SendChatMessage("Rebuff! Use Bufffood and |cffffffff|Hitem:114982|h[Song Flower]|h|r please.", "RAID_WARNING") |
Quote:
Honestliy i would like to create the item links hardcoded because they are always the same. But i havent figured out how. |cffffffff|Hitem:114982|h[Song Flower]|h|r only works with DEFAULT_CHAT_FRAME:AddMessage |
I removed some bits from the link that I thought were unnecessary, but maybe they're not. Try this:
Code:
SendChatMessage("Rebuff! Use Bufffood and |cffffffff|Hitem:114982::::::::110:::::|h[Song Flower]|h|r please.", "RAID_WARNING") |
Quote:
Thanks for your help :) Altought it doesnt work. I also tried Lua Code:
And the output is: 1. the Itemlink in my Chatframe (only visible for me) 2. nothing 3. "test" So this would mean that a hardcoded link is not outputable via SendChatMessage function. :< |
Just force it to be cached on ui load.
Lua Code:
|
All times are GMT -6. The time now is 03:17 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI