View Single Post
12/22/15, 02:45 PM   #10
Wandamey
Guest
Posts: n/a
I couldn't test circonian's function ( local name, icon, stack, sellPrice, quality = GetFishingLureInfo(lureIndex) ) because i can't log in on PTS and i don't have live installed anymore, but if the indexes are related to the wheel menu (the one to choose the bait when you fish) then it's jackpot : the indexes will be fixed values, the stacks would be already all taken into account i think. (i don't remember the original display, but i'm sure votan knows about that and could confirm)

and the biggest loop you would have to do would be of 9 elements (currently you are browsing your whole bag, aka up to 200 elements each time you pick a bait)
In this case you can use the stack return of circonian's function to update your values, lets say on map opening (it would be the cheapest number of calls and the values would be updated before displaying any tooltip - if the guy who can go through his whole screen in less than 10ms doesn't come back )

afaik there is no way to loot things or fish or look in the bag with the map on the screen so it seems to be a very viable option.
Now if this function doesn't rely on incertain indexes, it wouldn't hurt either to use it on a tooltip prehook as it is way lighter than a whole bag check.

to know what bait has what index, run the function for all baits and display the name, the stack and the index to see for yourself, you'll see if it add stacks too and references all baits or not. (if it references only the baits you possess, that may be a bit trickier to use it - but you could make a table of baits ids and retrieve the localized name from a fake itemLink it to compare to the name returned by the function for example - these would be little, manageable tables.)

i'd like to be more precise with examples of functions but as I can't test by myself right now, i rather count on someone else to tell you how to run the update on map opening for example...

edit : eerf i'm a slow typer, you edited and already saw the point of circonian's findings...
beware the chub and the simple bait, not sure they don't share the same pic.

Last edited by Wandamey : 12/22/15 at 02:54 PM.
  Reply With Quote