WoWInterface SVN SplitItemsOnTheFly

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 8 to Rev 9
    Reverse comparison

Rev 8 → Rev 9

trunk/core.lua
27,21 → 27,26
SI.Cursor:EnableMouseWheel(0)
SI.Cursor.text:SetText("")
SI.Cursor:SetScript('OnMouseWheel',function(self,arg1)
local i = tonumber(self.text:GetText()) or 1
local c = i+arg1
local i = tonumber(self.text:GetText())
local c
if not i then
c=arg1%SI.count
else
c = i+arg1
end
--if c<0 then it would drop automaticly
if c<=1 then
if c==1 then
ClearCursor()
if handling=='ITEM_LOCK_CHANGED' then
SplitContainerItem(SI.bagID,SI.bagSlot,c)
elseif handling=='GUILDBANK_ITEM_LOCK_CHANGED' then
SplitGuildBankItem(SI.bagID,SI.bagSlot,c)
end
if c==1 then
ClearCursor()
if handling=='ITEM_LOCK_CHANGED' then
SplitContainerItem(SI.bagID,SI.bagSlot,c)
elseif handling=='GUILDBANK_ITEM_LOCK_CHANGED' then
SplitGuildBankItem(SI.bagID,SI.bagSlot,c)
end
self.text:SetText(1)
elseif c>=SI.count or c==0 then
ClearCursor()
SplitContainerItem(SI.bagID,SI.bagSlot,SI.count)
self.text:SetText("")
elseif c>SI.count then
self.text:SetText(SI.count)
else
ClearCursor()
if handling=='ITEM_LOCK_CHANGED' then
58,12 → 63,12
--Get Count (initial Count)
_,SI.count,lock = GetContainerItemInfo(...)
--Item is splitable and got picked up
if SI.count > 1 and lock then
if SI.count > 1 and lock and CursorHasItem() then
--print('EnableMouseWheel')
SI.Cursor.text:SetPoint('BOTTOMLEFT',SI.Cursor,'BOTTOMLEFT',GetScaledCursorPosition(0,0) )
SI.Cursor:EnableMouseWheel(1)
SI.bagID,SI.bagSlot = ...
SI.Cursor.text:SetText(SI.count)
SI.Cursor.text:SetText("")
--Item isn't splitable and got dropped
else
SI.Cursor.text:SetText("")
91,12 → 96,12
if tab and slot then
_,SI.count,lock = GetGuildBankItemInfo(tab,slot)
--Item is splitable and got picked up
if SI.count > 1 and lock then
if SI.count > 1 and lock and CursorHasItem() then
--print('EnableMouseWheel')
SI.Cursor.text:SetPoint('BOTTOMLEFT',SI.Cursor,'BOTTOMLEFT',GetScaledCursorPosition(0,0) )
SI.Cursor:EnableMouseWheel(1)
SI.bagID,SI.bagSlot = tab,slot
SI.Cursor.text:SetText(SI.count)
SI.Cursor.text:SetText("")
--Item isn't splitable and got dropped
else
SI.Cursor.text:SetText("")