local modifiedClick = IsModifiedClick(); -- If we can loot the item and autoloot toggle is active, then do a normal click if ( button ~= "LeftButton" and modifiedClick and IsModifiedClick("AUTOLOOTTOGGLE") ) then local _, _, _, _, _, lootable = GetContainerItemInfo(self:GetParent():GetID(), self:GetID()); if ( lootable ) then modifiedClick = false; end end if ( modifiedClick ) then ContainerFrameItemButton_OnModifiedClick(self, button); else ContainerFrameItemButton_OnClick(self, button); end
ContainerFrameItemButton_OnLoad(self);
ContainerFrameItemButton_OnEnter(self, motion);
GameTooltip:Hide(); ResetCursor();
if ( self.hasStackSplit and (self.hasStackSplit == 1) ) then StackSplitFrame:Hide(); end
ContainerFrameItemButton_OnDrag(self, button);
ContainerFrameItemButton_OnDrag(self);
GameTooltip:SetOwner(self, "ANCHOR_LEFT"); if ( self:GetID() == 0 ) then GameTooltip:SetText(BACKPACK_TOOLTIP, 1.0, 1.0, 1.0); if (GetBindingKey("TOGGLEBACKPACK")) then GameTooltip:AppendText(" "..NORMAL_FONT_COLOR_CODE.."("..GetBindingKey("TOGGLEBACKPACK")..")"..FONT_COLOR_CODE_CLOSE) end elseif ( self:GetID() == KEYRING_CONTAINER ) then GameTooltip:SetText(KEYRING, 1.0, 1.0, 1.0); if (GetBindingKey("TOGGLEKEYRING")) then GameTooltip:AppendText(" "..NORMAL_FONT_COLOR_CODE.."("..GetBindingKey("TOGGLEKEYRING")..")"..FONT_COLOR_CODE_CLOSE) end elseif ( GameTooltip:SetInventoryItem("player", ContainerIDToInventoryID(self:GetID())) ) then local binding = GetBindingKey("TOGGLEBAG"..(4 - self:GetID() + 1)); if ( binding ) then GameTooltip:AppendText(" "..NORMAL_FONT_COLOR_CODE.."("..binding..")"..FONT_COLOR_CODE_CLOSE); end end
GameTooltip:Hide();
ToggleBag(self:GetParent():GetID());
ContainerFrame_OnEvent(self, event, ...);
ContainerFrame_OnLoad(self);
ContainerFrame_OnHide(self);
ContainerFrame_OnShow(self);