Mercurial > wow > reaction
comparison classes/BagButton.lua @ 151:57568d3ff3e6
fixed bags not showing when initially placed
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 08 May 2009 00:35:14 +0000 |
parents | 86564b5cbbff |
children | 6d7ef2a3f828 |
comparison
equal
deleted
inserted
replaced
150:f300c3ffc3fa | 151:57568d3ff3e6 |
---|---|
166 local f = self:GetFrame() | 166 local f = self:GetFrame() |
167 | 167 |
168 f:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight") | 168 f:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight") |
169 | 169 |
170 f:RegisterEvent("CURSOR_UPDATE") | 170 f:RegisterEvent("CURSOR_UPDATE") |
171 f:RegisterEvent("UNIT_INVENTORY_CHANGED") | 171 f:RegisterEvent("BAG_UPDATE") |
172 f:RegisterEvent("BAG_CLOSED") | 172 f:RegisterEvent("BAG_CLOSED") |
173 f:SetScript("OnDragStart", function(frame, ...) self:OnDragStart(...) end) | 173 f:SetScript("OnDragStart", function(frame, ...) self:OnDragStart(...) end) |
174 f:RegisterForDrag("LeftButton") | 174 f:RegisterForDrag("LeftButton") |
175 | 175 |
176 -- attach to skinner | 176 -- attach to skinner |
232 function Bag:OnDragStart() | 232 function Bag:OnDragStart() |
233 PickupBagFromSlot(self:GetInventorySlot()) | 233 PickupBagFromSlot(self:GetInventorySlot()) |
234 self:Update() | 234 self:Update() |
235 end | 235 end |
236 | 236 |
237 function Bag:UNIT_INVENTORY_CHANGED(unit) | 237 function Bag:BAG_UPDATE(bag) |
238 if unit == "player" then | 238 if bag == self:GetBagID() then |
239 self:Update() | 239 self:Update() |
240 end | 240 end |
241 end | 241 end |
242 | 242 |
243 function Bag:CURSOR_UPDATE() | 243 function Bag:CURSOR_UPDATE() |