Remove some locals

This commit is contained in:
2016-09-06 18:04:57 +02:00
parent 895f0ccd4c
commit 83abacd2f9

View File

@ -456,7 +456,6 @@ function MyInventory:UserDropDown_Initialize()
local chars = MyInventory:GetSortedCharList(MyInventory.GetOpt("Sort")) local chars = MyInventory:GetSortedCharList(MyInventory.GetOpt("Sort"))
local frame = this:GetParent():GetParent() local frame = this:GetParent():GetParent()
local selectedValue = UIDropDownMenu_GetSelectedValue(this) local selectedValue = UIDropDownMenu_GetSelectedValue(this)
local i
for i = 1, getn(chars) do for i = 1, getn(chars) do
local info = { local info = {
@ -571,7 +570,6 @@ function MyInventory:GetSortedCharList(sorttype, realm)
local realmlist = {} local realmlist = {}
local realmcount = 0 local realmcount = 0
if not realm then if not realm then
local realmname
for realmname in pairs(DataStore:GetRealms()) do for realmname in pairs(DataStore:GetRealms()) do
realmcount = realmcount + 1 realmcount = realmcount + 1
realmlist[realmcount] = realmname realmlist[realmcount] = realmname
@ -582,8 +580,7 @@ function MyInventory:GetSortedCharList(sorttype, realm)
end end
local result = {} local result = {}
local idx = 0 local idx = 0
local i for i = 1, realmcount do
for i=1, realmcount do
for charname, _ in pairs(DataStore:GetCharacters(realmlist[i])) do for charname, _ in pairs(DataStore:GetCharacters(realmlist[i])) do
if DataStore_Containers.Characters[DataStore:GetCharacter(charname, realmlist[i])] then if DataStore_Containers.Characters[DataStore:GetCharacter(charname, realmlist[i])] then
idx = idx + 1 idx = idx + 1