Remove some locals
This commit is contained in:
@ -470,7 +470,7 @@ end
|
|||||||
|
|
||||||
function MyBank:UserDropDown_Initialize()
|
function MyBank:UserDropDown_Initialize()
|
||||||
local this = self or _G.this
|
local this = self or _G.this
|
||||||
local chars, char_num, i
|
local chars, char_num
|
||||||
chars = MyBank:GetSortedCharList(MyBank.GetOpt("Sort"))
|
chars = MyBank:GetSortedCharList(MyBank.GetOpt("Sort"))
|
||||||
char_num = getn(chars)
|
char_num = getn(chars)
|
||||||
if (char_num == 0) then
|
if (char_num == 0) then
|
||||||
@ -526,18 +526,20 @@ function MyBank:ToggleAllBags(forceopen)
|
|||||||
else
|
else
|
||||||
ToggleBackpack()
|
ToggleBackpack()
|
||||||
end
|
end
|
||||||
local action, i
|
local action
|
||||||
if (IsBagOpen(0) or MyInventory.frame:IsVisible()) then
|
if (IsBagOpen(0) or MyInventory.frame:IsVisible()) then
|
||||||
action = "OpenBag"
|
action = "OpenBag"
|
||||||
else
|
else
|
||||||
action = "CloseBag"
|
action = "CloseBag"
|
||||||
end
|
end
|
||||||
for i=1, 4, 1 do
|
|
||||||
|
for i = 1, 4, 1 do
|
||||||
if not (MyInventory.GetOpt("Replace") and MyInventory:IncludeBag(i)) then
|
if not (MyInventory.GetOpt("Replace") and MyInventory:IncludeBag(i)) then
|
||||||
self.hooks[action](i)
|
self.hooks[action](i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i=5, 11, 1 do
|
|
||||||
|
for i = 5, 11, 1 do
|
||||||
if not MyBank.GetOpt("Replace") or not MyBank:IncludeBag(i) then
|
if not MyBank.GetOpt("Replace") or not MyBank:IncludeBag(i) then
|
||||||
self.hooks[action](i)
|
self.hooks[action](i)
|
||||||
end
|
end
|
||||||
@ -609,7 +611,6 @@ end
|
|||||||
|
|
||||||
function MyBank:GetSortedCharList(sorttype, realm)
|
function MyBank:GetSortedCharList(sorttype, realm)
|
||||||
if IsAddOnLoaded("DataStore_Containers") then
|
if IsAddOnLoaded("DataStore_Containers") then
|
||||||
local realmname
|
|
||||||
local realmlist = {}
|
local realmlist = {}
|
||||||
local realmcount = 0
|
local realmcount = 0
|
||||||
if not realm then
|
if not realm then
|
||||||
@ -623,9 +624,7 @@ function MyBank:GetSortedCharList(sorttype, realm)
|
|||||||
end
|
end
|
||||||
local result = {}
|
local result = {}
|
||||||
local idx = 0
|
local idx = 0
|
||||||
local i
|
for i = 1, realmcount do
|
||||||
local charname, charkey
|
|
||||||
for i=1, realmcount do
|
|
||||||
for charname, charkey in pairs(DataStore:GetCharacters(realmlist[i])) do
|
for charname, charkey in pairs(DataStore:GetCharacters(realmlist[i])) do
|
||||||
-- charkey = DataStore:GetCharacter(charname, realmlist[i])
|
-- charkey = DataStore:GetCharacter(charname, realmlist[i])
|
||||||
if DataStore_Containers.Characters[charkey] then
|
if DataStore_Containers.Characters[charkey] then
|
||||||
|
|||||||
Reference in New Issue
Block a user