Quantcast itemlink comparising allways fails - ESOUI
Thread Tools Display Modes
08/17/19, 09:25 AM   #1
cOOLsp0T
 
cOOLsp0T's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2019
Posts: 17
itemlink comparising allways fails

Hello Guys,

I acutally try to compare 2 itemlinks from the same item. First from the lootwindow via "GetLootItemLink()" and after that when it reaches the inventory over GetItemLink().

When I compare that both itemlinks in the chatlog they look identical and working well, but when I compare them via code did the check allways fail. Did I make something wrong or did the itemlinks differ when they get over different functions?

Lua Code:
  1. recentlootitemlink = GetLootItemLink(lootID)
  2. recentinventoryitemlink = GetItemLink(bagID,slotID)
  3.  
  4. if recentlootitemlink ~= recentinventoryitemlink then d("wrong...") end
  5.  
  6. >>> wrong...


EDIT:
Found the problem. The post can be deleted. sorry, for the unconvience.

Last edited by cOOLsp0T : 08/17/19 at 10:19 AM.
  Reply With Quote
08/17/19, 11:10 AM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 340
Personally, I prefer comparing specific parts of an item link. Item links from different sources, whether it's a default style or not, state of gear, etc. all change an item link, and you don't always care about it. So rather than a straight up equality, you should compare what you care about.
  Reply With Quote
08/17/19, 12:05 PM   #3
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 244
i guess your problem is: one item link is with brackets, the other without

as far i remember, the itemLink from loot event starts with "|H0" and this one from inventory with "|H1"

ups, didn't read your edit
__________________
EU Server - SŁĄuGhTerHĜuSe
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » itemlink comparising allways fails

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