Variables in for statements are always locals
This commit is contained in:
@ -706,13 +706,12 @@ end
|
||||
|
||||
function MyBagsCore:GetSlotCount()
|
||||
local slots, used, displaySlots = 0, 0, 0
|
||||
local i
|
||||
local bagIndex
|
||||
if self.isBank then
|
||||
if self:CanSaveItems() or self.isLive then
|
||||
slots = 28
|
||||
displaySlots = 28
|
||||
end
|
||||
|
||||
for i = 1, slots do
|
||||
if (self:GetInfo(BANK_CONTAINER, i)) then
|
||||
used = used + 1
|
||||
@ -923,7 +922,6 @@ function MyBagsCore:BagButton_OnEnter(widget)
|
||||
|
||||
if self.GetOpt("HlItems") then
|
||||
-- Highlight
|
||||
local i
|
||||
for i = 1, self.GetOpt("MAXBAGSLOTS") do
|
||||
local button = _G[bagFrame:GetName() .. "Item" .. i]
|
||||
if button then
|
||||
@ -938,7 +936,6 @@ end
|
||||
function MyBagsCore:BagButton_OnLeave(widget)
|
||||
SetMoneyFrameColor("GameTooltipMoneyFrame", 1.0, 1.0, 1.0)
|
||||
GameTooltip:Hide()
|
||||
local i
|
||||
for i = 1, self.GetOpt("MAXBAGSLOTS") do
|
||||
local button = _G[widget:GetParent():GetName() .. "Item" .. i]
|
||||
if button then
|
||||
@ -1065,7 +1062,6 @@ function MyBagsCore:LayoutOptions()
|
||||
if (BackpackTokenFrame_IsShown()) then
|
||||
token:SetParent(self.frameName)
|
||||
token:SetPoint("RIGHT", cash, "LEFT", -10, 0)
|
||||
local i
|
||||
for i = 1, MAX_WATCHED_TOKENS do
|
||||
local name, count, icon, currencyID = GetBackpackCurrencyInfo(i)
|
||||
-- Update watched tokens
|
||||
@ -1307,7 +1303,6 @@ function MyBagsCore:LayoutBagFrame(bagFrame)
|
||||
searchText = strlower(strtrim(searchText))
|
||||
end
|
||||
|
||||
local slot
|
||||
local itemBase = bagFrameName .. "Item"
|
||||
local bagButton = _G[bagFrameName .. "Bag"]
|
||||
local slotColor = ((self.GetOpt("SlotColor")) or MYBAGS_SLOTCOLOR)
|
||||
@ -1508,7 +1503,7 @@ function MyBagsCore:LayoutFrame()
|
||||
|
||||
self.isLive = self:IsLive()
|
||||
local bagBase = self.frameName .. "Bag"
|
||||
local bagIndex, bagFrame, bag
|
||||
local bagFrame
|
||||
self.curRow, self.curCol = 0,0
|
||||
self:LayoutOptions()
|
||||
if self.isEquipment then
|
||||
@ -1950,7 +1945,6 @@ local mixins = {
|
||||
}
|
||||
|
||||
function MyBagsCore:Embed( target )
|
||||
local k, v
|
||||
for k, v in pairs(mixins) do
|
||||
target[v] = self[v]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user