View Single Post
12/22/15, 04:48 PM   #16
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
Originally Posted by Wandamey View Post
I was thinking you could avoid the loop by using the indexes directly, though it may look cleaner, it would bring nothing since you update all the values at the same time.

your way is more resistant against indexes variations too. Don't mind what i said.
Your input is still valued

Now I just need an event that is fired when I OPEN my map (by pressing 'M').
As it is now, it counts every time there is ANY change in my bag, which causes lag.

I did look into votan's example using
Lua Code:
  1. WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)
  2. GAMEPAD_WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)
but it only fires on map change, not when I open it.

Last edited by SnowmanDK : 12/22/15 at 04:50 PM.
  Reply With Quote