mirror of
https://github.com/parnic/breakables.git
synced 2025-06-17 01:41:51 -05:00
- drycoded fix to ticket #10: look through the first 5 lines of the tooltip to find "millable" or "prospectable" instead of requiring it to be on line 2
This commit is contained in:
@ -847,13 +847,26 @@ function Breakables:FindBreakablesInSlot(bagId, slotId)
|
||||
end
|
||||
end
|
||||
|
||||
local extraInfo = BreakablesTooltipTextLeft2:GetText()
|
||||
local idx = 1
|
||||
local millable = false
|
||||
local prospectable = false
|
||||
for idx=1,5 do
|
||||
if _G["BreakablesTooltipTextLeft"..idx] then
|
||||
if _G["BreakablesTooltipTextLeft"..idx]:GetText() == ITEM_MILLABLE then
|
||||
millable = true
|
||||
break
|
||||
elseif _G["BreakablesTooltipTextLeft"..idx]:GetText() == ITEM_PROSPECTABLE then
|
||||
prospectable = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if CanMill and (itemSubType == MillingItemSubType or itemSubType == MillingItemSecondarySubType) and extraInfo == ITEM_MILLABLE then
|
||||
if CanMill and (itemSubType == MillingItemSubType or itemSubType == MillingItemSecondarySubType) and millable then
|
||||
return {itemLink, itemCount, itemType, itemTexture, bagId, slotId, itemSubType, itemLevel, BREAKABLE_HERB, false, itemName}
|
||||
end
|
||||
|
||||
if CanProspect and itemSubType == ProspectingItemSubType and extraInfo == ITEM_PROSPECTABLE then
|
||||
if CanProspect and itemSubType == ProspectingItemSubType and prospectable then
|
||||
return {itemLink, itemCount, itemType, itemTexture, bagId, slotId, itemSubType, itemLevel, BREAKABLE_ORE, false, itemName}
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user