This commit is contained in:
Bunny67
2018-07-11 23:24:37 +03:00
parent 91240dbf00
commit f65e8aa789
5 changed files with 19 additions and 8 deletions
+6 -4
View File
@@ -359,10 +359,12 @@ function B:ScanBags()
local bagSlot = B:Encode_BagSlot(bag, slot)
local itemID = ConvertLinkToID(B:GetItemLink(bag, slot))
if itemID then
bagMaxStacks[bagSlot] = select(7, GetItemInfo(itemID))
local _, _, rarity, _, _, _, stackCount = GetItemInfo(itemID)
local _, itemCount = B:GetItemInfo(bag, slot)
bagMaxStacks[bagSlot] = stackCount
bagIDs[bagSlot] = itemID
bagQualities[bagSlot] = select(3, GetItemInfo(itemID))
bagStacks[bagSlot] = select(2, B:GetItemInfo(bag, slot))
bagQualities[bagSlot] = rarity
bagStacks[bagSlot] = itemCount
end
end
end
@@ -666,7 +668,7 @@ function B:DoMove(move)
end
end
local stackSize = select(7, GetItemInfo(sourceItemID))
local _, _, _, _, _, _, stackSize = GetItemInfo(itemID)
if (sourceItemID == targetItemID) and (targetCount ~= stackSize) and ((targetCount + sourceCount) > stackSize) then
B:SplitItem(sourceBag, sourceSlot, stackSize - targetCount)
else
+11 -1
View File
@@ -303,7 +303,15 @@ end
function M:CHAT_MSG_LOOT()
local playername, itemname, rolltype = self:ParseRollChoice(arg1)
if playername and itemname and rolltype then
local class = select(2, UnitClass(playername))
for _, f in ipairs(M.RollBars) do
if f.rollID and f.button.link == itemname and not f.rolls[playername] then
f.rolls[playername] = { rolltype }
f[rolltype]:SetText(tonumber(f[rolltype]:GetText()) + 1)
return
end
end
--[[
local _, class = UnitClass(playername)
for _, f in ipairs(M.RollBars) do
if f.rollID and f.button.link == itemname and not f.rolls[playername] then
f.rolls[playername] = { rolltype, class }
@@ -311,7 +319,9 @@ function M:CHAT_MSG_LOOT()
return
end
end
]]
end
end
function M:LoadLootRoll()