Skip to content

Commit 4a68d0c

Browse files
committed
parser auras
1 parent e901c01 commit 4a68d0c

File tree

5 files changed

+91
-57
lines changed

5 files changed

+91
-57
lines changed

Details/Details.toc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Title: Details! Damage Meter
33
## Notes: Essential tool to impress that chick in your raid.
44
## Notes-ruRU: Незаменимый инструмент, чтобы произвести впечатление на девчонку в вашем рейде.
5-
## Version: 1.019
5+
## Version: 1.020
66
## SavedVariables: _detalhes_global
77
## SavedVariablesPerCharacter: _detalhes_database
88
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibCompress, LibGraph-2.0

Details/core/parser.lua

+69-53
Original file line numberDiff line numberDiff line change
@@ -2015,20 +2015,22 @@ end
20152015

20162016

20172017
if(_recording_buffs_and_debuffs) then
2018-
if(who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2019-
-- if(raid_members_cache[who_serial] and _in_combat) then
2020-
-- print(who_serial)
2021-
--> call record buffs uptime
2022-
-- print(spellname, "BUFF_UPTIME_IN")
2023-
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2024-
2025-
elseif(container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2026-
--um pet colocando uma aura do dono
2027-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2028-
elseif (buffs_to_other_players[spellid]) then
2029-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2030-
elseif true then
2018+
if _detalhes.SirusCustom.WriteAllAuras then
20312019
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2020+
else
2021+
if (who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2022+
-- if(raid_members_cache[who_serial] and _in_combat) then
2023+
-- print(who_serial)
2024+
--> call record buffs uptime
2025+
-- print(spellname, "BUFF_UPTIME_IN")
2026+
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2027+
2028+
elseif (container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2029+
--um pet colocando uma aura do dono
2030+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2031+
elseif (buffs_to_other_players[spellid]) then
2032+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_IN")
2033+
end
20322034
end
20332035
end
20342036

@@ -2073,16 +2075,17 @@ end
20732075
if(bitfield_debuffs[spellname] and raid_members_cache[alvo_serial]) then
20742076
bitfield_swap_cache[alvo_serial] = true
20752077
end
2076-
2077-
-- if(raid_members_cache[who_serial]) then
2078-
-- --> call record debuffs uptime
2079-
-- parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN")
2080-
2081-
-- elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e who � alguem de fora da raide
2082-
-- parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_IN")
2083-
if true then
2078+
if _detalhes.SirusCustom.WriteAllAuras then
20842079
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN")
20852080
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_IN")
2081+
else
2082+
if(raid_members_cache[who_serial]) then
2083+
--> call record debuffs uptime
2084+
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_IN")
2085+
2086+
elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e who � alguem de fora da raide
2087+
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_IN")
2088+
end
20862089
end
20872090
end
20882091

@@ -2282,17 +2285,19 @@ function parser:buff_refresh(token, time, who_serial, who_name, who_flags, alvo_
22822285
------------------------------------------------------------------------------------------------
22832286
--> buff uptime
22842287
if(_recording_buffs_and_debuffs) then
2285-
if(who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2286-
-- if( raid_members_cache[who_serial] and _in_combat) then
2287-
--> call record buffs uptime
2288-
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2289-
elseif(container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2290-
--um pet colocando uma aura do dono
2291-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2292-
elseif (buffs_to_other_players[spellid]) then ---CHECK
2293-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2294-
elseif true then
2288+
if _detalhes.SirusCustom.WriteAllAuras then
22952289
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2290+
else
2291+
if (who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2292+
-- if( raid_members_cache[who_serial] and _in_combat) then
2293+
--> call record buffs uptime
2294+
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2295+
elseif(container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2296+
--um pet colocando uma aura do dono
2297+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2298+
elseif (buffs_to_other_players[spellid]) then ---CHECK
2299+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_REFRESH")
2300+
end
22962301
end
22972302
end
22982303

@@ -2332,14 +2337,16 @@ function parser:buff_refresh(token, time, who_serial, who_name, who_flags, alvo_
23322337
------------------------------------------------------------------------------------------------
23332338
--> buff uptime
23342339
if(_recording_buffs_and_debuffs) then
2335-
-- if(raid_members_cache[who_serial]) then
2336-
-- --> call record debuffs uptime
2337-
-- parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH")
2338-
-- elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e o caster � inimigo
2339-
-- parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH", amount)
2340-
if true then
2340+
if _detalhes.SirusCustom.WriteAllAuras then
23412341
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH")
23422342
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH", amount)
2343+
else
2344+
if(raid_members_cache[who_serial]) then
2345+
--> call record debuffs uptime
2346+
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_REFRESH")
2347+
elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e o caster � inimigo
2348+
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_REFRESH", amount)
2349+
end
23432350
end
23442351
end
23452352

@@ -2415,6 +2422,9 @@ function parser:unbuff(token, time, who_serial, who_name, who_flags, alvo_serial
24152422
-- print(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
24162423
------------------------------------------------------------------------------------------------
24172424
--> handle shields
2425+
if alvo_name == nil then
2426+
alvo_name = UNKNOWN;
2427+
end
24182428
if absorb_spell_list[spellid] then
24192429
escudo[alvo_name] = escudo[alvo_name] or {}
24202430
-- locate buff
@@ -2432,17 +2442,20 @@ end
24322442
------------------------------------------------------------------------------------------------
24332443
--> buff uptime
24342444
if(_recording_buffs_and_debuffs) then
2435-
if(who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2436-
-- if(raid_members_cache[who_serial] and _in_combat) then
2437-
--> call record buffs uptime
2438-
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2439-
elseif(container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2440-
--um pet colocando uma aura do dono
2441-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2442-
elseif (buffs_to_other_players[spellid]) then ---TODO fxpw
2443-
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2444-
elseif true then
2445+
if _detalhes.SirusCustom.WriteAllAuras then
24452446
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2447+
else
2448+
if(who_name == alvo_name and raid_members_cache[who_serial] and _in_combat) then
2449+
-- if(raid_members_cache[who_serial] and _in_combat) then
2450+
--> call record buffs uptime
2451+
parser:add_buff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2452+
elseif(container_pets[who_serial] and container_pets[who_serial][2] == alvo_serial) then
2453+
--um pet colocando uma aura do dono
2454+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2455+
elseif (buffs_to_other_players[spellid]) then ---TODO fxpw
2456+
parser:add_buff_uptime(token, time, alvo_serial, alvo_name, alvo_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "BUFF_UPTIME_OUT")
2457+
end
2458+
24462459
end
24472460
end
24482461

@@ -2528,14 +2541,17 @@ end
25282541
------------------------------------------------------------------------------------------------
25292542
--> buff uptime
25302543
if(_recording_buffs_and_debuffs) then
2531-
-- if(raid_members_cache[who_serial]) then
2532-
-- --> call record debuffs uptime
2533-
-- parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT")
2534-
-- elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e o caster � inimigo
2535-
-- parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT")
2536-
if true then
2544+
2545+
if _detalhes.SirusCustom.WriteAllAuras then
25372546
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT")
25382547
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT")
2548+
else
2549+
if(raid_members_cache[who_serial]) then
2550+
--> call record debuffs uptime
2551+
parser:add_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, "DEBUFF_UPTIME_OUT")
2552+
elseif(raid_members_cache[alvo_serial] and not raid_members_cache[who_serial]) then --> alvo � da raide e o caster � inimigo
2553+
parser:add_bad_debuff_uptime(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, "DEBUFF_UPTIME_OUT")
2554+
end
25392555
end
25402556
end
25412557

Details/functions/profiles.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ local default_player_data = {
12201220
},
12211221
SirusCustom = {
12221222
MurazondDmgSkip = true,
1223-
channel = "SELF",
1223+
WriteAllAuras = false
12241224
},
12251225
announce_damagerecord = {
12261226
enabled = true,

Details/gumps/janela_options.lua

+17-1
Original file line numberDiff line numberDiff line change
@@ -10162,6 +10162,19 @@ function window:CreateFrame10()
1016210162
window:CreateLineBackground2 (frame10, "cloudCaptureSlider", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD_DESC"] )
1016310163

1016410164

10165+
--> writeallauras
10166+
g:NewLabel (frame10, _, "$parentWriteAllAurasLabel", "writeAllAurasLabel", Loc ["WriteAllAuras"], "GameFontHighlightLeft")
10167+
10168+
g:NewSwitch (frame10, _, "$parentWriteAllAuraslider", "writeAllAurasSlider", 60, 20, _, _, _detalhes.SirusCustom.WriteAllAuras, nil, nil, nil, nil, options_switch_template)
10169+
frame10.writeAllAurasSlider:SetPoint ("left", frame10.writeAllAurasLabel, "right", 2)
10170+
frame10.writeAllAurasSlider:SetAsCheckBox()
10171+
frame10.writeAllAurasSlider.OnSwitch = function (self, _, value)
10172+
_detalhes.SirusCustom.WriteAllAuras = value
10173+
end
10174+
10175+
window:CreateLineBackground2 (frame10, "writeAllAurasSlider", "writeAllAurasLabel", Loc ["WriteAllAurasDesc"] )
10176+
10177+
1016510178
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1016610179

1016710180
--> Erase Chart Data
@@ -10216,6 +10229,7 @@ function window:CreateFrame10()
1021610229
{"energyCaptureLabel", 8},
1021710230
{"miscCaptureLabel", 9},
1021810231
{"auraCaptureLabel", 10},
10232+
-- {"auraCaptureLabel", 11},
1021910233
}
1022010234

1022110235
window:arrange_menu (frame10, left_side, window.left_start_at, window.top_start_at)
@@ -10236,7 +10250,9 @@ function window:CreateFrame10()
1023610250
{"energyCaptureImage2", 8},
1023710251
{"miscCaptureImage2", 9},
1023810252
{"auraCaptureImage2", 10},
10239-
{"cloudCaptureLabel", 11, true},
10253+
{"writeAllAurasLabel", 11},
10254+
{"cloudCaptureLabel", 12, true},
10255+
1024010256

1024110257
}
1024210258

Details/locales/Details-ruRU.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -1776,4 +1776,6 @@ L["Damage by Encounter Phase"] = "Урон по фазам"
17761776
L["Healing by Encounter Phase"] = "Хил по фазам"
17771777
-----------------custom sirus
17781778
L["MurozondDmgSkip"] = "Мурозонд: без урона по щиту"
1779-
L["MurozondDmgSkipDesc"] = "Не считать урон в щит при перефазе мурозонда"
1779+
L["MurozondDmgSkipDesc"] = "Не считать урон в щит при перефазе мурозонда"
1780+
L["WriteAllAuras"] = "Записывать все ауры"
1781+
L["WriteAllAurasDesc"] = "Записывает все ауры в бафы и дебафы когда это возможно\n ВНИМАНИЕ!\n Будет использоваться больше памяти"

0 commit comments

Comments
 (0)