diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 50bd272b..a932f610 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -1,6 +1,6 @@ local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 20 +local CONST_LIB_VERSION = 21 LIB_OPEN_RAID_CAN_LOAD = false --declae the library within the LibStub diff --git a/Libs/LibOpenRaid/ThingsToMantain.lua b/Libs/LibOpenRaid/ThingsToMantain.lua index ccc7d573..be5dc391 100644 --- a/Libs/LibOpenRaid/ThingsToMantain.lua +++ b/Libs/LibOpenRaid/ThingsToMantain.lua @@ -5,6 +5,14 @@ if (not LIB_OPEN_RAID_CAN_LOAD) then return end +LIB_OPEN_RAID_BLOODLUST = { + [2825] = true, --bloodlust + [32182] = true, --heroism + [80353] = true, --timewarp + [90355] = true, --ancient hysteria + [309658] = true, --current exp drums +} + LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901 LIB_OPEN_RAID_COVENANT_ICONS = { diff --git a/classes/container_actors.lua b/classes/container_actors.lua index b7abfbb6..77026182 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -347,7 +347,9 @@ --player custom bar color --at this position in the code, the color will replace colors from arena matches if (Details.use_self_color) then - actorObject.customColor = Details.class_colors.SELF + if (nome == _detalhes.playername) then + actorObject.customColor = Details.class_colors.SELF + end end --> � um pet diff --git a/core/parser.lua b/core/parser.lua index 4aa0b40b..1e74aa54 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -2405,6 +2405,13 @@ ------------------------------------------------------------------------------------------------ --> buff uptime + if (LIB_OPEN_RAID_BLOODLUST[spellid]) then + if (_detalhes.playername == alvo_name) then + _current_combat.bloodlust = _current_combat.bloodlust or {} + _current_combat.bloodlust[#_current_combat.bloodlust+1] = _current_combat:GetCombatTime() + end + end + if (spellid == 27827) then --> spirit of redemption (holy priest) parser:dead ("UNIT_DIED", time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags) ignore_death [who_name] = true @@ -4884,7 +4891,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 return _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA() end + + -- ~encounter + --ENCOUNTER START function _detalhes.parser_functions:ENCOUNTER_START(...) if (_detalhes.debug) then _detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.") @@ -4976,6 +4986,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 _detalhes:SendEvent ("COMBAT_ENCOUNTER_START", nil, ...) end + + + --ENCOUNRTER_END function _detalhes.parser_functions:ENCOUNTER_END (...) if (_detalhes.debug) then @@ -5037,7 +5050,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 npc_cache = {}, ignore_spikeballs = 0, } - -- return true end diff --git a/functions/bossmods.lua b/functions/bossmods.lua index 4443428e..0b44b715 100644 --- a/functions/bossmods.lua +++ b/functions/bossmods.lua @@ -38,70 +38,72 @@ end function Details:BossModsLink() if (_G.DBM) then - local dbm_callback_phase = function (event, msg, ...) + local DBM = _G.DBM - --print("D!", event, msg, ...) - local mod = Details.encounter_table.DBM_Mod - + local DBMCallbackPhase = function(event, msg, ...) + local encounterTable = Details.encounter_table + + --get the mod from DBM cached within the encounter_table + --note: encounter_table is wipped at ENCOUNTER_END + --note 2: at the moment, the saved table 'DBM_Mod' isn't in use on Details!, need a cleanup in the future + local mod = encounterTable.DBM_Mod if (not mod) then - local id = Details:GetEncounterIdFromBossIndex (Details.encounter_table.mapid, Details.encounter_table.id) + local id = Details:GetEncounterIdFromBossIndex(encounterTable.mapid, encounterTable.id) if (id) then - for index, tmod in ipairs (DBM.Mods) do - if (tmod.id == id) then - Details.encounter_table.DBM_Mod = tmod - mod = tmod + for index, DBMMod in ipairs(DBM.Mods) do + if (DBMMod.id == id) then + encounterTable.DBM_Mod = DBMMod + mod = DBMMod end end end end - + local newPhase = 1 - --D! DBM_Announce Stage 3 136116 stagechange 0 2429 false + event = event:lower() + if (event:find("announce")) then + + msg = msg:lower() + if (msg:find("stage")) then - if (event == "DBM_Announce") then - if (msg:find("Stage")) then msg = msg:gsub("%a", "") msg = msg:gsub("%s+", "") newPhase = tonumber(msg) - --print("New Phase: ", newPhase) local ID, msg2, someId, someNumber, aBool = ... if (msg2 == "stagechange") then - --print("D! yeash", msg2) + --print(4,"newPhase: " .. newPhase .. "|", ID, msg2, someId, someNumber, aBool) end local phase = newPhase - if (phase and Details.encounter_table.phase ~= phase) then - Details:Msg ("Current phase is now:", phase) - + if (phase and encounterTable.phase ~= phase) then + Details:Msg("Current phase is now:", phase) Details:OnCombatPhaseChanged() - - Details.encounter_table.phase = phase - - local cur_combat = Details:GetCurrentCombat() - local time = cur_combat:GetCombatTime() + encounterTable.phase = phase + local currentCombat = Details:GetCurrentCombat() + local time = currentCombat:GetCombatTime() if (time > 5) then - tinsert (cur_combat.PhaseData, {phase, time}) + tinsert(currentCombat.PhaseData, {phase, time}) end - - Details:SendEvent ("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase) + Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase) end end end end - - local dbm_callback_pull = function (event, mod, delay, synced, startHp) - Details.encounter_table.DBM_Mod = mod - Details.encounter_table.DBM_ModTime = time() + + local DBMCallbackPull = function(event, mod, delay, synced, startHp) + local encounterTable = Details.encounter_table + encounterTable.DBM_Mod = mod + encounterTable.DBM_ModTime = time() end - - DBM:RegisterCallback ("DBM_Announce", dbm_callback_phase) - DBM:RegisterCallback ("pull", dbm_callback_pull) + + DBM:RegisterCallback("DBM_Announce", DBMCallbackPhase) + DBM:RegisterCallback("pull", DBMCallbackPull) end - + if (BigWigsLoader and not _G.DBM) then --Bigwigs change the phase of an encounter diff --git a/startup.lua b/startup.lua index 05de577b..a0220a88 100644 --- a/startup.lua +++ b/startup.lua @@ -438,7 +438,7 @@ function Details:StartMeUp() --I'll never stop! _detalhes:LoadFramesForBroadcastTools() _detalhes:BrokerTick() - --boss mobs callbacks (DBM and BigWigs) + --register boss mobs callbacks (DBM and BigWigs) -> functions/bossmods.lua Details.Schedules.NewTimer(5, Details.BossModsLink, Details) --limit item level life for 24Hs