View Single Post
12/24/15, 07:50 AM   #27
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
Originally Posted by Wandamey View Post

don't forget this
local name, icon, stack, sellPrice, quality = GetFishingLureInfo(lureIndex)
before using the stack variable.


And idk what happens in refresh pins, if you refresh your data there or not, but in case, as the call is already done to count the stacks in this loop, you might as well update your saved variables right away (with the name and icon check) for the next check.
You'll have to do it at some point and the call is done so... Beside these are very small loops and in UI mode it's not like you're looting zombies in the middle of a swarm.

also, if i lose 2 worms and find 2 minows, it wont update.

but i'm not sure what you are displaying though : the total number of baits? or the total for this water type? or each type amout for the water?
Ooops deleted that part by accident: "GetFishingLureInfo(lureIndex)"
It always does it's initial count on player load, so that part is covered.
In regards to the chance of getting 2 of one bait and loosing 2 of another, then you are right. The chance of that happening is small, but I guess I should count them individually.
Thanks for the tips

My pins show this (example, depending on settings in Destinations. They can all be toggled)
achievement name
rare fish name (the fish names can be only the ones missing, OR all for the acheivement)
rare fish name
rare fish name
water type (foul, ocean etc.)
optimal primary bait name/optimal rare bait name
primary bait left/rare bait left/simple bait left (if any)
  Reply With Quote