Bug fixes, Framework update, General changes to accommodate new systems.

This commit is contained in:
Tercio Jose
2024-02-26 14:12:11 -03:00
parent 483d9c6976
commit 32adc61608
34 changed files with 1801 additions and 524 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
otherplugins/
Blizzard_APIDocumentationGenerated/
.tmp.driveupload/
core/parser - FF.lua
core/parser_original.lua
core/windows - Copy.lua
+1 -1
View File
@@ -198,7 +198,7 @@ table members: name, mapid, zone@
time = combat:GetCombatTime()
@COMMENTreturns the length of the combat in seconds, if the combat is in progress, returns the current elapsed time.@
minutes, seconds = GetFormatedCombatTime()
minutes, seconds = GetMSTime()
@COMMENTreturns the combat time formated with minutes and seconds.@
startDate, endDate = combat:GetDate()
+1 -1
View File
@@ -159,7 +159,7 @@ table members: name, mapid, zone
time = combat:GetCombatTime()
returns the length of the combat in seconds, if the combat is in progress, returns the current elapsed time.
minutes, seconds = GetFormatedCombatTime()
minutes, seconds = GetMSTime()
returns the combat time formated with minutes and seconds.
startDate, endDate = combat:GetDate()
+154 -11
View File
@@ -1,4 +1,5 @@
---lower instance: each instance has an ID, starts from 1 and goes on, the lower instance is the opened instance with the lower ID.
---@alias plugintype
---| "SOLO"
@@ -50,6 +51,12 @@
---| "PLAYER_TARGET"
---| "DETAILS_PROFILE_APPLYED"
---@class mythicdungeontrashinfo
---@field ZoneName string
---@field MapID number
---@field Level number
---@field EJID number
---@class mythicdungeoninfo
---@field StartedAt number
---@field EndedAt number
@@ -105,18 +112,70 @@
---@field key6 petname pet name
---@field key7 guid pet guid
---@class bossinfo : table .is_boss on combatObjects
---@field diff_string string
---@field index number
---@field zone string
---@field encounter string
---@field mapid number
---@field try_number number
---@field name string
---@field ej_instance_id number
---@field id number
---@field unixtime unixtime
---@field diff number
---@field killed boolean
---@field bossimage texturepath|number
---@class details
---@field pets table<guid, petinfo> store the pet guid as the key and the petinfo as the value
---@field SpellTableMixin spelltablemixin
---@field GetInstance fun(self: details) : instance
---@field BreakdownWindowFrame breakdownwindow
---@field PlayerBreakdown table
---@field container_type table<containertype, string> [containertype] = "damage" or "heal" or "energy" or "utility"
---@field TextureAtlas table<atlasname, df_atlasinfo>
---@field playername string
---@field
---@field GetDisplayClassByDisplayId fun(self: details, displayId: number) : table -return the class object for the given displayId (attributeId)
---@field GetTextureAtlas fun(self: details, atlasName: atlasname) : df_atlasinfo return the texture atlas data
---@field GetTextureAtlasTable fun(self: details) : table<atlasname, df_atlasinfo>[] return the table with the texture atlas data
---@field Msg fun(self: details, msg: string) print a message to the chat frame
---@field RemoveSegmentByCombatObject fun(self: details, combatObject: combat) : boolean, combat|nil remove the passed combatObject from the segments list
---@field RemoveSegment fun(self: details, segmentIndex: number) : boolean, combat
---@field GetCombatByUID fun(self: details, uniqueCombatId: uniquecombatid) : combat|boolean get a unique combat id and return the combat object
---@field DoesCombatWithUIDExists fun(self: details, uniqueCombatId: uniquecombatid) : boolean
---@field GetOverallCombat fun(self: details) : combat return the overall combat
---@field SetCurrentCombat fun(self: details, combatObject: combat) set the current active combat
---@field GetCurrentCombat fun(self: details) : combat return the current active combat
---@field ResetSegmentData fun(self: details) reset all segments inclusing overall data
---@field ResetSegmentOverallData fun(self: details) reset only the overall data
---@field UpdateBreakdownPlayerList fun(self: details) update the player list in the breakdown window
---@field GetLowerInstanceNumber fun(self: details) : number return the lower instance number
---@field Name fun(self: details|actor, actor:actor?) : string return the name of the actor
---@field SetSpecId fun(self: actor, specId: number) set the specId of the actor
---@field GetOnlyName fun(self: details|actor, string: string?) : string return the name of the player without the realm name
---@field GetRoleIcon fun(self: details, role: role) : string, number, number, number, number return the path to a texture file and the texture coordinates for the given role
---@field GetSpecIcon fun(self: details, spec: number, useAlpha: boolean) : string, number, number, number, number return the path to a texture file and the texture coordinates for the given spec
---@field GetActiveWindowFromBreakdownWindow fun(self: details) : instance return the window (instance) that requested to open the player breakdown window
---@field OpenBreakdownWindow fun(self: details, instanceObject: instance, actorObject: actor, bFromAttributeChange: boolean?, bIsRefresh: boolean?, bIsShiftKeyDown: boolean?, bIsControlKeyDown: boolean?)
---@field GetActorObjectFromBreakdownWindow fun(self: details) : actor return the actor object that is currently shown in the breakdown window
---@field GetDisplayTypeFromBreakdownWindow fun(self: details) : number, number return the attribute and subattribute display type of the breakdown window
---@field GetCombatFromBreakdownWindow fun(self: details) : combat return the combat beaing used in the breakdown window
---@field GetInstance fun(self: details, instanceId: number) : instance return the instance object by its ID
---@field GetWindow fun(self: details) : instance this is an alias of GetInstance
---@field GetCombat fun(self: details) : combat
---@field GetSpellSchoolFormatedName fun(self: details, spellschool: spellschool) : string
---@field GetCombat fun(self: details, segmentId:any) : combat return the combat object by its segmentId
---@field GetSpellSchoolFormatedName fun(self: details, spellschool: spellschool) : string return the formated name of the spell school
---@field CommaValue fun(self: details, number: number) : string
---@field CreateEventListener fun(self: details) : table
---@field GetFullName fun(self: details, unitId: any, ambiguateString: any) : string create a CLEU compatible name of the unit passed, return string is in the format "playerName-realmName", the string will also be ambiguated using the ambiguateString passed
---@field GetTextColor fun(self:actor, instanceObject: instance, textSide: string) : number, number, number, number
---@field GetCombatSegments fun(self: details) : combat[] return a table with all the combat segments
---@field ListInstances fun(self: details) : instance[] return a table with all the instances
---@field UnpackMythicDungeonInfo fun(self: details, mythicDungeonInfo: mythicdungeoninfo) : boolean, segmentid, number, number, number, string, number, string, number, number, number unpack the mythic dungeon info and return the values
---@field
---@field
---@field
---@class detailseventlistener : table
---@field RegisterEvent fun(self: detailseventlistener, event: detailsevent, callback: function)
@@ -139,19 +198,45 @@
---@class savedspelldata : {key1: number, key2: string, key3: number}
---@class alternatepowertable : {last: number, total: number}
---@class overallsegmentadded : table
---@field name string combat name
---@field elapsed number combat time
---@field clock string start date
---@field type number combat type
---@class combat : table
---@field pvp boolean
---@field data_fim string|number
---@field data_inicio string|number
---@field tempo_start gametime
---@field segments_added overallsegmentadded[]
---@field enemy string the name of the enemy in the combat, can be boss name, encounter name
---@field contra string the name of the player enemy in a 1v1 pvp combat
---@field bossTimers table[] stored timers for bigwigs and dbm
---@field last_events_tables table[] where the death log of each player is stored
---@field
---@field
---@field
---@field
---@field __call table
---@field __index table
---@field zoneName string
---@field mapId number
---@field EncounterName string
---@field bossIcon texturepath|textureid
---@field bIsClosed boolean if true the combat is closed (passed by the EndCombat() function)
---@field __destroyedBy string
---@field amountCasts {[string]: table<string, number>}
---@field instance_type instancetype "raid" or "party" or "pvp" or "arena" or "none" or "scenario"
---@field run_time number
---@field end_time number
---@field start_time number
---@field start_time gametime
---@field end_time gametime
---@field combat_counter number
---@field is_trash boolean while in raid this is set to true if the combat isn't raid boss, in dungeon this is set to true if the combat isn't a boss or if the dungeon isn't a mythic+
---@field raid_roster table<string, string> [unitName] = unitGUID
---@field overall_added boolean is true when the combat got added into the overall combat
---@field is_mythic_dungeon_trash boolean
---@field is_mythic_dungeon mythicdungeoninfo
---@field is_mythic_dungeon_trash mythicdungeontrashinfo
---@field is_mythic_dungeon_run_id number
---@field is_mythic_dungeon_segment boolean
---@field trinketProcs table<actorname, table<spellid, {cooldown: number, total: number}>>
@@ -160,9 +245,21 @@
---@field totals_grupo {key1: table, key2: table, key3: table, key3: table}
---@field __destroyed boolean
---@field PhaseData table
---@field is_boss table
---@field is_boss bossinfo
---@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
---@field GetTryNumber fun(combat: combat) : number?
---@field GetFormattedCombatTime fun(combat: combat) : string
---@field GetMSTime fun(combat: combat) : number, number
---@field GetSegmentSlotId fun(combat: combat) : segmentid
---@field GetCombatName fun(combat: combat, bOnlyName: boolean?, bTryFind: boolean?) : string, number?, number?, number?, number? get the name of the combat
---@field GetCombatIcon fun(combat: combat) : df_atlasinfo
---@field GetTrinketProcsForPlayer fun(self: combat, playerName: string) : table<spellid, trinketprocdata> return a key|value table containing the spellId as key and a table with information about the trinket as value
---@field GetMythicDungeonTrashInfo fun(combat: combat) : mythicdungeontrashinfo
---@field IsMythicDungeon fun(combat: combat) : boolean, number return a boolean indicating if the combat is from a mythic+ dungeon, if true, also return the runId
---@field GetMythicDungeonInfo fun(combat: combat) : mythicdungeoninfo
---@field GetCombatType fun(combat: combat) : number
---@field GetCombatUID fun(combat: combat) : uniquecombatid
---@field GetTimeData fun(combat: combat, dataName: string) : table
@@ -176,7 +273,7 @@
---@field GetEndTime fun(combat: combat) : number
---@field GetDifficulty fun(combat: combat) : number return the dungeon or raid difficulty for boss fights
---@field GetEncounterCleuID fun(combat: combat) : number return the encounterId for boss fights, this number is gotten from the ENCOUNTER_START event
---@field GetBossInfo fun(combat: combat) : table a table containing many informations about the boss fight
---@field GetBossInfo fun(combat: combat) : bossinfo a table containing many informations about the boss fight
---@field SetEndTime fun(combat: combat, time: number)
---@field CopyDeathsFrom fun(combat1: combat, combat2: combat, bMythicPlus: boolean) copy the deaths from combat2 to combat1, use true on bMythicPlus if the combat is from a mythic plus run
---@field GetContainer fun(combat: combat, containerType: containertype) : actorcontainer get an actorcontainer, containerType can be 1 for damage, 2 heal, 3 resources, 4 utility
@@ -187,11 +284,14 @@
---@field GetActor fun(combat: combat, containerType: number, playerName: string) : actor
---@field CreateAlternatePowerTable fun(combat: combat, actorName: string) : alternatepowertable
---@field GetCombatNumber fun(combat: combat) : number get a unique number representing the combatId, each combat has a unique number
---@field SetDate fun(combat: combat, startDate: string, endDate: string) set the start and end date of the combat, format: "H:M:S"
---@field SetDate fun(combat: combat, startDate: string?, endDate: string?) set the start and end date of the combat, format: "H:M:S"
---@field GetDate fun(combat: combat) : string, string get the start and end date of the combat, format: "H:M:S"
---@field GetRoster fun(combat: combat) : table<string, string> get the roster of the combat, the table contains the names of the players in the combat
---@field InstanceType fun(combat: combat) : string get the instance type of the combat, can be "raid" or "party" or "pvp" or "arena" or "none"
---@field GetInstanceType fun(combat: combat) : instancetype get the instance type of the combat, can be "raid" or "party" or "pvp" or "arena" or "none"
---@field IsTrash fun(combat: combat) : boolean is true if the combat is a trash combat
---@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"
---@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
@@ -373,6 +473,10 @@
---@field freezed boolean
---@field sub_atributo_last table
---@field row_info table
---@field
---@field
---@field
---@field GetActorBySubDisplayAndRank fun(self: instance, displayid: attributeid, subDisplay: attributeid, rank: number) : actor
---@field GetSize fun(instance: instance) : width, height
---@field GetInstanceGroup fun() : table
---@field GetCombat fun(instance: instance)
@@ -407,6 +511,10 @@
---@field maxTime number
---@field averageTime number
---@class trinketprocdata : table
---@field cooldown number
---@field total number
---@class tabframe : frame this is the tab frame object for the breakdown window
---@class breakdownwindow : frame
@@ -415,6 +523,7 @@
---@field BreakdownPluginSelectionFrame frame frame which has buttons to select a plugin to show in the breakdown window
---@field BreakdownTabsFrame frame where the tab buttons are located (parent frame)
---@field RegisteredPluginButtons button[] table which contains plugins buttons that are registered to the breakdown window
---@field PlayerSelectionHeader df_headerframe
---@field RefreshPlayerScroll fun() refresh the player scroll frame (shown in the left side of the breakdown window)
---@field RegisterPluginButton fun(button: button, pluginObject: table, pluginAbsolutename: string) register a plugin button to the breakdown window
---@field GetShownPluginObject fun() : table get the plugin object that is currently shown in the breakdown window
@@ -429,15 +538,41 @@
---@class breakdownexpandbutton : button
---@field texture texture
---@class breakdownsegmentline : button
---@field segmentText df_label
---@field segmentIcon df_image
---@field UpdateLine function
---@field combatUniqueID uniquecombatid
---@field isSelected boolean
---@class breakdownsegmentdata
---@field UID uniquecombatid
---@field combatName string
---@field combatIcon df_atlasinfo
---@field r number
---@field g number
---@field b number
---has formartted data to use while reporting data from the breakdown
---@class breakdownreportdata : table
---@field name string
---@field amount string
---@field percent string
---@class breakdownreporttable : table contains 'title' with a string as title of the report and in the indexed part breakdownreporttable[]
---@field title string the title of the report to send before the report data
---@class breakdownspellscrollframe : df_scrollboxmixin, scrollframe
---@field Header df_headerframe
---@field RefreshMe fun(scrollFrame: breakdownspellscrollframe, data: table|nil)
---@field SortKey string
---@field SortOrder string
---@field RefreshMe fun(scrollFrame: breakdownspellscrollframe, data: table|nil)
---@field GetReportData fun(scrollFrame: breakdownphasescrollframe) : breakdownreportdata[]
---@class breakdowntargetscrollframe : df_scrollboxmixin, scrollframe
---@field Header df_headerframe
---@field RefreshMe fun(scrollFrame: breakdowntargetscrollframe, data: table|nil)
---@field GetReportData fun(scrollFrame: breakdownphasescrollframe) : breakdownreportdata[]
---@class breakdowngenericscrollframe : df_scrollboxmixin, scrollframe
---@field Header df_headerframe
@@ -446,6 +581,7 @@
---@class breakdownphasescrollframe : df_scrollboxmixin, scrollframe
---@field Header df_headerframe
---@field RefreshMe fun(scrollFrame: breakdownphasescrollframe, data: table|nil)
---@field GetReportData fun(scrollFrame: breakdownphasescrollframe) : breakdownreportdata[]
---@class breakdownphasebar : button, df_headerfunctions
---@field index number
@@ -582,6 +718,11 @@
---@field centerText fontstring
---@field rightText fontstring
---@class reportoverlaybutton : button
---@field scrollFrame df_scrollbox
---@field reportText fontstring
---@field backgroundTexture texture
---@class breakdownspelltab
---@field selectedSpellBar breakdownspellbar
---@field TabFrame breakdownspellstab
@@ -597,6 +738,7 @@
---@field PhaseContainerFrame df_framecontainer
---@field GenericContainerFrameLeft df_framecontainer
---@field GenericContainerFrameRight df_framecontainer
---@field ReportOverlays reportoverlaybutton[]
---@field GetActor fun() : actor
---@field GetCombat fun() : combat
---@field GetInstance fun() : instance
@@ -623,6 +765,7 @@
---@field CreateSpellScrollContainer fun(tabFrame: tabframe) : breakdownspellscrollframe
---@field CreateTargetBar fun(self: breakdowntargetscrollframe, index: number) : breakdowntargetbar
---@field CreateSpellBar fun(self: breakdownspellscrollframe, index: number) : breakdownspellbar
---@field SetShownReportOverlay fun(bIsShown: boolean)
---@class timemachine : table
---@field Ticker fun() runs each second and check if actors are performing damage and healing actions, if the actor isn't, stop the activity time of that actor
+1
View File
@@ -34,6 +34,7 @@ indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\events.lua
+1
View File
@@ -31,6 +31,7 @@ indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\private.lua
+1
View File
@@ -31,6 +31,7 @@ indent.lua
core\util.lua
functions\mixin.lua
API.lua
textures.lua
functions\ej_cache.lua
functions\private.lua
+15 -19
View File
@@ -381,6 +381,8 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin)
end
end
local noColor = {1, 1, 1, 1}
---add an icon to the left of the button text
---short method truncates the text: false = do nothing, nil = increate the button width, 1 = decrease the font size, 2 = truncate the text
---@param texture any
@@ -403,6 +405,16 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin)
self.widget.text:SetPoint("left", self.icon, "right", textDistance or 2, 0 + (textHeight or 0))
end
overlay = overlay or noColor
local red, green, blue, alpha = detailsFramework:ParseColors(overlay or noColor)
local left, right, top, bottom = texcoord and texcoord[1], texcoord and texcoord[2], texcoord and texcoord[3], texcoord and texcoord[4]
texture, width, height, left, right, top, bottom, red, green, blue, alpha = detailsFramework:ParseTexture(texture, width, height, left, right, top, bottom, red, green, blue, alpha)
if (red == nil) then
red, green, blue, alpha = 1, 1, 1, 1
end
if (type(texture) == "string") then
local isAtlas = C_Texture.GetAtlasInfo(texture)
if (isAtlas) then
@@ -414,33 +426,17 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin)
else
self.icon:SetTexture(texture)
end
elseif (type(texture) == "table") then
local r, g, b, a = detailsFramework:ParseColors(texture)
self.icon:SetColorTexture(r, g, b, a)
else
self.icon:SetTexture(texture)
end
self.icon:SetSize(width or self.height * 0.8, height or self.height * 0.8)
self.icon:SetDrawLayer(layout or "artwork")
if (texcoord) then
self.icon:SetTexCoord(unpack(texcoord))
else
self.icon:SetTexCoord(0, 1, 0, 1)
end
self.icon:SetTexCoord(left, right, top, bottom)
if (overlay) then
if (type(overlay) == "string") then
local r, g, b, a = detailsFramework:ParseColors(overlay)
self.icon:SetVertexColor(r, g, b, a)
else
self.icon:SetVertexColor(unpack(overlay))
end
else
self.icon:SetVertexColor(1, 1, 1, 1)
end
self.icon:SetVertexColor(red, green, blue, alpha)
local buttonWidth = self.button:GetWidth()
local iconWidth = self.icon:GetWidth()
+15 -3
View File
@@ -4,6 +4,8 @@ if (not DF or not DetailsFrameworkCanLoad) then
return
end
local detailsFramework = DF
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local _
@@ -15,7 +17,7 @@ local max = math.max
--api locals
local PixelUtil = PixelUtil or DFPixelUtil
local version = 20
local version = 21
local CONST_MENU_TYPE_MAINMENU = "main"
local CONST_MENU_TYPE_SUBMENU = "sub"
@@ -3178,9 +3180,19 @@ function DF:CreateCoolTip()
if (gameCooltip.Indexes == 0) then
return gameCooltip:PrintDebug("AddIcon() requires an already added line (Cooltip:AddLine()).")
end
--check data integrity
if ((type(iconTexture) ~= "string" and type(iconTexture) ~= "number") and (type(iconTexture) ~= "table" or not iconTexture.GetObjectType or iconTexture:GetObjectType() ~= "Texture")) then
return gameCooltip:PrintDebug("AddIcon() invalid parameters.")
local bCheckTextureObject = true
if (not detailsFramework:IsTexture(iconTexture, bCheckTextureObject)) then
return gameCooltip:PrintDebug("AddIcon() invalid texture.")
end
--parse the texure
local red, green, blue, alpha
iconTexture, iconWidth, iconHeight, leftCoord, rightCoord, topCoord, bottomCoord, red, green, blue, alpha = detailsFramework:ParseTexture(iconTexture, iconWidth, iconHeight, leftCoord, rightCoord, topCoord, bottomCoord, overlayColor)
if (not overlayColor and red) then
overlayColor = {red, green, blue, alpha}
end
side = side or 1
+54 -2
View File
@@ -36,6 +36,15 @@
---@field RegisterTableKeyWithLocTable fun(table:table, key:any, locTable:table, silence:boolean?)
---@field RegisterObjectWithLocTable fun(object:uiobject, locTable:table, silence:boolean?)
---@class df_atlasinfo : atlasinfo
---@field vertexRed number?
---@field vertexGreen number?
---@field vertexBlue number?
---@field vertexAlpha number?
---@field colorName string?
---@field nativeWidth number?
---@field nativeHeight number?
---@alias templatetype
---| "font"
---| "dropdown"
@@ -56,11 +65,13 @@
---@field KeybindMixin df_keybindmixin
---@field ScriptHookMixin df_scripthookmixin
---@field EditorMixin df_editormixin
---@field ScrollBoxFunctions df_scrollboxmixin
---@field ClassCache {ID:number, Name:string, FileString:string, Texture:string, TexCoord:number[]}[] only available after calling GetClassList()
---@field Math df_math
---@field FontOutlineFlags table<outline, boolean>
---@field table df_table_functions
---@field AnchorPoints string[]
---@field alias_text_colors table<string, number[]>
---@field ClassFileNameToIndex table<string, number> engClass -> classIndex
---@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()
@@ -108,7 +119,8 @@
---@field AddTextureToText fun(text:string, textureInfo:table, bAddSpace:boolean?, bAddAfterText:boolean) : string textureInfo is a table with .texture .width .height .coords{left, right, top, bottom}
---@field CreateTextureInfo fun(texture:atlasname|texturepath|textureid, width:number?, height:number?, left:number?, right:number?, top:number?, bottom:number?, imageWidthnumber?, imageHeightnumber?) : table
---@field ApplyStandardBackdrop fun(self:table, frame:frame, bUseSolidColor:boolean?, alphaScale:number?)
---@field CreateLabel fun(self:table, parent:frame, text:string, size:number?, color:any?, font:string?, member:string?, name:string?, layer:drawlayer?) : df_label
---@field NewLabel fun(self:table, parent:frame, container:frame, name:string?, member:string?, text:string|table, font:string?, size:any?, color:any?, layer:drawlayer?) : df_label
---@field CreateLabel fun(self:table, parent:frame, text:string, size:any?, color:any?, font:string?, member:string?, name:string?, layer:drawlayer?) : df_label
---@field CreateDropDown fun(self:table, parent:frame, func:function, default:any, width:number?, height:number?, member:string?, name:string?, template:table?) : df_dropdown
---@field CreateFontDropDown fun(self:table, parent:frame, func:function, default:any, width:number?, height:number?, member:string?, name:string?, template:table?) : df_dropdown
---@field CreateColorDropDown fun(self:table, parent:frame, func:function, default:any, width:number?, height:number?, member:string?, name:string?, template:table?) : df_dropdown
@@ -118,7 +130,7 @@
---@field CreateTextEntry fun(self:table, parent:frame, textChangedCallback:function, width:number, height:number, member:string?, name:string?, labelText:string?, textentryTemplate:table?, labelTemplate:table?) : df_textentry
---@field ReskinSlider fun(self:table, slider:frame)
---@field GetAvailableSpells fun(self:table) : table<spellid, boolean>
---@field NewColor fun(self:table, colorName:string, red:number, green:number, blue:number, alpha:number)
---@field NewColor fun(self:table, colorName:string, red:number, green:number, blue:number, alpha:number?) : table
---@field CreateKeybindFrame fun(self:table, parent:frame, name:string?, options:table?, setKeybindCallback:function?, keybindData:table?) : df_keybindframe
---@field CreateStatusBar fun(self:table, parent:frame, options:table?) : frame
---@field GetTemplate fun(self:table, templateType:templatetype, templateName:string) : table
@@ -153,9 +165,49 @@
---@field CreateSlider fun(self:table, parent:frame, width:number?, height:number?, minValue:number?, maxValue:number?, step:number?, defaultv:number?, isDecemal:boolean?, member:string?, name:string?, label:string?, sliderTemplate:string|table?, labelTemplate:string|table?) : df_slider, df_label?
---@field CreateFrameContainer fun(self:table, parent:frame, options:table?, frameName:string?) : df_framecontainer create a frame container, which is a frame that envelops another frame, and can be moved, resized, etc.
---@field CreateAnimation fun(self:table, animationGroup:animationgroup, animationType:animationtype, order:number, duration:number, arg1:any, arg2:any, arg3:any, arg4:any, arg5:any, arg6:any, arg7:any, arg8:any) : animation
---@field NewImage fun(self:table, parent:frame, texture:atlasname|texturepath|textureid|df_gradienttable|nil, width:number?, height:number?, layer:drawlayer?, texCoord:table?, member:string?, name:string?) : df_image
---@field CreateTexture fun(self:table, parent:frame, texture:atlasname|texturepath|textureid|nil, width:number?, height:number?, layer:drawlayer?, coords:table?, member:string?, name:string?) : df_image
---@field CreateImage fun(self:table, parent:frame, texture:atlasname|texturepath|textureid|nil, width:number?, height:number?, layer:drawlayer?, coords:table?, member:string?, name:string?) : df_image
---@field CreateFrameShake fun(self:table, parent:uiobject, duration:number?, amplitude:number?, frequency:number?, absoluteSineX:boolean?, absoluteSineY:boolean?, scaleX:number?, scaleY:number?, fadeInTime:number?, fadeOutTime:number?, anchorPoints:table?) : df_frameshake
---@field SetTexCoordFromAtlasInfo fun(self:table, texture:texture, atlasInfo:atlasinfo) : nil
---@field TruncateNumber fun(self:table, number:number, fractionDigits:number) : number
---@field GetNpcIdFromGuid fun(self:table, GUID:string) : number
---@field SortOrder1 fun(t1:table, t2:table) : boolean
---@field SortOrder2 fun(t1:table, t2:table) : boolean
---@field SortOrder3 fun(t1:table, t2:table) : boolean
---@field SortOrder1R fun(t1:table, t2:table) : boolean
---@field SortOrder2R fun(t1:table, t2:table) : boolean
---@field SortOrder3R fun(t1:table, t2:table) : boolean
---@field Trim fun(self:table, string:string) : string
---@field trim fun(self:table, string:string) : string
---@field TruncateTextSafe fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field TruncateText fun(self:table, fontString:fontstring, maxWidth:number) : nil
---@field CleanTruncateUTF8String fun(self:table, text:string) : string
---@field GetSpellBookSpells fun(self:table) : table<string, boolean>, spellid[] return a list of spells from the player spellbook
---@field PreviewTexture fun(self:table, texture:atlasname|texturepath|textureid, left:number?, right:number?, top:number?, bottom:number?) : nil
---@field SetAtlas fun(self:table, textureObject:texture, atlas:atlasinfo|atlasname, useAtlasSize:boolean?, filterMode:texturefilter?, resetTexCoords:boolean?) : nil
---@field CreateAtlas fun(self:table, file:texturepath|textureid, width:number?, height:number?, leftTexCoord:number?, rightTexCoord:number?, topTexCoord:number?, bottomTexCoord:number?, tilesHorizontally:boolean?, tilesVertically:boolean?, vertexRed:any, vertexGreen:number?, vertexBlue:number?, vertexAlpha:number?) : atlasinfo
---@field ParseTexture fun(self:table, texture:texturepath|textureid|atlasname|atlasinfo, width: number?, height: number?, leftTexCoord: number?, rightTexCoord: number?, topTexCoord: number?, bottomTexCoord: number?, vertexRed:number|string?, vertexGreenvertexRed:number?, vertexBluevertexRed:number?, vertexAlphavertexRed:number?) : any, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?, number?
---@field IsTexture fun(self:table, texture:any, bCheckTextureObject: boolean?) : boolean
---@field CreateAtlasString fun(self:table, atlas:atlasinfo|atlasname, textureHeight:number?, textureWidth:number?) : string
---@field
--[=[
Wrapped objects: when using the following functions, the object will be wrapped in a table, e.g. detailsFramework:CreateButton() will return a table with the button, the button will be accessible through the "button" key.
The wrapper table will have the same metatable as the wrapped object, so you can call methods on the wrapper table as if it was the wrapped object.
Example: local myButton = detailsFramework:CreateButton(); myButton:SetSize(100, 100) => will call SetSize(100, 100) on the button wrapped.
The wrapped object will be accessible through the "widget" key, e.g. local myButton = detailsFramework:CreateButton(); local actualButtonUIObject = myButton.widget.
Wrapped objects can give errors when used in some situations, like when passing them to the game API, in this case, you can use the "widget" key to access the actual object. This is very common on SetPoint calls where the game API expects a frame, not a table. Error exammple with SetPoints: "SetPoint(): Wrong object type for function".
The following functions will return a wrapped object:
- CreateButton, NewButton
- CreateColorPickButton
- CreateTexture, CreateImage, NewImage
- CreateSearchBox, NewSpellEntry, NewTextEntry, CreateTextEntry
- NewDropDown, CreateDropDown, CreateFontDropDown, CreateColorDropDown, CreateOutlineDropDown, CreateAnchorPointDropDown
- NewPanel, CreatePanel
- CreateSwitch, NewSwitch, NewSlider, CreateSlider
- NewLabel, CreateLabel
- NewSplitBar, CreateSplitBar
- CreateTimeBar
--]=]
+34 -4
View File
@@ -1,6 +1,6 @@
local dversion = 515
local dversion = 516
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -1166,6 +1166,8 @@ function DF:CleanUpName(name)
name = DF:RemoveRealmName(name)
name = DF:RemoveOwnerName(name)
name = name:gsub("%[%*%]%s", "")
--remove texture escape sequence
name = name:gsub("|T.-|t", "")
return name
end
@@ -1599,7 +1601,9 @@ function DF.SortOrder3R(t1, t2)
return t1[3] < t2[3]
end
--return a list of spells from the player spellbook
---return a list of spells from the player spellbook
---@return table<string, boolean> spellNamesInSpellBook
---@return spellid[] spellIdsInSpellBook
function DF:GetSpellBookSpells()
local spellNamesInSpellBook = {}
local spellIdsInSpellBook = {}
@@ -2036,10 +2040,15 @@ end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--colors
--add a new color name, the color can be query using DetailsFramework:ParseColors(colorName)
---add a new color name, the color can be query using DetailsFramework:ParseColors(colorName)
---@param colorName string
---@param red number
---@param green number
---@param blue number
---@param alpha number?
---@return table
function DF:NewColor(colorName, red, green, blue, alpha)
assert(type(colorName) == "string", "DetailsFramework:NewColor(): colorName must be a string.")
--assert(not DF.alias_text_colors[colorName], "DetailsFramework:NewColor(): colorName already exists.")
red, green, blue, alpha = DetailsFramework:ParseColors(red, green, blue, alpha)
local colorTable = DetailsFramework:FormatColor("table", red, green, blue, alpha)
@@ -5075,3 +5084,24 @@ function _G.__benchmark(bNotPrintResult)
end
end
function DF:PreviewTexture(texture, left, right, top, bottom)
local preview = DetailsFrameworkTexturePreview or CreateFrame("frame", "DetailsFrameworkTexturePreview", UIParent)
preview:SetSize(200, 200)
preview:SetPoint("center")
preview.texture = DetailsFrameworkTexturePreviewTexture or preview:CreateTexture("DetailsFrameworkTexturePreviewTexture", "artwork")
preview.texture:SetAllPoints()
--check if the texture passed is an atlas
if (type(texture) == "string" and C_Texture.GetAtlasInfo(texture)) then
preview.texture:SetAtlas(texture)
elseif (type(texture) == "table") then
preview.texture:SetTexture(texture.file or texture.filename)
preview.texture:SetTexCoord(texture.leftTexCoord, texture.rightTexCoord, texture.topTexCoord, texture.bottomTexCoord)
else
preview.texture:SetTexture(texture)
preview.texture:SetTexCoord(left or 0, right or 1, top or 0, bottom or 1)
end
preview:Show()
end
+23 -4
View File
@@ -289,10 +289,19 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.ScriptHookMixin)
---@field SetTextColor fun(self: df_label, red: any, green: number|nil, blue: number|nil, alpha: number|nil) set the button text color
---@field SetTextTruncated fun(self: df_label, text: string, maxWidth: width)
--there are two calls to create a label: detailsFramework:CreateLabel and detailsFramework:NewLabel
--NewLabel is the original function, CreateLabel is an alias with different parameters order to make it easier to use
--When converting the NewLabel() call with CreateLabel() do this:
--rename NewLabel to CreateLabel;
--change the order of the parameters: parent, container, name, member, text, font, size, color, layer => parent, text, size, color, font, member, name, layer
--container is gone from the parameters pm CreateLabel
--detailsFramework:CreateLabel(parent, text, size, color, font, member, name, layer)
--detailsFramework:NewLabel(parent, container, name, member, text, font, size, color, layer)
---create a new label object
---@param parent frame
---@param text string|table for used for localization, expects a locTable from the language system
---@param size number|nil
---@param size any?
---@param color any|nil
---@param font string|nil
---@param member string|nil
@@ -300,9 +309,19 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.ScriptHookMixin)
---@param layer drawlayer|nil
---@return df_label|nil
function detailsFramework:CreateLabel(parent, text, size, color, font, member, name, layer)
return detailsFramework:NewLabel(parent, nil, name, member, text, font, size, color, layer)
return detailsFramework:NewLabel(parent, parent, name, member, text, font, size, color, layer)
end
---create a new label object
---@param parent frame
---@param container frame
---@param name string?
---@param member string?
---@param text string|table regular text or a locTable from the language system
---@param font string?
---@param size any?
---@param color any?
---@param layer drawlayer?
function detailsFramework:NewLabel(parent, container, name, member, text, font, size, color, layer)
if (not parent) then
return error("Details! Framework: parent not found.", 2)
@@ -340,7 +359,7 @@ function detailsFramework:NewLabel(parent, container, name, member, text, font,
font = "GameFontNormal"
end
labelObject.label = parent:CreateFontString(name, layer or "OVERLAY", font)
labelObject.label = parent:CreateFontString(name, layer or "overlay", font)
labelObject.widget = labelObject.label
labelObject.label.MyObject = labelObject
@@ -363,7 +382,7 @@ function detailsFramework:NewLabel(parent, container, name, member, text, font,
if (detailsFramework.Language.IsLocTable(locTable)) then
detailsFramework.Language.SetTextWithLocTable(labelObject.widget, locTable)
else
labelObject.label:SetText(text)
labelObject.label:SetText("type(text) is a table, but locTable isn't registered.")
end
else
labelObject.label:SetText(text)
+14 -7
View File
@@ -1986,11 +1986,11 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
--the slider was anchoring to with_label and here here were anchoring the slider again
---@class df_scalebar : slider
---@field thumb texture
function detailsFramework:CreateScaleBar(frame, config) --~scale
function detailsFramework:CreateScaleBar(frame, config, bNoRightClick) --~scale
---@type df_scalebar
local scaleBar, text = detailsFramework:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.1)
scaleBar:SetValueStep(0.05)
scaleBar:SetObeyStepOnDrag(true)
scaleBar.mouseDown = false
rawset(scaleBar, "lockdown", true)
@@ -2023,26 +2023,32 @@ function detailsFramework:CreateScaleBar(frame, config) --~scale
end)
editbox:SetScript("OnEscapePressed", function()
if (bNoRightClick) then
return
end
editbox:ClearFocus()
editbox:Hide()
editbox:SetText(editbox.defaultValue)
end)
scaleBar:SetScript("OnMouseDown", function(_, mouseButton)
if (mouseButton == "RightButton") then
if (mouseButton == "LeftButton" or (mouseButton == "RightButton" and bNoRightClick)) then
scaleBar.mouseDown = true
elseif (mouseButton == "RightButton") then
if (bNoRightClick) then
return
end
editbox:Show()
editbox:SetAllPoints()
editbox:SetText(config.scale)
editbox:SetFocus(true)
editbox.defaultValue = config.scale
elseif (mouseButton == "LeftButton") then
scaleBar.mouseDown = true
end
end)
scaleBar:SetScript("OnMouseUp", function(_, mouseButton)
if (mouseButton == "LeftButton") then
if (mouseButton == "LeftButton" or (mouseButton == "RightButton" and bNoRightClick)) then
scaleBar.mouseDown = false
frame:SetScale(config.scale)
editbox.defaultValue = config.scale
@@ -3810,6 +3816,7 @@ end
---@field SetData fun(self:df_scrollbox, data:table)
---@field GetData fun(self:df_scrollbox): table
---@field OnSetData fun(self:df_scrollbox, data:table)? if exists, this function is called after the SetData with the same parameters
---@field ScrollBar statusbar
---@field
---create a scrollbox with the methods :Refresh() :SetData() :CreateLine()
+222
View File
@@ -1,4 +1,5 @@
---@type detailsframework
local detailsFramework = _G["DetailsFramework"]
if (not detailsFramework or not DetailsFrameworkCanLoad) then
return
@@ -252,6 +253,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
---@field invert boolean?
---create an object that encapsulates a texture and add additional methods to it
---this function is an alias of NewImage() with a different name and parameters in different order
---@param parent frame
---@param texture texturepath|textureid|df_gradienttable|nil
---@param width number?
@@ -266,6 +268,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
end
---create an object that encapsulates a texture and add additional methods to it
---this function is an alias of NewImage() with a different name and parameters in different order
---@param parent frame
---@param texture texturepath|textureid|df_gradienttable|nil
---@param width number?
@@ -438,3 +441,222 @@ function detailsFramework:CreateHighlightTexture(parent, parentKey, alpha, name)
return highlightTexture
end
---Set an atlas to a texture object
---Accpets a string (atlasname) or a table (atlasinfo)
---@param self table
---@param textureObject texture
---@param atlas atlasinfo|atlasname
---@param useAtlasSize boolean?
---@param filterMode texturefilter?
---@param resetTexCoords boolean?
function detailsFramework:SetAtlas(textureObject, atlas, useAtlasSize, filterMode, resetTexCoords)
local isAtlas = C_Texture.GetAtlasInfo(type(atlas) == "string" and atlas or "--")
if (isAtlas and type(atlas) == "string") then
textureObject:SetAtlas(atlas, useAtlasSize, filterMode, resetTexCoords)
return
end
if (type(atlas) == "table") then
---@cast atlas df_atlasinfo
local atlasInfo = atlas
if (useAtlasSize) then
if (atlasInfo.width) then
textureObject:SetWidth(atlasInfo.width)
end
if (atlasInfo.height) then
textureObject:SetHeight(atlasInfo.height)
end
end
textureObject:SetHorizTile(atlasInfo.tilesHorizontally or false)
textureObject:SetVertTile(atlasInfo.tilesVertically or false)
textureObject:SetTexture(atlasInfo.file, atlasInfo.tilesHorizontally and "REPEAT" or "CLAMP", atlasInfo.tilesVertically and "REPEAT" or "CLAMP", filterMode or "LINEAR")
textureObject:SetTexCoord(atlasInfo.leftTexCoord or 0, atlasInfo.rightTexCoord or 1, atlasInfo.topTexCoord or 0, atlasInfo.bottomTexCoord or 1)
if (atlasInfo.colorName) then
textureObject:SetVertexColor(detailsFramework:ParseColors(atlasInfo.colorName))
else
if (atlasInfo.vertexRed or atlasInfo.vertexGreen or atlasInfo.vertexBlue or atlasInfo.vertexAlpha) then
textureObject:SetVertexColor(atlasInfo.vertexRed or 1, atlasInfo.vertexGreen or 1, atlasInfo.vertexBlue or 1, atlasInfo.vertexAlpha or 1)
end
end
end
end
---get the passed atlas, convert it to string with a texture escape sequence, and return it
---textureHeight overrides the height of the atlas
---textureWidth overrides the width of the atlas
---@param self table
---@param atlas atlasinfo|atlasname
---@param textureHeight number?
---@param textureWidth number?
---@return string
function detailsFramework:CreateAtlasString(atlas, textureHeight, textureWidth)
local file, width, height, leftTexCoord, rightTexCoord, topTexCoord, bottomTexCoord, r, g, b, nativeWidth, nativeHeight = detailsFramework:ParseTexture(atlas)
if (not height) then
return "|T" .. file .. "|t"
elseif (not width) then
return "|T" .. file .. ":" .. height .. "|t"
elseif (not leftTexCoord) then
return "|T" .. file .. ":" .. height .. ":" .. width .. "|t"
elseif (not r) then
--the two zeros are the x and y offset
--texCoords are multiplied by the heigh and width to get the actual pixel position
return "|T" .. file .. ":" .. (textureHeight or height) .. ":" .. (textureWidth or width) .. ":0:0:" .. (nativeWidth or width) .. ":" .. (nativeHeight or height) .. ":" .. leftTexCoord*(nativeWidth or width) .. ":" .. rightTexCoord*(nativeWidth or width) .. ":" .. topTexCoord*(nativeHeight or height) .. ":" .. bottomTexCoord*(nativeHeight or height) .. "|t"
else
return "|T" .. file .. ":" .. (textureHeight or height) .. ":" .. (textureWidth or width) .. ":0:0:" .. (nativeWidth or width) .. ":" .. (nativeHeight or height) .. ":" .. leftTexCoord*(nativeWidth or width) .. ":" .. rightTexCoord*(nativeWidth or width) .. ":" .. topTexCoord*(nativeHeight or height) .. ":" .. bottomTexCoord*(nativeHeight or height) .. ":" .. r .. ":" .. g .. ":" .. b .. "|t"
end
end
---Receives a texturepath or a textureid or an atlasname or an atlasinfo.
---Parse the data received and return the texture path or id, width, height and texcoords, what is available.
---nativeWidth and nativeHeight are the dimentions of the texture file in pixels.
---@param self table
---@param texture texturepath|textureid|atlasname|atlasinfo
---@param width number?
---@param height number?
---@param leftTexCoord number?
---@param rightTexCoord number?
---@param topTexCoord number?
---@param bottomTexCoord number?
---@param vertexRed number?
---@param vertexGreen number?
---@param vertexBlue number?
---@param vertexAlpha number?
---@return any texture
---@return number? width
---@return number? height
---@return number? leftTexCoord
---@return number? rightTexCoord
---@return number? topTexCoord
---@return number? bottomTexCoord
---@return number? red
---@return number? green
---@return number? blue
---@return number? alpha
---@return number? nativeWidth
---@return number? nativeHeight
function detailsFramework:ParseTexture(texture, width, height, leftTexCoord, rightTexCoord, topTexCoord, bottomTexCoord, vertexRed, vertexGreen, vertexBlue, vertexAlpha)
local isAtlas
if (type(texture) == "string") then
isAtlas = C_Texture.GetAtlasInfo(texture)
end
if (isAtlas) then
---@type atlasinfo
local atlasInfo = isAtlas
local textureId = atlasInfo.file
local texturePath = atlasInfo.filename
return textureId or texturePath, width or atlasInfo.width, height or atlasInfo.height, atlasInfo.leftTexCoord, atlasInfo.rightTexCoord, atlasInfo.topTexCoord, atlasInfo.bottomTexCoord
end
if (type(texture) == "table") then
---@type df_atlasinfo
local atlasInfo = texture
local r, g, b, a
if (type(atlasInfo.colorName) == "string") then
r, g, b, a = detailsFramework:ParseColors(atlasInfo.colorName)
else
r, g, b, a = atlasInfo.vertexRed or vertexRed, atlasInfo.vertexGreen or vertexGreen, atlasInfo.vertexBlue or vertexBlue, atlasInfo.vertexAlpha or vertexAlpha
end
local nativeWidth, nativeHeight = atlasInfo.nativeWidth, atlasInfo.nativeHeight
return atlasInfo.file or atlasInfo.filename, width or atlasInfo.width, height or atlasInfo.height, atlasInfo.leftTexCoord, atlasInfo.rightTexCoord, atlasInfo.topTexCoord, atlasInfo.bottomTexCoord, r, g, b, a, nativeWidth, nativeHeight
end
if (type(vertexRed) == "string" or type(vertexRed) == "table") then
--the color passed is a colorName or a colorTable
vertexRed, vertexGreen, vertexBlue, vertexAlpha = detailsFramework:ParseColors(vertexRed)
end
return texture, width, height, leftTexCoord or 0, rightTexCoord or 1, topTexCoord or 0, bottomTexCoord or 1, vertexRed, vertexGreen, vertexBlue, vertexAlpha
end
---Use the passed arguments to create a table imitate an atlasinfo
---@param self table
---@param file any
---@param width number? width of the texture
---@param height number? height of the texture
---@param leftTexCoord number? left texture coordinate to use with SetTexCoord as firt parameter
---@param rightTexCoord number? right texture coordinate to use with SetTexCoord as second parameter
---@param topTexCoord number? top texture coordinate to use with SetTexCoord as third parameter
---@param bottomTexCoord number? bottom texture coordinate to use with SetTexCoord as fourth parameter
---@param tilesHorizontally boolean? if the texture should tile horizontally, used with texture:SetHorizTile(value)
---@param tilesVertically boolean? if the texture should tile vertically, used with texture:SetVertTile(value)
---@param vertexRed number|string? red color to use with SetVertexColor or a color name to be parsed with ParseColors
---@param vertexGreen number? green color to use with SetVertexColor
---@param vertexBlue number? blue color to use with SetVertexColor
---@param vertexAlpha number? alpha color to use with SetVertexColor
---@return df_atlasinfo
function detailsFramework:CreateAtlas(file, width, height, leftTexCoord, rightTexCoord, topTexCoord, bottomTexCoord, tilesHorizontally, tilesVertically, vertexRed, vertexGreen, vertexBlue, vertexAlpha)
---@type df_atlasinfo
local atlasInfo = {
file = file,
width = width or 64,
height = height or 64,
leftTexCoord = leftTexCoord or 0,
rightTexCoord = rightTexCoord or 1,
topTexCoord = topTexCoord or 0,
bottomTexCoord = bottomTexCoord or 1,
tilesHorizontally = tilesHorizontally or false,
tilesVertically = tilesVertically or false,
}
--parse the colors passed
if (vertexRed) then
if (type(vertexRed) == "string") then
atlasInfo.colorName = vertexRed
else
atlasInfo.vertexRed = vertexRed
atlasInfo.vertexGreen = vertexGreen
atlasInfo.vertexBlue = vertexBlue
atlasInfo.vertexAlpha = vertexAlpha
end
end
return atlasInfo
end
---Return the texture passed can be parsed as a texture
---@param self table
---@param texture any
---@param bCheckTextureObject boolean?
---@return boolean
function detailsFramework:IsTexture(texture, bCheckTextureObject)
--if is a string, can be a path or an atlasname, so can be parsed
if (type(texture) == "string") then
return true
end
--if is a number, can be parsed
if (type(texture) == "number") then
return true
end
if (type(texture) == "table") then
--gradient texture
if (texture.gradient) then
return true
end
--part of an atlasinfo
if (texture.file or texture.filename) then
return true
end
if (bCheckTextureObject) then
--check if is a texture object
if (texture.GetTexture and texture.GetObjectType and texture:GetObjectType() == "Texture") then
return true
end
end
end
return false
end
+33 -1
View File
@@ -86,6 +86,9 @@ detailsFramework.ScrollBoxFunctions = {
return self.Frames
end,
---@param self df_scrollbox
---@param offset number
---@return boolean
OnVerticalScroll = function(self, offset)
self:OnVerticalScrollFaux(offset, self.LineHeight, self.Refresh)
return true
@@ -112,12 +115,20 @@ detailsFramework.ScrollBoxFunctions = {
return newLine
end,
---Creates multiple lines in the scroll box.
---@param self df_scrollbox The DF_ScrollBox object.
---@param callback function The callback function to be called for each line.
---@param lineAmount number The number of lines to create.
CreateLines = function(self, callback, lineAmount)
for i = 1, lineAmount do
self:CreateLine(callback)
end
end,
---Retrieves a specific line from the scroll box.
---@param self df_scrollbox The DF_ScrollBox object.
---@param lineIndex number The index of the line to retrieve.
---@return frame line The line object at the specified index.
GetLine = function(self, lineIndex)
local line = self.Frames[lineIndex]
if (line) then
@@ -128,6 +139,8 @@ detailsFramework.ScrollBoxFunctions = {
return line
end,
---Sets the data for the scroll box.
---@param data table The data to be set.
SetData = function(self, data)
self.data = data
if (self.OnSetData) then
@@ -135,26 +148,45 @@ detailsFramework.ScrollBoxFunctions = {
end
end,
---Retrieves the data associated with the scrollbox.
---@param self df_scrollbox
---@return table The data associated with the scrollbox.
GetData = function(self)
return self.data
end,
---Retrieves the frames contained within the scrollbox.
---@param self df_scrollbox
---@return table The frames contained within the scrollbox.
GetFrames = function(self)
return self.Frames
end,
GetLines = function(self) --alias of GetFrames
---Retrieves the lines contained within the scrollbox.
---This is an alias of GetFrames.
---@param self df_scrollbox
---@return table The lines contained within the scrollbox.
GetLines = function(self)
return self.Frames
end,
---Retrieves the number of frames created within the scrollbox.
---@param self df_scrollbox
---@return number The number of frames created within the scrollbox.
GetNumFramesCreated = function(self)
return #self.Frames
end,
---get the amount of lines the scroll is currently showing
---@param self df_scrollbox
---@return number amountOfLines
GetNumFramesShown = function(self)
return self.LineAmount
end,
---set the max amount of lines the scroll can show
---@param self df_scrollbox
---@param newAmount number
SetNumFramesShown = function(self, newAmount)
--hide frames which won't be used
if (newAmount < #self.Frames) then
+530 -17
View File
@@ -1,3 +1,28 @@
---Contents for the blizzard_documentation field "Arguments".
---@class blizzard_documentation_arguments : table
---@field Name string the name of the argument
---@field Type string the type of the argument: if is not a primitive type, just use the type name as string
---@field Nilable boolean whether the argument can be nil
---@field Mixin string? the mixin of the argument
---Contents for the blizzard_documentation field "Returns".
---@class blizzard_documentation_returns : table
---@field Name string the name of the return
---@field Type string the type of the return: if is not a primitive type, just use the type name as string
---@field Nilable boolean whether the return can be nil
---This table contains documentation for functions inside C_ChallengeMode.
---@class blizzard_documentation : table
---@field Name string the name of the field, can be
---@field Type string most of the time the type is "Function"
---@field Arguments blizzard_documentation_arguments[]? a table containing the arguments of the function
---@field Returns blizzard_documentation_returns[]? a table containing the returns of the function, the the type is table, it may have "InnerType" which is the type of the elements inside the table
---@class LibStub : table
LibStub = {}
function LibStub:NewLibrary(major, minor)end
function LibStub:GetLibrary(major, silent)end
function LibStub:IterateLibraries()end
--uiobject: is an object that represents a UI element, such as a frame, a texture, or a button. UIObjects are the base class for all UI elements in the WoW API.
--3D World: is an object which is placed behind|below all UI elements, cannot be parent of any object, in the 3D World object is where the game world is rendered
@@ -11,6 +36,15 @@
--guadians: represents a npc, the server has the possess of the controller, don't accept commands like pets, helps attacking the enemies of the npc or player.
--role: is a string that represents the role of a unit, such as tank, healer, or damage dealer. only players can have a role.
--escape sequences: are used to represent characters that are not printable, such as new lines, tabs, and other control characters.
--in wow they are used to add colors, textures, and other special characters to a string.
--they always start with a pipe character (|) followed by a letter, and can have a value after the letter, and end with a pipe character (|) followed by another leter.
--color: myTextWithColor = "|cFF00FF00This is a green text|r". |c open the color, FF00FF00 is the color, |r close the color. Color is represented by the hexadecimal value of the color, the first two characters are the alpha, the next two are the red, the next two are the green, and the last two are the blue.
--texture: open with |T and close with |t, the first value is the texture, second and third height and width, offsetX and offsetY, textureWidth and textureHeight, texture coordinates in pixels for leftCoord, rightCoord, topCoord, and bottomCoord, the last three values are: redVertexColor, greenVertexColor, and blueVertexColor in 0 to 255.
--texture: myTextWithTexture = "|TInterface\\Icons\\INV_Misc_QuestionMark:0|tThis is a text with a question mark texture"
--texture: myTextWithTexture = "|TInterface\\Icons\\INV_Misc_QuestionMark:32:32:1:-1:64:64:4:60:4:60:0:0:255|tThis is a text with a question mark texture of size 32x32, with cropped to remove the border of the icon and with a blue color"
--atlas: open with |A and close with |a, the first value is the atlas, second and third height and width, offsetX and offsetY, and redVertexColor, greenVertexColor, and blueVertexColor in 0 to 255.
---@alias animationtype
---| "Alpha"
---| "Rotation"
@@ -240,15 +274,16 @@
---@field sourceUnit string unitid
---@class atlasinfo : table
---@field file string|number
---@field leftTexCoord number
---@field rightTexCoord number
---@field topTexCoord number
---@field bottomTexCoord number
---@field width number
---@field height number
---@field tilesHorizontally boolean
---@field tilesVertically boolean
---@field filename any?
---@field file any?
---@field leftTexCoord number?
---@field rightTexCoord number?
---@field topTexCoord number?
---@field bottomTexCoord number?
---@field width number?
---@field height number?
---@field tilesHorizontally boolean?
---@field tilesVertically boolean?
---@alias width number property that represents the horizontal size of a UI element, such as a frame or a texture. Gotten from the first result of GetWidth() or from the first result of GetSize(). It is expected a GetWidth() or GetSize() when the type 'height' is used.
@@ -260,9 +295,11 @@
---@alias alpha number @number(0-1.0) value representing the alpha (transparency) of a UIObject, the value must be between 0 and 1. 0 is fully transparent, 1 is fully opaque.
---@alias unit string string that represents a unit in the game, such as the player, a party member, or a raid member.
---@alias health number amount of hit points (health) of a unit. This value can be changed by taking damage or healing.
---@alias healthmax number max amount of hit points (health) of a unit.
---@alias encounterid number encounter ID number received by the event ENCOUNTER_START and ENCOUNTER_END
---@alias encounterejid number encounter ID number used by the encounter journal
---@alias encountername string encounter name received by the event ENCOUNTER_START and ENCOUNTER_END also used by the encounter journal
---@alias instancename string localized name of an instance (e.g. "The Nighthold")
---@alias spellid number each spell in the game has a unique spell id, this id can be used to identify a spell.
---@alias unitname string name of a unit
---@alias unitguid string unique id of a unit (GUID)
@@ -274,6 +311,7 @@
---@alias actorid string unique id of a unit (GUID)
---@alias serial string unique id of a unit (GUID)
---@alias guid string unique id of a unit (GUID)
---@alias mapid nmber each map in the game has a unique map id, this id can be used to identify a map.
---@alias specializationid number the ID of a class specialization
---@alias controlflags number flags telling what unit type the is (player, npc, pet, etc); it's relatiotionship to the player (friendly, hostile, etc); who controls the unit (controlled by the player, controlled by the server, etc)
---@alias color table @table(r: red|number, g: green|number, b: blue|number, a: alpha|number) @table(number, number, number, number) @string(color name) @hex (000000-ffffff) value representing a color, the value must be a table with the following fields: r, g, b, a. r, g, b are numbers between 0 and 1, a is a number between 0 and 1. To retrieve a color from a string or table use: local red, green, blue, alpha = DetailsFramework:ParseColors(color)
@@ -317,9 +355,6 @@
---@field NewTimer fun(delay: number, func: function): timer
---@field NewTicker fun(interval: number, func: function, iterations: number|nil): timer
---@class C_ChallengeMode : table
---@field GetActiveKeystoneInfo fun(): number, number[], boolean @returns keystoneLevel, affixIDs, wasActive
---@class tablesize : {H: number, W: number}
---@class tablecoords : {L: number, R: number, T: number, B: number}
---@class texturecoords: {left: number, right: number, top: number, bottom: number}
@@ -619,7 +654,7 @@
---@field SetDrawLayer fun(self: texture, layer: drawlayer, subLayer: number?)
---@field GetTexture fun(self: texture) : any
---@field SetTexture fun(self: texture, path: textureid|texturepath, horizontalWrap: texturewrap?, verticalWrap: texturewrap?, filter: texturefilter?)
---@field SetAtlas fun(self: texture, atlas: string)
---@field SetAtlas fun(self: texture, atlas: string, useAtlasSize: boolean?, filterMode: texturefilter?, resetTexCoords: boolean?)
---@field SetColorTexture fun(self: texture, r: red|number, g: green|number, b: blue|number, a: alpha|number?)
---@field SetDesaturated fun(self: texture, desaturate: boolean)
---@field SetDesaturation fun(self: texture, desaturation: number)
@@ -656,6 +691,8 @@
---@field GetGradientColors fun(self: texture) : number, number, number, number, number, number, number, number, number, number, number, number
---@field GetBlendMode fun(self: texture) : string
---@field GetVertexColor fun(self: texture) : number, number, number, number
---@field SetHorizTile fun(self: texture, tile: boolean) set the texture to be tiled horizontally
---@field SetVertTile fun(self: texture, tile: boolean) set the texture to be tiled vertically
---@class editbox : frame
---@field SetText fun(self: editbox, text: string)
@@ -750,6 +787,98 @@ function NegateIf(value, condition) return 0 end
---@return number float - A random floating-point number within the specified range.
function RandomFloatInRange(minValue, maxValue) return 0 end
---Calculates the percentage between two values.
---@param value number The value to calculate the percentage for.
---@param startValue number The starting value.
---@param endValue number The ending value.
---@return number percentage between the startValue and endValue.
function PercentageBetween(value, startValue, endValue) return 0 end
---Calculates the clamped percentage between two values.
---The result is clamped between 0 and 1.
---@param value number The value to calculate the clamped percentage for.
---@param startValue number The starting value.
---@param endValue number The ending value.
---@return number clampedPercentage between the startValue and endValue.
function ClampedPercentageBetween(value, startValue, endValue) return 0 end
---Returns the time in seconds since the last frame was drawn.
---@return number timeSec The time in seconds since the last frame was drawn.
function GetTickTime() return 0 end
---Linearly interpolates between two values.
---@param startValue number The starting value.
---@param endValue number The ending value.
---@param amount number The interpolation amount (between 0 and 1).
---@param timeSec number The time in seconds.
---@return number The interpolated value.
function DeltaLerp(startValue, endValue, amount, timeSec) return 0 end
---@param amount number The interpolation amount (between 0 and 1).
---@return number The interpolated value.
function FrameDeltaLerp(startValue, endValue, amount) return 0 end
---Rounds a value to a specified number of significant digits.
---@param value number The value to round.
---@param numDigits number The number of significant digits.
---@return number The rounded value.
function RoundToSignificantDigits(value, numDigits) return 0 end
---Squares a value.
---@param value number The value to square.
---@return number The squared value.
function Square(value) return 0 end
---Returns the sign of a value.
---@param value number The value to check the sign of.
---@return number The sign of the value (-1, 0, or 1).
function Sign(value) return 0 end
---Checks if a value is within a specified range (inclusive).
---@param value number The value to check.
---@param min number The minimum value of the range.
---@param max number The maximum value of the range.
---@return boolean Whether the value is within the range.
function WithinRange(value, min, max) return true end
---Checks if a value is within a specified range (exclusive).
---@param value number The value to check.
---@param min number The minimum value of the range.
---@param max number The maximum value of the range.
---@return boolean Whether the value is within the range.
function WithinRangeExclusive(value, min, max) return true end
---Checks if two values are approximately equal within a specified epsilon.
---@param v1 number The first value to compare.
---@param v2 number The second value to compare.
---@param epsilon number (optional) The epsilon value for comparison.
---@return boolean Whether the values are approximately equal.
function ApproximatelyEqual(v1, v2, epsilon) return true end
---Calculates the squared distance between two points.
---@param x1 number The x-coordinate of the first point.
---@param y1 number The y-coordinate of the first point.
---@param x2 number The x-coordinate of the second point.
---@param y2 number The y-coordinate of the second point.
---@return number The squared distance between the points.
function CalculateDistanceSq(x1, y1, x2, y2) return 0 end
---Calculates the distance between two points.
---@param x1 number The x-coordinate of the first point.
---@param y1 number The y-coordinate of the first point.
---@param x2 number The x-coordinate of the second point.
---@param y2 number The y-coordinate of the second point.
---@return number The distance between the points.
function CalculateDistance(x1, y1, x2, y2) return 0 end
---Calculates the angle between two points.
---@param x1 number The x-coordinate of the first point.
---@param y1 number The y-coordinate of the first point.
---@param x2 number The x-coordinate of the second point.
---@param y2 number The y-coordinate of the second point.
---@return number The angle between the points.
function CalculateAngleBetween(x1, y1, x2, y2) return 0 end
---Returns a formatted version of its variable number of arguments following the description given in its first argument.
---@param s string|number
---@param ... any
@@ -757,6 +886,25 @@ function RandomFloatInRange(minValue, maxValue) return 0 end
---@nodiscard
function format(s, ...) return "" end
---Returns the length of a string.
---@param s string
---@return number
function strlen(s) return 0 end
---Returns a substring of a given string.
---@param s string The input string.
---@param start number The starting index of the substring.
---@param finish number (optional) The ending index of the substring. If not provided, the substring will include all characters from the starting index to the end of the string.
---@return string return The resulting substring.
function strsub(s, start, finish) return "" end
---Rounds a given value to the nearest integer.
---If the value is negative, it rounds up.
---If the value is positive, it rounds down.
---@param value number The value to be rounded.
---@return number roundedValue
function Round(value) return 0 end
table.wipe = true
wipe = true
@@ -770,11 +918,251 @@ max = function(...) return 0 end
---@return number The minimum value.
min = function(...) return 0 end
--- ColorMixin is a mixin that provides functionality for working with colors.
---@class ColorMixin : table
ColorMixin = {}
---@class colorRGB : table, ColorMixin
---@field r number
---@field g number
---@field b number
---Sets the RGBA values of the color.
---@param r number The red component of the color (0-1).
---@param g number The green component of the color (0-1).
---@param b number The blue component of the color (0-1).
---@param a? number The alpha component of the color (0-1).
function ColorMixin:SetRGBA(r, g, b, a) end
---Sets the RGB values of the color.
---@param r number The red component of the color (0-1).
---@param g number The green component of the color (0-1).
---@param b number The blue component of the color (0-1).
function ColorMixin:SetRGB(r, g, b) end
---Returns the RGB values of the color.
---@return number r
---@return number g
---@return number b
function ColorMixin:GetRGB() return 0, 0, 0 end
---Returns the RGB values of the color as bytes (0-255).
---@return number red
---@return number green
---@return number blue
function ColorMixin:GetRGBAsBytes() return 0, 0, 0 end
---Returns the RGBA values of the color.
---@return number red
---@return number green
---@return number blue
---@return number alpha
function ColorMixin:GetRGBA() return 0, 0, 0, 0 end
---Returns the RGBA values of the color as bytes (0-255).
---@return number red
---@return number green
---@return number blue
---@return number alpha
function ColorMixin:GetRGBAAsBytes() return 0, 0, 0, 0 end
---Checks if the RGB values of this color are equal to another color.
---@param otherColor table The other color to compare with.
---@return boolean bIsEqual if the RGB values are equal, false otherwise.
function ColorMixin:IsRGBEqualTo(otherColor) return true end
---Checks if this color is equal to another color.
---@param otherColor table The other color to compare with.
---@return boolean True if the RGB and alpha values are equal, false otherwise.
function ColorMixin:IsEqualTo(otherColor) return true end
---Generates a hexadecimal color string with alpha.
---@return string hexadecimal color string with alpha.
function ColorMixin:GenerateHexColor() return "" end
---Generates a hexadecimal color string without alpha.
---@return string hexadecimal color string without alpha.
function ColorMixin:GenerateHexColorNoAlpha() return "" end
---Generates a hexadecimal color markup string.
---@return string hexadecimal color markup string.
function ColorMixin:GenerateHexColorMarkup() return "" end
---Wraps the given text in a color code using this color.
---@param text string The text to wrap.
---@return string The wrapped text with the color code.
function ColorMixin:WrapTextInColorCode(text) return "" end
---name space for challenge mode functions.
---@documentation: /Blizzard_APIDocumentationGenerated/ChallengeModeInfoDocumentation.lua
C_ChallengeMode = {}
---@class ChallengeModeCompletionMemberInfo
---@field memberGUID string
---@field name string
---@class ChallengeModeGuildAttemptMember
---@field name string
---@field classFileName string
---@class ChallengeModeGuildTopAttempt
---@field name string
---@field classFileName string
---@field keystoneLevel number
---@field mapChallengeModeID number
---@field isYou boolean
---@field members table<ChallengeModeGuildAttemptMember>
---@class MythicPlusRatingLinkInfo : table
---@field mapChallengeModeID number
---@field level number
---@field completedInTime number
---@field dungeonScore number
---@field name string
---@class MythicPlusAffixScoreInfo : table
---@field name string
---@field score number
---@field level number
---@field durationSec number
---@field overTime boolean
---return true if the player is in a challenge mode dungeon.
---@return boolean bIsActive Whether the player is in a challenge mode dungeon.
function C_ChallengeMode.IsChallengeModeActive() return true end
---return the current challenge mode map id.
---@return number mapID The map id of the current challenge mode.
function C_ChallengeMode.GetActiveChallengeMapID() return 0 end
---return the current challenge mode keystone level.
---@return number level The keystone level of the current challenge mode.
---@return number[] affixIDs The affix ids of the current challenge mode.
---@return boolean wasActive Whether the keystone was active.
function C_ChallengeMode.GetActiveKeystoneInfo() return 0, {}, true end
---return the completion information for the current challenge mode.
---@return number mapChallengeModeID The map id of the challenge mode.
---@return number level The keystone level of the challenge mode.
---@return number time The time taken to complete the challenge mode.
---@return boolean onTime Whether the challenge mode was completed within the time limit.
---@return number keystoneUpgradeLevels The number of keystone upgrade levels.
---@return boolean practiceRun Whether the challenge mode was a practice run.
---@return number oldOverallDungeonScore The old overall dungeon score.
---@return number newOverallDungeonScore The new overall dungeon score.
---@return boolean isMapRecord Whether the completion is a map record.
---@return boolean isAffixRecord Whether the completion is an affix record.
---@return number primaryAffix The primary affix id.
---@return boolean isEligibleForScore Whether the completion is eligible for a score.
---@return ChallengeModeCompletionMemberInfo[] members The members of the group.
function C_ChallengeMode.GetCompletionInfo() return 0, 0, 0, true, 0, true, 0, 0, true, true, 0, true, {} end
---return the death count for the current challenge mode.
---@return number numDeaths The number of deaths.
---@return number timeLost The time lost due to deaths.
function C_ChallengeMode.GetDeathCount() return 0, 0 end
---return the color value for the overall season M+ rating.
---@param dungeonScore number The overall season M+ rating.
---@return colorRGB scoreColor The color value for the overall season M+ rating.
function C_ChallengeMode.GetDungeonScoreRarityColor(dungeonScore) return {} end
---return the top guild attempts for the current challenge mode.
---@return ChallengeModeGuildTopAttempt[] topAttempt The top guild attempts for the current challenge mode.
function C_ChallengeMode.GetGuildLeaders() return {} end
---return the color value for the keystone level.
---@param level number The keystone level.
---@return colorRGB levelScore The color value for the keystone level.
function C_ChallengeMode.GetKeystoneLevelRarityColor(level) return {} end
---return the display scores for the current challenge mode map.
---@return MythicPlusRatingLinkInfo[] displayScores The display scores for the current challenge mode map.
function C_ChallengeMode.GetMapScoreInfo() return {} end
---return the map ids for the challenge mode.
---@return number[] mapChallengeModeIDs The map ids for the challenge mode.
function C_ChallengeMode.GetMapTable() return {} end
---return the UI information for the challenge mode map.
---@param mapChallengeModeID number The map id for the challenge mode.
---@return string name The name of the challenge mode map.
---@return number id The id of the challenge mode map.
function C_ChallengeMode.GetMapUIInfo(mapChallengeModeID) return "", 0 end
---return the affix information for the challenge mode.
---@param affixID number The affix id for the challenge mode.
---@return string name The name of the affix.
---@return string description The description of the affix.
---@return number filedataid The file data id for the affix.
function C_ChallengeMode.GetAffixInfo(affixID) return "", "", 0 end
---return true if the player can use the keystone in the current map.
---@param itemLocation ItemLocationMixin The item location of the keystone.
---@return boolean canUse Whether the player can use the keystone in the current map.
function C_ChallengeMode.CanUseKeystoneInCurrentMap(itemLocation) return true end
---clear the keystone.
function C_ChallengeMode.ClearKeystone() end
---close the keystone frame.
function C_ChallengeMode.CloseKeystoneFrame() end
---return true if the player has a slotted keystone.
---@return boolean hasSlottedKeystone Whether the player has a slotted keystone.
function C_ChallengeMode.HasSlottedKeystone() return true end
---remove the keystone.
---@return boolean removalSuccessful Whether the keystone was removed.
function C_ChallengeMode.RemoveKeystone() return true end
---request the leaders for the challenge mode map.
---@param mapChallengeModeID number The map id for the challenge mode.
function C_ChallengeMode.RequestLeaders(mapChallengeModeID) end
---reset the challenge mode.
function C_ChallengeMode.Reset() end
---slot the keystone.
function C_ChallengeMode.SlotKeystone() end
---start the challenge mode.
---@return boolean success Whether the challenge mode was started.
function C_ChallengeMode.StartChallengeMode() return true end
---return the power level damage and health modifiers for the challenge mode.
---@param powerLevel number The power level for the challenge mode.
---@return number damageMod The damage modifier for the challenge mode.
---@return number healthMod The health modifier for the challenge mode.
function C_ChallengeMode.GetPowerLevelDamageHealthMod(powerLevel) return 0, 0 end
---return the overall season M+ rating for the player.
---@return number overallDungeonScore The overall season M+ rating for the player.
function C_ChallengeMode.GetOverallDungeonScore() return 0 end
---return the slotted keystone information.
---@return number mapChallengeModeID The map id for the challenge mode.
---@return number[] affixIDs The affix ids for the challenge mode.
---@return number keystoneLevel The keystone level for the challenge mode.
function C_ChallengeMode.GetSlottedKeystoneInfo() return 0, {}, 0 end
---return the color value for the specific dungeon overall score.
---@param specificDungeonOverallScore number The specific dungeon overall score.
---@return colorRGB specificDungeonOverallScoreColor The color value for the specific dungeon overall score.
function C_ChallengeMode.GetSpecificDungeonOverallScoreRarityColor(specificDungeonOverallScore) return {} end
---return the color value for the specific dungeon score.
---@param specificDungeonScore number The specific dungeon score.
---@return colorRGB specificDungeonScoreColor The color value for the specific dungeon score.
function C_ChallengeMode.GetSpecificDungeonScoreRarityColor(specificDungeonScore) return {} end
---return the color value for the overall season M+ rating.
---@param overallDungeonScore number The overall season M+ rating.
---@return colorRGB overallDungeonScoreColor The color value for the overall season M+ rating.
function C_ChallengeMode.GetOverallDungeonScoreRarityColor(overallDungeonScore) return {} end
PixelUtil = {}
---@param object statusbar
@@ -934,6 +1322,67 @@ AuraUtil.DispellableDebuffTypes = {
---@return any
AuraUtil.ForEachAura = function(unit, filter, maxCount, func, usePackedAura) end
---@class bit : table
---@field band fun(x: number, y: number) : number
---@field bor fun(x: number, y: number) : number
---@field bxor fun(x: number, y: number) : number
---@field bnot fun(x: number) : number
---@field lshift fun(x: number, y: number) : number
---@field rshift fun(x: number, y: number) : number
---@field rol fun(x: number, y: number) : number
---@field ror fun(x: number, y: number) : number
---@class bit
bit = {}
---returns the bitwise AND of two numbers.
---@param x number The first number.
---@param y number The second number.
---@return number The bitwise AND of the two numbers.
function bit.band(x, y) return 0 end
---returns the bitwise OR of two numbers.
---@param x number The first number.
---@param y number The second number.
---@return number The bitwise OR of the two numbers.
function bit.bor(x, y) return 0 end
---returns the bitwise XOR of two numbers.
---@param x number The first number.
---@param y number The second number.
---@return number The bitwise XOR of the two numbers.
function bit.bxor(x, y) return 0 end
---returns the bitwise NOT of a number.
---@param x number The number to invert.
---@return number The bitwise NOT of the number.
function bit.bnot(x) return 0 end
---returns the bitwise shift left of a number.
---@param x number The number to shift.
---@param y number The number of bits to shift.
---@return number The bitwise shift left of the number.
function bit.lshift(x, y) return 0 end
---returns the bitwise shift right of a number.
---@param x number The number to shift.
---@param y number The number of bits to shift.
---@return number The bitwise shift right of the number.
function bit.rshift(x, y) return 0 end
---returns the bitwise rotate left of a number.
---@param x number The number to rotate.
---@param y number The number of bits to rotate.
---@return number The bitwise rotate left of the number.
function bit.rol(x, y) return 0 end
---returns the bitwise rotate right of a number.
---@param x number The number to rotate.
---@param y number The number of bits to rotate.
---@return number The bitwise rotate right of the number.
function bit.ror(x, y) return 0 end
C_Timer = {}
---@param delay number
@@ -964,9 +1413,13 @@ function unpack(list, i, j) end
---@return number
function abs(x) return 0 end
---@param unit string
LE_PARTY_CATEGORY_HOME = 1
LE_PARTY_CATEGORY_INSTANCE = 2
---retur true if the player is in a group
---@param partyCategory number?
---@return boolean
function IsInGroup(unit) return true end
function IsInGroup(partyCategory) return true end
---@param name string
---@param server string|nil
@@ -1000,6 +1453,12 @@ function tremove(table, index) return nil end
---@return function func A function to be executed.
function loadstring(code) return function()end end
---lua os.date() function
---@param format string?
---@param time number?
---@return string
function date(format, time) return "" end
---returns the number of members in the current group.
---@return number
GetNumGroupMembers = function() return 0 end
@@ -1052,6 +1511,45 @@ GetAchievementNumCriteria = function(achievementID) return 0 end
---@return number, string, string, string, number, string
GetSpecializationInfo = function(specIndex, isInspect, isPet, sex, level) return 0, "", "", "", 0, "" end
---@param specID number
---@param isInspect boolean?
---@param isPet boolean?
---@param inspectTarget string?
---@return number specId
---@return string name
---@return string description
---@return string icon
---@return number role
---@return ...
GetSpecializationInfoByID = function(specID, isInspect, isPet, inspectTarget) return 0, "", "", "", 0, "" end
---Retrieves specialization information for a given class ID and the specialization index (1 to 3 or 4 on Druids).
---@param classID number The ID of the class.
---@param index number The index of the specialization.
---@return number specializationID The ID of the specialization.
---@return string specName The name of the specialization.
---@return string specDescription The description of the specialization.
---@return string icon The icon of the specialization.
---@return number role The role of the specialization.
---@return boolean recommended Whether the specialization is recommended.
---@return boolean allowedForBoost Whether the specialization is allowed for boost.
---@return number masterySpell1 The ID of the first mastery spell.
---@return number masterySpell2 The ID of the second mastery spell.
GetSpecializationInfoForClassID = function(classID, index) return 0, "", "", "", 0, true, true, 0, 0 end
--make here the documentation for the function GetSpecializationInfoForSpecID() following the same pattern as the other functions
---@param specID number
---@return number specializationID The ID of the specialization.
---@return string specName The name of the specialization.
---@return string specDescription The description of the specialization.
---@return string icon The icon of the specialization.
---@return number role The role of the specialization.
---@return boolean recommended Whether the specialization is recommended.
---@return boolean allowedForBoost Whether the specialization is allowed for boost.
---@return number masterySpell1 The ID of the first mastery spell.
---@return number masterySpell2 The ID of the second mastery spell.
GetSpecializationInfoForSpecID = function(specID) return 0, "", "", "", 0, true, true, 0, 0 end
---@param achievementID number
---@return number
GetAchievementNumRewards = function(achievementID) return 0 end
@@ -3107,8 +3605,18 @@ GetBattlefieldInstanceRunTime = function() return 0, 0 end
---@return number
GetInstanceBootTimeRemaining = function() return 0 end
---@return boolean, string, number, number, number, number, boolean, boolean
GetInstanceInfo = function() return true, "", 0, 0, 0, 0, true, true end
---retrive information about the zone the player is in
---@return string name
---@return string instanceType
---@return number difficultyID
---@return string difficultyName
---@return number maxPlayers
---@return number dynamicDifficulty
---@return boolean isDynamic
---@return number instanceID
---@return number instanceGroupSize
---@return number LfgDungeonID
GetInstanceInfo = function() return "", "", 0, "", 0, 0, true, 0, 0, 0 end
---@return number
GetNumSavedInstances = function() return 0 end
@@ -5240,22 +5748,27 @@ function UnitUsingVehicle(unit) return true end
---@return number, number, number
function GetThreatStatusColor(status) return 0, 0, 0 end
---Retrieves the current experience points of a unit.
---@param unit string
---@return number
function UnitXP(unit) return 0 end
---Retrieves the maximum experience points of a unit.
---@param unit string
---@return number
function UnitXPMax(unit) return 0 end
---Sets the portrait texture of a frame.
---@param frame table
---@param texture string
function SetPortraitTexture(frame, texture) end
---Sets the portrait texture of a frame to a specific texture.
---@param frame table
---@param texture string
function SetPortraitToTexture(frame, texture) end
---Inserts a value into a table.
---@param table table
---@param value any
function tinsert(table, value) end
+46 -41
View File
@@ -618,6 +618,10 @@ do
return "orange"
end
function Details:GetTextureAtlasTable()
return Details.TextureAtlas
end
--armazena as funes para inicializao dos dados - Metatable functions
_detalhes.refresh = {}
--armazena as funes para limpar e guardas os dados - Metatable functions
@@ -828,9 +832,10 @@ do
--plugin templates
_detalhes.gump:NewColor("DETAILS_PLUGIN_BUTTONTEXT_COLOR", 0.9999, 0.8196, 0, 1)
DetailsFramework:NewColor("DETAILS_PLUGIN_BUTTONTEXT_COLOR", 0.9999, 0.8196, 0, 1)
DetailsFramework:NewColor("DETAILS_HEADER_YELLOW", 227/255, 186/255, 4/255)
_detalhes.gump:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE",
DetailsFramework:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
@@ -838,7 +843,7 @@ do
onentercolor = {0.3, 0.3, 0.3, .5},
}
)
_detalhes.gump:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE",
DetailsFramework:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
@@ -847,7 +852,7 @@ do
}
)
_detalhes.gump:InstallTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE",
DetailsFramework:InstallTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {1, 1, 1, .5},
@@ -859,7 +864,7 @@ do
height = 20,
}
)
_detalhes.gump:InstallTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE",
DetailsFramework:InstallTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE",
{
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {1, 1, 1, .5},
@@ -872,14 +877,14 @@ do
}
)
_detalhes.gump:InstallTemplate("button", "DETAILS_TAB_BUTTON_TEMPLATE",
DetailsFramework:InstallTemplate("button", "DETAILS_TAB_BUTTON_TEMPLATE",
{
width = 100,
height = 20,
},
"DETAILS_PLUGIN_BUTTON_TEMPLATE"
)
_detalhes.gump:InstallTemplate("button","DETAILS_TAB_BUTTONSELECTED_TEMPLATE",
DetailsFramework:InstallTemplate("button","DETAILS_TAB_BUTTONSELECTED_TEMPLATE",
{
width = 100,
height = 20,
@@ -887,53 +892,53 @@ do
"DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE"
)
_detalhes.PluginsGlobalNames = {}
_detalhes.PluginsLocalizedNames = {}
Details.PluginsGlobalNames = {}
Details.PluginsLocalizedNames = {}
--raid -------------------------------------------------------------------
--general function for raid mode plugins
_detalhes.RaidTables = {}
Details.RaidTables = {}
--menu for raid modes
_detalhes.RaidTables.Menu = {}
Details.RaidTables.Menu = {}
--plugin objects for raid mode
_detalhes.RaidTables.Plugins = {}
Details.RaidTables.Plugins = {}
--name to plugin object
_detalhes.RaidTables.NameTable = {}
Details.RaidTables.NameTable = {}
--using by
_detalhes.RaidTables.InstancesInUse = {}
_detalhes.RaidTables.PluginsInUse = {}
Details.RaidTables.InstancesInUse = {}
Details.RaidTables.PluginsInUse = {}
--solo -------------------------------------------------------------------
--general functions for solo mode plugins
_detalhes.SoloTables = {}
Details.SoloTables = {}
--maintain plugin menu
_detalhes.SoloTables.Menu = {}
Details.SoloTables.Menu = {}
--plugins objects for solo mode
_detalhes.SoloTables.Plugins = {}
Details.SoloTables.Plugins = {}
--name to plugin object
_detalhes.SoloTables.NameTable = {}
Details.SoloTables.NameTable = {}
--toolbar -------------------------------------------------------------------
--plugins container
_detalhes.ToolBar = {}
Details.ToolBar = {}
--current showing icons
_detalhes.ToolBar.Shown = {}
_detalhes.ToolBar.AllButtons = {}
Details.ToolBar.Shown = {}
Details.ToolBar.AllButtons = {}
--plugin objects
_detalhes.ToolBar.Plugins = {}
Details.ToolBar.Plugins = {}
--name to plugin object
_detalhes.ToolBar.NameTable = {}
_detalhes.ToolBar.Menu = {}
Details.ToolBar.NameTable = {}
Details.ToolBar.Menu = {}
--statusbar -------------------------------------------------------------------
--plugins container
_detalhes.StatusBar = {}
Details.StatusBar = {}
--maintain plugin menu
_detalhes.StatusBar.Menu = {}
Details.StatusBar.Menu = {}
--plugins object
_detalhes.StatusBar.Plugins = {}
Details.StatusBar.Plugins = {}
--name to plugin object
_detalhes.StatusBar.NameTable = {}
Details.StatusBar.NameTable = {}
--constants
@@ -990,7 +995,7 @@ do
--[[global]] DETAILS_MODE_GROUP = 2
--[[global]] DETAILS_MODE_ALL = 3
_detalhes._detalhes_props = {
Details._detalhes_props = {
DATA_TYPE_START = 1, --Something on start
DATA_TYPE_END = 2, --Something on end
@@ -999,34 +1004,34 @@ do
MODO_ALL = 3, --Everything
MODO_RAID = 4, --Raid
}
_detalhes.modos = {
Details.modos = {
alone = 1, --Solo
group = 2, --Group
all = 3, --Everything
raid = 4 --Raid
}
_detalhes.divisores = {
Details.divisores = {
abre = "(", --open
fecha = ")", --close
colocacao = ". " --dot
}
_detalhes.role_texcoord = {
Details.role_texcoord = {
DAMAGER = "72:130:69:127",
HEALER = "72:130:2:60",
TANK = "5:63:69:127",
NONE = "139:196:69:127",
}
_detalhes.role_texcoord_normalized = {
Details.role_texcoord_normalized = {
DAMAGER = {72/256, 130/256, 69/256, 127/256},
HEALER = {72/256, 130/256, 2/256, 60/256},
TANK = {5/256, 63/256, 69/256, 127/256},
NONE = {139/256, 196/256, 69/256, 127/256},
}
_detalhes.player_class = {
Details.player_class = {
["HUNTER"] = true,
["WARRIOR"] = true,
["PALADIN"] = true,
@@ -1040,7 +1045,7 @@ do
["DEATHKNIGHT"] = true,
["DEMONHUNTER"] = true,
}
_detalhes.classstring_to_classid = {
Details.classstring_to_classid = {
["WARRIOR"] = 1,
["PALADIN"] = 2,
["HUNTER"] = 3,
@@ -1054,7 +1059,7 @@ do
["DRUID"] = 11,
["DEMONHUNTER"] = 12,
}
_detalhes.classid_to_classstring = {
Details.classid_to_classstring = {
[1] = "WARRIOR",
[2] = "PALADIN",
[3] = "HUNTER",
@@ -1071,7 +1076,7 @@ do
local Loc = LibStub("AceLocale-3.0"):GetLocale ("Details")
_detalhes.segmentos = {
Details.segmentos = {
label = Loc ["STRING_SEGMENT"]..": ",
overall = Loc ["STRING_TOTAL"],
overall_standard = Loc ["STRING_OVERALL"],
@@ -1080,7 +1085,7 @@ do
past = Loc ["STRING_FIGHTNUMBER"]
}
_detalhes._detalhes_props["modo_nome"] = {
Details._detalhes_props["modo_nome"] = {
[_detalhes._detalhes_props["MODO_ALONE"]] = Loc ["STRING_MODE_SELF"],
[_detalhes._detalhes_props["MODO_GROUP"]] = Loc ["STRING_MODE_GROUP"],
[_detalhes._detalhes_props["MODO_ALL"]] = Loc ["STRING_MODE_ALL"],
@@ -1092,7 +1097,7 @@ do
--[[global]] DETAILS_MODE_GROUP = 2
--[[global]] DETAILS_MODE_ALL = 3
_detalhes.icones = {
Details.icones = {
--report window
report = {
up = "Interface\\FriendsFrame\\UI-Toast-FriendOnlineIcon",
@@ -1102,7 +1107,7 @@ do
}
}
_detalhes.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --do not localize-me
Details.missTypes = {"ABSORB", "BLOCK", "DEFLECT", "DODGE", "EVADE", "IMMUNE", "MISS", "PARRY", "REFLECT", "RESIST"} --do not localize-me
function Details.SendHighFive()
+4 -2
View File
@@ -5994,8 +5994,10 @@ function damageClass:BuildSpellDetails(spellBar, spellBlockContainer, blockIndex
local totalCasts = spellBar.amountCasts > 0 and spellBar.amountCasts or "(?)"
blockLine1.leftText:SetText(Loc ["STRING_CAST"] .. ": " .. totalCasts) --total amount of casts
if (trinketData[spellId] and combatObject.trinketProcs) then
local trinketProcData = combatObject.trinketProcs[actorName]
local trinketProcs = combatObject:GetTrinketProcsForPlayer(actorName)
if (trinketData[spellId] and trinketProcs) then
local trinketProcData = trinketProcs[actorName]
if (trinketProcData) then
local trinketProc = trinketProcData[spellId]
if (trinketProc) then
+44 -30
View File
@@ -1,5 +1,10 @@
---@type details
local Details = _G.Details
---@type detailsframework
local detailsFramework = DetailsFramework
local _
local addonName, Details222 = ...
@@ -8,6 +13,8 @@ local segmentClass = Details.historico
local bitBand = bit.band
local wipe = table.wipe
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--API
@@ -34,6 +41,10 @@ function Details:GetOverallCombat()
return Details.tabela_overall
end
---return a combat object for the given segment identifier
---@param self details
---@param combat any
---@return combat|nil
function Details:GetCombat(combat)
if (not combat) then
return Details:GetCurrentCombat()
@@ -142,6 +153,8 @@ function segmentClass:CreateNewSegmentDatabase()
return newSegmentDatabase
end
---comment
---@param combatObject combat
function segmentClass:AddToOverallData(combatObject)
local zoneName, zoneType = GetInstanceInfo()
if (zoneType ~= "none" and combatObject:GetCombatTime() <= Details.minimum_overall_combat_time) then
@@ -183,49 +196,48 @@ function segmentClass:AddToOverallData(combatObject)
end
end
--store the segments added to the overall data
Details.tabela_overall.segments_added = Details.tabela_overall.segments_added or {}
local startDate = combatObject.data_inicio
---@type combat
local overallCombat = Details:GetOverallCombat()
local combatName = combatObject:GetCombatName(true)
--store the segments added to the overall data
overallCombat.segments_added = overallCombat.segments_added or {}
local combatStartDate = combatObject:GetDate()
local combatName = combatObject:GetCombatName(false, true)
local combatTime = combatObject:GetCombatTime()
local combatType = combatObject:GetCombatType()
table.insert(Details.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = startDate, type = combatType})
table.insert(overallCombat.segments_added, 1, {name = combatName, elapsed = combatTime, clock = combatStartDate, type = combatType})
if (#Details.tabela_overall.segments_added > 40) then
table.remove(Details.tabela_overall.segments_added, 41)
if (#overallCombat.segments_added > 40) then
table.remove(overallCombat.segments_added, 41)
end
if (Details.debug) then
--Details:Msg("(debug) adding the segment to overall data: " .. (combatObject:GetCombatName(true) or "no name") .. " with time of: " .. (combatObject:GetCombatTime() or "no time"))
end
Details.tabela_overall = Details.tabela_overall + combatObject
overallCombat = overallCombat + combatObject
combatObject.overall_added = true
if (not Details.tabela_overall.overall_enemy_name) then
Details.tabela_overall.overall_enemy_name = combatObject.is_boss and combatObject.is_boss.name or combatObject.enemy
if (not overallCombat.overall_enemy_name) then
overallCombat.overall_enemy_name = combatObject.is_boss and combatObject.is_boss.name or combatObject.enemy
else
if (Details.tabela_overall.overall_enemy_name ~= (combatObject.is_boss and combatObject.is_boss.name or combatObject.enemy)) then
Details.tabela_overall.overall_enemy_name = "-- x -- x --"
if (overallCombat.overall_enemy_name ~= (combatObject.is_boss and combatObject.is_boss.name or combatObject.enemy)) then
overallCombat.overall_enemy_name = "-- x -- x --"
end
end
if (Details.tabela_overall.start_time == 0) then
Details.tabela_overall:SetStartTime(combatObject.start_time)
Details.tabela_overall:SetEndTime(combatObject.end_time)
if (overallCombat.start_time == 0) then
overallCombat:SetStartTime(combatObject.start_time)
overallCombat:SetEndTime(combatObject.end_time)
else
Details.tabela_overall:SetStartTime(combatObject.start_time - Details.tabela_overall:GetCombatTime())
Details.tabela_overall:SetEndTime(combatObject.end_time)
overallCombat:SetStartTime(combatObject.start_time - overallCombat:GetCombatTime())
overallCombat:SetEndTime(combatObject.end_time)
end
local currentCombat = Details:GetCurrentCombat()
if (Details.tabela_overall.data_inicio == 0) then
Details.tabela_overall.data_inicio = currentCombat.data_inicio or 0
local overallStartDate = overallCombat:GetDate()
if (overallStartDate == 0) then
overallCombat:SetDate(combatStartDate or 0)
end
Details.tabela_overall:seta_data(Details._detalhes_props.DATA_TYPE_END)
overallCombat:SetDateToNow(false, true)
Details:ClockPluginTickOnSegment()
for id, instance in Details:ListInstances() do
@@ -247,6 +259,8 @@ function Details:CanAddCombatToOverall(combatObject)
return false
end
local combatType = combatObject:GetCombatType()
--special cases
local mythicInfo = combatObject.is_mythic_dungeon
if (mythicInfo) then
@@ -261,7 +275,7 @@ function Details:CanAddCombatToOverall(combatObject)
--raid boss - flag 0x1
if (bitBand(Details.overall_flag, 0x1) ~= 0) then
if (combatObject.is_boss and combatObject.instance_type == "raid" and not combatObject.is_pvp) then
if (combatObject.is_boss and combatObject:GetInstanceType() == "raid" and not combatObject.is_pvp) then
if (combatObject:GetCombatTime() >= 30) then
return true
end
@@ -270,21 +284,21 @@ function Details:CanAddCombatToOverall(combatObject)
--raid trash - flag 0x2
if (bitBand(Details.overall_flag, 0x2) ~= 0) then
if (combatObject.is_trash and combatObject.instance_type == "raid") then
if (combatObject.is_trash and combatObject:GetInstanceType() == "raid") then
return true
end
end
--dungeon boss - flag 0x4
if (bitBand(Details.overall_flag, 0x4) ~= 0) then
if (combatObject.is_boss and combatObject.instance_type == "party" and not combatObject.is_pvp) then
if (combatObject.is_boss and combatObject:GetInstanceType() == "party" and combatType ~= DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND) then
return true
end
end
--dungeon trash - flag 0x8
if (bitBand(Details.overall_flag, 0x8) ~= 0) then
if ((combatObject.is_trash or combatObject.is_mythic_dungeon_trash) and combatObject.instance_type == "party") then
if ((combatObject.is_trash or combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH) and combatObject:GetInstanceType() == "party") then
return true
end
end
@@ -295,7 +309,7 @@ function Details:CanAddCombatToOverall(combatObject)
end
--is a PvP combat
if (combatObject.is_pvp or combatObject.is_arena) then
if (combatType == DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND or combatType == DETAILS_SEGMENTTYPE_PVP_ARENA) then
return true
end
+10 -3
View File
@@ -329,7 +329,8 @@
--flag Details! as 'in combat'
Details.in_combat = true
newCombatObject:seta_data(Details._detalhes_props.DATA_TYPE_START) --seta na tabela do combate a data do inicio do combate -- setup time data
local bSetStartTime = true
newCombatObject:SetDateToNow(bSetStartTime)
--set the combat id on the combat object
newCombatObject.combat_id = combatCounter
@@ -548,7 +549,9 @@
end
--salva hora, minuto, segundo do fim da luta
currentCombat:seta_data(Details._detalhes_props.DATA_TYPE_END)
local bSetStartTime = false
local bSetEndTime = true
currentCombat:SetDateToNow(bSetStartTime, bSetEndTime)
currentCombat:seta_tempo_decorrido()
--drop last events table to garbage collector
@@ -617,12 +620,16 @@
if (currentCombat.is_mythic_dungeon_segment) then --setted just above
--is inside a mythic+ dungeon and this is not a boss segment, so tag it as a dungeon mythic+ trash segment
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
currentCombat.is_mythic_dungeon_trash = {
---@type mythicdungeontrashinfo
local mythicPlusTrashInfo = {
ZoneName = zoneName,
MapID = instanceMapID,
Level = Details.MythicPlus.Level,
EJID = Details.MythicPlus.ejID,
}
currentCombat.is_mythic_dungeon_trash = mythicPlusTrashInfo
if (Details.debug) then
Details:Msg("segment tagged as mythic+ trash.")
end
+6 -4
View File
@@ -133,12 +133,14 @@ local classTypeUtility = Details.atributos.misc
end
--overall data startTime
if (overallCombatObject.data_inicio == 0) then
overallCombatObject.data_inicio = thisCombatObject.data_inicio or 0
if (overallCombatObject:GetDate() == 0) then
overallCombatObject:SetDate(thisCombatObject:GetDate() or 0)
end
--overall data finished time
overallCombatObject.data_fim = thisCombatObject.data_fim or overallCombatObject.data_fim
local thisCombatDateStart, thisCombaDateEnd = thisCombatObject:GetDate()
local overallDateStart, overallDateEnd = overallCombatObject:GetDate()
overallCombatObject:SetDate(nil, thisCombaDateEnd or overallDateEnd)
--overall data enemy name
if (not Details.tabela_overall.overall_enemy_name) then
@@ -151,7 +153,7 @@ local classTypeUtility = Details.atributos.misc
--overall data segments added
local dateStart, dateEnd = thisCombatObject:GetDate()
table.insert(overallCombatObject.segments_added, {name = thisCombatObject:GetCombatName(true), elapsed = thisCombatObject:GetCombatTime(), clock = dateStart})
table.insert(overallCombatObject.segments_added, {name = thisCombatObject:GetCombatName(false, true), elapsed = thisCombatObject:GetCombatTime(), clock = dateStart})
end
--ghost container (container for custom displays, this is not a real container)
+12 -10
View File
@@ -1646,8 +1646,11 @@
end
if (_current_combat.trinketProcs) then
---@type table <actorname, trinketprocdata>
local playerTrinketData = _current_combat.trinketProcs[sourceName] or {}
_current_combat.trinketProcs[sourceName] = playerTrinketData
---@type trinketprocdata
local trinketData = playerTrinketData[spellId] or {cooldown = 0, total = 0}
playerTrinketData[spellId] = trinketData
@@ -4755,6 +4758,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end
--local WA_OnPlayerDeath = function(isFakeDeath, token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, deathLog, lastCooldown, combatElapsedTime, maxHealth, mythicPlusElapsedTime)
--check auras with details! death log enabled
--run a script in the aura which receives interesting data from the WA_OnPlayerDeath()
--end
--Details:InstallHook("HOOK_DEATH", WA_OnPlayerDeath)
function parser:environment(token, time, sourceSerial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, env_type, amount)
local spelId
@@ -6901,7 +6910,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details:Destroy(bitfield_swap_cache)
Details:Destroy(empower_cache)
local groupRoster = Details.tabela_vigente.raid_roster
local currentCombat = Details:GetCurrentCombat()
local groupRoster = currentCombat.raid_roster
if (IsInRaid()) then
local unitIdCache = Details222.UnitIdCache.Raid
@@ -6988,15 +6999,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end
local orderNames = {}
for playerName in pairs(groupRoster) do
orderNames[#orderNames+1] = playerName
end
table.sort(orderNames, function(name1, name2)
return string.len(name1) > string.len(name2)
end)
Details.tabela_vigente.raid_roster_indexed = orderNames
if (Details.iam_a_tank) then
tanks_members_cache[UnitGUID("player")] = true
end
+3 -3
View File
@@ -353,7 +353,7 @@
custom = custom:gsub("{target}", alvo_name or "")
_detalhes:SendMsgToChannel (custom, "PRINT")
else
local minute, second = _detalhes:GetCombat():GetFormatedCombatTime()
local minute, second = _detalhes:GetCombat():GetMSTime()
local class = Details:GetUnitClass(who_name)
local class_color = "|cFFFF3333"
@@ -455,7 +455,7 @@
end
local msg
local minute, second = _detalhes:GetCombat():GetFormatedCombatTime()
local minute, second = _detalhes:GetCombat():GetMSTime()
local class = Details:GetUnitClass(who_name)
local class_color = "|cFFFFFFFF"
@@ -592,7 +592,7 @@
msg = msg .. " " .. spells
if (where == 4) then --observer
local minute, second = _detalhes:GetCombat():GetFormatedCombatTime()
local minute, second = _detalhes:GetCombat():GetMSTime()
if (second < 10) then
second = "0" .. second
end
+2 -2
View File
@@ -722,7 +722,7 @@ do
if (child.options.segmentType == 1) then
child.text:SetText(Loc ["STRING_CURRENT"])
else
local combatName = Details.tabela_vigente:GetCombatName(true)
local combatName = Details.tabela_vigente:GetCombatName(false, true)
if (combatName and combatName ~= Loc ["STRING_UNKNOW"]) then
if (child.options.segmentType == 2) then
@@ -746,7 +746,7 @@ do
child.text:SetText(Loc ["STRING_FIGHTNUMBER"] .. child.instance:GetSegmentId())
else
local combatName = child.instance.showing:GetCombatName(true)
local combatName = child.instance.showing:GetCombatName(false, true)
if (combatName ~= Loc ["STRING_UNKNOW"]) then
if (child.options.segmentType == 2) then
child.text:SetText(combatName)
+190 -214
View File
@@ -6,6 +6,9 @@ local segmentos = Details.segmentos
local gump = Details.gump
local _
---@type detailsframework
local detailsFramework = DetailsFramework
--lua locals
local ceil = math.ceil
local floor = math.floor
@@ -6307,10 +6310,6 @@ function Details:GetSegmentInfo(index)
end
function Details:UnpackMythicDungeonInfo(t)
return t.OverallSegment, t.SegmentID, t.Level, t.EJID, t.MapID, t.ZoneName, t.EncounterID, t.EncounterName, t.StartedAt, t.EndedAt, t.RunID
end
local segmentsUsed = 0
local segmentsFilled = 0
@@ -6358,73 +6357,99 @@ local buildSegmentTooltip = function(self, deltaTime)
local dungeonColor = party_line_color
local dungeonColorTrash = party_line_color_trash
local dungeonRunId = false
local isMythicDungeon = false
--the mythic dungeon run id is used to check if the segment is from the same run
--later the code can change the color of the segment to a slight different blue if the run is different
--this variable can be nil or false for non mythic dungeons segments or a number for mythic dungeons segments
local mythicDungeonRunId
local statusBarTexture = "Skyline"
for i = Details.segments_amount, 1, -1 do
if (i <= fill) then
---@type combat
local thisCombat = segmentsTable[i]
if (thisCombat and not thisCombat.__destroyed) then
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
---@type bossinfo
local bossInfo = thisCombat:GetBossInfo()
---@type details_instanceinfo
local instanceInfo = Details:GetInstanceInfo(bossInfo and bossInfo.mapid or thisCombat.mapId)
---@type details_encounterinfo
local encounterInfo = Details:GetEncounterInfo(thisCombat:GetEncounterName())
local dateStart, dateEnd = thisCombat:GetDate()
---@type combattime
local elapsedCombatTime = thisCombat:GetCombatTime()
local enemyName = bossInfo and bossInfo.name
local segmentInfoAdded = false
segmentsUsed = segmentsUsed + 1
if (thisCombat.is_mythic_dungeon_segment) then
if (not isMythicDungeon) then
isMythicDungeon = thisCombat.is_mythic_dungeon_run_id
local bIsMythicDungeon, runId = thisCombat:IsMythicDungeon()
local combatType, combatCategory = thisCombat:GetCombatType()
if (combatCategory == DETAILS_SEGMENTTYPE_MYTHICDUNGEON) then
if (not mythicDungeonRunId) then
mythicDungeonRunId = runId
else
if (isMythicDungeon ~= thisCombat.is_mythic_dungeon_run_id) then
isMythicDungeon = thisCombat.is_mythic_dungeon_run_id
if (mythicDungeonRunId ~= runId) then
mythicDungeonRunId = runId
dungeonColor = dungeonColor == party_line_color and party_line_color2 or party_line_color
dungeonColorTrash = dungeonColorTrash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
end
end
local mythicDungeonInfo = thisCombat:GetMythicDungeonInfo()
if (mythicDungeonInfo) then --if is is_mythic_dungeon_segment but no mythicDungeonInfo, it will show as M+ 'Trash Cleanup'
--is a boss, trash overall or run overall segment
local bossInfo = thisCombat.is_boss
local elapsedCombatTime = thisCombat:GetCombatTime()
--if this call fail, it'll show 'Unknown (boss fight)'
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = Details:UnpackMythicDungeonInfo(mythicDungeonInfo)
if (not dungeonRunId) then
dungeonRunId = runID
else
if (dungeonRunId ~= runID) then
dungeonColor = dungeonColor == party_line_color and party_line_color2 or party_line_color
dungeonColorTrash = dungeonColorTrash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
dungeonRunId = runID
--if is bIsMythicDungeon but no mythicDungeonInfo, it will show as M+ 'Trash Cleanup'
--is a boss, trash overall or run overall segment
if (combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH) then
--the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
--so this is a trash cleanup segment
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
gameCooltip:AddLine(thisCombat:GetCombatName(), detailsFramework:IntegerToTimer(thisCombat:GetCombatTime()), 1, dungeonColorTrash, "gray")
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left", nil, nil, nil, nil, nil, nil, nil, nil, true)
--submenu
gameCooltip:AddLine(Loc["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", detailsFramework:IntegerToTimer(thisCombat:GetCombatTime()), 2, "white", "white")
gameCooltip:AddLine("", "", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat:GetDate(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
if (trashInfo) then
local backgroundImage = Details:GetRaidIcon(trashInfo.MapID, trashInfo.EJID, "party")
if (backgroundImage and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper(2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true)
end
end
local addIconAndStatusBar = function(redTint)
gameCooltip:AddIcon([[Interface\AddOns\Details\images\empty16]], 2, 1, 12, 12)
gameCooltip:AddStatusBar(100, 2, redTint or 0, 0, 0, 0.85, false, false, "Skyline")
end
--is mythic overall
if (isMythicOverallSegment) then
local overallIcon = "|TInterface\\GLUES\\CharacterSelect\\Glues-AddOn-Icons:16:16:0:0:64:16:48:64:0:16|t"
gameCooltip:AddLine(overallIcon .. zoneName .. " +" .. mythicLevel .. " (" .. Loc["STRING_SEGMENTS_LIST_OVERALL"] .. ")", Details.gump:IntegerToTimer(endedAt - startedAt), 1, dungeonColor)
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
gameCooltip:AddStatusBar(100, 1, .5, .1, 0, 0.55, false, false, "Skyline")
elseif (combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then
gameCooltip:AddLine(thisCombat:GetCombatName(), detailsFramework:IntegerToTimer(endedAt - startedAt), 1, dungeonColor)
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
gameCooltip:AddStatusBar(100, 1, .5, .1, 0, 0.55, false, false, statusBarTexture)
--submenu
gameCooltip:AddLine(zoneName .. " +" .. mythicLevel .. " (" .. Loc["STRING_SEGMENTS_LIST_OVERALL"] .. ")", nil, 2, "white", "white")
gameCooltip:AddStatusBar(100, 2, 0, 0, 0, 0.85, false, false, "Skyline")
else
if (segmentID == "trashoverall") then
local trashIcon = "|TInterface\\AddOns\\Details\\images\\icons:16:16:0:0:512:512:14:58:98:160|t"
gameCooltip:AddLine(trashIcon .. "" .. (encounterName or Loc["STRING_UNKNOW"]) .. " (" .. Loc["STRING_SEGMENTS_LIST_TRASH"] .. ")", Details.gump:IntegerToTimer(endedAt - startedAt), 1, dungeonColor, "gray")
addIconAndStatusBar()
gameCooltip:AddLine((encounterName or Loc["STRING_UNKNOW"]) .. " (" .. Loc["STRING_SEGMENTS_LIST_TRASH"] .. ")", nil, 2, "white", "white")
addIconAndStatusBar()
else
gameCooltip:AddStatusBar(100, 2, 0, 0, 0, 0.85, false, false, statusBarTexture)
elseif (DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS) then
local addIconAndStatusBar = function(redTint)
gameCooltip:AddIcon(Details:GetTextureAtlas("segment-icon-empty"), 2, 1)
gameCooltip:AddStatusBar(100, 2, redTint or 0, 0, 0, 0.85, false, false, statusBarTexture)
end
local skull = "|TInterface\\AddOns\\Details\\images\\icons:16:16:0:0:512:512:496:512:0:16|t"
gameCooltip:AddLine(skull .. "" .. (encounterName or Loc["STRING_UNKNOW"]) .. " (" .. Loc["STRING_SEGMENTS_LIST_BOSS"] .. ")", Details.gump:IntegerToTimer(elapsedCombatTime), 1, dungeonColor, "gray")
gameCooltip:AddLine(skull .. "" .. thisCombat:GetCombatName(), detailsFramework:IntegerToTimer(elapsedCombatTime), 1, dungeonColor, "gray")
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
addIconAndStatusBar()
gameCooltip:AddLine((encounterName or Loc["STRING_UNKNOW"]) .. " (" .. Loc["STRING_SEGMENTS_LIST_BOSS"] .. ")", nil, 2, "white", "white")
gameCooltip:AddLine(thisCombat:GetCombatName(), nil, 2, "white", "white")
addIconAndStatusBar()
do
@@ -6442,9 +6467,6 @@ local buildSegmentTooltip = function(self, deltaTime)
--gameCooltip:SetBannerImage(2, 2, [[Interface\PetBattles\Weather-Windy]], 200, 55, anchor, {1, 0.129609375, 1, 0})
--gameCooltip:SetBannerText(2, 2, encounterName, textPoint, avatarTextColor, 14, SharedMedia:Fetch("font", Details.tooltip.fontface))
end
end
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
end
local instanceData
if (thisCombat.is_boss) then
@@ -6467,33 +6489,33 @@ local buildSegmentTooltip = function(self, deltaTime)
local timeInCombat = thisCombat:GetCombatTime()
if (segmentID == "trashoverall") then
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", Details.gump:IntegerToTimer(timeInCombat), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", detailsFramework:IntegerToTimer(timeInCombat), 2, "white", "white")
addIconAndStatusBar()
local totalRealTime = endedAt - startedAt
local wasted = totalRealTime - timeInCombat
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. detailsFramework:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
addIconAndStatusBar(0.15)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer(endedAt - startedAt), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", detailsFramework:IntegerToTimer(endedAt - startedAt), 2, "white", "white")
addIconAndStatusBar()
elseif (isMythicOverallSegment) then
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", Details.gump:IntegerToTimer(timeInCombat), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", detailsFramework:IntegerToTimer(timeInCombat), 2, "white", "white")
addIconAndStatusBar()
local totalRealTime = thisCombat:GetRunTimeNoDefault() or (endedAt - startedAt)
local notInCombatTime = totalRealTime - timeInCombat
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer(totalRealTime), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", detailsFramework:IntegerToTimer(totalRealTime), 2, "white", "white")
addIconAndStatusBar()
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer(notInCombatTime) .. " (" .. floor(notInCombatTime / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. detailsFramework:IntegerToTimer(notInCombatTime) .. " (" .. floor(notInCombatTime / totalRealTime * 100) .. "%)|r", 2, "white", "white")
addIconAndStatusBar(0.15)
else
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", Details.gump:IntegerToTimer(timeInCombat), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", detailsFramework:IntegerToTimer(timeInCombat), 2, "white", "white")
addIconAndStatusBar()
end
@@ -6502,88 +6524,51 @@ local buildSegmentTooltip = function(self, deltaTime)
addIconAndStatusBar()
end
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat:GetDate(), 2, "white", "white")
addIconAndStatusBar()
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
addIconAndStatusBar()
--gameCooltip:AddStatusBar(100, 1, .3, .3, .3, 0.2, false, false, "Skyline")
else
--the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
--so this is a trash cleanup segment
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
gameCooltip:AddLine(Loc["STRING_SEGMENT_TRASH"] .. " (#" .. i .. ")", Details.gump:IntegerToTimer(thisCombat:GetCombatTime()), 1, dungeonColorTrash, "gray")
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
end
--submenu
gameCooltip:AddLine(Loc["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", Details.gump:IntegerToTimer(thisCombat:GetCombatTime()), 2, "white", "white")
gameCooltip:AddLine("", "", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
if (trashInfo) then
local backgroundImage = Details:GetRaidIcon(trashInfo.MapID, trashInfo.EJID, "party")
if (backgroundImage and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper(2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true)
end
end
end
segmentInfoAdded = true
--end of DETAILS_SEGMENTTYPE_MYTHICDUNGEON
elseif (thisCombat.is_boss and thisCombat.is_boss.name) then
---@type details_instanceinfo
local instanceInfo = Details:GetInstanceInfo(thisCombat.is_boss.mapid)
elseif (combatType == DETAILS_SEGMENTTYPE_DUNGEON_BOSS or combatType == DETAILS_SEGMENTTYPE_RAID_BOSS) then --if this is a boss encounter
--isn't anymore a sequence of mythic+ segments
mythicDungeonRunId = false
isMythicDungeon = false
local try_number = thisCombat.is_boss.try_number
local combat_time = thisCombat:GetCombatTime()
local tryNumber = thisCombat:GetTryNumber()
local combatTime = thisCombat:GetCombatTime()
local combatInstanceType = thisCombat:GetInstanceType()
if (thisCombat.instance_type == "party") then
gameCooltip:AddLine(thisCombat.is_boss.name .." (#"..i..")", _, 1, dungeonColor)
elseif (thisCombat.is_boss.killed) then
if (try_number) then
local m, s = floor(combat_time/60), floor(combat_time%60)
if (s < 10) then
s = "0" .. s
end
gameCooltip:AddLine(thisCombat.is_boss.name .." (#"..try_number.." " .. m .. ":" .. s .. ")", _, 1, "lime")
if (combatInstanceType == "party") then
local combatName, r, g, b = thisCombat:GetCombatName()
gameCooltip:AddLine(combatName, _, 1, r or dungeonColor, b, g, 1)
elseif (bossInfo.killed) then
gameCooltip:AddLine(thisCombat:GetCombatName(), _, 1, "lime")
else
gameCooltip:AddLine(thisCombat.is_boss.name .." (#"..i..")", _, 1, "lime")
end
else
if (try_number) then
local m, s = floor(combat_time/60), floor(combat_time%60)
if (s < 10) then
s = "0" .. s
end
gameCooltip:AddLine(thisCombat.is_boss.name .." (#"..try_number.." " .. m .. ":" .. s .. ")", _, 1, "red")
else
gameCooltip:AddLine(thisCombat.is_boss.name .." (#"..i..")", _, 1, "red")
end
gameCooltip:AddLine(thisCombat:GetCombatName(), _, 1, "red")
end
---@type details_encounterinfo
local encounterInfo = Details:GetEncounterInfo(thisCombat.EncounterName)
local portrait = (encounterInfo and encounterInfo.creatureIcon) or thisCombat.is_boss.bossimage or thisCombat.bossIcon
local portrait = thisCombat:GetBossImage()
if (portrait) then
gameCooltip:AddIcon(portrait, 2, "top", 128, 64)
end
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 16, 0.96875, 1, 0, 0.03125)
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
if (Details.tooltip.submenu_wallpaper) then
local background = Details:GetRaidIcon(thisCombat.is_boss.mapid)
local background = Details:GetRaidIcon(bossInfo.mapid)
if (background and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper(2, background, nil, segments_wallpaper_color, true)
else
local ej_id = thisCombat.is_boss.ej_instance_id
if (ej_id and ej_id ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = DetailsFramework.EncounterJournal.EJ_GetInstanceInfo (ej_id)
local encounterJournalId = bossInfo.ej_instance_id
if (encounterJournalId and encounterJournalId ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = DetailsFramework.EncounterJournal.EJ_GetInstanceInfo(encounterJournalId)
if (name and bCanUseBackgroundImage) then
if (thisCombat.instance_type == "party") then
if (combatInstanceType == "party") then
gameCooltip:SetWallpaper(2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
else
gameCooltip:SetWallpaper(2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
@@ -6593,11 +6578,19 @@ local buildSegmentTooltip = function(self, deltaTime)
end
end
elseif (thisCombat.is_pvp) then
isMythicDungeon = false
gameCooltip:AddLine(thisCombat.is_pvp.name, _, 1, battleground_color)
enemy = thisCombat.is_pvp.name
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)
elseif (combatType == DETAILS_SEGMENTTYPE_EVENT_VALENTINEDAY) then
mythicDungeonRunId = false
--dungeon
local combatName, r, g, b = thisCombat:GetCombatName()
gameCooltip:AddLine(combatName, _, 1, "hotpink")
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
elseif (combatType == DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND) then
mythicDungeonRunId = false
enemyName = thisCombat:GetCombatName()
gameCooltip:AddLine(enemyName, _, 1, battleground_color)
enemyName = enemyName
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
if (Details.tooltip.submenu_wallpaper) then
local file, coords = Details:GetBattlegroundInfo (thisCombat.is_pvp.mapid)
@@ -6606,11 +6599,11 @@ local buildSegmentTooltip = function(self, deltaTime)
end
end
elseif (thisCombat.is_arena) then
isMythicDungeon = false
gameCooltip:AddLine(thisCombat.is_arena.name, _, 1, "yellow")
enemy = thisCombat.is_arena.name
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.251953125, 0.306640625, 0.205078125, 0.248046875)
elseif (combatType == DETAILS_SEGMENTTYPE_PVP_ARENA) then
mythicDungeonRunId = false
enemyName = thisCombat:GetCombatName()
gameCooltip:AddLine(enemyName, _, 1, "yellow")
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
if (Details.tooltip.submenu_wallpaper) then
local file, coords = Details:GetArenaInfo(thisCombat.is_arena.mapid)
@@ -6619,19 +6612,11 @@ local buildSegmentTooltip = function(self, deltaTime)
end
end
else
isMythicDungeon = false
enemy = thisCombat.enemy
if (enemy) then
gameCooltip:AddLine(thisCombat.enemy .." (#"..i..")", _, 1, "yellow")
else
gameCooltip:AddLine(segmentos.past..i, _, 1, "silver")
end
mythicDungeonRunId = false
if (thisCombat.is_trash) then
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125)
else
gameCooltip:AddIcon([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16)
end
local bFindEnemyName = true
gameCooltip:AddLine(thisCombat:GetCombatName(false, bFindEnemyName), _, 1, "yellow")
gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left")
if (Details.tooltip.submenu_wallpaper and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper(2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color, true)
@@ -6641,24 +6626,21 @@ local buildSegmentTooltip = function(self, deltaTime)
gameCooltip:AddMenu(1, instance.SetSegmentFromCooltip, i)
if (not segmentInfoAdded) then
gameCooltip:AddLine(Loc["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
local decorrido = thisCombat:GetCombatTime() --attempt to call method 'GetCombatTime' (a nil value)
local minutos, segundos = floor(decorrido/60), floor(decorrido%60)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_ENEMY"] .. ":", enemyName, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", thisCombat:GetFormattedCombatTime(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat:GetDate(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
end
amountOfSegments = amountOfSegments + 1
else
if (thisCombat and thisCombat.__destroyed) then
Details:Msg("a deleted combat object was found on the history table, please report this bug on discord:")
Details:Msg("a deleted combat object was found on the segments history table, please report this bug on discord:")
Details:Msg("combat destroyed by:", thisCombat.__destroyedBy)
else
gameCooltip:AddLine(Loc["STRING_SEGMENT_LOWER"] .. " #" .. i, _, 1, "gray")
gameCooltip:AddMenu(1, instance.SetSegmentFromCooltip, i)
gameCooltip:AddIcon([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color)
gameCooltip:AddIcon(Details:GetTextureAtlas("segment-icon-regular"), "main", "left", nil, nil, nil, nil, nil, nil, empty_segment_color)
gameCooltip:AddLine(Loc["STRING_SEGMENT_EMPTY"], _, 2)
gameCooltip:AddIcon([[Interface\CHARACTERFRAME\Disconnect-Icon]], 2, 1, 12, 12, 0.3125, 0.65625, 0.265625, 0.671875)
end
@@ -6676,17 +6658,18 @@ local buildSegmentTooltip = function(self, deltaTime)
GameCooltip:AddLine("$div", nil, nil, -5, -13)
----------- current
local enemy = Details.tabela_vigente.is_boss and Details.tabela_vigente.is_boss.name or Details.tabela_vigente.enemy or "--x--x--"
local file, coords
local thisCombat = Details.tabela_vigente
--> current combat
local thisCombat = Details:GetCurrentCombat()
local dateStart, dateEnd = thisCombat:GetDate()
local segment_info_added
local enemy = thisCombat.is_boss and thisCombat.is_boss.name or thisCombat.enemy or "--x--x--"
local file, coords
--add the new line
gameCooltip:AddLine(segmentos.current_standard, _, 1, "white")
gameCooltip:AddMenu(1, instance.SetSegmentFromCooltip, 0)
gameCooltip:AddIcon([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
gameCooltip:AddIcon(Details:GetTextureAtlas("segment-icon-current"), "main", "left")
--current segment is a dungeon mythic+?
if (thisCombat.is_mythic_dungeon_segment) then
@@ -6698,16 +6681,6 @@ local buildSegmentTooltip = function(self, deltaTime)
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = Details:UnpackMythicDungeonInfo (mythicDungeonInfo)
local combatElapsedTime = thisCombat:GetCombatTime()
if (not dungeonRunId) then
dungeonRunId = runID
else
if (dungeonRunId ~= runID) then
dungeonColor = dungeonColor == party_line_color and party_line_color2 or party_line_color
dungeonColorTrash = dungeonColorTrash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
dungeonRunId = runID
end
end
--is mythic overall
if (isMythicOverallSegment) then
--mostrar o tempo da dungeon
@@ -6748,36 +6721,36 @@ local buildSegmentTooltip = function(self, deltaTime)
local totalRealTime = endedAt - startedAt
local wasted = totalRealTime - decorrido
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", Details.gump:IntegerToTimer(decorrido), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", detailsFramework:IntegerToTimer(decorrido), 2, "white", "white")
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. detailsFramework:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, statusBarTexture)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer(endedAt - startedAt) .. " [|cFFFF3300" .. Details.gump:IntegerToTimer(totalRealTime - decorrido) .. "|r]", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", detailsFramework:IntegerToTimer(endedAt - startedAt) .. " [|cFFFF3300" .. detailsFramework:IntegerToTimer(totalRealTime - decorrido) .. "|r]", 2, "white", "white")
elseif (isMythicOverallSegment) then
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", Details.gump:IntegerToTimer(decorrido), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", detailsFramework:IntegerToTimer(decorrido), 2, "white", "white")
local totalRealTime = endedAt - startedAt
local wasted = totalRealTime - decorrido
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", Details.gump:IntegerToTimer(totalRealTime), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", detailsFramework:IntegerToTimer(totalRealTime), 2, "white", "white")
--wasted time
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. Details.gump:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, "Skyline")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_WASTED_TIME"] .. ":", "|cFFFF3300" .. detailsFramework:IntegerToTimer(wasted) .. " (" .. floor(wasted / totalRealTime * 100) .. "%)|r", 2, "white", "white")
gameCooltip:AddStatusBar (100, 2, 0, 0, 0, 0.35, false, false, statusBarTexture)
else
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", Details.gump:IntegerToTimer(decorrido), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", detailsFramework:IntegerToTimer(decorrido), 2, "white", "white")
end
if (thisCombat.is_boss) then
gameCooltip:AddLine("", "", 2, "white", "white")
end
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat:GetDate(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
else
--the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
@@ -6791,10 +6764,10 @@ local buildSegmentTooltip = function(self, deltaTime)
--submenu
gameCooltip:AddLine(Loc["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", Details.gump:IntegerToTimer(thisCombat:GetCombatTime()), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", detailsFramework:IntegerToTimer(thisCombat:GetCombatTime()), 2, "white", "white")
gameCooltip:AddLine("", "", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", thisCombat:GetDate(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
if (trashInfo) then
local backgroundImage = Details:GetRaidIcon (trashInfo.MapID, trashInfo.EJID, "party")
@@ -6806,12 +6779,11 @@ local buildSegmentTooltip = function(self, deltaTime)
segment_info_added = true
elseif (Details.tabela_vigente.is_boss and Details.tabela_vigente.is_boss.name) then
local portrait = Details:GetBossPortrait(Details.tabela_vigente.is_boss.mapid, Details.tabela_vigente.is_boss.index) or Details.tabela_vigente.is_boss.bossimage
elseif (thisCombat.is_boss and thisCombat.is_boss.name) then
local portrait = Details:GetBossPortrait(thisCombat.is_boss.mapid, thisCombat.is_boss.index) or thisCombat.is_boss.bossimage
if (portrait) then
gameCooltip:AddIcon(portrait, 2, "top", 128, 64)
else
local thisCombat = Details.tabela_vigente
local encounter_name = thisCombat.is_boss.encounter
local instanceID = thisCombat.is_boss.ej_instance_id
instanceID = tonumber(instanceID)
@@ -6827,15 +6799,15 @@ local buildSegmentTooltip = function(self, deltaTime)
end
if (Details.tooltip.submenu_wallpaper) then
local background = Details:GetRaidIcon (Details.tabela_vigente.is_boss.mapid)
local background = Details:GetRaidIcon (thisCombat.is_boss.mapid)
if (background and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
else
local ej_id = Details.tabela_vigente.is_boss.ej_instance_id
local ej_id = thisCombat.is_boss.ej_instance_id
if (ej_id and ej_id ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = DetailsFramework.EncounterJournal.EJ_GetInstanceInfo (ej_id)
if (name and bCanUseBackgroundImage) then
if (Details.tabela_vigente.instance_type == "party") then
if (thisCombat.instance_type == "party") then
gameCooltip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
else
gameCooltip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
@@ -6845,13 +6817,13 @@ local buildSegmentTooltip = function(self, deltaTime)
end
end
elseif (Details.tabela_vigente.is_pvp) then
enemy = Details.tabela_vigente.is_pvp.name
file, coords = Details:GetBattlegroundInfo(Details.tabela_vigente.is_pvp.mapid)
elseif (thisCombat.is_pvp) then
enemy = thisCombat.is_pvp.name
file, coords = Details:GetBattlegroundInfo(thisCombat.is_pvp.mapid)
elseif (Details.tabela_vigente.is_arena) then
enemy = Details.tabela_vigente.is_arena.name
file, coords = Details:GetArenaInfo(Details.tabela_vigente.is_arena.mapid)
elseif (thisCombat.is_arena) then
enemy = thisCombat.is_arena.name
file, coords = Details:GetArenaInfo(thisCombat.is_arena.mapid)
else
if (Details.tooltip.submenu_wallpaper and bCanUseBackgroundImage) then
@@ -6868,22 +6840,22 @@ local buildSegmentTooltip = function(self, deltaTime)
if (not segment_info_added) then
gameCooltip:AddLine(Loc["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
if (not Details.tabela_vigente:GetEndTime()) then
if (not thisCombat:GetEndTime()) then
if (Details.in_combat) then
local decorrido = Details.tabela_vigente:GetCombatTime()
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = floor(decorrido/60), floor(decorrido%60)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
else
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", "--x--x--", 2, "white", "white")
end
else
local decorrido = Details.tabela_vigente:GetCombatTime()
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = floor(decorrido/60), floor(decorrido%60)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
end
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", Details.tabela_vigente.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", Details.tabela_vigente.data_fim or "in progress", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", dateStart, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd or "in progress", 2, "white", "white")
end
--fill a quantidade de menu que esta sendo mostrada
@@ -6899,25 +6871,30 @@ local buildSegmentTooltip = function(self, deltaTime)
menuIndex = nil
end
----------- overall
--> overall
---@type combat
local overallCombat = Details:GetOverallCombat()
--CoolTip:AddLine(segmentos.overall_standard, _, 1, "white") Loc["STRING_REPORT_LAST"] .. " " .. fight_amount .. " " .. Loc["STRING_REPORT_FIGHTS"]
gameCooltip:AddLine(Loc["STRING_SEGMENT_OVERALL"], _, 1, "white")
gameCooltip:AddLine(overallCombat:GetCombatName(), _, 1, "white")
gameCooltip:AddMenu(1, instance.SetSegmentFromCooltip, -1)
gameCooltip:AddIcon([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
gameCooltip:AddIcon(overallCombat:GetCombatIcon(), "main", "left")
local enemy_name = Details.tabela_overall.overall_enemy_name
local dateStart, dateEnd = overallCombat:GetDate()
gameCooltip:AddLine(Loc["STRING_SEGMENT_ENEMY"] .. ":", enemy_name, 2, "white", "white")
local enemyName = overallCombat.overall_enemy_name
local combat_time = Details.tabela_overall:GetCombatTime()
gameCooltip:AddLine(Loc["STRING_SEGMENT_ENEMY"] .. ":", enemyName, 2, "white", "white")
local combat_time = overallCombat:GetCombatTime()
local minutos, segundos = floor(combat_time / 60), floor(combat_time % 60)
gameCooltip:AddLine(Loc["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", Details.tabela_overall.data_inicio, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", Details.tabela_overall.data_fim, 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_START"] .. ":", overallCombat:GetDate(), 2, "white", "white")
gameCooltip:AddLine(Loc["STRING_SEGMENT_END"] .. ":", dateEnd, 2, "white", "white")
-- combats added
local combats_added = Details.tabela_overall.segments_added or Details.empty_table
local combats_added = overallCombat.segments_added or Details.empty_table
gameCooltip:AddLine(Loc["STRING_SEGMENTS"] .. ":", #combats_added, 2, "white", "white")
if (#combats_added > 0) then
@@ -6936,20 +6913,19 @@ local buildSegmentTooltip = function(self, deltaTime)
local segmentType = segment.type
if (segmentType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_TRASH) then
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], 2, 1, 12, 8, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
gameCooltip:AddIcon(Details.TextureAtlas["segment-icon-mythicplus"], 2, 1, 12, 8, nil, nil, nil, nil, nil, nil, true)
elseif (segmentType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_BOSS) then
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], 2, 1, 12, 12, 0.96875, 1, 0, 0.03125, party_line_color)
gameCooltip:AddIcon(Details.TextureAtlas["segment-icon-skull"], 2, 1, 12, 12, nil, nil, nil, nil, party_line_color)
elseif (segmentType == DETAILS_SEGMENTTYPE_RAID_TRASH or segmentType == DETAILS_SEGMENTTYPE_DUNGEON_TRASH) then
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], 2, 1, 10, 8, 0.02734375, 0.11328125, 0.19140625, 0.3125)
gameCooltip:AddIcon(Details.TextureAtlas["broom-icon"], 2, 1, 10, 8)
elseif (segmentType == DETAILS_SEGMENTTYPE_RAID_BOSS) then
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], 2, 1, 12, 12, 0.96875, 1, 0, 0.03125)
gameCooltip:AddIcon(Details.TextureAtlas["segment-icon-skull"], 2, 1, 12, 12)
end
--CoolTip:AddStatusBar (100, 2, 0, 0, 0, 0.2, false, false, "Skyline")
--CoolTip:AddStatusBar (100, 2, 0, 0, 0, 0.2, false, false, statusBarTexture)
end
--fill a quantidade de menu que esta sendo mostrada
@@ -769,7 +769,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
local lootSquare = unitBanner.LootSquare
lootSquare.itemLink = itemLink
local effectiveILvl = GetDetailedItemLevelInfo(itemLink)
local effectiveILvl, nop, baseItemLevel = GetDetailedItemLevelInfo(itemLink)
local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType,
itemStackCount, itemEquipLoc, itemTexture, sellPrice, classID, subclassID, bindType,
@@ -777,7 +777,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel()
--print("equip loc:", itemEquipLoc)
if (effectiveILvl > 300) then --avoid showing loot that isn't items
if (effectiveILvl > 300 and baseItemLevel > 5) then --avoid showing loot that isn't items
local rarityColor = ITEM_QUALITY_COLORS[itemQuality]
lootSquare.LootIconBorder:SetVertexColor(rarityColor.r, rarityColor.g, rarityColor.b, 1)
+1
View File
@@ -199,6 +199,7 @@ local _
Details.janela_report.slider.lockTexture:Hide()
Details.janela_report.slider.amt:Show()
--print("report is custom:", bIsCustom)
if (options) then
--dumpt(param2) = {damage, spellName, spellId}
--print(param2, options._custom) options._custom = nil
+103 -64
View File
@@ -1,93 +1,110 @@
--[[ Declare all Details classes and container indexes ]]
do
local _detalhes = _G.Details
---@type details
local Details = _G.Details
local addonName, Details222 = ...
local setmetatable = setmetatable
-------- container que armazena o cache de pets
_detalhes.container_pets = {}
_detalhes.container_pets.__index = _detalhes.container_pets
setmetatable(_detalhes.container_pets, _detalhes)
Details.container_pets = {}
Details.container_pets.__index = Details.container_pets
setmetatable(Details.container_pets, Details)
-------- time machine controla o tempo em combate dos jogadores
_detalhes.timeMachine = {}
_detalhes.timeMachine.__index = _detalhes.timeMachine
setmetatable(_detalhes.timeMachine, _detalhes)
Details.timeMachine = {}
Details.timeMachine.__index = Details.timeMachine
setmetatable(Details.timeMachine, Details)
-------- classe da tabela que armazenar todos os combates efetuados
_detalhes.historico = {}
_detalhes.historico.__index = _detalhes.historico
setmetatable(_detalhes.historico, _detalhes)
Details.historico = {}
Details.historico.__index = Details.historico
setmetatable(Details.historico, Details)
---------------- classe da tabela onde sero armazenados cada combate efetuado
_detalhes.combate = {}
_detalhes.combate.__index = _detalhes.combate
setmetatable(_detalhes.combate, _detalhes.historico)
Details.combate = {}
Details.combate.__index = Details.combate
setmetatable(Details.combate, Details.historico)
------------------------ armazenas classes de jogadores ou outros derivados
_detalhes.container_combatentes = {}
_detalhes.container_combatentes.__index = _detalhes.container_combatentes
setmetatable(_detalhes.container_combatentes, _detalhes.combate)
Details.container_combatentes = {}
Details.container_combatentes.__index = Details.container_combatentes
setmetatable(Details.container_combatentes, Details.combate)
-------------------------------- dano das habilidades.
_detalhes.atributo_damage = {}
_detalhes.atributo_damage.__index = _detalhes.atributo_damage
setmetatable(_detalhes.atributo_damage, _detalhes.container_combatentes)
Details.atributo_damage = {}
Details.atributo_damage.__index = Details.atributo_damage
setmetatable(Details.atributo_damage, Details.container_combatentes)
-------------------------------- cura das habilidades.
_detalhes.atributo_heal = {}
_detalhes.atributo_heal.__index = _detalhes.atributo_heal
setmetatable(_detalhes.atributo_heal, _detalhes.container_combatentes)
Details.atributo_heal = {}
Details.atributo_heal.__index = Details.atributo_heal
setmetatable(Details.atributo_heal, Details.container_combatentes)
-------------------------------- e_energy ganha
_detalhes.atributo_energy = {}
_detalhes.atributo_energy.__index = _detalhes.atributo_energy
setmetatable(_detalhes.atributo_energy, _detalhes.container_combatentes)
Details.atributo_energy = {}
Details.atributo_energy.__index = Details.atributo_energy
setmetatable(Details.atributo_energy, Details.container_combatentes)
-------------------------------- outros atributos
_detalhes.atributo_misc = {}
_detalhes.atributo_misc.__index = _detalhes.atributo_misc
setmetatable(_detalhes.atributo_misc, _detalhes.container_combatentes)
Details.atributo_misc = {}
Details.atributo_misc.__index = Details.atributo_misc
setmetatable(Details.atributo_misc, Details.container_combatentes)
-------------------------------- atributos customizados
_detalhes.atributo_custom = {}
_detalhes.atributo_custom.__index = _detalhes.atributo_custom
setmetatable(_detalhes.atributo_custom, _detalhes.container_combatentes)
Details.atributo_custom = {}
Details.atributo_custom.__index = Details.atributo_custom
setmetatable(Details.atributo_custom, Details.container_combatentes)
-------------------------------- armazena as classes de habilidades usadas pelo combatente
_detalhes.container_habilidades = {}
_detalhes.container_habilidades.__index = _detalhes.container_habilidades
setmetatable(_detalhes.container_habilidades, _detalhes.combate)
Details.container_habilidades = {}
Details.container_habilidades.__index = Details.container_habilidades
setmetatable(Details.container_habilidades, Details.combate)
---------------------------------------- classe das habilidades que do cura
_detalhes.habilidade_cura = {}
_detalhes.habilidade_cura.__index = _detalhes.habilidade_cura
setmetatable(_detalhes.habilidade_cura, _detalhes.container_habilidades)
Details.habilidade_cura = {}
Details.habilidade_cura.__index = Details.habilidade_cura
setmetatable(Details.habilidade_cura, Details.container_habilidades)
---------------------------------------- classe das habilidades que do danos
_detalhes.habilidade_dano = {}
_detalhes.habilidade_dano.__index = _detalhes.habilidade_dano
setmetatable(_detalhes.habilidade_dano, _detalhes.container_habilidades)
Details.habilidade_dano = {}
Details.habilidade_dano.__index = Details.habilidade_dano
setmetatable(Details.habilidade_dano, Details.container_habilidades)
---------------------------------------- classe das habilidades que do e_energy
_detalhes.habilidade_e_energy = {}
_detalhes.habilidade_e_energy.__index = _detalhes.habilidade_e_energy
setmetatable(_detalhes.habilidade_e_energy, _detalhes.container_habilidades)
Details.habilidade_e_energy = {}
Details.habilidade_e_energy.__index = Details.habilidade_e_energy
setmetatable(Details.habilidade_e_energy, Details.container_habilidades)
---------------------------------------- classe das habilidades variadas
_detalhes.habilidade_misc = {}
_detalhes.habilidade_misc.__index = _detalhes.habilidade_misc
setmetatable(_detalhes.habilidade_misc, _detalhes.container_habilidades)
Details.habilidade_misc = {}
Details.habilidade_misc.__index = Details.habilidade_misc
setmetatable(Details.habilidade_misc, Details.container_habilidades)
---------------------------------------- classe dos alvos das habilidads
_detalhes.alvo_da_habilidade = {}
_detalhes.alvo_da_habilidade.__index = _detalhes.alvo_da_habilidade
setmetatable(_detalhes.alvo_da_habilidade, _detalhes.container_combatentes)
Details.alvo_da_habilidade = {}
Details.alvo_da_habilidade.__index = Details.alvo_da_habilidade
setmetatable(Details.alvo_da_habilidade, Details.container_combatentes)
---return the class object for the given displayId (attributeId)
---@param displayId attributeid
---@return table
function Details:GetDisplayClassByDisplayId(displayId)
if (displayId == DETAILS_ATTRIBUTE_DAMAGE) then
return Details.atributo_damage
elseif (displayId == DETAILS_ATTRIBUTE_HEAL) then
return Details.atributo_heal
elseif (displayId == DETAILS_ATTRIBUTE_ENERGY) then
return Details.atributo_energy
elseif (displayId == DETAILS_ATTRIBUTE_MISC) then
return Details.atributo_misc
elseif (displayId == DETAILS_ATTRIBUTE_CUSTOM) then
return Details.atributo_custom
end
return {}
end
--[[ Armazena os diferentes tipos de containers ]] --[[ Container Types ]]
_detalhes.container_type = {
Details.container_type = {
CONTAINER_PLAYERNPC = 1,
CONTAINER_DAMAGE_CLASS = 2,
CONTAINER_HEAL_CLASS = 3,
@@ -121,50 +138,72 @@ do
[1446] = 71, --warrior
}
---@param self actor
---@param specId number
function Details:SetSpecId(specId)
self.spec = initialSpecListOverride[specId] or specId
end
function _detalhes:Name(actor)
---@param self details|actor
---@param actor actor?
function Details:Name(actor)
return self.nome or actor and actor.nome
end
function _detalhes:GetName(actor)
---Retrieves the name of the actor.
---If the name is not available in the current object (self), it checks the provided actor object.
---@param actor (optional) The actor object to retrieve the name from.
---@return The name of the actor.
function Details:GetName(actor)
return self.nome or actor and actor.nome
end
function _detalhes:GetNameNoRealm(actor)
---Retrieves the name of the actor without the realm information.
---If the name is not available in the current object (self), it checks the provided actor object.
---@param actor (optional) The actor object to retrieve the name from.
---@return The name of the actor without the realm information.
function Details:GetNameNoRealm(actor)
local name = self.nome or actor and actor.nome
return Details:GetOnlyName(name)
end
function _detalhes:GetDisplayName(actor)
---Retrieves the display name of the actor.
---If the display name is not available in the current object (self), it checks the provided actor object.
---@param actor actor The actor object to retrieve the display name from.
---@return string displayName display name of the actor.
function Details:GetDisplayName(actor)
return self.displayName or actor and actor.displayName
end
---Sets the display name of the actor.
---If the new display name is not provided, it sets the display name of the current object (self) to the provided actor object.
---@param actor actor The actor object to set the display name for.
---@param newDisplayName string The new display name to set.
function Details:SetDisplayName(actor, newDisplayName)
if (not newDisplayName) then
newDisplayName = actor
self.displayName = newDisplayName
local thisActor = self
---@cast thisActor actor
local displayName = tostring(actor)
thisActor.displayName = displayName
else
actor.displayName = newDisplayName
end
end
function _detalhes:GetOnlyName(string)
function Details:GetOnlyName(string)
if (string) then
return string:gsub(("%-.*"), "")
end
return self.nome:gsub(("%-.*"), "")
end
function _detalhes:RemoveOwnerName(string)
function Details:RemoveOwnerName(string)
if (string) then
return string:gsub((" <.*"), "")
end
return self.nome:gsub((" <.*"), "")
end
function _detalhes:GetCLName(id)
function Details:GetCLName(id)
local name, realm = UnitName(id)
if (name) then
if (realm and realm ~= "") then
@@ -368,9 +407,9 @@ do
end
--inherits to all actors without placing it on _detalhes namespace.
_detalhes.container_combatentes.guid = _detalhes.GetGUID
_detalhes.container_combatentes.name = _detalhes.GetName
_detalhes.container_combatentes.class = _detalhes.GetActorClass
_detalhes.container_combatentes.flag = _detalhes.GetFlag
Details.container_combatentes.guid = Details.GetGUID
Details.container_combatentes.name = Details.GetName
Details.container_combatentes.class = Details.GetActorClass
Details.container_combatentes.flag = Details.GetFlag
end
+1
View File
@@ -60,6 +60,7 @@ function Details:GetEncounterInfo(id)
end
end
---@param id instanceid|instancename|mapid
---@return details_instanceinfo?
function Details:GetInstanceInfo(id)
---@type details_encounterinfo
+26 -37
View File
@@ -1,69 +1,58 @@
--File Revision: 1
--Last Modification: 06/12/2013
-- Change Log:
-- 06/12/2013: file added.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[global]] DETAILS_HOOK_COOLDOWN = "HOOK_COOLDOWN"
--[[global]] DETAILS_HOOK_DEATH = "HOOK_DEATH"
--[[global]] DETAILS_HOOK_BATTLERESS = "HOOK_BATTLERESS"
--[[global]] DETAILS_HOOK_INTERRUPT = "HOOK_INTERRUPT"
--[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" --[[REMOVED--]]
local _detalhes = _G.Details
local _
local Details = _G.Details
local addonName, Details222 = ...
local _
_detalhes.hooks ["HOOK_COOLDOWN"] = {}
_detalhes.hooks ["HOOK_DEATH"] = {}
_detalhes.hooks ["HOOK_BATTLERESS"] = {}
_detalhes.hooks ["HOOK_INTERRUPT"] = {}
---@alias detailshook
---| '"HOOK_COOLDOWN"' # Hook for cooldowns
---| '"HOOK_DEATH"' # Hook for deaths
---| '"HOOK_BATTLERESS"' # Hook for battle ress
---| '"HOOK_INTERRUPT"' # Hook for interrupts
_detalhes.hooks ["HOOK_BUFF"] = {} --[[REMOVED--]]
Details.hooks["HOOK_COOLDOWN"] = {}
Details.hooks["HOOK_DEATH"] = {}
Details.hooks["HOOK_BATTLERESS"] = {}
Details.hooks["HOOK_INTERRUPT"] = {}
function _detalhes:InstallHook (hook_type, func)
if (not _detalhes.hooks [hook_type]) then
function Details:InstallHook(hookType, func)
if (not Details.hooks[hookType]) then
return false, "Invalid hook type."
end
for _, this_func in ipairs(_detalhes.hooks [hook_type]) do
if (this_func == func) then
for _, thisFunc in ipairs(Details.hooks[hookType]) do
if (thisFunc == func) then
--already installed
return
end
end
_detalhes.hooks [hook_type] [#_detalhes.hooks [hook_type] + 1] = func
Details.hooks[hookType][#Details.hooks[hookType] + 1] = func
Details.hooks[hookType].enabled = true
_detalhes.hooks [hook_type].enabled = true
_detalhes:UpdateParserGears()
Details:UpdateParserGears()
return true
end
function _detalhes:UnInstallHook (hook_type, func)
if (not _detalhes.hooks [hook_type]) then
function Details:UnInstallHook(hookType, func)
if (not Details.hooks[hookType]) then
return false, "Invalid hook type."
end
for index, this_func in ipairs(_detalhes.hooks [hook_type]) do
for index, thisFunc in ipairs(Details.hooks[hookType]) do
if (thisFunc == func) then
table.remove(Details.hooks[hookType], index)
if (this_func == func) then
table.remove (_detalhes.hooks [hook_type], index)
if (#_detalhes.hooks [hook_type] == 0) then
_detalhes.hooks [hook_type].enabled = false
if (#Details.hooks[hookType] == 0) then
Details.hooks[hookType].enabled = false
end
_detalhes:UpdateParserGears()
Details:UpdateParserGears()
return true
end
end
end
+3 -2
View File
@@ -132,6 +132,7 @@ function Details222.MythicPlus.OnBossDefeated(encounterID, encounterName)
--iterate among segments
for i = 1, 25 do --from the newer combat to the oldest
---@type combat
local pastCombat = segmentsTable[i]
--does the combat exists
if (pastCombat and not pastCombat._trashoverallalreadyadded and pastCombat.is_mythic_dungeon_trash) then
@@ -334,7 +335,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() --~merge
end
--after each boss fight, if enalbed on settings, create an extra segment with all trash segments from the boss just killed
function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule)
function DetailsMythicPlusFrame.MergeTrashCleanup()
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print("Details!", "MergeTrashCleanup() > running", DetailsMythicPlusFrame.TrashMergeScheduled and #DetailsMythicPlusFrame.TrashMergeScheduled)
end
@@ -522,7 +523,7 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
if (not Details.tabela_vigente) then
--assuming there's no segment from the dungeon run
Details:EntrarEmCombate()
Details:StartCombat()
Details:SairDoCombate()
end
+12 -2
View File
@@ -122,6 +122,17 @@ function SlashCmdList.DETAILS (msg, editbox)
dumpt(returnTable)
elseif (command == "mythic+") then
local statName = "mythicdungeoncompletedDF2"
local mythicDungeonRuns = Details222.PlayerStats:GetStat(statName)
dumpt(mythicDungeonRuns)
for mapChallengeModeID, mapChallengeModeData in pairs(mythicDungeonRuns) do
local mapName = C_ChallengeMode.GetMapUIInfo(mapChallengeModeID)
print(mapName, mapChallengeModeData.level, mapChallengeModeData.completed, mapChallengeModeData.time)
end
elseif (command == "mergepetspells") then --deprecated
Details.merge_pet_abilities = not Details.merge_pet_abilities
Details:Msg("Merging pet spells:", Details.merge_pet_abilities or "false")
@@ -1304,8 +1315,7 @@ function SlashCmdList.DETAILS (msg, editbox)
newCombat:SetStartTime(GetTime() - totalTime)
newCombat:SetEndTime(GetTime())
newCombat.data_inicio = startDate
newCombat.data_fim = endDate
newCombat:SetDate(startDate, endDate)
--immediatly finishes the segment just started
Details:SairDoCombate()
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

+197
View File
@@ -0,0 +1,197 @@
---@type details
local Details = Details
function Details:GetTextureAtlas(atlasName)
return Details.TextureAtlas[atlasName]
end
--atlasinfo
Details.TextureAtlas = {
["segment-icon-mythicplus-overall"] = {
file = [[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]],
width = 16,
height = 16,
leftTexCoord = 48/64,
rightTexCoord = 1,
topTexCoord = 0,
bottomTexCoord = 1,
nativeWidth = 64,
nativeHeight = 16,
},
["segment-icon-mythicplus"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 14,
height = 10,
leftTexCoord = 479/512,
rightTexCoord = 510/512,
topTexCoord = 24/512,
bottomTexCoord = 51/512,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-empty"] = {
file = [[Interface\AddOns\Details\images\empty16]],
width = 12,
height = 12,
nativeWidth = 16,
nativeHeight = 16,
},
["segment-icon-broom"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 12,
height = 16,
leftTexCoord = 14/512,
rightTexCoord = 58/512,
topTexCoord = 98/512,
bottomTexCoord = 160/512,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-skull"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 16,
height = 16,
leftTexCoord = 0.96875,
rightTexCoord = 1,
topTexCoord = 0,
bottomTexCoord = 0.03125,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-arena"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 16,
height = 12,
leftTexCoord = 0.251953125,
rightTexCoord = 0.306640625,
topTexCoord = 0.205078125,
bottomTexCoord = 0.248046875,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-boss"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 16,
height = 16,
leftTexCoord = 0.96875,
rightTexCoord = 1,
topTexCoord = 0.0625,
bottomTexCoord = 0.09375,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-regular"] = {
file = [[Interface\QUESTFRAME\UI-Quest-BulletPoint]],
width = 16,
height = 16,
leftTexCoord = 0,
rightTexCoord = 1,
topTexCoord = 0,
bottomTexCoord = 1,
nativeWidth = 16,
nativeHeight = 16,
},
["segment-icon-current"] = {
file = [[Interface\QUESTFRAME\UI-Quest-BulletPoint]],
width = 16,
height = 16,
leftTexCoord = 0,
rightTexCoord = 1,
topTexCoord = 0,
bottomTexCoord = 1,
colorName = "orange",
nativeWidth = 16,
nativeHeight = 16,
},
["segment-icon-overall"] = {
file = [[Interface\QUESTFRAME\UI-Quest-BulletPoint]],
width = 16,
height = 16,
leftTexCoord = 0,
rightTexCoord = 1,
topTexCoord = 0,
bottomTexCoord = 1,
colorName = "orange",
nativeWidth = 16,
nativeHeight = 16,
},
["broom"] = {
file = [[Interface\AddOns\Details\images\icons]],
width = 44,
height = 68,
leftTexCoord = 14/512,
rightTexCoord = 58/512,
topTexCoord = 98/512,
bottomTexCoord = 160/512,
tilesHorizontally = false,
tilesVertically = false,
nativeWidth = 512,
nativeHeight = 512,
},
["segment-icon-love-is-in-the-air"] = {
leftTexCoord = 165/512,
rightTexCoord = 201/512,
topTexCoord = 98/512,
bottomTexCoord = 131/512,
width = 10,
height = 9,
tilesVertically = false,
tilesHorizontally = false,
file = [[Interface\AddOns\Details\images\icons]],
nativeWidth = 512,
nativeHeight = 512,
},
["breakdown-icon-reportbutton"] = {
file = [[Interface\AddOns\Details\images\icons]],
leftTexCoord = 249/512,
rightTexCoord = 270/512,
topTexCoord = 110/512,
bottomTexCoord = 142/512,
nativeWidth = 512,
nativeHeight = 512,
width = 10,
height = 14,
colorName = "silver",
},
["breakdown-icon-optionsbutton"] = {
file = [[Interface\AddOns\Details\images\icons]],
leftTexCoord = 211/512,
rightTexCoord = 243/512,
topTexCoord = 110/512,
bottomTexCoord = 139/512,
nativeWidth = 512,
nativeHeight = 512,
width = 12,
height = 12,
colorName = "silver",
}
}
C_Timer.After(1, function()
--DetailsFramework:PreviewTexture(Details.TextureAtlas["segment-icon-arena"])
end)