Updates
- Improved Augmented damage prediction. - Lib Open Raid update
This commit is contained in:
@@ -443,6 +443,26 @@ function openRaidLib.GetFoodTierFromAura(auraInfo)
|
||||
return nil
|
||||
end
|
||||
|
||||
local isTierPiece = function(itemLink)
|
||||
local tooltipData = C_TooltipInfo.GetHyperlink(itemLink)
|
||||
if (tooltipData) then
|
||||
local lines = tooltipData.lines
|
||||
if (lines and #lines > 0) then
|
||||
for i = 1, #lines do
|
||||
local thisLine = lines[i]
|
||||
local leftText = thisLine.leftText
|
||||
if (type(leftText) == "string") then
|
||||
if (leftText:match( "%s%(%d%/5%)$" )) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
--called from AddUnitGearList() on LibOpenRaid file
|
||||
function openRaidLib.GearManager.BuildEquipmentItemLinks(equippedGearList)
|
||||
equippedGearList = equippedGearList or {} --nil table for older versions
|
||||
@@ -485,6 +505,7 @@ function openRaidLib.GearManager.BuildEquipmentItemLinks(equippedGearList)
|
||||
equipmentTable.itemQuality = itemQuality
|
||||
equipmentTable.itemId = itemId
|
||||
equipmentTable.itemName = itemName
|
||||
equipmentTable.isTier = isTierPiece(itemLink)
|
||||
|
||||
local _, _, enchantId, gemId1, gemId2, gemId3, gemId4, suffixId, uniqueId, levelOfTheItem, specId, upgradeInfo, instanceDifficultyId, numBonusIds, restLink = strsplit(":", itemLink)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 111
|
||||
local CONST_LIB_VERSION = 112
|
||||
|
||||
if (LIB_OPEN_RAID_MAX_VERSION) then
|
||||
if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then
|
||||
@@ -1637,6 +1637,16 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
|
||||
unitGearInfo.equippedGear = equippedGearList
|
||||
|
||||
local tierAmount = 0
|
||||
|
||||
for i = 1, #equippedGearList do
|
||||
if (equippedGearList[i].isTier) then
|
||||
tierAmount = tierAmount + 1
|
||||
end
|
||||
end
|
||||
|
||||
unitGearInfo.tierAmount = tierAmount
|
||||
|
||||
openRaidLib.publicCallback.TriggerCallback("GearUpdate", openRaidLib.GetUnitID(unitName), unitGearInfo, openRaidLib.GearManager.GetAllUnitsGear())
|
||||
end
|
||||
|
||||
@@ -1666,7 +1676,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
|
||||
--unpack the enchant data as a ipairs table
|
||||
local noEnchantTableUnpacked = openRaidLib.UnpackTable(data, 4, false, false, noEnchantTableSize)
|
||||
--unpack the enchant data as a ipairs table
|
||||
--unpack the gems data as a ipairs table
|
||||
local noGemsTableUnpacked = openRaidLib.UnpackTable(data, noGemsTableIndex, false, false, noGemsTableSize)
|
||||
--unpack the full gear
|
||||
local equippedGearListUnpacked = equippedGearListIndex and openRaidLib.UnpackTable(data, equippedGearListIndex, false, true, 4) or {}
|
||||
|
||||
@@ -90,6 +90,7 @@ playerGear = {
|
||||
.itemName = string
|
||||
.enchantId = number
|
||||
.gemId = number
|
||||
.isTier = boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user