First, merry christmas, happy hanuka, or whatever
With the great help from all you guys, then I ended with what I think is my final code.
I may no have used what you all suggested, but you still inspired me
function:
Lua Code:
local function UpdateBaitAmount()
if DestinationsSV.filters[PINS_FISHING_SHOW_BAIT_LEFT] then
local numLures = GetNumFishingLures()
local oldBaitCount = defaults.data.FoulBaitLeft + defaults.data.FoulSBaitLeft + defaults.data.RiverBaitLeft + defaults.data.RiverSBaitLeft + defaults.data.OceanBaitLeft + defaults.data.OceanSBaitLeft + defaults.data.LakeBaitLeft + defaults.data.LakeSBaitLeft + defaults.data.GeneralBait
local baitCount = 0
for lureIndex=1, numLures do
if stack then
baitCount = baitCount + stack
end
end
if baitCount ~= oldBaitCount then
LMP:RefreshPins(PINS_FISHING)
end
end
end
call:
Lua Code:
ZO_PreHookHandler(ZO_WorldMap, "OnShow", UpdateBaitAmount)
I know I COULD have chosen to just fire the LMP:RefreshPins(PINS_FISHING) every time the map opens to skip the comparison of stacks, but I think this will have a smaller impact on the game.