Added combat:GetBossHealth(); combat:GetBossName(); combat:GetCurrentPhase()
This commit is contained in:
@@ -223,6 +223,8 @@
|
||||
---@field last_events_tables table[] where the death log of each player is stored
|
||||
---@field boss_hp number percentage of the health points of the boss
|
||||
---@field training_dummy boolean if true, the combat is against a training dummy
|
||||
---@field playerTalents table<actorname, string> [playerName] = "talent string"
|
||||
---@field bossName string? the name of the boss, if the combat has no unitId "boss1", this value is nil
|
||||
---@field
|
||||
---@field
|
||||
---@field __call table
|
||||
@@ -256,6 +258,8 @@
|
||||
---@field is_world_trash_combat boolean when true this combat is a regular combat done in the world, not in a dungeon, raid, battleground, arena, ...
|
||||
---@field player_last_events table<string, table[]> record the latest events of each player, latter used to build the death log
|
||||
---@field
|
||||
---@field GetCurrentPhase fun(combat: combat) : number return the current phase of the combat or the phase where the combat ended
|
||||
---@field StoreTalents fun(self:combat)
|
||||
---@field FindEnemyName fun(combat: combat) : string attempt to get the name of the enemy in the combat by getting the top most damaged unit by the player
|
||||
---@field GetTryNumber fun(combat: combat) : number?
|
||||
---@field GetFormattedCombatTime fun(combat: combat) : string
|
||||
@@ -298,6 +302,9 @@
|
||||
---@field GetEncounterName fun(combat: combat) : string get the name of the encounter
|
||||
---@field GetBossImage fun(combat: combat) : texturepath|textureid get the icon of the encounter
|
||||
---@field SetDateToNow fun(combat: combat, bSetStartDate: boolean?, bSetEndDate: boolean?) set the date to the current time. format: "H:M:S"
|
||||
---@field GetBossHealth fun(combat: combat) : number get the percentage of the boss health when the combat ended
|
||||
---@field GetBossName fun(combat: combat) : string? return the name of the unitId "boss1", nil if the unit doesn't existed during the combat
|
||||
|
||||
|
||||
---@class actorcontainer : table contains two tables _ActorTable and _NameIndexTable, the _ActorTable contains the actors, the _NameIndexTable contains the index of the actors in the _ActorTable, making quick to reorder them without causing overhead
|
||||
---@field need_refresh boolean when true the container is dirty and needs to be refreshed
|
||||
|
||||
@@ -157,8 +157,23 @@
|
||||
---@field SliderCounter number when no name is given, a string plus an incremental number is used instead
|
||||
---@field SwitchCounter number when no name is given, a string plus an incremental number is used instead
|
||||
---@field SplitBarCounter number when no name is given, a string plus an incremental number is used instead
|
||||
---@field TalentExporter table
|
||||
---@field FormatNumber fun(number:number) : string abbreviate a number, e.g. 1000 -> 1k 1000 -> 1천, depending on the client language
|
||||
---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here
|
||||
---@field IsDragonflight fun():boolean
|
||||
---@field IsDragonflightAndBeyond fun():boolean
|
||||
---@field IsTimewalkWoW fun():boolean
|
||||
---@field IsClassicWow fun():boolean
|
||||
---@field IsTBCWow fun():boolean
|
||||
---@field IsWotLKWow fun():boolean
|
||||
---@field IsCataWow fun():boolean
|
||||
---@field IsPandaWow fun():boolean
|
||||
---@field IsWarlordsWow fun():boolean
|
||||
---@field IsLegionWow fun():boolean
|
||||
---@field IsBFAWow fun():boolean
|
||||
---@field IsShadowlandsWow fun():boolean
|
||||
---@field IsDragonflightWow fun():boolean
|
||||
---@field IsWarWow fun():boolean
|
||||
---@field LoadSpellCache fun(self:table, hashMap:table, indexTable:table, allSpellsSameName:table) : hashMap:table, indexTable:table, allSpellsSameName:table load all spells in the game and add them into the passed tables
|
||||
---@field UnloadSpellCache fun(self:table) wipe the table contents filled with LoadSpellCache()
|
||||
---@field GetCurrentClassName fun(self:table) : string return the name of the class the player is playing
|
||||
@@ -167,7 +182,9 @@
|
||||
---@field GetCurrentSpec fun(self:table):number?
|
||||
---@field GetCurrentSpecId fun(self:table):number? return the specId of the current spec, retuns nil if the expansion the player is playing does not support specs
|
||||
---@field GetClassSpecIds fun(self:table, engClass:string):number[]
|
||||
---@field GetClassSpecIDs fun(self:table, engClass:string):number[]
|
||||
---@field IsValidSpecId fun(self:table, specId:number):boolean check if the passed specId is valid for the player class, also return false for tutorial specs
|
||||
---@field GetDragonlightTalentString fun(self:table):string return the talent config string
|
||||
---@field GetClassList fun(self:table):{ID:number, Name:string, FileString:string, Texture:string, TexCoord:number[]}[]
|
||||
---@field DebugVisibility fun(self:table, object:uiobject) print the reason why the frame isn't shown in the screen
|
||||
---@field Dispatch fun(self:table, callback:function, ...) : any dispatch a function call using xpcall, print to chat if the function passed is invalid
|
||||
|
||||
+79
-31
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 521
|
||||
local dversion = 522
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary(major, minor)
|
||||
|
||||
@@ -31,6 +31,8 @@ local UnitIsTapDenied = UnitIsTapDenied
|
||||
SMALL_NUMBER = 0.000001
|
||||
ALPHA_BLEND_AMOUNT = 0.8400251
|
||||
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
|
||||
DF.dversion = dversion
|
||||
|
||||
DF.AuthorInfo = {
|
||||
@@ -77,62 +79,104 @@ function DF:GetDefaultBackdropColor()
|
||||
return 0.1215, 0.1176, 0.1294, 0.8
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is dragonflight
|
||||
---@return boolean
|
||||
function DF.IsDragonflight()
|
||||
if (buildInfo < 110000 and buildInfo >= 100000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is dragonflight or an expansion after it
|
||||
---@return boolean
|
||||
function DF.IsDragonflightAndBeyond()
|
||||
return select(4, GetBuildInfo()) >= 100000
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is dragonflight
|
||||
---@return boolean
|
||||
function DF.IsDragonflight()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
if (buildInfo < 110000 and buildInfo >= 100000) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is a classic version of wow
|
||||
---@return boolean
|
||||
function DF.IsTimewalkWoW()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
if (buildInfo < 40000) then
|
||||
return true
|
||||
end
|
||||
if (buildInfo < 40000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is the vanilla version of wow
|
||||
---@return boolean
|
||||
function DF.IsClassicWow()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
if (buildInfo < 20000) then
|
||||
return true
|
||||
end
|
||||
if (buildInfo < 20000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the TBC version of wow
|
||||
---@return boolean
|
||||
function DF.IsTBCWow()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
if (buildInfo < 30000 and buildInfo >= 20000) then
|
||||
return true
|
||||
end
|
||||
if (buildInfo < 30000 and buildInfo >= 20000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the WotLK version of wow
|
||||
---@return boolean
|
||||
function DF.IsWotLKWow()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
if (buildInfo < 40000 and buildInfo >= 30000) then
|
||||
return true
|
||||
end
|
||||
if (buildInfo < 40000 and buildInfo >= 30000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the Cataclysm version of wow
|
||||
---@return boolean
|
||||
function DF.IsCataWow()
|
||||
if (buildInfo < 50000 and buildInfo >= 40000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the Mists version of wow
|
||||
---@return boolean
|
||||
function DF.IsPandaWow()
|
||||
if (buildInfo < 60000 and buildInfo >= 50000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the Warlords of Draenor version of wow
|
||||
---@return boolean
|
||||
function DF.IsWarlordsWow()
|
||||
if (buildInfo < 70000 and buildInfo >= 60000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the Legion version of wow
|
||||
---@return boolean
|
||||
function DF.IsLegionWow()
|
||||
if (buildInfo < 80000 and buildInfo >= 70000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the BFA version of wow
|
||||
---@return boolean
|
||||
function DF.IsBFAWow()
|
||||
if (buildInfo < 90000 and buildInfo >= 80000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return true if the player is playing in the Shadowlands version of wow
|
||||
---@return boolean
|
||||
function DF.IsShadowlandsWow()
|
||||
if (buildInfo < 100000 and buildInfo >= 90000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is dragonflight
|
||||
---@return boolean
|
||||
function DF.IsDragonflightWow()
|
||||
if (buildInfo < 110000 and buildInfo >= 100000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
---return if the wow version the player is playing is the war within
|
||||
---@return boolean
|
||||
function DF.IsWarWow()
|
||||
if (buildInfo < 120000 and buildInfo >= 110000) then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
---return true if the player is playing in the WotLK version of wow with the retail api
|
||||
---@return boolean
|
||||
function DF.IsNonRetailWowWithRetailAPI()
|
||||
@@ -4287,6 +4331,9 @@ local specs_per_class = {
|
||||
}
|
||||
|
||||
|
||||
---return an array table with the spec ids the class can have
|
||||
---@param engClass string
|
||||
---@return table
|
||||
function DF:GetClassSpecIDs(engClass)
|
||||
return specs_per_class[engClass]
|
||||
end
|
||||
@@ -4320,7 +4367,6 @@ local getDragonflightTalents = function()
|
||||
|
||||
local treeInfo = C_Traits.GetTreeInfo(configId, configInfo.treeIDs[1])
|
||||
local treeHash = C_Traits.GetTreeHash(treeInfo.ID)
|
||||
|
||||
local serializationVersion = C_Traits.GetLoadoutSerializationVersion()
|
||||
|
||||
DF.TalentExporter:WriteLoadoutHeader(exportStream, serializationVersion, currentSpecID, treeHash)
|
||||
@@ -4329,12 +4375,14 @@ local getDragonflightTalents = function()
|
||||
return exportStream:GetExportString()
|
||||
end
|
||||
|
||||
--/dump DetailsFramework:GetDragonlightTalentExportString()
|
||||
--/dump DetailsFramework:GetDragonlightTalentString()
|
||||
function DF:GetDragonlightTalentString()
|
||||
local talentString, errorText = pcall(getDragonflightTalents)
|
||||
if (errorText) then
|
||||
local runOkay, errorText = pcall(getDragonflightTalents)
|
||||
if (not runOkay) then
|
||||
DF:Msg("error 0x4517", errorText)
|
||||
return ""
|
||||
else
|
||||
local talentString = errorText
|
||||
return talentString
|
||||
end
|
||||
end
|
||||
|
||||
@@ -863,6 +863,7 @@ local segmentTypeToString = {
|
||||
end
|
||||
|
||||
---Return how many attempts were made for this boss
|
||||
---@param self combat
|
||||
---@return number|nil
|
||||
function classCombat:GetTryNumber()
|
||||
---@type bossinfo
|
||||
@@ -872,6 +873,32 @@ local segmentTypeToString = {
|
||||
end
|
||||
end
|
||||
|
||||
---Return the percentage of the boss health when the combat ended
|
||||
---1 = 100% 0.5 = 50%
|
||||
---@param self combat
|
||||
---@return number
|
||||
function classCombat:GetBossHealth()
|
||||
return self.boss_hp
|
||||
end
|
||||
|
||||
---Get the boss name
|
||||
---@param self combat
|
||||
---@return string?
|
||||
function classCombat:GetBossName()
|
||||
return self.bossName
|
||||
end
|
||||
|
||||
---Return the current phase of the combat or which phase the combat was when it ended
|
||||
---@param self combat
|
||||
---@return number
|
||||
function classCombat:GetCurrentPhase()
|
||||
local phaseData = self.PhaseData
|
||||
local lastPhase = #phaseData
|
||||
--the phase data has on its first index the ID of the phase and on the second the time when it started
|
||||
local lastPhaseId = phaseData[lastPhase][1]
|
||||
return lastPhaseId
|
||||
end
|
||||
|
||||
---copy deaths from combat2 into combat1
|
||||
---if bMythicPlus is true it'll check if the death has mythic plus death time and use it instead of the normal death time
|
||||
---@param combat1 combat
|
||||
@@ -896,6 +923,11 @@ local segmentTypeToString = {
|
||||
--return the total of a specific attribute
|
||||
local power_table = {0, 1, 3, 6, 0, "alternatepower"}
|
||||
|
||||
---return the total of a specific attribute, example: total damage, total healing, total resources, etc
|
||||
---@param attribute number
|
||||
---@param subAttribute number
|
||||
---@param onlyGroup boolean?
|
||||
---@return number
|
||||
function classCombat:GetTotal(attribute, subAttribute, onlyGroup)
|
||||
if (attribute == 1 or attribute == 2) then
|
||||
if (onlyGroup) then
|
||||
@@ -936,6 +968,20 @@ local segmentTypeToString = {
|
||||
return alternatePowerTable
|
||||
end
|
||||
|
||||
---transfer talents from Details talent cache to the combat combat
|
||||
---@param self combat
|
||||
function classCombat:StoreTalents()
|
||||
local talentStorage = Details.cached_talents
|
||||
local damageContainer = self:GetContainer(DETAILS_ATTRIBUTE_DAMAGE)
|
||||
for idx, actorObject in damageContainer:ListActors() do
|
||||
local thisActorTalents = talentStorage[actorObject.serial]
|
||||
if (thisActorTalents) then
|
||||
local actorName = actorObject:Name()
|
||||
self.playerTalents[actorName] = thisActorTalents
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--delete an actor from the combat ~delete ~erase ~remove
|
||||
function classCombat:DeleteActor(attribute, actorName, removeDamageTaken, cannotRemap)
|
||||
local container = self[attribute]
|
||||
@@ -1026,6 +1072,15 @@ function classCombat:CreateNewCombatTable()
|
||||
return classCombat:NovaTabela()
|
||||
end
|
||||
|
||||
local getBossName = function()
|
||||
if (UnitExists("boss1") and Details.in_combat) then
|
||||
local bossName = UnitName("boss1")
|
||||
if (bossName) then
|
||||
Details:GetCurrentCombat().bossName = bossName
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---class constructor
|
||||
---@param bTimeStarted boolean if true set the start time to now with GetTime
|
||||
---@param overallCombatObject combat
|
||||
@@ -1084,11 +1139,17 @@ function classCombat:NovaTabela(bTimeStarted, overallCombatObject, combatId, ...
|
||||
|
||||
combatObject.boss_hp = 1
|
||||
|
||||
C_Timer.After(0.5, getBossName)
|
||||
|
||||
combatObject.bossTimers = {}
|
||||
|
||||
---store trinket procs
|
||||
combatObject.trinketProcs = {}
|
||||
|
||||
--store talents of players
|
||||
---@type table<actorname, string>
|
||||
combatObject.playerTalents = {}
|
||||
|
||||
---store the amount of casts of each player
|
||||
---@type table<actorname, table<spellname, number>>
|
||||
combatObject.amountCasts = {}
|
||||
|
||||
@@ -339,6 +339,7 @@
|
||||
local combatCounter = Details:GetOrSetCombatId(1)
|
||||
|
||||
--create a new combat object and preplace the current one
|
||||
---@type combat
|
||||
local newCombatObject = Details.combate:NovaTabela(true, Details.tabela_overall, combatCounter, ...)
|
||||
Details:SetCurrentCombat(newCombatObject)
|
||||
|
||||
@@ -771,6 +772,9 @@
|
||||
if (not bShouldForceDiscard and (zoneType == "none" or tempo_do_combate >= Details.minimum_combat_time or not segmentsTable[1])) then
|
||||
--combat accepted
|
||||
Details.tabela_historico:AddCombat(currentCombat) --move a tabela atual para dentro do hist�rico
|
||||
|
||||
currentCombat:StoreTalents()
|
||||
|
||||
if (currentCombat.is_boss) then
|
||||
if (IsInRaid()) then
|
||||
local cleuID = currentCombat.is_boss.id
|
||||
|
||||
@@ -1919,6 +1919,9 @@ function _detalhes:IlvlFromNetwork (player, realm, core, serialNumber, itemLevel
|
||||
if (talentsSelected[1]) then
|
||||
_detalhes.cached_talents[serialNumber] = talentsSelected
|
||||
end
|
||||
|
||||
elseif (type(talentsSelected) == "string" and talentsSelected ~= "") then
|
||||
_detalhes.cached_talents[serialNumber] = talentsSelected
|
||||
end
|
||||
|
||||
--store the spec the player is playing
|
||||
|
||||
+69
-12
@@ -3,6 +3,9 @@
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
local _
|
||||
|
||||
---@type detailsframework
|
||||
local detailsFramework = DetailsFramework
|
||||
|
||||
--register namespace
|
||||
Details.network = {}
|
||||
|
||||
@@ -77,6 +80,30 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--item level
|
||||
|
||||
local getHorizontalTalentsAsString = function()
|
||||
local talents = ""
|
||||
for i = 1, 7 do
|
||||
for o = 1, 3 do
|
||||
local talentID, name, texture, selected, available = GetTalentInfo(i, o, 1)
|
||||
if (selected) then
|
||||
talents = "" .. talentID .. ","
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--remove the comma after the last talent id
|
||||
if (talents:sub(-1) == ",") then
|
||||
talents = talents:sub(1, -2)
|
||||
end
|
||||
|
||||
return talents
|
||||
end
|
||||
|
||||
---send item level data to the group the player is in
|
||||
---@param self details
|
||||
---@return nil
|
||||
function Details:SendCharacterData()
|
||||
--only send if in group
|
||||
if (not IsInGroup() and not IsInRaid()) then
|
||||
@@ -87,7 +114,8 @@
|
||||
return
|
||||
end
|
||||
|
||||
--check the player level
|
||||
--check the player level to be at least 60
|
||||
---@type number
|
||||
local playerLevel = UnitLevel("player")
|
||||
if (not playerLevel) then
|
||||
return
|
||||
@@ -97,23 +125,52 @@
|
||||
|
||||
--delay to sent information again
|
||||
if (Details.LastPlayerInfoSync and Details.LastPlayerInfoSync + 10 > GetTime()) then
|
||||
--do not send info if recently sent
|
||||
--do not send info if it was recently sent
|
||||
return
|
||||
end
|
||||
|
||||
--get player item level
|
||||
--get the equipped player item level
|
||||
local overall, equipped = GetAverageItemLevel()
|
||||
|
||||
local talentsAsString = ""
|
||||
|
||||
--get player talents
|
||||
local talents = {}
|
||||
for i = 1, 7 do
|
||||
for o = 1, 3 do
|
||||
local talentID, name, texture, selected, available = GetTalentInfo(i, o, 1)
|
||||
if (selected) then
|
||||
tinsert(talents, talentID)
|
||||
break
|
||||
--depending on the game version, the talent API is different
|
||||
|
||||
--vertical tree
|
||||
if (DetailsFramework.IsClassicWow()) then --vanilla
|
||||
talentsAsString = ""
|
||||
|
||||
elseif (DetailsFramework.IsTBCWow()) then --burning crusade
|
||||
talentsAsString = ""
|
||||
|
||||
elseif (DetailsFramework.IsWotLKWow()) then --wrath of the lich king
|
||||
talentsAsString = ""
|
||||
|
||||
elseif (DetailsFramework.IsCataWow()) then --cataclysm
|
||||
talentsAsString = ""
|
||||
end
|
||||
|
||||
--horizontal pick one
|
||||
if (DetailsFramework.IsPandaWow()) then
|
||||
talentsAsString = getHorizontalTalentsAsString()
|
||||
|
||||
elseif (DetailsFramework.IsWarlordsWow()) then
|
||||
talentsAsString = getHorizontalTalentsAsString()
|
||||
|
||||
elseif (DetailsFramework.IsLegionWow()) then
|
||||
talentsAsString = getHorizontalTalentsAsString()
|
||||
|
||||
elseif (DetailsFramework.IsBFAWow()) then
|
||||
talentsAsString = getHorizontalTalentsAsString()
|
||||
|
||||
elseif (DetailsFramework.IsShadowlandsWow()) then
|
||||
talentsAsString = getHorizontalTalentsAsString()
|
||||
end
|
||||
|
||||
--vertical, horizonal tree
|
||||
if (DetailsFramework.IsDragonflight()) then
|
||||
talentsAsString = detailsFramework:GetDragonlightTalentString()
|
||||
end
|
||||
|
||||
--get the spec ID
|
||||
@@ -130,13 +187,13 @@
|
||||
local serial = UnitGUID("player")
|
||||
|
||||
if (IsInRaid()) then
|
||||
Details:SendRaidData(CONST_ITEMLEVEL_DATA, serial, equipped, talents, currentSpec)
|
||||
Details:SendRaidData(CONST_ITEMLEVEL_DATA, serial, equipped, talentsAsString, currentSpec)
|
||||
if (Details.debugnet) then
|
||||
Details:Msg("(debug) sent ilevel data to Raid")
|
||||
end
|
||||
|
||||
elseif (IsInGroup()) then
|
||||
Details:SendPartyData(CONST_ITEMLEVEL_DATA, serial, equipped, talents, currentSpec)
|
||||
Details:SendPartyData(CONST_ITEMLEVEL_DATA, serial, equipped, talentsAsString, currentSpec)
|
||||
if (Details.debugnet) then
|
||||
Details:Msg("(debug) sent ilevel data to Party")
|
||||
end
|
||||
|
||||
@@ -2119,6 +2119,8 @@ local iconFrame_OnEnter = function(self)
|
||||
Details:AddTooltipHeaderStatusbar()
|
||||
|
||||
local talentString = ""
|
||||
|
||||
if (type(talents) == "table") then
|
||||
if (talents and not (DetailsFramework.IsClassicWow() or DetailsFramework.IsTBCWow() or DetailsFramework.IsWotLKWow())) then
|
||||
for i = 1, #talents do
|
||||
local talentID, talentName, texture, selected, available = GetTalentInfoByID(talents [i])
|
||||
@@ -2127,6 +2129,7 @@ local iconFrame_OnEnter = function(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local gotInfo
|
||||
local localizedItemLevelString = _G.STAT_AVERAGE_ITEM_LEVEL
|
||||
@@ -6628,7 +6631,8 @@ local buildSegmentTooltip = function(self, deltaTime)
|
||||
elseif (bossInfo.killed) then
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "lime", combatTimeColor)
|
||||
else
|
||||
gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "orange", combatTimeColor)
|
||||
--include phase string: "P" .. thisCombat:GetCurrentPhase() .. " " ..
|
||||
gameCooltip:AddLine(combatName, math.floor(thisCombat:GetBossHealth()*100) .. "%", 1, "orange", combatTimeColor) --formattedElapsedTime
|
||||
end
|
||||
|
||||
gameCooltip:AddIcon(combatIcon, "main", "left")
|
||||
|
||||
@@ -943,17 +943,21 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
|
||||
readyFrame.DungeonBackdropTexture:SetTexture(overallMythicDungeonCombat.is_mythic_dungeon.DungeonTexture)
|
||||
end
|
||||
|
||||
|
||||
wipe(readyFrame.playerCacheByName)
|
||||
|
||||
if (Details222.MythicPlus.OnTime) then
|
||||
readyFrame.YouBeatTheTimerLabel:SetFormattedText(CHALLENGE_MODE_COMPLETE_BEAT_TIMER .. " | " .. CHALLENGE_MODE_COMPLETE_KEYSTONE_UPGRADED, Details222.MythicPlus.KeystoneUpgradeLevels) --"You beat the timer!"
|
||||
readyFrame.YouBeatTheTimerLabel.textcolor = "limegreen"
|
||||
--readyFrame.KeystoneUpgradeLabel:SetFormattedText(CHALLENGE_MODE_COMPLETE_KEYSTONE_UPGRADED, Details222.MythicPlus.KeystoneUpgradeLevels)
|
||||
PlaySound(SOUNDKIT.UI_70_CHALLENGE_MODE_KEYSTONE_UPGRADE)
|
||||
C_Timer.After(0.020, function()
|
||||
--PlaySoundFile([[Interface\AddOns\Details\sounds\bassdrop2.mp3]])
|
||||
end)
|
||||
else
|
||||
readyFrame.YouBeatTheTimerLabel.textcolor = "white"
|
||||
readyFrame.YouBeatTheTimerLabel.text = CHALLENGE_MODE_COMPLETE_TIME_EXPIRED --"Time expired!"
|
||||
--readyFrame.KeystoneUpgradeLabel.text = CHALLENGE_MODE_COMPLETE_TRY_AGAIN --"Try again! Beat the timer to upgrade your keystone!"
|
||||
PlaySound(SOUNDKIT.UI_70_CHALLENGE_MODE_COMPLETE_NO_UPGRADE)
|
||||
end
|
||||
|
||||
if (Details222.MythicPlus.NewDungeonScore and Details222.MythicPlus.OldDungeonScore) then
|
||||
|
||||
+16
-16
@@ -8,31 +8,31 @@ function Details:OnCombatPhaseChanged()
|
||||
local current_combat = Details:GetCurrentCombat()
|
||||
local current_phase = current_combat.PhaseData[#current_combat.PhaseData][1]
|
||||
|
||||
local phase_damage_container = current_combat.PhaseData.damage [current_phase]
|
||||
local phase_healing_container = current_combat.PhaseData.heal [current_phase]
|
||||
local phaseDamageContainer = current_combat.PhaseData.damage[current_phase]
|
||||
local phaseHealingContainer = current_combat.PhaseData.heal[current_phase]
|
||||
|
||||
local phase_damage_section = current_combat.PhaseData.damage_section
|
||||
local phase_healing_section = current_combat.PhaseData.heal_section
|
||||
local phaseDamageSection = current_combat.PhaseData.damage_section
|
||||
local phaseHealingSection = current_combat.PhaseData.heal_section
|
||||
|
||||
if (not phase_damage_container) then
|
||||
phase_damage_container = {}
|
||||
current_combat.PhaseData.damage [current_phase] = phase_damage_container
|
||||
if (not phaseDamageContainer) then
|
||||
phaseDamageContainer = {}
|
||||
current_combat.PhaseData.damage[current_phase] = phaseDamageContainer
|
||||
end
|
||||
if (not phase_healing_container) then
|
||||
phase_healing_container = {}
|
||||
current_combat.PhaseData.heal [current_phase] = phase_healing_container
|
||||
if (not phaseHealingContainer) then
|
||||
phaseHealingContainer = {}
|
||||
current_combat.PhaseData.heal[current_phase] = phaseHealingContainer
|
||||
end
|
||||
|
||||
for index, damage_actor in ipairs(Details.cache_damage_group) do
|
||||
local phase_damage = damage_actor.total - (phase_damage_section [damage_actor.nome] or 0)
|
||||
phase_damage_section [damage_actor.nome] = damage_actor.total
|
||||
phase_damage_container [damage_actor.nome] = (phase_damage_container [damage_actor.nome] or 0) + phase_damage
|
||||
local phase_damage = damage_actor.total - (phaseDamageSection [damage_actor.nome] or 0)
|
||||
phaseDamageSection [damage_actor.nome] = damage_actor.total
|
||||
phaseDamageContainer [damage_actor.nome] = (phaseDamageContainer [damage_actor.nome] or 0) + phase_damage
|
||||
end
|
||||
|
||||
for index, healing_actor in ipairs(Details.cache_healing_group) do
|
||||
local phase_heal = healing_actor.total - (phase_healing_section [healing_actor.nome] or 0)
|
||||
phase_healing_section [healing_actor.nome] = healing_actor.total
|
||||
phase_healing_container [healing_actor.nome] = (phase_healing_container [healing_actor.nome] or 0) + phase_heal
|
||||
local phase_heal = healing_actor.total - (phaseHealingSection [healing_actor.nome] or 0)
|
||||
phaseHealingSection [healing_actor.nome] = healing_actor.total
|
||||
phaseHealingContainer [healing_actor.nome] = (phaseHealingContainer [healing_actor.nome] or 0) + phase_heal
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ function DetailsMythicPlusFrame.SaveMythicPlusStats(combatObject)
|
||||
|
||||
---@type mythicplusrunstats
|
||||
local runStats = {
|
||||
date = time(),
|
||||
date = _G.time(),
|
||||
runTime = math.floor(time/1000),
|
||||
onTime = onTime,
|
||||
deaths = amountDeaths,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
@@ -288,6 +288,20 @@ Details.TextureAtlas = {
|
||||
nativeWidth = 512,
|
||||
nativeHeight = 512,
|
||||
},
|
||||
|
||||
["small-clock"] = {
|
||||
file = [[Interface\AddOns\Details\images\icons]],
|
||||
width = 16,
|
||||
height = 16,
|
||||
leftTexCoord = 211/512,
|
||||
rightTexCoord = 245/512,
|
||||
topTexCoord = 145/512,
|
||||
bottomTexCoord = 179/512,
|
||||
tilesHorizontally = false,
|
||||
tilesVertically = false,
|
||||
nativeWidth = 512,
|
||||
nativeHeight = 512,
|
||||
},
|
||||
}
|
||||
|
||||
C_Timer.After(1, function()
|
||||
|
||||
Reference in New Issue
Block a user