Skip to content

Commit

Permalink
Update to version 8192
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jan 28, 2021
1 parent 23ae80e commit d907624
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 100 deletions.
24 changes: 23 additions & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 232
local dversion = 233

local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
Expand Down Expand Up @@ -3639,6 +3639,28 @@ function DF:GetRoleTypes()
return DF.RoleTypes
end

local roleTexcoord = {
DAMAGER = "72:130:69:127",
HEALER = "72:130:2:60",
TANK = "5:63:69:127",
NONE = "139:196:69:127",
}

function DF:AddRoleIconToText(text, role, size)
if (role and type(role) == "string") then
local coords = GetTexCoordsForRole(role)
if (coords) then
if (type (text) == "string" and role ~= "NONE") then
size = size or 14
text = "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. size .. ":" .. size .. ":0:0:256:256:" .. roleTexcoord[role] .. "|t " .. text
return text
end
end
end

return text
end

DF.CLEncounterID = {
{ID = 2144, Name = "Taloc"},
{ID = 2141, Name = "MOTHER"},
Expand Down
4 changes: 4 additions & 0 deletions Libs/DF/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ DF.CooldownsBySpec = {
[30283] = 5, --Shadowfury
[6789] = 5, --Mortal Coil (talent)
[333889] = 5, --Fel Domination
[5484] = 5, --Howl of Terror (talent)
},
--demonology
[266] = {
Expand Down Expand Up @@ -162,6 +163,7 @@ DF.CooldownsBySpec = {
[6789] = 5, --Mortal Coil (talent)
[30283] = 5, --Shadowfury
[333889] = 5, --Fel Domination
[5484] = 5, --Howl of Terror (talent)
},

--WARRIOR
Expand Down Expand Up @@ -537,6 +539,7 @@ DF.CooldownsInfo = {
[113858] = {cooldown = 120, duration = 20, talent = 23092, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability (talent)
[30283] = {cooldown = 60, duration = 3, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury
[333889] = {cooldown = 180, duration = 15, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination
[5484] = {cooldown = 40, duration = 20, talent = true, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent)

--> shaman
[198067] = {cooldown = 150, duration = 30, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
Expand Down Expand Up @@ -716,6 +719,7 @@ DF.CrowdControlSpells = {
[6789] = "WARLOCK", --Mortal Coil
[30283] = "WARLOCK", --Shadowfury
[710] = "WARLOCK", --Banish
[5484] = "WARLOCK", --Howl of Terror (talent)

[118] = "MAGE", --Polymorph
[61305] = "MAGE", --Polymorph (black cat)
Expand Down
22 changes: 16 additions & 6 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")

_detalhes.build_counter = 8156
_detalhes.alpha_build_counter = 8156 --if this is higher than the regular counter, use it instead
_detalhes.build_counter = 8192
_detalhes.alpha_build_counter = 8192 --if this is higher than the regular counter, use it instead
_detalhes.dont_open_news = true
_detalhes.game_version = "v9.0.2"
_detalhes.userversion = "v9.0.2." .. _detalhes.build_counter
_detalhes.realversion = 144 --core version, this is used to check API version for scripts and plugins (see alias below)
Expand All @@ -28,10 +29,16 @@ do
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )

local news = {
--{"v9.0.2.8162.144", "January ??th, 2021"},
--"Added covenant into the Raid Check plugin.",

{"v9.0.2.8156.144", "January 21th, 2021"},
{"v9.0.2.8192.144", "January 27th, 2021"},
"If you get issues with nicknames, disable any weakaura which modifies this feature.",
"Advanced Death Logs plugin got some fixes and should work properly.",
"Added the word 'Overall' at the end of the title bar text when the segment is overall.",
"Added covenant and durability into the Raid Check plugin.",
"Added API Window:SetTitleBarText(text) and Window:GetTitleBarText().",
"Fixed some issues where Details! printed 'combat start time not found.'",
"Fixed damage per Phase.",
"Fixed resizing window with no background error.",
"Fixed 'Always Show player' on ascending sort direction.",
"Added more foods into the Ready Check plugin.",
"Fixed some issues with the coach fearure.",

Expand Down Expand Up @@ -536,6 +543,9 @@ do
[323436] = true --Phial of Serenity (from Kyrians)
}

--[[global]] DETAILS_MODE_GROUP = 2
--[[global]] DETAILS_MODE_ALL = 3

_detalhes._detalhes_props = {
DATA_TYPE_START = 1, --> Something on start
DATA_TYPE_END = 2, --> Something on end
Expand Down
25 changes: 12 additions & 13 deletions classes/container_actors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,27 @@

--> � um player
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then

if (not _detalhes.ignore_nicktag) then
novo_objeto.displayName = _detalhes:GetNickname (nome, false, true) --> serial, default, silent
if (novo_objeto.displayName and novo_objeto.displayName ~= "") then
--don't display empty nicknames
if (novo_objeto.displayName:find(" ")) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
else
novo_objeto.displayName = nome
end
end
end
end

if (not novo_objeto.displayName) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
else
novo_objeto.displayName = nome
end
--[=[
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
elseif (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "%*") --nome = nil
else
novo_objeto.displayName = nome
end
--]=]
end

if (_detalhes.all_players_are_group or _detalhes.immersion_enabled) then
Expand Down
6 changes: 4 additions & 2 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4534,7 +4534,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end

_current_encounter_id = encounterID
Details:Msg("encounter started:", encounterID, encounterName)
--Details:Msg("encounter started:", encounterID, encounterName)
_detalhes.boss1_health_percent = 1

local dbm_mod, dbm_time = _detalhes.encounter_table.DBM_Mod, _detalhes.encounter_table.DBM_ModTime
Expand All @@ -4546,7 +4546,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes.encounter_table.phase = 1

--store the encounter time inside the encounter table for the encounter plugin
_detalhes.encounter_table ["start"] = _GetTime()
_detalhes.encounter_table.start = GetTime()
_detalhes.encounter_table ["end"] = nil
-- local encounterID = Details.encounter_table.id
_detalhes.encounter_table.id = encounterID
Expand Down Expand Up @@ -4585,6 +4585,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end

_detalhes:SendEvent ("COMBAT_ENCOUNTER_START", nil, ...)

--print ("encounter staerted at:", _detalhes.encounter_table.start)
end

function _detalhes.parser_functions:ENCOUNTER_END (...)
Expand Down
49 changes: 33 additions & 16 deletions frames/window_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7577,27 +7577,27 @@ function _detalhes:CheckForTextTimeCounter (combat_start)
local instance = _detalhes:GetInstance (lower)
if (instance.baseframe and instance:IsEnabled()) then
if (instance.attribute_text.show_timer) then
if (_detalhes.instance_title_text_timer [instance.meu_id]) then
_detalhes:CancelTimer (_detalhes.instance_title_text_timer [instance.meu_id])
if (_detalhes.instance_title_text_timer [instance:GetId()]) then
Details.Schedules.Cancel(_detalhes.instance_title_text_timer [instance:GetId()])
end
_detalhes.instance_title_text_timer [instance.meu_id] = _detalhes:ScheduleRepeatingTimer ("TitleTextTickTimer", 1, instance)
_detalhes.instance_title_text_timer[instance:GetId()] = Details.Schedules.NewTicker(1, Details.TitleTextTickTimer, Details, instance)
end
end
else
return
end
else
if (_detalhes.in_combat and _detalhes.zone_type == "raid") then
_detalhes:ScheduleTimer ("CheckForTextTimeCounter", 3, true)
Details.Schedules.NewTimer(3, Details.CheckForTextTimeCounter, Details, true)
end
end
else
for _, instance in ipairs (_detalhes.tabela_instancias) do
if (_detalhes.instance_title_text_timer [instance.meu_id] and instance.baseframe and instance:IsEnabled() and instance.menu_attribute_string) then
_detalhes:CancelTimer (_detalhes.instance_title_text_timer [instance.meu_id])
local current_text = instance.menu_attribute_string:GetText()
if (_detalhes.instance_title_text_timer [instance:GetId()] and instance.baseframe and instance:IsEnabled() and instance.menu_attribute_string) then
Details.Schedules.Cancel(_detalhes.instance_title_text_timer[instance:GetId()])
local current_text = instance:GetTitleBarText()
current_text = current_text:gsub ("%[.*%] ", "")
instance.menu_attribute_string:SetText (current_text)
instance:SetTitleBarText(current_text)
end
end
end
Expand All @@ -7621,24 +7621,29 @@ function _detalhes:TitleTextTickTimer (instance)
local currentText = instance.menu_attribute_string.originalText
if (currentText) then
local timer = format_timer (_detalhes.tabela_vigente:GetCombatTime())
instance.menu_attribute_string:SetText(timer .. " " .. currentText)

instance:SetTitleBarText(timer .. " " .. currentText)
else
local current_text = instance.menu_attribute_string:GetText()
local current_text = instance:GetTitleBarText()
if (not current_text:find ("%[.*%]")) then
instance.menu_attribute_string:SetText ("[00:01] " .. current_text)
instance:SetTitleBarText("[00:01] " .. current_text)
else
local timer = format_timer (_detalhes.tabela_vigente:GetCombatTime())
current_text = current_text:gsub ("%[.*%]", timer)
instance.menu_attribute_string:SetText (current_text)
instance:SetTitleBarText(current_text)
end
end
end
end

function _detalhes:SetTitleBarText (text)
function _detalhes:SetTitleBarText(text)
if (self.attribute_text.enabled and self.menu_attribute_string) then
self.menu_attribute_string:SetText (text)
self.menu_attribute_string:SetText(text)
end
end

function _detalhes:GetTitleBarText()
if (self.menu_attribute_string) then
return self.menu_attribute_string:GetText()
end
end

Expand Down Expand Up @@ -7718,14 +7723,26 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
function self.menu_attribute_string:OnEvent (instance, attribute, subAttribute)
if (instance == label.owner_instance) then
local sName = instance:GetInstanceAttributeText()
local instanceMode = instance:GetMode()

if (instanceMode == DETAILS_MODE_GROUP or instanceMode == DETAILS_MODE_ALL) then
local segment = instance:GetSegment()
if (segment == DETAILS_SEGMENTID_OVERALL) then
sName = sName .. " " .. Loc ["STRING_OVERALL"]

elseif (segment >= 2) then
sName = sName .. " [" .. segment .. "]"
end
end

label.text = sName
label.originalText = sName
end
end

_detalhes:RegisterEvent (self.menu_attribute_string, "DETAILS_INSTANCE_CHANGEATTRIBUTE", self.menu_attribute_string.OnEvent)
_detalhes:RegisterEvent (self.menu_attribute_string, "DETAILS_INSTANCE_CHANGEMODE", self.menu_attribute_string.OnEvent)

_detalhes:RegisterEvent (self.menu_attribute_string, "DETAILS_INSTANCE_CHANGESEGMENT", self.menu_attribute_string.OnEvent)
end

self.menu_attribute_string:Show()
Expand Down
Loading

0 comments on commit d907624

Please sign in to comment.