Skip to content

Commit

Permalink
Added mythic dungeon settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Dec 21, 2020
1 parent b3e907d commit b703d60
Show file tree
Hide file tree
Showing 10 changed files with 115 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Libs/DF/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,9 @@ DF.CrowdControlSpells = {
[50259] = "DRUID", --Dazed (from Wild Charge)
[209753] = "DRUID", --Cyclone (from pvp talent)
[33786] = "DRUID", --Cyclone (from pvp talent - resto druid)
[155722] = "DRUID", --Rake

[3355] = "HUNTER", --Freezing Trap
[3355] = "HUNTER", --Diamond Ice (from pvp talent)
[3355] = "HUNTER", --Freezing Trap / Diamond Ice (from pvp talent)
[19577] = "HUNTER", --Intimidation
[190927] = "HUNTER", --Harpoon
[162480] = "HUNTER", --Steel Trap
Expand Down
2 changes: 1 addition & 1 deletion Libs/LibRaidStatus/LibRaidStatus.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

local major = "LibRaidStatus-1.0"
local CONST_LIB_VERSION = 10
local CONST_LIB_VERSION = 11
LIB_RAID_STATUS_CAN_LOAD = false

--declae the library within the LibStub
Expand Down
9 changes: 5 additions & 4 deletions Libs/LibRaidStatus/ThingsToMantain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[104773] = 2, --Unending Resolve
[108416] = 2, --Dark Pact (talent)
[30283] = 5, --Shadowfury
[6789] = 5, --Mortal Coil (talent)
--[6789] = 5, --Mortal Coil (talent)
[333889] = 5, --Fel Domination
},
--demonology
Expand All @@ -229,7 +229,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[108416] = 2, --Dark Pact (talent)

[30283] = 5, --Shadowfury
[6789] = 5, --Mortal Coil (talent)
--[6789] = 5, --Mortal Coil (talent)
[5484] = 5, --Howl of Terror (talent)
[333889] = 5, --Fel Domination
},
Expand All @@ -240,7 +240,7 @@ LIB_RAID_STATUS_COOLDOWNS_BY_SPEC = {
[113858] = 1, --Dark Soul: Instability (talent)
[104773] = 2, --Unending Resolve
[108416] = 2, --Dark Pact (talent)
[6789] = 5, --Mortal Coil (talent)
--[6789] = 5, --Mortal Coil (talent)
[30283] = 5, --Shadowfury
[333889] = 5, --Fel Domination
},
Expand Down Expand Up @@ -619,7 +619,8 @@ LIB_RAID_STATUS_COOLDOWNS_INFO = {
[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

--[6789] = {cooldown = 45, duration = 3, talent = 19291, charges = 1, class = "WARLOCK", type = 5}, --Mortal Coil (talent)

--> shaman
[198067] = {cooldown = 150, duration = 30, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental
[192249] = {cooldown = 150, duration = 30, talent = 19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent)
Expand Down
2 changes: 1 addition & 1 deletion classes/class_combat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
tremove(container._ActorTable, index)

--remap
self:Remap()
container:Remap()
end
end
end
Expand Down
8 changes: 7 additions & 1 deletion core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,9 @@ function Details.Database.StoreWipe(combat)

--database
local db = Details.Database.LoadDB()
if (not db) then
return
end

local diff_storage = db [diff]
if (not diff_storage) then
Expand Down Expand Up @@ -1604,7 +1607,10 @@ function Details.Database.StoreEncounter(combat)

--database
local db = Details.Database.LoadDB()

if (not db) then
return
end

local diff_storage = db [diff]
if (not diff_storage) then
db [diff] = {}
Expand Down
8 changes: 7 additions & 1 deletion core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@
alvo_name = alvo_name .. " <" .. alvo_dono.nome .. ">"

end

if (not jogador_alvo) then
local instanceName, _, _, _, _, _, _, instanceId = GetInstanceInfo()
Details:Msg("Report 0x885488", alvo_name, instanceName, instanceId, damage_cache[alvo_serial] and "true")
return
end

--> last event
este_jogador.last_event = _tempo
Expand Down Expand Up @@ -4527,7 +4533,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return
end

--> leave the current combat when the encounter start, if is doing a mythic plus dungeons, check if the options alows to create a dedicated segment for the boss fight
--> leave the current combat when the encounter start, if is doing a mythic plus dungeons, check if the options allows to create a dedicated segment for the boss fight
if ((_in_combat and not _detalhes.tabela_vigente.is_boss) and (not _detalhes.MythicPlus.Started or _detalhes.mythic_plus.boss_dedicated_segment)) then
_detalhes:SairDoCombate()
end
Expand Down
6 changes: 4 additions & 2 deletions frames/window_options2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,14 @@ function Details.options.InitializeOptionsWindow(instance)
[16] = Loc ["STRING_OPTIONSMENU_SPELLS"],
[17] = Loc ["STRING_OPTIONSMENU_DATACHART"],

[18] = "Mythic Dungeon",

}

local optionsSectionsOrder = {
1, "", 3, 4, "", 5, 6, 7, 12, 13, "", 9, 2, 8, 10, 11, "", 14, 15, 16, 17--, 18, 19
1, "", 3, 4, "", 5, 6, 7, 12, 13, "", 9, 2, 8, 10, 11, 18, "", 14, 15, 16, 17--, 18, 19
}
local maxSectionIds = 17
local maxSectionIds = 18
Details.options.maxSectionIds = maxSectionIds

local buttonYPosition = -40
Expand Down
86 changes: 86 additions & 0 deletions frames/window_options2_sections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ end
~15 - broadcaster
~16 - custom spells
~17 - charts data
~18 - mythic dungeon
--]]


Expand Down Expand Up @@ -6253,6 +6254,91 @@ do
tinsert(Details.optionsSection, buildSection)
end

do
local buildSection = function(sectionFrame)

local sectionOptions = {
{type = "label", get = function() return Loc["STRING_OPTIONS_GENERAL_ANCHOR"] end, text_template = subSectionTitleTextTemplate},
{--always in combat
type = "toggle",
get = function() return Details.mythic_plus.always_in_combat end,
set = function (self, fixedparam, value)
Details.mythic_plus.always_in_combat = value
end,
name = "Always in Combat",
desc = "Details won't create new segments for trash or boss and treat the run as a single segment.",
},

{--dedicated segment for bosses
type = "toggle",
get = function() return Details.mythic_plus.boss_dedicated_segment end,
set = function (self, fixedparam, value)
Details.mythic_plus.boss_dedicated_segment = value
end,
name = "Boss Dedicated Segment",
desc = "If a boss is pulled while in combat, Details! close the combat and start a new one for the boss.",
},

{--make overall when done
type = "toggle",
get = function() return Details.mythic_plus.make_overall_when_done end,
set = function (self, fixedparam, value)
Details.mythic_plus.make_overall_when_done = value
end,
name = "Make Overall Segment",
desc = "When the run is done, make an overall segment.",
},

{--overall only with bosses
type = "toggle",
get = function() return Details.mythic_plus.make_overall_boss_only end,
set = function (self, fixedparam, value)
Details.mythic_plus.make_overall_boss_only = value
end,
name = "Overall Segment Boss Only",
desc = "Only add boss segments on the overall.",
},

{--merge trash
type = "toggle",
get = function() return Details.mythic_plus.merge_boss_trash end,
set = function (self, fixedparam, value)
Details.mythic_plus.merge_boss_trash = value
end,
name = "Merge Trash",
desc = "Merge Trash",
},

{--delete merged trash
type = "toggle",
get = function() return Details.mythic_plus.delete_trash_after_merge end,
set = function (self, fixedparam, value)
Details.mythic_plus.delete_trash_after_merge = value
end,
name = "Delete Merged Trash Segments",
desc = "After have the segment merged, if this option is enabled it'll delete those merged segments.",
},

{--show chart popup
type = "toggle",
get = function() return Details.mythic_plus.show_damage_graphic end,
set = function (self, fixedparam, value)
Details.mythic_plus.show_damage_graphic = value
end,
name = "Show Damage Charts",
desc = "Show Damage Charts",
},


}

DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end

tinsert(Details.optionsSection, buildSection)
end


--[[]
do
local buildSection = function(sectionFrame)
Expand Down
2 changes: 1 addition & 1 deletion functions/profiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ local default_global_data = {
--> mythic plus config
mythic_plus = {
always_in_combat = false, --
merge_boss_trash = false, --
merge_boss_trash = true, --
delete_trash_after_merge = true, --
--merge_boss_with_trash = false, --this won't be used
boss_dedicated_segment = true, --
Expand Down
11 changes: 1 addition & 10 deletions functions/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,6 @@ do
[200025] = 65, -- Beacon of Virtue
[223306] = 65, -- Bestow Faith
[4987] = 65, -- Cleanse
[231667] = 65, -- Crusader Strike
[342348] = 65, -- Crusader Strike
[35395] = 65, -- Crusader Strike
[196926] = 65, -- Crusader's Might
[498] = 65, -- Divine Protection
[325966] = 65, -- Glimmer of Light
Expand Down Expand Up @@ -546,7 +543,6 @@ do
[204019] = 66, -- Blessed Hammer
[229976] = 66, -- Blessed Hammer
[204018] = 66, -- Blessing of Spellwarding
[204054] = 66, -- Consecrated Ground
[204023] = 66, -- Crusader's Judgment
[204077] = 66, -- Final Stand
[203776] = 66, -- First Avenger
Expand All @@ -556,14 +552,13 @@ do
[337287] = 66, -- Hammer of the Righteous
[53595] = 66, -- Hammer of the Righteous
[315924] = 66, -- Hand of the Protector
[152261] = 66, -- Holy Shield
[327193] = 66, -- Moment of Glory
[280373] = 66, -- Redoubt
[204074] = 66, -- Righteous Protector
[161800] = 66, -- Riposte
[321136] = 66, -- Shining Light


-- Retribution Paladin:
[267344] = 70, -- Art of War
[317912] = 70, -- Art of War
Expand All @@ -574,15 +569,11 @@ do
[53385] = 70, -- Divine Storm
[326732] = 70, -- Empyrean Power
[343527] = 70, -- Execution Sentence
[205191] = 70, -- Eye for an Eye
[343721] = 70, -- Final Reckoning
[203316] = 70, -- Fires of Justice
[183218] = 70, -- Hand of Hindrance
[326734] = 70, -- Healing Hands
[215661] = 70, -- Justicar's Vengeance
[267610] = 70, -- Righteous Verdict
[85804] = 70, -- Selfless Healer
[184662] = 70, -- Shield of Vengeance
[85256] = 70, -- Templar's Verdict
[255937] = 70, -- Wake of Ashes
[269569] = 70, -- Zeal
Expand Down

0 comments on commit b703d60

Please sign in to comment.