From 3a414360abee1cf42fe3dd4cf0834c39da518747 Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Sat, 17 Aug 2024 15:28:14 +0100 Subject: [PATCH 1/6] Reattribute Augmentation damage directly where possible Reattribute damage from Fate Mirror, Inferno's Blessing, Breath of Eons, and Blistering Scales to the casting Augmentation Evoker directly, instead of using the augmented spells container / "grey bar". Added reattribution for Fate Mirror healing. Added an extra bar (same as Neltharus Weapons), "Unknown Buffer", for when multiple Augmentation Evokers are buffing the same target and the exact caster cannot be determined. Added reattribution for Thread of Fate damage and healing. Added reattribution for Blessing of Summer healing. Removed reattribution for Blessing of Winter damage, as it no longer does damage. --- core/parser.lua | 359 +++++++++++++++++++++++++++--------------------- 1 file changed, 199 insertions(+), 160 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index 704d828da..5347b059b 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -121,9 +121,13 @@ local cacheAnything = { arenaHealth = {}, paladin_vivaldi_blessings = {}, + chronowarden_thread_fate = {}, track_hunter_frenzy = false, rampage_cast_amount = {}, } + + --store the number of aug evokerSerial + local aug_members_cache = {} --store the gear of each player local gearCache = {} @@ -527,6 +531,11 @@ [196917] = true, --light of the martyr [388009] = true, --blessing of spring [388012] = true, --blessing of summer + [410265] = true, --inferno's blessing + [404908] = true, --fate mirror + [360828] = true, --blistering scales + [409632] = true, --breath of eons + [432895] = true, --thread of fate [384601] = true, --Anti Magic Bomb [392171] = true, --Rose of the Vale [392166] = true, --Azure Stone of Might @@ -601,6 +610,9 @@ Details.NeltharusWeaponActorName = "Neltharus Weapons" Details.NeltharusWeaponActorSpellId = 377176 --for the icon: Blazing Aegis + Details.StackedBuffActorName = "Unknown Buffer" + Details.StackedBuffActorSpellId = 395152 --for the icon: Ebon Might + --sanguine affix for m+ Details.SanguineHealActorName = GetSpellInfo(SPELLID_SANGUINE_HEAL) @@ -616,6 +628,9 @@ --add Neltharus weapons Details.SpecialSpellActorsName[Details.NeltharusWeaponActorName] = Details.NeltharusWeaponActorSpellId + + --add stacked buff bar + Details.SpecialSpellActorsName[Details.StackedBuffActorName] = Details.StackedBuffActorSpellId end --Damage spells that trigger outside of combat, which we don't want to have start a combat. @@ -897,12 +912,118 @@ elseif (spellId == 196917) then -- or spellid == 183998 < healing part return parser:LOTM_damage(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, spellId, spellName, spellType, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) - elseif (spellId == 388009 or spellId == 388012) then --damage from the paladin blessings of the seasons + elseif (spellId == 388009) then --damage from the paladin blessings of the seasons local blessingSource = cacheAnything.paladin_vivaldi_blessings[sourceSerial] if (blessingSource) then sourceSerial, sourceName, sourceFlags = unpack(blessingSource) end - + + elseif (spellId == 410265) then --damage from inferno's blessing + local currentlyBuffedWithInfernoBless = nil + local countBuffedWithInfernoBless = 0 + local countAugMember = 0 + if (augmentation_cache.infernobless[sourceSerial]) then + currentlyBuffedWithInfernoBless = augmentation_cache.infernobless[sourceSerial] + countBuffedWithInfernoBless = #currentlyBuffedWithInfernoBless + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithInfernoBless == 1) then + sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithInfernoBless[1]) + elseif (countAugMember >= 2) then + sourceName = Details.StackedBuffActorName + sourceFlags = 0x514 + sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 404908) then --damage from fate mirror + local currentlyBuffedWithPrescience = nil + local countBuffedWithPrescience = 0 + local countAugMember = 0 + if (augmentation_cache.prescience[sourceSerial]) then + currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial] + countBuffedWithPrescience = #currentlyBuffedWithPrescience + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithPrescience == 1) then + sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithPrescience[1]) + elseif (countAugMember >= 2) then + Details:Msg("Stacked buff from: ", sourceName) + sourceName = Details.StackedBuffActorName + sourceFlags = 0x514 + sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 360828) then --damage from blistering scales + local currentlyBuffedWithBlistering = nil + local countBuffedWithBlistering = 0 + local countAugMember = 0 + if (augmentation_cache.shield[sourceSerial]) then + currentlyBuffedWithBlistering = augmentation_cache.shield[sourceSerial] + countBuffedWithBlistering = #currentlyBuffedWithBlistering + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithBlistering == 1) then + sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithBlistering[1]) + elseif (countAugMember >= 2) then + sourceName = Details.StackedBuffActorName + sourceFlags = 0x514 + sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 409632) then + local breathTargets = augmentation_cache.breath_targets + local evokerWithEonsApplications = breathTargets[targetSerial] + local eonsSourcesFound = 0 + local lastEvokerSerial = nil + local lastEvokerName = nil + local lastEvokerFlags = nil + local countAugMember = 0 + if (evokerWithEonsApplications) then + --this table consists in a list of evokers who applied eon's breath on the target + for i = 1, #evokerWithEonsApplications do + ---@type evokereonsbreathinfo + local evokerInfo = evokerWithEonsApplications[i] + ---@type guid, actorname, controlflags, unit, unixtime, auraduration, gametime + local evokerSerial, evokerName, evokerFlags, unitIDAffected, appliedTime, duration, expirationTime = unpack(evokerInfo) + if (detailsFramework:IsNearlyEqual(time, appliedTime + duration, 0.12)) then + eonsSourcesFound = eonsSourcesFound + 1 + lastEvokerSerial = evokerSerial + lastEvokerName = evokerName + lastEvokerFlags = evokerFlags + end + end + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (eonsSourcesFound == 1) then + sourceSerial = lastEvokerSerial + sourceName = lastEvokerName + sourceFlags = lastEvokerFlags + elseif (countAugMember >= 2) then + sourceName = Details.StackedBuffActorName + sourceFlags = 0x514 + sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) + end + elseif (spellId == 432895) then --damage from thread of fate + local chronoThreadSource = cacheAnything.chronowarden_thread_fate[sourceSerial] + if (chronoThreadSource) then + sourceSerial, sourceName, sourceFlags = unpack(chronoThreadSource) + end elseif (Details.NeltharusWeaponSpellIds[spellId]) then sourceName = Details.NeltharusWeaponActorName sourceFlags = 0x514 @@ -1449,161 +1570,6 @@ end end - if (spellId == 360828 and augmentation_cache.shield[sourceSerial]) then --shield - ---actor buffed with the shield -> list of evokers whose buffed - ---@type table - local currentlyBuffedWithShield = augmentation_cache.shield[sourceSerial] - - for i, evokerInfo in ipairs(currentlyBuffedWithShield) do - ---@cast evokerInfo evokerinfo - ---@type serial, actorname, controlflags - local evokerSourceSerial, evokerSourceName, evokerSourceFlags = unpack(evokerInfo) - - if (evokerSourceSerial ~= sourceSerial) then - ---@type actor - local evokerActor = damage_cache[evokerSourceSerial] - if (not evokerActor) then - evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true) - end - - if (evokerActor) then - local extraSpellId = 360828 - evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS) - local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId] - if (not augmentedSpell) then - augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token) - end - - local damageSplitted = amount / #currentlyBuffedWithShield - evokerActor.total_extra = evokerActor.total_extra + damageSplitted - - augmentedSpell.total = augmentedSpell.total + damageSplitted - augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + damageSplitted - - if (Details.debug) then - --DetailsParserDebugFrame:BlinkIcon(extraSpellId, 3) - end - end - end - end - end - - if (spellId == 404908 and augmentation_cache.prescience[sourceSerial]) then --fate mirror - ---actor buffed with prescience -> list of evokers whose buffed - ---@type table - local currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial] - - for i, evokerInfo in ipairs(currentlyBuffedWithPrescience) do - ---@cast evokerInfo evokerinfo - ---@type serial, actorname, controlflags - local evokerSourceSerial, evokerSourceName, evokerSourceFlags = unpack(evokerInfo) - if (evokerSourceSerial ~= sourceSerial) then - ---@type actor - local evokerActor = damage_cache[evokerSourceSerial] - if (not evokerActor) then - evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true) - end - - if (evokerActor) then - local extraSpellId = 404908 - evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS) - local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId] - if (not augmentedSpell) then - augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token) - end - - local fateMirror_plus_Prescience = amount + amount * 0.58782001 - - evokerActor.total_extra = evokerActor.total_extra + fateMirror_plus_Prescience - - augmentedSpell.total = augmentedSpell.total + fateMirror_plus_Prescience - augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + fateMirror_plus_Prescience - - if (Details.debug) then - --DetailsParserDebugFrame:BlinkIcon(extraSpellId, 4) - end - end - end - end - end - - if (spellId == 410265 and augmentation_cache.infernobless[sourceSerial]) then - ---@type table - local currentlyBuffedWithInfernoBless = augmentation_cache.infernobless[sourceSerial] - - for i, evokerInfo in ipairs(currentlyBuffedWithInfernoBless) do - ---@cast evokerInfo evokerinfo - ---@type serial, actorname, controlflags - local evokerSourceSerial, evokerSourceName, evokerSourceFlags = unpack(evokerInfo) - - if (evokerSourceSerial ~= sourceSerial) then - ---@type actor - local evokerActor = damage_cache[evokerSourceSerial] - if (not evokerActor) then - evokerActor = _current_damage_container:GetOrCreateActor(evokerSourceSerial, evokerSourceName, evokerSourceFlags, true) - end - - if (evokerActor) then - local extraSpellId = 410265 - evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS) - local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId] - if (not augmentedSpell) then - augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token) - end - - evokerActor.total_extra = evokerActor.total_extra + amount - - augmentedSpell.total = augmentedSpell.total + amount - augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount - - if (Details.debug) then - --DetailsParserDebugFrame:BlinkIcon(extraSpellId, 5) - end - end - end - end - end - - if (spellId == 409632) then - local breathTargets = augmentation_cache.breath_targets - ---@type evokereonsbreathinfo[] - local evokerWithEonsApplications = breathTargets[targetSerial] - - if (evokerWithEonsApplications) then - --this table consists in a list of evokers who applied eon's breath on the target - for i = 1, #evokerWithEonsApplications do - ---@type evokereonsbreathinfo - local evokerInfo = evokerWithEonsApplications[i] - ---@type guid, actorname, controlflags, unit, unixtime, auraduration, gametime - local evokerSerial, evokerName, evokerFlags, unitIDAffected, appliedTime, duration, expirationTime = unpack(evokerInfo) - - if (evokerSerial ~= sourceSerial) then - if (detailsFramework:IsNearlyEqual(time, appliedTime + duration, 0.12)) then - ---@type actor - local evokerActor = damage_cache[evokerSerial] - if (not evokerActor) then - evokerActor = _current_damage_container:GetOrCreateActor(evokerSerial, evokerName, evokerFlags, true) - end - - if (evokerActor) then - local extraSpellId = 409632 - evokerActor.augmentedSpellsContainer = evokerActor.augmentedSpellsContainer or spellContainerClass:CreateSpellContainer(Details.container_type.CONTAINER_DAMAGE_CLASS) - local augmentedSpell = evokerActor.augmentedSpellsContainer._ActorTable[extraSpellId] - if (not augmentedSpell) then - augmentedSpell = evokerActor.augmentedSpellsContainer:GetOrCreateSpell(extraSpellId, true, token) - end - - evokerActor.total_extra = evokerActor.total_extra + amount - - augmentedSpell.total = augmentedSpell.total + amount - augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount - end - end - end - end - end - end - --actor owner (if any) if (ownerActor) then --se for dano de um Pet ownerActor.total = ownerActor.total + amount --e adiciona o dano ao pet @@ -2564,7 +2530,40 @@ end _current_heal_container.need_refresh = true + + if (spellId == 413786) then --heal from fate mirror + local currentlyBuffedWithPrescience = nil + local countBuffedWithPrescience = 0 + local countAugMember = 0 + if (augmentation_cache.prescience[sourceSerial]) then + currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial] + countBuffedWithPrescience = #currentlyBuffedWithPrescience + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithPrescience == 1) then + sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithPrescience[1]) + elseif (countAugMember >= 2) then + Details:Msg("Stacked buff from: ", sourceName) + sourceName = Details.StackedBuffActorName + sourceFlags = 0x514 + sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) + end + elseif (spellId == 432896) then --heal from thread of fate + local chronoThreadSource = cacheAnything.chronowarden_thread_fate[sourceSerial] + if (chronoThreadSource) then + sourceSerial, sourceName, sourceFlags = unpack(chronoThreadSource) + end + elseif (spellId == 448227) then --blessing of summer healing + local blessingSource = cacheAnything.paladin_vivaldi_blessings[sourceSerial] + if (blessingSource) then + sourceSerial, sourceName, sourceFlags = unpack(blessingSource) + end + end ------------------------------------------------------------------------------------------------ --get actors @@ -2921,9 +2920,12 @@ end end - elseif (spellId == 388007 or spellId == 388011) then --buff: bleesing of the summer and winter + elseif (spellId == 388007) then --buff: bleesing of the summer and winter cacheAnything.paladin_vivaldi_blessings[targetSerial] = {sourceSerial, sourceName, sourceFlags} + elseif (spellId == 431716) then --buff: thread of fate + cacheAnything.chronowarden_thread_fate[targetSerial] = {sourceSerial, sourceName, sourceFlags} + elseif (spellId == 27827) then --spirit of redemption (holy ~priest) ~spirit local deathLog = last_events_cache[targetName] if (not deathLog) then @@ -3085,6 +3087,10 @@ sourceFlags = 0xa48 sourceSerial = "" end + + if (spellId == 431716) then --buff: thread of fate + cacheAnything.chronowarden_thread_fate[targetSerial] = {sourceSerial, sourceName, sourceFlags} + end if (augmentation_aura_list[spellId]) then Details222.SpecHelpers[1473].BuffRefresh(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, tipo, amount) @@ -3214,8 +3220,11 @@ parser:heal(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, damage_prevented, ceil (amount or 0), 0, 0, true) end - elseif (spellId == 388007 or spellId == 388011) then --buff: bleesing of the summer + elseif (spellId == 388007) then --buff: bleesing of the summer cacheAnything.paladin_vivaldi_blessings[targetSerial] = nil + + elseif (spellId == 431716) then --buff: thread of fate + cacheAnything.chronowarden_thread_fate[targetSerial] = nil end ------------------------------------------------------------------------------------------------ @@ -6744,6 +6753,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details:Destroy(dk_pets_cache.apoc) Details:Destroy(cacheAnything.paladin_vivaldi_blessings) + Details:Destroy(cacheAnything.chronowarden_thread_fate) Details:Destroy(cacheAnything.rampage_cast_amount) if (not bIsFromCombatStart) then @@ -6862,6 +6872,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details:Destroy(auto_regen_cache) Details:Destroy(bitfield_swap_cache) Details:Destroy(empower_cache) + Details:Destroy(aug_members_cache) local currentCombat = Details:GetCurrentCombat() @@ -6869,6 +6880,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (IsInRaid()) then local unitIdCache = Details222.UnitIdCache.Raid + local playerGUID = UnitGUID("player") for i = 1, GetNumGroupMembers() do local unitId = unitIdCache[i] @@ -6890,10 +6902,19 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (auto_regen_power_specs[Details.cached_specs[unitGUID]]) then auto_regen_cache[unitName] = auto_regen_power_specs[Details.cached_specs[unitGUID]] end + + if (Details.cached_specs[unitGUID] == 1473) then + if (unitGUID == playerGUID) then + table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + else + table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) + end + end end elseif (IsInGroup()) then local unitIdCache = Details222.UnitIdCache.Party + local playerGUID = UnitGUID("player") for i = 1, GetNumGroupMembers()-1 do local unitId = unitIdCache[i] @@ -6911,11 +6932,25 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (auto_regen_power_specs[Details.cached_specs[unitGUID]]) then auto_regen_cache[unitName] = auto_regen_power_specs[Details.cached_specs[unitGUID]] end + + if (Details.cached_specs[unitGUID] == 1473) then + if (unitGUID == playerGUID) then + table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + else + table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) + end + end + end + + --iterate over the last group member, which is not necesarily the player, to add to aug_members_cache + local unitIdExtra = unitIdCache[GetNumGroupMembers()] + local unitGUIDExtra = UnitGUID(unitIdExtra) + if (Details.cached_specs[unitGUIDExtra] == 1473) then + table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) end --player local playerName = Details.playername - local playerGUID = UnitGUID("player") raid_members_cache[playerGUID] = playerName groupRoster[playerName] = playerGUID @@ -6950,6 +6985,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (auto_regen_power_specs[Details.cached_specs[playerGUID]]) then auto_regen_cache[playerName] = auto_regen_power_specs[Details.cached_specs[playerGUID]] end + + if (Details.cached_specs[playerGUID] == 1473) then + table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + end end if (Details.iam_a_tank) then From be26e146cb79e4e04ae171ff722bace40a27d071 Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Sat, 17 Aug 2024 16:00:11 +0100 Subject: [PATCH 2/6] Update parser.lua --- core/parser.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index 9157000e9..c2c112c8c 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -6972,9 +6972,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.cached_specs[unitGUID] == 1473) then if (unitGUID == playerGUID) then - table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) else - table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) + table.insert(aug_members_cache, {unitGUID, unitName, 0x512}) end end end @@ -7002,9 +7002,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.cached_specs[unitGUID] == 1473) then if (unitGUID == playerGUID) then - table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) else - table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) + table.insert(aug_members_cache, {unitGUID, unitName, 0x512}) end end end @@ -7013,7 +7013,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 local unitIdExtra = unitIdCache[GetNumGroupMembers()] local unitGUIDExtra = UnitGUID(unitIdExtra) if (Details.cached_specs[unitGUIDExtra] == 1473) then - table.insert(aug_members_cache, {unitGUID, unitName, "1298"}) + if (unitGUID == playerGUID) then + table.insert(aug_members_cache, {unitGUIDExtra, unitNameExtra, 0x511}) + else + table.insert(aug_members_cache, {unitGUIDExtra, unitNameExtra, 0x512}) + end end --player @@ -7054,7 +7058,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end if (Details.cached_specs[playerGUID] == 1473) then - table.insert(aug_members_cache, {unitGUID, unitName, "1297"}) + table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) end end From 37d20a894f267468faf52ce33db64628f692ad43 Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Sun, 6 Oct 2024 12:31:13 +0100 Subject: [PATCH 3/6] Update parser.lua Remove leftover debugging messages --- core/parser.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index c2c112c8c..72387e461 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -957,7 +957,6 @@ if (countBuffedWithPrescience == 1) then sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithPrescience[1]) elseif (countAugMember >= 2) then - Details:Msg("Stacked buff from: ", sourceName) sourceName = Details.StackedBuffActorName sourceFlags = 0x514 sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" @@ -2549,7 +2548,6 @@ if (countBuffedWithPrescience == 1) then sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithPrescience[1]) elseif (countAugMember >= 2) then - Details:Msg("Stacked buff from: ", sourceName) sourceName = Details.StackedBuffActorName sourceFlags = 0x514 sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" From 63d695b8123770cbc6849b792841ec15e95a0bf3 Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Sun, 13 Oct 2024 18:29:10 +0100 Subject: [PATCH 4/6] Update parser.lua --- core/parser.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index 72387e461..8972ef0c3 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -6980,7 +6980,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 elseif (IsInGroup()) then local unitIdCache = Details222.UnitIdCache.Party local playerGUID = UnitGUID("player") - for i = 1, GetNumGroupMembers()-1 do + for i = 1, GetNumGroupMembers() do local unitId = unitIdCache[i] local unitName = GetUnitName(unitId, true) @@ -7006,17 +7006,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end end end - - --iterate over the last group member, which is not necesarily the player, to add to aug_members_cache - local unitIdExtra = unitIdCache[GetNumGroupMembers()] - local unitGUIDExtra = UnitGUID(unitIdExtra) - if (Details.cached_specs[unitGUIDExtra] == 1473) then - if (unitGUID == playerGUID) then - table.insert(aug_members_cache, {unitGUIDExtra, unitNameExtra, 0x511}) - else - table.insert(aug_members_cache, {unitGUIDExtra, unitNameExtra, 0x512}) - end - end --player local playerName = Details.playername From 85e334dafb658ffebec01ffee2717929c044340a Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:35:10 +0100 Subject: [PATCH 5/6] Bombardments reattribution Added reattribution for Bombardments. Moved Aug, Thread of Fate, Bombardments, and Blessing of Summer reattribution to a separate function. --- core/parser.lua | 332 +++++++++++++++++++++++++++++------------------- 1 file changed, 204 insertions(+), 128 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index ca31d2be2..4853c48f4 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -121,12 +121,16 @@ arenaHealth = {}, paladin_vivaldi_blessings = {}, chronowarden_thread_fate = {}, + scalecommander_bombardments = {}, track_hunter_frenzy = false, rampage_cast_amount = {}, } --store the number of aug evokerSerial local aug_members_cache = {} + + --store the number of dev and evokerSerial + local scalecommander_members_cache = {} --store the gear of each player local gearCache = {} @@ -552,12 +556,24 @@ [360828] = true, --blistering scales [409632] = true, --breath of eons [432895] = true, --thread of fate + [434481] = true, --bombardments [384601] = true, --Anti Magic Bomb [392171] = true, --Rose of the Vale [392166] = true, --Azure Stone of Might [379020] = true, --Wand of Negation [372824] = true, --Burning Chains } + + --damage spells that need reattribution + local external_damage_spells = { + [388009] = true, --blessing of summer + [410265] = true, --inferno's blessing + [404908] = true, --fate mirror + [360828] = true, --blistering scales + [409632] = true, --breath of eons + [432895] = true, --thread of fate + [434481] = true, --bombardments + } --damage spells to ignore local damage_spells_to_ignore = { @@ -903,10 +919,12 @@ end end end + --check if the spellId has an especial treatment if (special_damage_spells[spellId]) then --stagger + if (spellId == 124255) then return parser:MonkStagger_damage(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, spellId, spellName, spellType, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) @@ -925,122 +943,12 @@ sourceFlags = ownerFlags end end - + elseif (external_damage_spells[spellId]) then + sourceSerial, sourceName, sourceFlags = parser:external_damage(spellId, sourceSerial, sourceName, sourceFlags, targetSerial, time) --Light of the Martyr - paladin spell which causes damage to the caster it self elseif (spellId == 196917) then -- or spellid == 183998 < healing part return parser:LOTM_damage(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, spellId, spellName, spellType, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand) - elseif (spellId == 388009) then --damage from the paladin blessings of the seasons - local blessingSource = cacheAnything.paladin_vivaldi_blessings[sourceSerial] - if (blessingSource) then - sourceSerial, sourceName, sourceFlags = unpack(blessingSource) - end - - elseif (spellId == 410265) then --damage from inferno's blessing - local currentlyBuffedWithInfernoBless = nil - local countBuffedWithInfernoBless = 0 - local countAugMember = 0 - if (augmentation_cache.infernobless[sourceSerial]) then - currentlyBuffedWithInfernoBless = augmentation_cache.infernobless[sourceSerial] - countBuffedWithInfernoBless = #currentlyBuffedWithInfernoBless - end - if (aug_members_cache) then - countAugMember = #aug_members_cache - end - if (countBuffedWithInfernoBless == 1) then - sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithInfernoBless[1]) - elseif (countAugMember >= 2) then - sourceName = Details.StackedBuffActorName - sourceFlags = 0x514 - sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" - elseif (countAugMember == 1) then - sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) - end - - elseif (spellId == 404908) then --damage from fate mirror - local currentlyBuffedWithPrescience = nil - local countBuffedWithPrescience = 0 - local countAugMember = 0 - if (augmentation_cache.prescience[sourceSerial]) then - currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial] - countBuffedWithPrescience = #currentlyBuffedWithPrescience - end - if (aug_members_cache) then - countAugMember = #aug_members_cache - end - if (countBuffedWithPrescience == 1) then - sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithPrescience[1]) - elseif (countAugMember >= 2) then - sourceName = Details.StackedBuffActorName - sourceFlags = 0x514 - sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" - elseif (countAugMember == 1) then - sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) - end - - elseif (spellId == 360828) then --damage from blistering scales - local currentlyBuffedWithBlistering = nil - local countBuffedWithBlistering = 0 - local countAugMember = 0 - if (augmentation_cache.shield[sourceSerial]) then - currentlyBuffedWithBlistering = augmentation_cache.shield[sourceSerial] - countBuffedWithBlistering = #currentlyBuffedWithBlistering - end - if (aug_members_cache) then - countAugMember = #aug_members_cache - end - if (countBuffedWithBlistering == 1) then - sourceSerial, sourceName, sourceFlags = unpack(currentlyBuffedWithBlistering[1]) - elseif (countAugMember >= 2) then - sourceName = Details.StackedBuffActorName - sourceFlags = 0x514 - sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" - elseif (countAugMember == 1) then - sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) - end - - elseif (spellId == 409632) then - local breathTargets = augmentation_cache.breath_targets - local evokerWithEonsApplications = breathTargets[targetSerial] - local eonsSourcesFound = 0 - local lastEvokerSerial = nil - local lastEvokerName = nil - local lastEvokerFlags = nil - local countAugMember = 0 - if (evokerWithEonsApplications) then - --this table consists in a list of evokers who applied eon's breath on the target - for i = 1, #evokerWithEonsApplications do - ---@type evokereonsbreathinfo - local evokerInfo = evokerWithEonsApplications[i] - ---@type guid, actorname, controlflags, unit, unixtime, auraduration, gametime - local evokerSerial, evokerName, evokerFlags, unitIDAffected, appliedTime, duration, expirationTime = unpack(evokerInfo) - if (detailsFramework:IsNearlyEqual(time, appliedTime + duration, 0.12)) then - eonsSourcesFound = eonsSourcesFound + 1 - lastEvokerSerial = evokerSerial - lastEvokerName = evokerName - lastEvokerFlags = evokerFlags - end - end - end - if (aug_members_cache) then - countAugMember = #aug_members_cache - end - if (eonsSourcesFound == 1) then - sourceSerial = lastEvokerSerial - sourceName = lastEvokerName - sourceFlags = lastEvokerFlags - elseif (countAugMember >= 2) then - sourceName = Details.StackedBuffActorName - sourceFlags = 0x514 - sourceSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" - elseif (countAugMember == 1) then - sourceSerial, sourceName, sourceFlags = unpack(aug_members_cache[1]) - end - elseif (spellId == 432895) then --damage from thread of fate - local chronoThreadSource = cacheAnything.chronowarden_thread_fate[sourceSerial] - if (chronoThreadSource) then - sourceSerial, sourceName, sourceFlags = unpack(chronoThreadSource) - end elseif (Details.NeltharusWeaponSpellIds[spellId]) then sourceName = Details.NeltharusWeaponActorName sourceFlags = 0x514 @@ -2014,6 +1922,151 @@ end end + --returns the serial, name, and flags that the damage should be attributed to + --separate function due to main function becoming oversized + function parser:external_damage(spellId, sourceSerial, sourceName, sourceFlags, targetSerial, time) + local newSerial = sourceSerial + local newName = sourceName + local newFlags = sourceFlags + if (spellId == 388009) then --damage from the paladin blessings of the seasons + local blessingSource = cacheAnything.paladin_vivaldi_blessings[sourceSerial] + if (blessingSource) then + newSerial, newName, newFlags = unpack(blessingSource) + end + + elseif (spellId == 410265) then --damage from inferno's blessing + local currentlyBuffedWithInfernoBless = nil + local countBuffedWithInfernoBless = 0 + local countAugMember = 0 + if (augmentation_cache.infernobless[sourceSerial]) then + currentlyBuffedWithInfernoBless = augmentation_cache.infernobless[sourceSerial] + countBuffedWithInfernoBless = #currentlyBuffedWithInfernoBless + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithInfernoBless == 1) then + newSerial, newName, newFlags = unpack(currentlyBuffedWithInfernoBless[1]) + elseif (countAugMember >= 2) then + newName = Details.StackedBuffActorName + newFlags = 0x514 + newSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + newSerial, newName, newFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 404908) then --damage from fate mirror + local currentlyBuffedWithPrescience = nil + local countBuffedWithPrescience = 0 + local countAugMember = 0 + if (augmentation_cache.prescience[sourceSerial]) then + currentlyBuffedWithPrescience = augmentation_cache.prescience[sourceSerial] + countBuffedWithPrescience = #currentlyBuffedWithPrescience + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithPrescience == 1) then + newSerial, newName, newFlags = unpack(currentlyBuffedWithPrescience[1]) + elseif (countAugMember >= 2) then + newName = Details.StackedBuffActorName + newFlags = 0x514 + newSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + newSerial, newName, newFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 360828) then --damage from blistering scales + local currentlyBuffedWithBlistering = nil + local countBuffedWithBlistering = 0 + local countAugMember = 0 + if (augmentation_cache.shield[sourceSerial]) then + currentlyBuffedWithBlistering = augmentation_cache.shield[sourceSerial] + countBuffedWithBlistering = #currentlyBuffedWithBlistering + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (countBuffedWithBlistering == 1) then + newSerial, newName, newFlags = unpack(currentlyBuffedWithBlistering[1]) + elseif (countAugMember >= 2) then + newName = Details.StackedBuffActorName + newFlags = 0x514 + newSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + newSerial, newName, newFlags = unpack(aug_members_cache[1]) + end + + elseif (spellId == 409632) then + local breathTargets = augmentation_cache.breath_targets + local evokerWithEonsApplications = breathTargets[targetSerial] + local eonsSourcesFound = 0 + local lastEvokerSerial = nil + local lastEvokerName = nil + local lastEvokerFlags = nil + local countAugMember = 0 + if (evokerWithEonsApplications) then + --this table consists in a list of evokers who applied eon's breath on the target + for i = 1, #evokerWithEonsApplications do + ---@type evokereonsbreathinfo + local evokerInfo = evokerWithEonsApplications[i] + ---@type guid, actorname, controlflags, unit, unixtime, auraduration, gametime + local evokerSerial, evokerName, evokerFlags, unitIDAffected, appliedTime, duration, expirationTime = unpack(evokerInfo) + if (detailsFramework:IsNearlyEqual(time, appliedTime + duration, 0.12)) then + eonsSourcesFound = eonsSourcesFound + 1 + lastEvokerSerial = evokerSerial + lastEvokerName = evokerName + lastEvokerFlags = evokerFlags + end + end + end + if (aug_members_cache) then + countAugMember = #aug_members_cache + end + if (eonsSourcesFound == 1) then + newSerial = lastEvokerSerial + newName = lastEvokerName + newFlags = lastEvokerFlags + elseif (countAugMember >= 2) then + newName = Details.StackedBuffActorName + newFlags = 0x514 + newSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countAugMember == 1) then + newSerial, newName, newFlags = unpack(aug_members_cache[1]) + end + elseif (spellId == 432895) then --damage from thread of fate + local chronoThreadSource = cacheAnything.chronowarden_thread_fate[sourceSerial] + if (cacheAnything.chronowarden_thread_fate[sourceSerial]) then + newSerial, newName, newFlags = unpack(chronoThreadSource) + end + elseif (spellId == 434481) then + local countScalecommanderMember = 0 + local countBombardmentsCasters = 0 + if (scalecommander_members_cache) then + countScalecommanderMember = #scalecommander_members_cache + end + if (cacheAnything.scalecommander_bombardments) then + --countBombardmentsCasters = #cacheAnything.scalecommander_bombardments + --for some reason, above returns 0. using below instead. + for k, v in pairs(cacheAnything.scalecommander_bombardments) do + countBombardmentsCasters = countBombardmentsCasters + 1 + end + else + end + if (countBombardmentsCasters == 1) then + for k, v in pairs(cacheAnything.scalecommander_bombardments) do + newSerial, newName, newFlags = k, unpack(v) + end + elseif (countScalecommanderMember >= 2 and countBombardmentsCasters >= 2) then + newName = Details.StackedBuffActorName + newFlags = 0x514 + newSerial = "Creature-0-3134-2289-28065-" .. spellId .. "-000164C698" + elseif (countScalecommanderMember == 1) then + newSerial, newName, newFlags = unpack(scalecommander_members_cache[1]) + end + end + return newSerial, newName, newFlags + end --extra attacks - disabled function parser:spell_dmg_extra_attacks(token, time, who_serial, who_name, who_flags, _, _, _, _, spellid, spellName, spelltype, arg1) --print("this is even exists on ingame cleu?") @@ -2289,7 +2342,6 @@ 12/14 21:14:44.545 SPELL_SUMMON,Creature-0-4391-615-3107-15439-00001A8313,"Fire Elemental Totem",0x2112,0x0,Creature-0-4391-615-3107-15438-00001A8313,"Greater Fire Elemental",0x2112,0x0,32982,"Fire Elemental Totem",0x1 ]] - if (isWOTLK or isCATA) then if (npcId == 15439) then petContainer.AddPet(petGuid:gsub("%-15439%-", "%-15438%-"), "Greater Fire Elemental", petFlags, sourceSerial, sourceName, sourceFlags, summonSpellId) @@ -2300,7 +2352,6 @@ elseif (npcId == 210759) then return end - --send the summonSpellId to spellcache in order to identify if the pet is from an item, for instance: a trinket local newPetName = Details222.Pets.GetPetNameFromCustomSpells(petName, summonSpellId, npcId) if (newPetName ~= petName) then @@ -3091,6 +3142,15 @@ parser:add_bad_debuff_uptime (token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, "DEBUFF_UPTIME_IN") end end + + + if (spellId == 434473) then --scalecommander bombardments + if (cacheAnything.scalecommander_bombardments[sourceSerial]) then + cacheAnything.scalecommander_bombardments[sourceSerial][3] = cacheAnything.scalecommander_bombardments[sourceSerial][3] + 1 + else + cacheAnything.scalecommander_bombardments[sourceSerial] = {sourceName, sourceFlags, 1} + end + end end end @@ -3326,6 +3386,15 @@ bitfield_swap_cache[targetSerial] = nil end end + + if (spellId == 434473) then --scalecommander bombardments + if (cacheAnything.scalecommander_bombardments[sourceSerial]) then + cacheAnything.scalecommander_bombardments[sourceSerial][3] = math.max(cacheAnything.scalecommander_bombardments[sourceSerial][3] - 1, 0) + if (cacheAnything.scalecommander_bombardments[sourceSerial][3] == 0) then + cacheAnything.scalecommander_bombardments[sourceSerial] = nil + end + end + end end end @@ -6934,6 +7003,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details:Destroy(bitfield_swap_cache) Details:Destroy(empower_cache) Details:Destroy(aug_members_cache) + Details:Destroy(scalecommander_members_cache) local currentCombat = Details:GetCurrentCombat() @@ -6967,14 +7037,23 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.cached_specs[unitGUID] == 1473) then if (unitGUID == playerGUID) then table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) else table.insert(aug_members_cache, {unitGUID, unitName, 0x512}) + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x512}) + end + elseif (Details.cached_specs[unitGUID] == 1467) then + if (unitGUID == playerGUID) then + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) + else + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x512}) end end end elseif (IsInGroup()) then local unitIdCache = Details222.UnitIdCache.Party + local playerGUID = UnitGUID("player") for i = 1, GetNumGroupMembers() do local unitId = unitIdCache[i] @@ -6996,27 +7075,21 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.cached_specs[unitGUID] == 1473) then if (unitGUID == playerGUID) then table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) else table.insert(aug_members_cache, {unitGUID, unitName, 0x512}) + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x512}) + end + elseif (Details.cached_specs[unitGUID] == 1467) then + if (unitGUID == playerGUID) then + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) + else + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x512}) end end end - - --player local playerName = Details.playername - local playerGUID = UnitGUID("player") - - raid_members_cache[playerGUID] = playerName - groupRoster[playerName] = playerGUID - local role = _UnitGroupRolesAssigned(playerName) - if (role == "TANK") then - tanks_members_cache[playerGUID] = true - end - - if (auto_regen_power_specs[Details.cached_specs[playerGUID]]) then - auto_regen_cache[playerName] = auto_regen_power_specs[Details.cached_specs[playerGUID]] - end else local playerName = Details.playername local playerGUID = UnitGUID("player") @@ -7042,6 +7115,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.cached_specs[playerGUID] == 1473) then table.insert(aug_members_cache, {unitGUID, unitName, 0x511}) + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) + elseif (Details.cached_specs[playerGUID] == 1467) then + table.insert(scalecommander_members_cache, {unitGUID, unitName, 0x511}) end end From 7b6c719b391bbeb69efe6a0c89c6a093ba917932 Mon Sep 17 00:00:00 2001 From: KYZ124 <46207225+KYZ124@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:39:41 +0100 Subject: [PATCH 6/6] Update parser.lua --- core/parser.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/core/parser.lua b/core/parser.lua index 4853c48f4..964faeea8 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -6884,6 +6884,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details:Destroy(cacheAnything.paladin_vivaldi_blessings) Details:Destroy(cacheAnything.chronowarden_thread_fate) + Details:Destroy(cacheAnything.scalecommander_bombardments) Details:Destroy(cacheAnything.rampage_cast_amount) if (not bIsFromCombatStart) then