Updates, please see /details news

This commit is contained in:
Tercio Jose
2022-04-22 13:30:41 -03:00
parent 7762e29d00
commit 694b52ddc4
27 changed files with 2703 additions and 1676 deletions
+11 -50
View File
@@ -39,58 +39,19 @@ end
function Details:BossModsLink()
if (_G.DBM) then
local DBM = _G.DBM
local DBMCallbackPhase = function(event, msg, ...)
local DBMCallbackPhase2 = function(event, mod, modId, phase, encounterId, stageTotal)
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(encounterTable.mapid, encounterTable.id)
if (id) then
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
event = event:lower()
if (event:find("announce")) then
msg = msg:lower()
if (msg:find("stage")) then
msg = msg:gsub("%a", "")
msg = msg:gsub("%s+", "")
newPhase = tonumber(msg)
local ID, msg2, someId, someNumber, aBool = ...
if (msg2 == "stagechange") then
--print(4,"newPhase: " .. newPhase .. "|", ID, msg2, someId, someNumber, aBool)
end
local phase = newPhase
if (phase and encounterTable.phase ~= phase) then
Details:Msg("Current phase is now:", phase)
Details:OnCombatPhaseChanged()
encounterTable.phase = phase
local currentCombat = Details:GetCurrentCombat()
local time = currentCombat:GetCombatTime()
if (time > 5) then
tinsert(currentCombat.PhaseData, {phase, time})
end
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
end
if (phase and encounterTable.phase ~= phase) then
--Details:Msg("Current phase is now:", phase)
Details:OnCombatPhaseChanged()
encounterTable.phase = phase
local currentCombat = Details:GetCurrentCombat()
local time = currentCombat:GetCombatTime()
if (time > 5) then
tinsert(currentCombat.PhaseData, {phase, time})
end
Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase)
end
end
@@ -100,8 +61,8 @@ function Details:BossModsLink()
encounterTable.DBM_ModTime = time()
end
DBM:RegisterCallback("DBM_Announce", DBMCallbackPhase)
DBM:RegisterCallback("pull", DBMCallbackPull)
DBM:RegisterCallback("DBM_SetStage", DBMCallbackPhase2)
end
if (BigWigsLoader and not _G.DBM) then
+3 -1
View File
@@ -627,7 +627,9 @@ hooksecurefunc (_G, "DeathRecap_LoadUI", function()
local casterPrestige = evtData.casterPrestige
local spellSchool = evtData.school
--print("Killed by (Blizzard-Debug): ", spellName, "amount:", amountDamage)
if (Details.death_recap.enabled) then
print("Blizzard DeathRecap: ", spellName, "amount:", amountDamage)
end
--recap by Details!
local deathEventsDetails = latestDeath[1]
+5
View File
@@ -22,6 +22,8 @@
--> misc
["DETAILS_OPTIONS_MODIFIED"] = {},
["UNIT_SPEC"] = {},
["UNIT_TALENTS"] = {},
--> data
["DETAILS_DATA_RESET"] = {},
@@ -116,6 +118,9 @@ local common_events = {
["REALM_CHANNEL_LEAVE"] = true,
["COMM_EVENT_RECEIVED"] = true,
["COMM_EVENT_SENT"] = true,
["UNIT_SPEC"] = true,
["UNIT_TALENTS"] = true,
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+44
View File
@@ -10,6 +10,8 @@ do
local _select = select
local _unpack = unpack
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
local unknown_class_coords = {0.75, 1, 0.75, 1}
function Details:GetUnknownClassIcon()
@@ -255,6 +257,34 @@ do
end
end
function Details:GetUnitId(unitName)
unitName = unitName or self.nome
local unitId = openRaidLib.GetUnitID(unitName)
if (unitId) then
return unitId
end
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
local unitId = "raid" .. i
if (GetUnitName(unitId, true) == unitName) then
return unitId
end
end
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers() -1 do
local unitId = "party" .. i
if (GetUnitName(unitId, true) == unitName) then
return unitId
end
end
if (UnitName("player") == unitName) then
return "player"
end
end
end
function _detalhes:ReGuessSpec (t)
local Actor, container = t[1], t[2]
@@ -272,6 +302,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Actor.guessing_spec = nil
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
@@ -296,6 +328,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
@@ -328,6 +362,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
@@ -396,6 +432,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
Actor.guessing_spec = nil
@@ -421,6 +459,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Actor.guessing_spec = nil
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
@@ -447,6 +487,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Actor.guessing_spec = nil
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
@@ -479,6 +521,8 @@ do
Actor.spec = spec
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
Actor.guessing_spec = nil
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
if (container) then
container.need_refresh = true
+15 -4
View File
@@ -820,9 +820,9 @@ local default_profile = {
0.23, -- [3]
},
["ARENA_GREEN"] = {
0.4, -- [1]
1, -- [2]
0.4, -- [3]
0.686, -- [1]
0.372, -- [2]
0.905, -- [3]
},
["ARENA_YELLOW"] = {
1, -- [1]
@@ -1131,8 +1131,19 @@ local default_player_data = {
only_in_group = true,
only_inside_instance = true,
},
show_options = false,
show_options = true,
current_cooldowns = {},
framme_locked = false,
filters = {
["defensive-raid"] = false,
["defensive-target"] = false,
["defensive-personal"] = false,
["ofensive"] = true,
["utility"] = false,
},
width = 120,
height = 18,
lines_per_column = 12,
},
--> force all fonts to have this outline
+13 -1
View File
@@ -29,7 +29,7 @@ function Details:StopTestBarUpdate()
Details.test_bar_update = nil
end
function Details:CreateTestBars (alphabet)
function Details:CreateTestBars (alphabet, isArena)
local current_combat = Details:GetCombat ("current")
local pclass = select (2, UnitClass ("player"))
@@ -178,6 +178,18 @@ function Details:CreateTestBars (alphabet)
robot.grupo = true
robot.classe = who [2]
robot.flag_original = "0x514"
if (isArena) then
if (math.random() > 0.5) then
robot.arena_ally = true
robot.arena_team = 0
else
robot.arena_enemy = true
robot.arena_team = 1
robot.enemy = true
end
end
if (who[3]) then
robot.spec = who[3]