Browse Source

Added Bulk Cancel for 100 items

pull/11/head
xanthics 3 years ago
parent
commit
3b300bbbc7
  1. 1
      TradeSkillMaster_Auctioning/locale/deDE.lua
  2. 2
      TradeSkillMaster_Auctioning/locale/enUS.lua
  3. 1
      TradeSkillMaster_Auctioning/locale/esES.lua
  4. 1
      TradeSkillMaster_Auctioning/locale/esMX.lua
  5. 1
      TradeSkillMaster_Auctioning/locale/frFR.lua
  6. 1
      TradeSkillMaster_Auctioning/locale/koKR.lua
  7. 1
      TradeSkillMaster_Auctioning/locale/ptBR.lua
  8. 1
      TradeSkillMaster_Auctioning/locale/ruRU.lua
  9. 1
      TradeSkillMaster_Auctioning/locale/zhCN.lua
  10. 1
      TradeSkillMaster_Auctioning/locale/zhTW.lua
  11. 24
      TradeSkillMaster_Auctioning/modules/CancelScan.lua
  12. 1
      TradeSkillMaster_Auctioning/modules/GUI.lua
  13. 4
      TradeSkillMaster_Auctioning/modules/manage.lua

1
TradeSkillMaster_Auctioning/locale/deDE.lua

@ -104,6 +104,7 @@ L["General Reset Settings"] = "Allgemeine Reset Einstellungen" -- Needs review
L["General Settings"] = "Allgemeine Optionen"
L["Give the new operation a name. A descriptive name will help you find this operation later."] = "Gib der neuen Operation einen Namen. Ein beschreibender Name hilft dir die Operation später wieder zu finden." -- Needs review
L["Help"] = "Hilfe"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "Wielange Auktionen dauern sollen."
L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = "Wieviele Auktionen sollen zum niedrigsten Preis auf einmal erstellt werden. Wenn auf 0 gesetzt werden keine Auktionen für alle Gruppen die diese Operation verwenden erstellt." -- Needs review
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "Wieviele Items sollen pro Auktion versteigert werden? 20 bedeutet, dass sie als Stacks (Paket) von 20 Items ins Auktionshaus gesetzt werden." -- Needs review

2
TradeSkillMaster_Auctioning/locale/enUS.lua

@ -108,6 +108,8 @@ L["General Settings"] = true
L["General"] = true
L["Give the new operation a name. A descriptive name will help you find this operation later."] = true
L["Help"] = true
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["Hold Alt to cancel 100 auctions at a time"] = true
L["How long auctions should be up for."] = true
L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = true
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = true

1
TradeSkillMaster_Auctioning/locale/esES.lua

@ -99,6 +99,7 @@ Could potentially reset %d items for %s profit.]=] ] = "" ]==]
-- L["General Settings"] = ""
-- L["Give the new operation a name. A descriptive name will help you find this operation later."] = ""
-- L["Help"] = ""
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
-- L["How long auctions should be up for."] = ""
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
-- L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = ""

1
TradeSkillMaster_Auctioning/locale/esMX.lua

@ -99,6 +99,7 @@ L["General"] = "General" -- Needs review
L["General Settings"] = "Opciones Generales" -- Needs review
-- L["Give the new operation a name. A descriptive name will help you find this operation later."] = ""
L["Help"] = "Ayuda" -- Needs review
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "Cuanto tiempo deberian estar las subastas." -- Needs review
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "Cuantos objetos deberian estar en una sola subasta, 20 significaria que seran subastados en pilas de 20." -- Needs review

1
TradeSkillMaster_Auctioning/locale/frFR.lua

@ -99,6 +99,7 @@ L["General Options"] = "Options générales" -- Needs review
L["General Settings"] = "Paramètres généraux"
-- L["Give the new operation a name. A descriptive name will help you find this operation later."] = ""
L["Help"] = "Aide"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "Combien de temps les enchères doivent elles durer. "
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "Combien d'objets doivent être vendu en une seule enchère, 20 signifiera une seul pile de 20 objets."

1
TradeSkillMaster_Auctioning/locale/koKR.lua

@ -99,6 +99,7 @@ L["General Reset Settings"] = "일반 재설정 설정" -- Needs review
L["General Settings"] = "일반 설정"
L["Give the new operation a name. A descriptive name will help you find this operation later."] = "새 작업의 이름을 지정하세요. 설명이 포함된 이름은 나중에 이 작업을 찾는 데 도움이 됩니다." -- Needs review
L["Help"] = "도움말"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "경매 지속시간"
L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = "한 번에 몇 개의 경매를 등록할지 지정합니다. 0으로 설정하면 이 작업이 적용되는 모든 그룹은 경매 등록을 하지 않습니다." -- Needs review
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "각 경매당 등록할 아이템의 개수를 지정, 20은 20 묶음을 등록한다는 의미입니다." -- Needs review

1
TradeSkillMaster_Auctioning/locale/ptBR.lua

@ -104,6 +104,7 @@ L["General Options"] = "Opções Gerais" -- Needs review
L["General Settings"] = "Configurações Gerais"
L["Give the new operation a name. A descriptive name will help you find this operation later."] = "Dê um nome a nova operação. Um nome descritivo ajudará você a encontrar esta operação mais tarde." -- Needs review
L["Help"] = "Ajuda"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "Quanto tempo os leilões devem durar."
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "Quantos itens devem estar em um mesmo leilão, 20 significa que serão postados em pilhas de 20."

1
TradeSkillMaster_Auctioning/locale/ruRU.lua

@ -104,6 +104,7 @@ L["General Reset Settings"] = "Основные опции сброса"
L["General Settings"] = "Основные настройки"
L["Give the new operation a name. A descriptive name will help you find this operation later."] = "Укажите новое имя для операции. Правильное название поможет вам найти эту операцию позже."
L["Help"] = "Помощь"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "Сколько должен длиться аукцион."
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "Количество товаров в связке. 20 обозначает, что товары будут выставляться связками по 20 штук."

1
TradeSkillMaster_Auctioning/locale/zhCN.lua

@ -105,6 +105,7 @@ L["General Reset Settings"] = "常规转卖设置"
L["General Settings"] = "常规设定"
L["Give the new operation a name. A descriptive name will help you find this operation later."] = "为新操作命名,一个描述性的名称将方便您找到它。"
L["Help"] = "帮助"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "拍卖持续时间。"
L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = "发布商品的数量上限。设置为0时会使任何应用此操作的分组无法发布拍卖。"
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "一次拍卖发布多少个物品,20意味着物品将以20个为堆叠发布."

1
TradeSkillMaster_Auctioning/locale/zhTW.lua

@ -104,6 +104,7 @@ L["General"] = "一般"
L["General Settings"] = "一般設定"
-- L["Give the new operation a name. A descriptive name will help you find this operation later."] = ""
L["Help"] = "幫助"
-- L["Hold Alt to cancel 100 auctions at a time"] = ""
L["How long auctions should be up for."] = "拍賣要發佈多久。"
-- L["How many auctions at the lowest price tier can be up at any one time. Setting this to 0 disables posting for any groups this operation is applied to."] = ""
L["How many items should be in a single auction, 20 will mean they are posted in stacks of 20."] = "多少物品在單一拍賣,20是指20的堆疊發佈。"

24
TradeSkillMaster_Auctioning/modules/CancelScan.lua

@ -410,7 +410,8 @@ local function DelayFrame()
end
-- updates the current item to the first one in the list
function Cancel:UpdateItem()
function Cancel:UpdateItem(...)
local count = ...
if #(cancelQueue) == 0 then
GUI.buttons:Disable()
if isScanning then
@ -423,7 +424,11 @@ function Cancel:UpdateItem()
sort(cancelQueue, function(a, b) return (a.index or 0)>(b.index or 0) end)
if count then
totalCanceled = totalCanceled + count
else
totalCanceled = totalCanceled + 1
end
TSM.Manage:UpdateStatus("manage", totalCanceled, totalToCancel)
wipe(currentItem)
currentItem = cancelQueue[1]
@ -431,6 +436,23 @@ function Cancel:UpdateItem()
GUI.buttons:Enable()
end
-- cancel auctions up to 100 at a time
function Cancel:BulkCancel()
local count = 0
-- list may be unsorted before we start
sort(cancelQueue, function(a, b) return (a.index or 0)>(b.index or 0) end)
print(#(cancelQueue))
for j=1,#(cancelQueue) do
CancelAuction(cancelQueue[1].index)
tinsert(itemsCancelled, CopyTable(cancelQueue[1]))
tremove(cancelQueue, 1)
count = count + 1
if j >= 100 then break end -- 100 items, stop processing cancels
end
print(#(cancelQueue), count)
Cancel:UpdateItem(count)
end
-- cancel the current item (gets called when the button is pressed
function Cancel:DoAction()
local index, backupIndex

1
TradeSkillMaster_Auctioning/modules/GUI.lua

@ -73,6 +73,7 @@ function private:CreateButtons(parent)
button:SetPoint("TOPLEFT")
button:SetWidth(80)
button:SetHeight(height)
button.tooltip = L["Hold Alt to cancel 100 auctions at a time"]
button:SetText(L["Cancel"])
button.which = "action"
button:SetScript("OnClick", OnClick)

4
TradeSkillMaster_Auctioning/modules/manage.lua

@ -65,7 +65,11 @@ end
function Manage:OnGUIEvent(event)
if event == "action" then
if mode == "Cancel" and IsAltKeyDown() then
Util:BulkCancel()
else
Util:DoAction()
end
elseif event == "skip" then
Util:SkipItem()
elseif event == "stop" then

Loading…
Cancel
Save