Release Candidate 1

This commit is contained in:
Tercio Jose
2024-01-20 14:28:25 -03:00
parent 4eff7b223e
commit b7c2b6c7a1
9 changed files with 599 additions and 374 deletions
+68 -2
View File
@@ -3481,6 +3481,7 @@ function damageClass.PredictedAugSpellsOnEnter(self)
local CONST_SPELLID_EBONMIGHT = 395152
local CONST_SPELLID_PRESCIENCE = 410089
local CONST_SPELLID_BLACKATTUNEMENT = 403264
local CONST_SPELLID_BLISTERING_SCALES = 360827
---@type actor[]
local augmentationEvokers = {}
@@ -3565,7 +3566,7 @@ function damageClass.PredictedAugSpellsOnEnter(self)
GameCooltip:AddLine("", "")
GameCooltip:AddIcon("", nil, nil, 1, 1)
for i = 1, #augmentationEvokers do
for i = 1, #augmentationEvokers do --black attunement
local actorObject = augmentationEvokers[i]
if (actorObject:Name() == actorName) then
local buffUptimeSpellContainer = actorObject:GetSpellContainer("buff")
@@ -3589,6 +3590,26 @@ function damageClass.PredictedAugSpellsOnEnter(self)
GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B)
end
end
local spellTable = buffUptimeSpellContainer:GetSpell(CONST_SPELLID_BLISTERING_SCALES)
if (spellTable) then
local uptime = spellTable.uptime
local spellName, _, spellIcon = _GetSpellInfo(CONST_SPELLID_BLISTERING_SCALES)
local uptimePercent = uptime / combatTime * 100
if (uptime <= combatTime) then
local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60)
if (minutes > 0) then
GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)")
Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen")
else
GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)")
Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen")
end
GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B)
end
end
end
end
end
@@ -3645,7 +3666,7 @@ function damageClass.PredictedAugSpellsOnEnter(self)
if (evokerObject) then
GameCooltip:AddLine("Prescience Uptime by Amount of Applications")
local prescienceData = evokerObject.cleu_prescience_time --real time
local prescienceData = evokerObject.cleu_prescience_time
if (prescienceData) then
prescienceData = prescienceData.stackTime
@@ -3667,6 +3688,51 @@ function damageClass.PredictedAugSpellsOnEnter(self)
end
end
end
--iterate among all the actors and find which one are healers, then get the amount of mana the evoker restored for that healer
---@type actorcontainer
local resourcesContainer = combatObject:GetContainer(DETAILS_ATTRIBUTE_ENERGY)
local manaRestoredToHealers = {}
for index, actorObject in resourcesContainer:ListActors() do
if (actorObject.spec == 1473) then --this is an aug evoker
local spellContainer = actorObject:GetSpellContainer("spell")
--local spellContainer = actorObject.spells
if (spellContainer) then
local sourceOfMagic = spellContainer:GetSpell(372571)
if (sourceOfMagic) then
for targetName, restoredAmount in pairs(sourceOfMagic.targets) do
manaRestoredToHealers[#manaRestoredToHealers+1] = {targetName, restoredAmount}
end
end
end
end
end
if (#manaRestoredToHealers > 0) then
GameCooltip:AddLine(" ")
GameCooltip:AddIcon(" ", 1, 1, 10, 10)
GameCooltip:AddLine("Mana Restored to Healers:")
table.sort(manaRestoredToHealers, Details.Sort2)
for i = 1, math.min(10, #manaRestoredToHealers) do
local targetName, restoredAmount = unpack(manaRestoredToHealers[i])
local targetActorObject = combatObject(DETAILS_ATTRIBUTE_ENERGY, targetName)
if (targetActorObject) then
local targetClass = targetActorObject:GetActorClass()
local targetName = detailsFramework:AddClassColorToText(targetName, targetClass)
targetName = detailsFramework:AddClassIconToText(targetName, targetName, targetClass)
GameCooltip:AddLine(targetName, Details:Format(restoredAmount))
local spellIcon = GetSpellTexture(372571)
GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B)
Details:AddTooltipBackgroundStatusbar(false, 100, true, "dodgerblue")
end
end
end
end
GameCooltip:AddLine("feature under test, can't disable atm")
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -1535,8 +1535,9 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
if (auraName) then
if (UnitExists(unitCaster)) then
local bBuffIsPlacedOnTarget = Details.CreditBuffToTarget[spellId]
if (UnitIsUnit(unitCaster, unitId) or bBuffIsPlacedOnTarget) then
if (bBuffIsPlacedOnTarget and not UnitIsUnit(unitCaster, unitId)) then
local bUnitIsTheCaster = UnitIsUnit(unitCaster, unitId)
if (bUnitIsTheCaster or bBuffIsPlacedOnTarget) then
if (bBuffIsPlacedOnTarget and not bUnitIsTheCaster) then
--could be prescince, ebom might or power infusion; casted on a target instead of the caster
local sourceSerial = UnitGUID(unitCaster)
local sourceName = Details:GetFullName(unitCaster)
@@ -1546,9 +1547,9 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
local targetFlags = 0x514
local targetFlags2 = 0x0
local spellName = auraName
--print(targetName, "already had", spellName, "at first of a combat")
Details.parser:buff("SPELL_AURA_APPLIED", time(), sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, 0x4, "BUFF", 0)
else
elseif (bUnitIsTheCaster) then
local playerGUID = UnitGUID(unitId)
if (playerGUID) then
local playerName = Details:GetFullName(unitId)