Go to Page... |
Compatibility: | Ascending Tide (7.3.5) |
Updated: | 03/04/22 05:16 PM |
Created: | 03/02/22 11:55 AM |
Monthly downloads: | 66 |
Total downloads: | 2,188 |
Favorites: | 4 |
MD5: | |
Categories: | Utility Mods, Combat Mods |
Comment Options |
vazelle |
View Public Profile |
Send a private message to vazelle |
Find More Posts by vazelle |
Add vazelle to Your Buddy List |
tralce |
View Public Profile |
Send a private message to tralce |
Send email to tralce |
Find More Posts by tralce |
Add tralce to Your Buddy List |
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
06/17/22, 01:11 AM | ||
|
|
|
|
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
06/17/22, 09:38 AM | ||
|
For testing purposes, here are the item IDs of the rings on that character (problematic ones marked with *) |H1:item:187658:364:50:45884:370:50:31:0:0:0:0:0:0:0:2049:0:0:1:0:0:0|h|h * (Oaken) |H1:item:163052:364:50:45884:369:50:28:0:0:0:0:0:0:0:2049:0:0:1:0:0:0|h|h * (RotWH) |H1:item:182208:364:50:45884:369:50:0:0:0:0:0:0:0:0:1:0:0:1:0:0:0|h|h (MroM) |H1:item:171436:364:50:45883:370:50:0:0:0:0:0:0:0:0:1:0:0:1:0:0:0|h|h (RotPO) When I first began tinkering with it yesterday, it would not equip my Oakensoul Ring I'd recently added to MS. During my testing and tinkering, MS also lost the ability to equip RotWH. I do notice that the item IDs for those two are longer, dunno if that has anything to do with it. Today, I cleared and re-created my list on the same character, and it worked fine. Strange. Another character does have two of the same ring, each with different enchants, and that's always been fine, and to my knowledge still is. I will test a bit more. This is apparently gonna be difficult to reproduce though. Let me know if there's anything I can look at. |
|
|
tralce |
View Public Profile |
Send a private message to tralce |
Send email to tralce |
Find More Posts by tralce |
Add tralce to Your Buddy List |
08/05/24, 11:35 AM | |
DIY Fix for Can't find <item> in inventory.
I've only recently started using this addon and it's really useful. I had no trouble getting it working with my rings but necklaces always reported "Can't find <item> in inventory."
I've found the problem is due to the way the addon scans the inventory. If it used to work but doesn't now then I guess there's been a ZOS change to the bag indexing. The present code uses GetNumBagUsedSlots() to find how many slots are used and loops from 1 to that number. Unfortunately, the backpack may have gaps where a slot doesn't reference an item, so to find all the items the scan needs to go beyond GetNumBagUsedSlots: once I'd fixed my code, I've seen my inventory of 140 used slots have to scan 160 slots to skip over 20 unused ones. It seems my rings are all in the earlier slots but my necklaces were in slots above 140. My DIY fix is to edit AddOns\MythicSelector\MythicSelector.lua and correct function MS.GetInventoryIndex(item), from line 196. You will need to replace: Code:
function MS.GetInventoryIndex(item) local index = nil for i=1,GetNumBagUsedSlots(BAG_BACKPACK) do if item.itemLink == GetItemLink(BAG_BACKPACK, i, LINK_STYLE_BRACKETS) then index = i break end end return index end Code:
function MS.GetInventoryIndex(item) local bag, style = BAG_BACKPACK, LINK_STYLE_BRACKETS local slot = ZO_GetNextBagSlotIndex(bag) while slot do if HasItemInSlot(bag, slot) and item.itemLink == GetItemLink(bag, slot, style) then return slot end slot = ZO_GetNextBagSlotIndex(bag, slot) end -- no return => return nil end Code:
if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.") return end ... if GetItemLink(BAG_BACKPACK, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.") return end Code:
if GetItemLink(BAG_WORN, EQUIP_SLOT_NECK, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink then MS.SendToChat(MS.SavedVars[MS.nameSpace].Necklaces[MS.neckIndex].itemLink .. " is already equipped.") return end ... if GetItemLink(BAG_WORN, EQUIP_SLOT_RING1, LINK_STYLE_BRACKETS) == MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink then MS.SendToChat(MS.SavedVars[MS.nameSpace].Rings[MS.ringIndex].itemLink .. " is already equipped.") return end |
|
|
shadowcep |
View Public Profile |
Send a private message to shadowcep |
Send email to shadowcep |
Find More Posts by shadowcep |
Add shadowcep to Your Buddy List |
08/05/24, 03:04 PM | ||
|
Re: DIY Fix for Can't find <item> in inventory.
|
|
|
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
08/06/24, 05:54 AM | |
Larger text for indicator?
Hi Static, if you have time when you're updating this, could you add an option to configure the indicator text a little larger (like in your Already Taunted addon)? I can read the small indicator but would find it easier with slightly larger text.
Something else I noticed in your code:
Warning: Spoiler
You set various displayName fields by calling GetItemLink() with LINK_STYLE_NO_BRACKETS. That constant doesn't exist and the only alternative to LINK_STYLE_BRACKETS is LINK_STYLE_DEFAULT. Since your code works (I can see the saved displayName fields have H0 links, while the itemLink fields have H1 links), I guess you are effectively passing nil for the link style and the default, LINK_STYLE_DEFAULT, is being used.
Thanks for your efforts! |
|
|
shadowcep |
View Public Profile |
Send a private message to shadowcep |
Send email to shadowcep |
Find More Posts by shadowcep |
Add shadowcep to Your Buddy List |