Skip to content

Commit

Permalink
Real Time DPS, ten years old
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jul 14, 2023
1 parent 9a49918 commit 7a0e045
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 255 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ plugins/Details_RaidCheck/.github/workflows/release.yml
plugins/Details_Streamer/.github/workflows/release.yml
plugins/Details_TinyThreat/.github/workflows/release.yml
plugins/Details_Vanguard/.github/workflows/release.yml
photoshop/ten_years_skin.tga
2 changes: 1 addition & 1 deletion Libs/LibOpenRaid/LibOpenRaid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
end

local major = "LibOpenRaid-1.0"
local CONST_LIB_VERSION = 104
local CONST_LIB_VERSION = 105

if (not LIB_OPEN_RAID_MAX_VERSION) then
LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION
Expand Down
15 changes: 15 additions & 0 deletions Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ do
--evoker
-- 1467 - Devastation
-- 1468 - Preservation
-- 1473 - Augmentation
[374251] = {cooldown = 60, duration = 0, specs = {1467, 1468}, talent = false, charges = 1, class = "EVOKER", type = 7}, --Cauterizing Flame
[365585] = {cooldown = 8, duration = 0, specs = {1467}, talent = false, charges = 1, class = "EVOKER", type = 7}, --Expunge
[360823] = {cooldown = 8, duration = 0, specs = {1468}, talent = false, charges = 1, class = "EVOKER", type = 7}, --Naturalize
Expand All @@ -750,6 +751,20 @@ do
[374968] = {cooldown = 120, duration = 10, specs = {1467, 1468}, talent = false, charges = 1, class = "EVOKER", type = 5}, --Time Spiral
[374227] = {cooldown = 120, duration = 8, specs = {1467, 1468}, talent = false, charges = 1, class = "EVOKER", type = 4}, --Zephyr
[360806] = {cooldown = 15, duration = 20, specs = {1467, 1468}, talent = false, charges = 1, class = "EVOKER", type = 8}, --Sleep Walk

[360827] = {cooldown = 30, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 3}, --Blistering Scales
[395152] = {cooldown = 30, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 1}, --Ebon Might
--[395160] = {cooldown = 0, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 0}, --Eruption
[396286] = {cooldown = 40, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 1}, --Upheaval
--[403208] = {cooldown = 0, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 0}, --Draconic Attunements
--[403264] = {cooldown = 3, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 0}, --Black Attunement
--[403265] = {cooldown = 3, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 0}, --Bronze Attunement
[403631] = {cooldown = 120, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 1}, --Breath of Eons
[404977] = {cooldown = 180, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 1}, --Time Skip
[406732] = {cooldown = 120, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 3}, --Spatial Paradox
[408233] = {cooldown = 60, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 5}, --Bestow Weyrnstone
[409311] = {cooldown = 12, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 1}, --Prescience
--[412710] = {cooldown = 0, duration = 0, specs = {1473}, talent = false, charges = 1, class = "EVOKER", type = 0}, --Timelessness
}

--this table store all cooldowns the player currently have available
Expand Down
8 changes: 3 additions & 5 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
--test if the packager will deploy to wago
--https://github.com/LuaLS/lua-language-server/wiki/Annotations#documenting-types

--make an option to show death in the order of newest to oldest

_ = nil
_G.Details = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")

Expand All @@ -15,12 +13,12 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 11023
Details.alpha_build_counter = 11023 --if this is higher than the regular counter, use it instead
Details.build_counter = 11700
Details.alpha_build_counter = 11700 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Details.realversion = 153 --core version, this is used to check API version for scripts and plugins (see alias below)
Details.realversion = 154 --core version, this is used to check API version for scripts and plugins (see alias below)
Details.APIVersion = Details.realversion --core version
Details.version = Details.userversion .. " (core " .. Details.realversion .. ")" --simple stirng to show to players

Expand Down
35 changes: 22 additions & 13 deletions classes/class_damage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2663,19 +2663,28 @@ function damageClass:RefreshLine(instance, lineContainer, whichRowLine, rank, to

--calculate the actor dps
if ((Details.time_type == 2 and self.grupo) or not Details:CaptureGet("damage") or instance.segmento == -1 or Details.time_type == 3) then
if (instance.segmento == -1 and combat_time == 0) then
local actor = currentCombat(1, self.nome)
if (actor) then
local combatTime = actor:Tempo()
dps = damageTotal / combatTime
self.last_dps = dps
if (Details.time_type == 3 and Details.in_combat) then
local currentDps = Details.CurrentDps.GetCurrentDps(self.serial)
if (currentDps) then
dps = currentDps
end
end

if (not dps) then
if (instance.segmento == -1 and combat_time == 0) then
local actor = currentCombat(1, self.nome)
if (actor) then
local combatTime = actor:Tempo()
dps = damageTotal / combatTime
self.last_dps = dps
else
dps = damageTotal / combat_time
self.last_dps = dps
end
else
dps = damageTotal / combat_time
self.last_dps = dps
end
else
dps = damageTotal / combat_time
self.last_dps = dps
end
else
if (not self.on_hold) then
Expand Down Expand Up @@ -3500,7 +3509,7 @@ function damageClass:ToolTip_DamageDone (instancia, numero, barra, keydown)
local timeInCombat = 0
if (Details.time_type == 1 or not self.grupo) then
timeInCombat = petActorObject:Tempo()
elseif (Details.time_type == 2) then
elseif (Details.time_type == 2 or Details.time_type == 3) then
timeInCombat = petActorObject:GetCombatTime()
end

Expand Down Expand Up @@ -4721,7 +4730,7 @@ function damageClass:MontaInfoDamageDone() --I guess this fills the list of spel
local actorCombatTime
if (Details.time_type == 1 or not actorObject.grupo) then
actorCombatTime = actorObject:Tempo()
elseif (Details.time_type == 2) then
elseif (Details.time_type == 2 or Details.time_type == 3) then
actorCombatTime = breakdownWindowFrame.instancia.showing:GetCombatTime()
end

Expand Down Expand Up @@ -5700,7 +5709,7 @@ function damageClass:MontaDetalhesDamageDone (spellId, spellLine, instance) --th
if (Details.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()

elseif (Details.time_type == 2) then
elseif (Details.time_type == 2 or Details.time_type == 3) then
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
end

Expand Down Expand Up @@ -6266,7 +6275,7 @@ function damageClass:MontaTooltipAlvos (thisLine, index, instancia) --~deprecate
local meu_tempo
if (Details.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
elseif (Details.time_type == 2) then
elseif (Details.time_type == 2 or Details.time_type == 3) then
meu_tempo = breakdownWindowFrame.instancia.showing:GetCombatTime()
end

Expand Down
Loading

0 comments on commit 7a0e045

Please sign in to comment.