Thread Tools Display Modes
11/07/15, 12:15 PM   #1
Jhenox
 
Jhenox's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 42
Request: Identify crafted potions.

I'd like to request an add on that will add a marker of some sort or tooltip note to differentiate crafted (and/or my crafted potions_ potions from looted potions. I think Zenimax should have added this long ago but I keep crafting potions for writs then they get mixed in with looted ones. Normally I can tell with a little effort by looking for the effects but the Wrothgar pots seem close to my crafted potions. Thank you.
  Reply With Quote
11/07/15, 01:10 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I will write something quick as we already found how to detect a crafted pot

hmm I did this which works.. but..
as long as inventory don't use thoses functions to get quality, but SHARED_INVENTORY.bagcache[bagId][slotId].quality (and PLAYER_INVENTORY), we could rewrite the tooltips itself.. If someone else wants do something. it shouldn't be hard.

just rewrite a bit GetItemLinkTraitOnUseAbilityInfo() maybe. But it should be better to try to continue to modify the quality I guess.



Lua Code:
  1. local original_GetItemQuality = GetItemQuality
  2. GetItemQuality = function(bagId, slotId)
  3.     if GetItemType(bagId, slotId) == ITEMTYPE_POTION then
  4.         local itemLink = GetItemLink(bagId, slotId)
  5.         if select(24, ZO_LinkHandler_ParseLink(itemLink)) ~= "0" then
  6.            
  7.             local quality = ITEM_QUALITY_NORMAL
  8.             for i = 1, GetMaxTraits() do
  9.                
  10.                 local hasTraitAbility = GetItemLinkTraitOnUseAbilityInfo(itemLink, i)
  11.                
  12.                 if(hasTraitAbility) then
  13.                     quality = quality + 1
  14.                 end
  15.                
  16.             end
  17.            
  18.             if quality == ITEM_QUALITY_NORMAL then
  19.                 quality = ITEM_QUALITY_MAGIC
  20.             end
  21.            
  22.             return quality
  23.        
  24.         end
  25.     end
  26.     return original_GetItemQuality(bagId, slotId)
  27. end
  28.  
  29. local original_GetItemLinkQuality = GetItemLinkQuality
  30. GetItemLinkQuality = function(itemLink)
  31.     if GetItemLinkItemType(itemLink) == ITEMTYPE_POTION then
  32.         if select(24, ZO_LinkHandler_ParseLink(itemLink)) ~= "0" then
  33.            
  34.             local quality = ITEM_QUALITY_NORMAL
  35.             for i = 1, GetMaxTraits() do
  36.                
  37.                 local hasTraitAbility = GetItemLinkTraitOnUseAbilityInfo(itemLink, i)
  38.                
  39.                 if(hasTraitAbility) then
  40.                     quality = quality + 1
  41.                 end
  42.                
  43.             end
  44.            
  45.             if quality == ITEM_QUALITY_NORMAL then
  46.                 quality = ITEM_QUALITY_MAGIC
  47.             end
  48.            
  49.             return quality
  50.        
  51.         end
  52.     end
  53.     return original_GetItemLinkQuality(itemLink)
  54. end

Last edited by Ayantir : 11/07/15 at 01:34 PM.
  Reply With Quote
11/07/15, 01:32 PM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
There was a request on eso forums to differentiate crafted potions in inventory. I have something thrown in my "misc tweaks and dirty hacks add-on" ... not sure when I'll force myself to push it out
  Reply With Quote
11/07/15, 02:59 PM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
http://www.esoui.com/downloads/info1...edPotions.html

I still need to :
  • Force quality on tooltip
  • Force quality in trading house

But it's a good begening
  Reply With Quote
11/10/15, 06:46 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,000
And force quality at quickslot too please! This would be great.
  Reply With Quote
11/10/15, 07:14 AM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
I looked around and couldn't find a way to override quality on tooltip. It doesn't seem to use GetItemInfo or GetItemLinkQuality, and the title child control is inaccessible.
  Reply With Quote
11/15/15, 09:37 AM   #7
Jhenox
 
Jhenox's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 42
You guys are awesome! Thank you!
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Request: Identify crafted potions.


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