Remove some locals

This commit is contained in:
2016-09-06 18:11:09 +02:00
parent 089d270ade
commit 48eba18c2b

View File

@ -312,7 +312,6 @@ end
function MyEquipment:OnEnable()
MyEquipmentFramePortrait:SetTexture("Interface\\Addons\\MyBags\\Skin\\MyEquipmentPortrait")
local key, value
for key,value in pairs( SLOTNAMES ) do -- Just in case Blizzard shuffles the slot name table around
local slotId = GetInventorySlotInfo(value)
MYEQUIPMENT_SLOT[slotId] = value
@ -355,7 +354,6 @@ function MyEquipment:UserDropDown_Initialize()
local frame = this:GetParent():GetParent()
local selectedValue = UIDropDownMenu_GetSelectedValue(this)
local i
for i = 1, charnum do
local info = {
["text"] = chars[i],
@ -523,7 +521,7 @@ end
function MyEquipment:LayoutEquipmentFrame(self)
local itemBase = "MyEquipmentSlotsItem"
local texture, count, locked, quality, ammo, key, value, id
local texture, count, locked, quality, id
local slotColor = ((self.GetOpt("SlotColor")) or MYBAGS_SLOTCOLOR)
local charID = self:GetCurrentPlayer()
local hasRelic = self:GetRelic(charID)
@ -532,6 +530,7 @@ function MyEquipment:LayoutEquipmentFrame(self)
if self.aioiOrder and (hasRelic or hideAmmo) then
self.curCol = self.curCol + 1
end
for key, value in pairs( SLOTNAMES ) do
local slot = GetInventorySlotInfo(value)
local itemButton = _G[itemBase .. slot]
@ -539,6 +538,7 @@ function MyEquipment:LayoutEquipmentFrame(self)
self.curCol = 0
self.curRow = self.curRow + 1
end
itemButton:Show()
itemButton:ClearAllPoints()
itemButton:SetPoint("TOPLEFT", self.frame:GetName(), "TOPLEFT", self:GetXY(self.curRow, self.curCol))