Skip to content

Commit

Permalink
Libraries update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alar of Runetotem committed Aug 16, 2024
1 parent 4970472 commit 31ad11f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
17 changes: 9 additions & 8 deletions MailCommander.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function Count:Total(id, toon, bank)
if type(id) == "string" and presets[id] then
return presets[id]:count(id, toon, bank) or 0
else
return GetItemCount(id, bank) - bags[id] or 0
return (C_Item.GetItemCount(id, bank) - bags[id]) or 0
end
end

Expand Down Expand Up @@ -311,7 +311,7 @@ function Count:IsSendable(id, idInBag, toon, bagId, slotId)
if presets[id] and type(presets[id].validate) == "function" then
return presets[id]:validate(idInBag, toon, bagId, slotId)
else
local boa = I:IsBoa(GetContainerItemLink(bagId, slotId))
local boa = I:IsBoa(C_Container.GetContainerItemLink(bagId, slotId))
if not Count:CanSendMail(toon) and not boa then return false end
return id == idInBag
end
Expand Down Expand Up @@ -445,15 +445,16 @@ local basepresets = { --#basepresets
end
local min = getProperty('keep', toon, id, 0)
local max = getProperty('cap', toon, id, CAP)
local level = GetDetailedItemLevelInfo(itemlink)
local itemType, itemSubType = select(6, GetItemInfoInstant(id))
if db.items[id].boe and IsEquippableItem(itemlink) and level >= min and level <= max then
if itemType ~= LE_ITEM_CLASS_WEAPON and itemType ~= LE_ITEM_CLASS_WEAPON then return false end
local level = C_Item.GetDetailedItemLevelInfo(itemlink)
local itemType, itemSubType = select(6, C_Item.GetItemInfoInstant(id))
if db.items[id].boe and C_Item.IsEquippableItem(itemlink) and level >= min and level <= max then
if itemType ~= Enum.ItemClass.Weapon then return false end
local rc, alreadybound = pcall(C_Item.IsBound, ItemLocation:CreateFromBagAndSlot(bag, slot))
return not alreadybound
end
end
end,

res = false,
cap = L['Maximum Level'],
keep = L['Minimum Level']
Expand Down Expand Up @@ -2471,8 +2472,8 @@ local function UpdateItemInfo(itemId)
local data = db.items[itemId]
data.l = link
data.t = texture
data.bop = (bindType == LE_ITEM_BIND_ON_ACQUIRE)
data.boe = (bindType == LE_ITEM_BIND_ON_EQUIP or bindType == LE_ITEM_BIND_ON_USE)
data.bop = (bindType == Enum.ItemBind.OnAcquire)
data.boe = (bindType == Enum.ItemBind.OnEquip or bindType == Enum.ItemBind.OnUse)
data.boa = quality == Enum.ItemQuality.Heirloom or I:IsBoa(itemId)
end
end
Expand Down
2 changes: 1 addition & 1 deletion MailCommander.toc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
## X-Revision: @project-abbreviated-hash@
## eMail: [email protected]
## URL: http://wow.aspide.it
## OptionalDeps: Titan, Bazooka, ChocolateBar , FuBar , LibDataBroker-1.1, LibDBIcon-1.0, LibDebug
## OptionalDeps: Titan, Bazooka, ChocolateBar , FuBar , LibDataBroker-1.1, LibDBIcon-1.0, LibDebug, LibInit
## DefaultState: Enabled
## SavedVariables: dbMAC
## X-ID: MCOM
Expand Down
3 changes: 3 additions & 0 deletions RelNotes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Mail Commander allows you to define a per character list of needs which wil be d
You can make this selection permament, disabling some kind of items, or just cherry pick each time
You can also use the "Send all" button to have all enabled items sent with a single click
]])
self:RelNotes(2,6,1,[[
Rebuild: libraries upgrade
]])
self:RelNotes(2,6,0,[[
Toc: Updated to 11.0.0, 11.0.2
]])
Expand Down

0 comments on commit 31ad11f

Please sign in to comment.