View Single Post
08-10-13, 04:36 AM   #30
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
No i meant, the other way around.

I do need myChars and herChars as globals because i use them in loads of addons.

I don't need the myToons and herToons tables as globals because i don't use them anywhere exept here in the management, you use it to check if the other manager is online.

Edit: Unless there's a better solution i made both tables local and then this in the lib:

Code:
caelLib.myToons = myToons[caelLib.playerRealm]
caelLib.myChars = myToons[caelLib.playerRealm] and myToons[caelLib.playerRealm][caelLib.playerName]
caelLib.herChars = herToons[caelLib.playerRealm] and herToons[caelLib.playerRealm][caelLib.playerName]
And then in the manager, i just changed:

Code:
local chars = caelLib.myToons[caelLib.playerRealm]
To

Code:
local chars = caelLib.myToons
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 08-10-13 at 06:46 AM.
  Reply With Quote