Originally Posted by votan
For counting the baits, you could try circonian's idea.
/edit: Ok, I'm even more slow
|
that's nice, I managed to place my post right when I could pretend it was useful
edit cross post with SMDK if you wait 5 mn, i'm sure votan will help with a tested version of bait listing by id and something like this :
local fakeitemLink = zo_strformat(|H0blablabla<<1>>blablabla|h|h, baitId) <---build an ItemLink with no name
zo_strformat(<<1>>,GetItemLinkName(fakeitemLink)) <-- get localized name - format or not depending on the value returned by GetFishingLureInfo or format both the same to compare
(all you need to do this is in fisherman, file Baits.lua btw : all ids, the localized name function too)
but i think you are able to simply make a table lure[itemId] = lureindex, i'm pretty sure these indexes are stable because of the selection wheel.
re edit : you are using
local lureIndex = GetFishingLure() at first? It probably just return the index of the current lure on the rod? not sure. but anyway you are using it as the indice 2 lines later. Doesn't seem needed at all.