More fixes and Early empowerment spells support

This commit is contained in:
Tercio Jose
2022-11-22 10:05:16 -03:00
parent 28f78fb88d
commit 8f9493d25d
4 changed files with 85 additions and 4 deletions
+2 -2
View File
@@ -6,8 +6,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()
_detalhes.build_counter = 10278
_detalhes.alpha_build_counter = 10278 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 10280
_detalhes.alpha_build_counter = 10280 --if this is higher than the regular counter, use it instead
_detalhes.dont_open_news = true
_detalhes.game_version = version
_detalhes.userversion = version .. " " .. _detalhes.build_counter
+11 -1
View File
@@ -4952,13 +4952,20 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance)
cast_string = cast_string .. spell_cast
end
local averageEmpowerLevel
if (esta_magia.e_lvl) then --spell empowered
averageEmpowerLevel = format("Empower Average: %.2f", esta_magia.e_lvl / esta_magia.e_amt)
end
gump:SetaDetalheInfoTexto( index, 100,
cast_string,
Loc ["STRING_DAMAGE"]..": "..Details:ToK(esta_magia.total),
schooltext, --offhand,
Loc ["STRING_AVERAGE"] .. ": " .. Details:comma_value (media),
this_dps,
Loc ["STRING_HITS"]..": " .. hits_string
Loc ["STRING_HITS"]..": " .. hits_string,
averageEmpowerLevel or "",
""
)
--NORMAL
@@ -5036,6 +5043,9 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance)
t3[9] = "MISS" .. ": " .. misses
end
--empowered
--Details:BuildPlayerDetailsSpellChart()
--DetailsPlayerDetailSmallChart.ShowChart (Details.playerDetailWindow.grupos_detalhes [5].bg, info.instancia.showing, info.instancia.showing.cleu_events, self.nome, false, spellid, 1, 2, 3, 4, 5, 6, 7, 8, 15)
+66
View File
@@ -1940,6 +1940,59 @@
end
-----------------------------------------------------------------------------------------------------------------------------------------
--SPELL_EMPOWER
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:spell_empower(token, time, sourceGUID, sourceName, sourceFlags, targetGUID, targetName, targetFlags, targetRaidFlags, spellId, spellName, spellSchool, empowerLevel)
--empowerLevel only exists on _END and _INTERRUPT
if (not empowerLevel) then
return
end
--early checks
if (not sourceGUID or not sourceName or not sourceFlags) then
return
end
--source damager, should this only register for Players?
if (sourceFlags and bitBand(sourceFlags, OBJECT_TYPE_PLAYER) == 0) then
return
end
local sourceObject = damage_cache[sourceGUID] or damage_cache[sourceName]
if (not sourceObject) then
sourceObject = _current_damage_container:PegarCombatente(sourceGUID, sourceName, sourceFlags, true)
end
if (not sourceObject) then
return
end
--actor spells table
local spellTable = sourceObject.spells._ActorTable[spellId]
if (not spellTable) then
spellTable = sourceObject.spells:PegaHabilidade(spellId, true, token)
spellTable.spellschool = spellSchool or 1
end
spellTable.e_lvl = (spellTable.e_lvl or 0) + empowerLevel
spellTable.e_amt = (spellTable.e_amt or 0) + 1
--print("spellTable.e_lvl", spellTable.e_lvl, "spellTable.e_amt", spellTable.e_amt, "average:", spellTable.e_lvl / spellTable.e_amt)
end
--parser.spell_empower
--10/30 15:32:11.515 SPELL_EMPOWER_START,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,382266,"Fire Breath",0x4
--10/30 15:32:12.433 SPELL_EMPOWER_END,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,0000000000000000,nil,0x80000000,0x80000000,382266,"Fire Breath",0x4,1
--10/30 15:33:45.970 SPELL_EMPOWER_INTERRUPT,Player-4184-00218B4F,"Minng-Valdrakken",0x512,0x0,0000000000000000,nil,0x80000000,0x80000000,382266,"Fire Breath",0x4,1
--10/30 15:34:47.249 SPELL_EMPOWER_START,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,Player-4184-0048EE5B,"Nezaland-Valdrakken",0x514,0x0,382266,"Fire Breath",0x4
--357209 damage spell is different from the spell cast
-----------------------------------------------------------------------------------------------------------------------------------------
--SUMMON serach key: ~summon |
-----------------------------------------------------------------------------------------------------------------------------------------
@@ -4632,6 +4685,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
token_list ["DAMAGE_SHIELD_MISSED"] = nil
token_list ["ENVIRONMENTAL_DAMAGE"] = nil
token_list ["SPELL_BUILDING_DAMAGE"] = nil
token_list ["SPELL_EMPOWER_START"] = nil
token_list ["SPELL_EMPOWER_END"] = nil
token_list ["SPELL_EMPOWER_INTERRUPT"] = nil
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = nil
@@ -4679,6 +4735,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--SPELL_DISPEL_FAILED --need research
--SPELL_BUILDING_HEAL --need research
function _detalhes:CaptureEnable (capture_type)
capture_type = string.lower(capture_type)
@@ -4700,6 +4757,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
token_list ["DAMAGE_SHIELD_MISSED"] = parser.missed
token_list ["ENVIRONMENTAL_DAMAGE"] = parser.environment
token_list ["SPELL_EMPOWER_START"] = parser.spell_empower --evoker only
token_list ["SPELL_EMPOWER_END"] = parser.spell_empower --evoker only
token_list ["SPELL_EMPOWER_INTERRUPT"] = parser.spell_empower --evoker only
elseif (capture_type == "heal") then
token_list ["SPELL_HEAL"] = parser.heal
token_list ["SPELL_PERIODIC_HEAL"] = parser.heal
@@ -4761,6 +4822,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
["ress"] = parser.ress,
["interrupt"] = parser.interrupt,
["dead"] = parser.dead,
["spell_empower"] = parser.spell_empower,
}
function parser:SetParserFunction (token, func)
@@ -5969,6 +6031,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
xpcall(saveNicktabCache, saver_error)
end)
--10/30 15:32:11.515 SPELL_EMPOWER_START,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,382266,"Fire Breath",0x4
--10/30 15:32:12.433 SPELL_EMPOWER_END,Player-4184-00242A35,"Isodrak-Valdrakken",0x514,0x0,0000000000000000,nil,0x80000000,0x80000000,382266,"Fire Breath",0x4,1
--10/30 15:33:45.970 SPELL_EMPOWER_INTERRUPT,Player-4184-00218B4F,"Minng-Valdrakken",0x512,0x0,0000000000000000,nil,0x80000000,0x80000000,382266,"Fire Breath",0x4,1
-- ~parserstart ~startparser ~cleu
function _detalhes.OnParserEvent(...)
local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
+6 -1
View File
@@ -162,7 +162,7 @@ end
if (eventFrame.scheduleRosterUpdate) then
return
end
eventFrame.scheduleRosterUpdate = C_Timer.NewTimer(1, Details222.CooldownTracking.RefreshCooldownFrames)
--eventFrame.scheduleRosterUpdate = C_Timer.NewTimer(1, Details222.CooldownTracking.RefreshCooldownFrames)
end
end)
@@ -243,6 +243,11 @@ end
--update cooldown frames based on the amount of players in the group or raid
function Details222.CooldownTracking.RefreshCooldownFrames(filterName)
if (not Details.ocd_tracker.enabled) then
Details222.CooldownTracking.DisableTracker()
return
end
local allPanels = Details222.CooldownTracking.GetAllPanels()
local screenPanel = allPanels[filterName or "main"]