Fix some more locals

This commit is contained in:
2016-09-06 17:35:07 +02:00
parent 23ff6cf7f3
commit 6352b997d1

View File

@ -819,7 +819,8 @@ function MyBagsCore:ItemButton_OnEnter(widget)
if widget:GetParent() == MyBankFrameBank then if widget:GetParent() == MyBankFrameBank then
GameTooltip:SetInventoryItem("player", BankButtonIDToInvSlotID(widget:GetID())) GameTooltip:SetInventoryItem("player", BankButtonIDToInvSlotID(widget:GetID()))
else else
local hasCooldown, repairCost, speciesID, level, breedQuality, maxHealth, power, speed, name = GameTooltip:SetBagItem(widget:GetParent():GetID(), widget:GetID()) local speciesID = select(3, GameTooltip:SetBagItem(widget:GetParent():GetID(), widget:GetID()))
-- local hasCooldown, repairCost, speciesID, level, breedQuality, maxHealth, power, speed, name = GameTooltip:SetBagItem(widget:GetParent():GetID(), widget:GetID())
if (speciesID and speciesID > 0) then if (speciesID and speciesID > 0) then
local link = GetContainerItemLink(widget:GetParent():GetID(), widget:GetID()) local link = GetContainerItemLink(widget:GetParent():GetID(), widget:GetID())
local id, lvl, rar, hp, pw, sp, n = GetBattlePetInfoFromLink(link) local id, lvl, rar, hp, pw, sp, n = GetBattlePetInfoFromLink(link)
@ -1323,7 +1324,7 @@ function MyBagsCore:LayoutBagFrame(bagFrame)
bagFrame.size = tonum(count) bagFrame.size = tonum(count)
if bagButton and bagFrame:GetID() ~= BANK_CONTAINER then if bagButton and bagFrame:GetID() ~= BANK_CONTAINER then
if not texture then if not texture then
local bag_id, texture = GetInventorySlotInfo("Bag0Slot") texture = select(2, GetInventorySlotInfo("Bag0Slot"))
end end
if not self.isLive or (self.isLive and self:IsBagSlotUsable(bagFrame:GetID())) then if not self.isLive or (self.isLive and self:IsBagSlotUsable(bagFrame:GetID())) then