General Fixes, Backend Improvements, Library Updates.
Release Documentation: - Classic now uses the same combat log reader as retail (Flamanis). - Merged Rage of Fyr'alath spells (equara). - Added Rogue Ambushes to merged spells (WillowGryph). - The Remove Common Segments option now also removes segments trash between raid bosses. - Fixed an issue where auras applied before combat start, such as Power Infusion and Prescience, which are counted towards the target, were not being accounted for. - Added to Combat Class: classCombat:GetRunTimeNoDefault(). This returns the run time of the Mythic+ if available, nil otherwise. Technical Notes: - Classic now uses retail parser. - Combat class now have the member: classCombat:GetRunTimeNoDefault(); Returns the run time of a M+ (after completed). - The Utility class's buff scan at the start of combat has been improved, and the code has been cleaned. Also, the scan runs now on the next frame after combat start. - Augmentation Evoker won't track auras from the combat start aura scan, if the player isn't in combat (example: a player in the group enters in combat). - Remove tier bonus for Augmentation Evoker Ebon Might damage prediction and nerfed Close as Cluthmates to 10%. - Segments Container's ResetDataByCombatType() now supports multiple combat types per classification. - Code cleanup on Segments menu code to use the new Mythic+ functions added to Combat class. - Mythic+ start detection produced errors if a WORLD_STATE_TIMER_START event triggered before the CHALLENGE_MODE_START event. - Mythic+ finish code was bugging when 'time' returned by C_ChallengeMode.GetCompletionInfo() wasn't being checked again nil value. - Rogue's Ambush ability and Rage of Fyr'alath spellIds added to override_spellId within the parser. - Details! Framework updated. - Open Raid Library updated.
This commit is contained in:
@@ -711,9 +711,10 @@ local bIsNewUnitAuraAvailable = C_UnitAuras and C_UnitAuras.GetAuraDataBySlot an
|
||||
|
||||
local auraSpellID
|
||||
local auraDurationTime
|
||||
local auraUnitId
|
||||
|
||||
local handleBuffAura = function(aura)
|
||||
local auraInfo = C_UnitAuras.GetAuraDataByAuraInstanceID("player", aura.auraInstanceID)
|
||||
local auraInfo = C_UnitAuras.GetAuraDataByAuraInstanceID(auraUnitId, aura.auraInstanceID)
|
||||
if (auraInfo) then
|
||||
local spellId = auraInfo.spellId
|
||||
if (auraSpellID == spellId) then
|
||||
@@ -724,7 +725,7 @@ local handleBuffAura = function(aura)
|
||||
end
|
||||
end
|
||||
|
||||
local getAuraDuration = function(spellId)
|
||||
local getAuraDuration = function(spellId, unitId)
|
||||
--some auras does not have the same spellId of the cast as the spell for its aura duration
|
||||
--in these cases, it's necessary to declare the buff spellId which tells the duration of the effect by adding 'durationSpellId = spellId' within the cooldown data
|
||||
if (not LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId]) then
|
||||
@@ -740,8 +741,9 @@ local getAuraDuration = function(spellId)
|
||||
local bUsePackedAura = true
|
||||
auraSpellID = customBuffDuration or spellId
|
||||
auraDurationTime = 0 --reset duration
|
||||
auraUnitId = unitId or "player"
|
||||
|
||||
AuraUtil.ForEachAura("player", "HELPFUL", bBatchCount, handleBuffAura, bUsePackedAura) --check auras to find a buff for the spellId
|
||||
AuraUtil.ForEachAura(auraUnitId, "HELPFUL", bBatchCount, handleBuffAura, bUsePackedAura) --check auras to find a buff for the spellId
|
||||
|
||||
if (auraDurationTime == 0) then --if the buff wasn't found, attempt to get the duration from the file
|
||||
return LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId].duration or 0
|
||||
@@ -754,9 +756,10 @@ end
|
||||
|
||||
---get the duration of a buff placed by a spell
|
||||
---@param spellId number
|
||||
---@param unitId string?
|
||||
---@return number duration
|
||||
function openRaidLib.CooldownManager.GetSpellBuffDuration(spellId)
|
||||
return getAuraDuration(spellId)
|
||||
function openRaidLib.CooldownManager.GetSpellBuffDuration(spellId, unitId)
|
||||
return getAuraDuration(spellId, unitId)
|
||||
end
|
||||
|
||||
---check if a player cooldown is ready or if is in cooldown
|
||||
@@ -856,6 +859,51 @@ do
|
||||
end
|
||||
|
||||
|
||||
do
|
||||
local getUnitName = function(unitId)
|
||||
local unitName, realmName = UnitName(unitId)
|
||||
if (unitName) then
|
||||
if (realmName and realmName ~= "") then
|
||||
unitName = unitName .. "-" .. realmName
|
||||
end
|
||||
return unitName
|
||||
end
|
||||
end
|
||||
|
||||
local predicateFunc = function(spellIdToFind, casterName, _, name, icon, applications, dispelName, duration, expirationTime, sourceUnitId, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, applications)
|
||||
if (spellIdToFind == spellId and UnitExists(sourceUnitId)) then
|
||||
if (casterName == getUnitName(sourceUnitId)) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---find the duration of a debuff by passing the spellId and the caster name
|
||||
---@param unitId unit
|
||||
---@param spellId spellid
|
||||
---@param casterName actorname
|
||||
---@return auraduration|nil auraDuration
|
||||
---@return number|nil expirationTime
|
||||
function openRaidLib.AuraTracker.FindBuffDuration(unitId, casterName, spellId)
|
||||
local name, texture, count, buffType, duration, expirationTime = AuraUtil.FindAura(predicateFunc, unitId, "HELPFUL", spellId, casterName)
|
||||
if (name) then
|
||||
return duration, expirationTime
|
||||
end
|
||||
end
|
||||
|
||||
---find the duration of a buff placed by a unit
|
||||
---@param targetString string
|
||||
---@param casterString string
|
||||
---@param spellId number
|
||||
function openRaidLib.AuraTracker.FindBuffDurationByUnitName(targetString, casterString, spellId)
|
||||
local targetName = Ambiguate(targetString, "none")
|
||||
local casterName = Ambiguate(casterString, "none")
|
||||
return openRaidLib.AuraTracker.FindBuffDuration(targetName, casterName, spellId)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--which is the main attribute of each spec
|
||||
--1 Intellect
|
||||
|
||||
Reference in New Issue
Block a user