From 2fd02eebb161ece8b3e640e1050e89ebfa9103cc Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Tue, 13 Feb 2024 13:24:28 -0300 Subject: [PATCH] General development and bug fixes (see commit description). - Fixed the deaths display, where the windows wasn't usig custom text scripts. - Fixed an issue with custom displays, where it was unable to use class colors in their texts. - More development and bug fixes on the new Mythic+ Run Completion panel. - Framework Update. --- Libs/DF/button.lua | 61 +- Libs/DF/definitions.lua | 10 +- Libs/DF/dropdown.lua | 43 +- Libs/DF/fw.lua | 68 +- Libs/DF/icongeneric.lua | 501 +- Libs/DF/rounded_panel.lua | 11 +- Libs/DF/scrollbox.lua | 108 +- Libs/DF/slider.lua | 79 +- Libs/DF/textentry.lua | 45 + Libs/LibLuaServer/LibLuaServer.lua | 5836 +++++++++++++---- boot.lua | 11 +- classes/class_custom.lua | 273 +- classes/class_damage.lua | 25 +- classes/class_heal.lua | 7 +- classes/class_utility.lua | 88 +- core/util.lua | 18 +- frames/window_mythicplus/deprecated.lua | 95 + .../window_mythicplus/window_end_of_run.lua | 160 +- functions/profiles.lua | 4 +- 19 files changed, 5685 insertions(+), 1758 deletions(-) create mode 100644 frames/window_mythicplus/deprecated.lua diff --git a/Libs/DF/button.lua b/Libs/DF/button.lua index 4bea4cfd..e18e5495 100644 --- a/Libs/DF/button.lua +++ b/Libs/DF/button.lua @@ -481,12 +481,16 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) ---enable the button making it clickable and not grayed out ---@return unknown function ButtonMetaFunctions:Enable() + return self.button:Enable() end ---disable the button making it unclickable and grayed out ---@return unknown function ButtonMetaFunctions:Disable() + if (self.color_texture) then + self.color_texture:SetVertexColor(0.14, 0.14, 0.14) + end return self.button:Disable() end @@ -733,7 +737,7 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) ---receives a table where the keys are settings and the values are the values to set ---this is the list of keys the table support: ---width, height, icon|table, textcolor, textsize, textfont, textalign, backdrop, backdropcolor, backdropbordercolor, onentercolor, onleavecolor, onenterbordercolor, onleavebordercolor ----@param template table +---@param template table|string function ButtonMetaFunctions:SetTemplate(template) if (type(template) == "string") then template = detailsFramework:GetTemplate("button", template) @@ -808,6 +812,25 @@ function ButtonMetaFunctions:SetTemplate(template) if (template.textalign) then self.textalign = template.textalign end + + if (template.rounded_corner) then + self:SetBackdrop(nil) + detailsFramework:AddRoundedCornersToFrame(self.widget or self, template.rounded_corner) + + --check if this is a color picker button + if (self.__iscolorpicker) then + self.color_texture:SetTexture([[Interface\CHARACTERFRAME\TempPortraitAlphaMaskSmall]], "CLAMP", "CLAMP", "TRILINEAR") + self.color_texture:SetDrawLayer("overlay", 7) + self.color_texture:SetPoint("topleft", self.widget, "topleft", 2, -2) + self.color_texture:SetPoint("bottomright", self.widget, "bottomright", -2, 2) + + self.background_texture:SetDrawLayer("overlay", 6) + self.background_texture:SetPoint("topleft", self.color_texture, "topleft", 2, -2) + self.background_texture:SetPoint("bottomright", self.color_texture, "bottomright", -2, 2) + + self.widget.texture_disabled:SetTexture([[Interface\CHARACTERFRAME\TempPortraitAlphaMaskSmall]], "CLAMP", "CLAMP", "TRILINEAR") + end + end end ------------------------------------------------------------------------------------------------------------ @@ -857,7 +880,7 @@ end ---@field textfont string ---@field textsize number ---@field icon texture created after calling SetIcon() - ---@field SetTemplate fun(self: df_button, template: table) set the button visual by a template + ---@field SetTemplate fun(self: df_button, template: table|string) set the button visual by a template ---@field RightClick fun(self: df_button) right click the button executing its right click function ---@field Exec fun(self: df_button) execute the button function for the left button ---@field Disable fun(self: df_button) disable the button @@ -1064,6 +1087,15 @@ end return self.color_texture:GetVertexColor() end + ---@class df_colorpickbutton : df_button + ---@field color_callback function + ---@field Cancel function + ---@field SetColor function + ---@field GetColor function + ---@field __iscolorpicker boolean + ---@field color_texture texture + ---@field background_texture texture + ---create a button which opens a color picker when clicked ---@param parent table ---@param name string|nil @@ -1077,33 +1109,38 @@ end end function detailsFramework:NewColorPickButton(parent, name, member, callback, alpha, buttonTemplate) - --button - local colorPickButton = detailsFramework:NewButton(parent, _, name, member, 16, 16, pickcolor, alpha, "param2", nil, nil, nil, buttonTemplate) + local colorPickButton = detailsFramework:NewButton(parent, _, name, member, 16, 16, pickcolor, alpha, "param2") + ---@cast colorPickButton df_colorpickbutton + colorPickButton.color_callback = callback colorPickButton.Cancel = colorpickCancel colorPickButton.SetColor = setColorPickColor colorPickButton.GetColor = getColorPickColor + colorPickButton.__iscolorpicker = true colorPickButton.HookList.OnColorChanged = {} - if (not buttonTemplate) then - colorPickButton:SetTemplate(detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")) - end - --background showing a grid to indicate the transparency - local background = colorPickButton:CreateTexture(nil, "background", nil, 2) + local background = colorPickButton:CreateTexture("$parentBackgroupTransparency", "background", nil, 2) background:SetPoint("topleft", colorPickButton.widget, "topleft", 0, 0) background:SetPoint("bottomright", colorPickButton.widget, "bottomright", 0, 0) - background:SetTexture([[Interface\ITEMSOCKETINGFRAME\UI-EMPTYSOCKET]]) - background:SetTexCoord(3/16, 13/16, 3/16, 13/16) + background:SetAtlas("AnimCreate_Icon_Texture") background:SetAlpha(0.3) + colorPickButton.background_texture = background --texture which shows the texture color - local colorTexture = detailsFramework:NewImage(colorPickButton, nil, 16, 16, nil, nil, "color_texture", "$parentTex") + local colorTexture = colorPickButton:CreateTexture("$parentTex", "overlay") colorTexture:SetColorTexture(1, 1, 1) colorTexture:SetPoint("topleft", colorPickButton.widget, "topleft", 0, 0) colorTexture:SetPoint("bottomright", colorPickButton.widget, "bottomright", 0, 0) colorTexture:SetDrawLayer("background", 3) + colorPickButton.color_texture = colorTexture + + if (not buttonTemplate) then + colorPickButton:SetTemplate(detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")) + else + colorPickButton:SetTemplate(buttonTemplate) + end return colorPickButton end diff --git a/Libs/DF/definitions.lua b/Libs/DF/definitions.lua index b9184df8..f60dd20e 100644 --- a/Libs/DF/definitions.lua +++ b/Libs/DF/definitions.lua @@ -103,7 +103,7 @@ ---@field GroupIterator fun(self:table, callback:function, ...) iterate over the group, calling the callback function for each group member ---@field CommaValue fun(self:table, value:number) : string convert a number to a string with commas, e.g. 1000000 -> 1,000,000 ---@field SplitTextInLines fun(self:table, text:string) : string[] split a text into lines ----@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean, specId: specializationid) : string there's no self here +---@field UnitGroupRolesAssigned fun(unitId: unit, bUseSupport:boolean?, specId: specializationid?) : string there's no self here ---@field SetAnchor fun(self:table, widget:uiobject, anchorTable:df_anchor, anchorTo:uiobject?) only adjust the anchors of a widget, does not save values ---@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 @@ -112,6 +112,8 @@ ---@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 +---@field CreateOutlineDropDown fun(self:table, parent:frame, func:function, default:any, width:number?, height:number?, member:string?, name:string?, template:table?) : df_dropdown +---@field CreateAnchorPointDropDown fun(self:table, parent:frame, func:function, default:any, width:number?, height:number?, member:string?, name:string?, template:table?) : df_dropdown ---@field CreateFontListGenerator fun(self:table, callback:function) : function return a function which when called returns a table filled with all fonts available and ready to be used on dropdowns ---@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) @@ -146,5 +148,9 @@ ---@field CreateEditor fun(self:table, parent:frame, name:string?, options:df_editor_defaultoptions?) : df_editor ---@field RandomBool fun(self:table, odds: number?) : boolean return a random boolean ---@field CreateHighlightTexture fun(self:table, parent:frame, parentKey:string?, alpha:number?, name:string?) : texture +---@field CreateIconRowGeneric fun(self:table, parent:frame, name:string?, options:table?) +---@field CreateColorPickButton fun(self:table, parent:frame, name:string?, member:string?, callback:function, alpha:number?, buttonTemplate:table?) : df_button +---@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 +---@field ---@field - diff --git a/Libs/DF/dropdown.lua b/Libs/DF/dropdown.lua index c09c479d..64846bdc 100644 --- a/Libs/DF/dropdown.lua +++ b/Libs/DF/dropdown.lua @@ -303,7 +303,7 @@ function DropDownMetaFunctions:GetFrameForOption(optionsTable, value) --not test end function DropDownMetaFunctions:Refresh() - local optionsTable = DF:Dispatch(self.func, self) + local state, optionsTable = xpcall(self.func, geterrorhandler(), self) if (#optionsTable == 0) then self:NoOption(true) @@ -558,9 +558,11 @@ function DropDownMetaFunctions:Selected(thisOption) self.statusbar:SetTexture(thisOption.statusbar) if (thisOption.statusbarcolor) then self.statusbar:SetVertexColor(unpack(thisOption.statusbarcolor)) + else + self.statusbar:SetVertexColor(1, 1, 1, 1) end else - self.statusbar:SetTexture([[Interface\Tooltips\CHATBUBBLE-BACKGROUND]]) + self.statusbar:SetVertexColor(0, 0, 0, 0) end if (self.widget.__rcorners) then @@ -774,9 +776,11 @@ function DetailsFrameworkDropDownOnMouseDown(button, buttontype) thisOptionFrame.statusbar:SetTexture(thisOption.statusbar) if (thisOption.statusbarcolor) then thisOptionFrame.statusbar:SetVertexColor(unpack(thisOption.statusbarcolor)) + else + thisOptionFrame.statusbar:SetVertexColor(1, 1, 1, 1) end else - thisOptionFrame.statusbar:SetTexture([[Interface\Tooltips\CHATBUBBLE-BACKGROUND]]) + thisOptionFrame.statusbar:SetVertexColor(0, 0, 0, 0) end --an extra button in the right side of the row @@ -824,7 +828,7 @@ function DetailsFrameworkDropDownOnMouseDown(button, buttontype) end selectedTexture:Show() - selectedTexture:SetVertexColor(1, 1, 1, .3) + selectedTexture:SetVertexColor(1, 1, 0, .5) selectedTexture:SetTexCoord(0, 29/32, 5/32, 27/32) currentIndex = tindex @@ -1009,13 +1013,21 @@ end --template function DropDownMetaFunctions:SetTemplate(template) + if (type(template) == "string") then + local templateName = template + template = DF:GetTemplate("dropdown", templateName) + if (not template) then + print("no template found", templateName) + end + end + self.template = template if (template.width) then PixelUtil.SetWidth(self.dropdown, template.width) end if (template.height) then - PixelUtil.SetWidth(self.dropdown, template.height) + PixelUtil.SetHeight(self.dropdown, template.height) end if (template.backdrop) then @@ -1090,13 +1102,19 @@ end --object constructor ---@class df_dropdown : table, frame ----@field SetTemplate fun(self:df_dropdown, template:table) +---@field SetTemplate fun(self:df_dropdown, template:table|string) ---@field BuildDropDownFontList fun(self:df_dropdown, onClick:function, icon:any, iconTexcoord:table?, iconSize:table?):table make a dropdown list with all fonts available, on select a font, call the function onClick ----@field ----@field ----@field ----@field ----@field +---@field SetFunction fun(self:df_dropdown, func:function) +---@field SetEmptyTextAndIcon fun(self:df_dropdown, text:string, icon:any) +---@field Select fun(self:df_dropdown, optionName:string|number, byOptionNumber:boolean?, bOnlyShown:boolean?, runCallback:boolean?):boolean +---@field Open fun(self:df_dropdown) +---@field Close fun(self:df_dropdown) +---@field Refresh fun(self:df_dropdown) +---@field GetFunction fun(self:df_dropdown):function +---@field GetMenuSize fun(self:df_dropdown):number, number +---@field SetMenuSize fun(self:df_dropdown, width:number, height:number) +---@field Disable fun(self:df_dropdown) +---@field Enable fun(self:df_dropdown) ---return a function which when called returns a table filled with all fonts available and ready to be used on dropdowns ---@param callback function @@ -1259,6 +1277,9 @@ function DF:NewDropDown(parent, container, name, member, width, height, func, de default = 1 end + width = width or 160 + height = height or 20 + dropDownObject.dropdown = DF:CreateNewDropdownFrame(parent, name) PixelUtil.SetSize(dropDownObject.dropdown, width, height) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 5b3a9a20..564350ed 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 510 +local dversion = 511 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) @@ -2522,6 +2522,28 @@ DF.dropdown_templates["OPTIONS_DROPDOWNDARK_TEMPLATE"] = { dropiconpoints = {-2, -3}, } +DF.dropdown_templates["OLD_DROPDOWN_TEMPLATE"] = { + height = 24, + + backdrop = { + edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", + edgeSize = 8, + bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], + tileSize = 64, + tile = true, + insets = {left = 4, right = 4, top = 4, bottom = 4} + }, + + backdropcolor = {0.1215, 0.1176, 0.1294, 0.4000}, + backdropbordercolor = {1, 1, 1, 1}, + onentercolor = {.5, .5, .5, .9}, + onenterbordercolor = {1, 1, 1, 1}, + + dropicon = "Interface\\BUTTONS\\arrow-Down-Down", + dropiconsize = {16, 16}, + dropiconpoints = {-2, -3}, +} + --switches DF.switch_templates = DF.switch_templates or {} DF.switch_templates["OPTIONS_CHECKBOX_TEMPLATE"] = { @@ -2534,6 +2556,23 @@ DF.switch_templates["OPTIONS_CHECKBOX_TEMPLATE"] = { disabled_backdropcolor = {1, 1, 1, .2}, onenterbordercolor = {1, 1, 1, 1}, } + +DF.switch_templates["OPTIONS_CIRCLECHECKBOX_TEMPLATE"] = { + width = 18, + height = 18, + is_checkbox = true, --will call SetAsCheckBox() + checked_texture = [[Interface\CHARACTERFRAME\TempPortraitAlphaMaskSmall]], + checked_size_percent = 0.7, + checked_xoffset = 0, + checked_yoffset = 0, + checked_color = "dark3", + rounded_corner = { + color = {.075, .075, .075, 1}, + border_color = {.2, .2, .2, 1}, + roundness = 8, + }, +} + DF.switch_templates["OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"] = { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {1, 1, 1, .5}, @@ -2553,6 +2592,14 @@ DF.button_templates["OPTIONS_BUTTON_TEMPLATE"] = { backdropbordercolor = {0, 0, 0, 1}, } +DF.button_templates["OPTIONS_CIRCLEBUTTON_TEMPLATE"] = { + rounded_corner = { + color = {.075, .075, .075, 1}, + border_color = {.2, .2, .2, 1}, + roundness = 8, + }, +} + DF.button_templates["OPTIONS_BUTTON_GOLDENBORDER_TEMPLATE"] = { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {1, 1, 1, .5}, @@ -3905,7 +3952,7 @@ function DF:GetClassSpecIds(engClass) --naming conventions end local dispatch_error = function(context, errortext) - DF:Msg( (context or "") .. " |cFFFF9900error|r: " .. (errortext or "")) + error((context or "") .. (errortext or "")) end --call a function with payload, if the callback doesn't exists, quit silently @@ -3930,23 +3977,8 @@ end ---@param ... any ---@return any function DF:Dispatch(func, ...) - if (type(func) ~= "function") then - return dispatch_error(_, "DetailsFramework:Dispatch(func) expect a function as parameter 1.") - end + assert(type(func) == "function", "DetailsFramework:Dispatch(func) expect a function as parameter 1. Received: " .. type(func) .. " instead.") return select(2, xpcall(func, geterrorhandler(), ...)) - - --[=[ - local dispatchResult = {xpcall(func, geterrorhandler(), ...)} - local okay = dispatchResult[1] - - if (not okay) then - return false - end - - tremove(dispatchResult, 1) - - return unpack(dispatchResult) - --]=] end --[=[ diff --git a/Libs/DF/icongeneric.lua b/Libs/DF/icongeneric.lua index 887de83c..e4d88094 100644 --- a/Libs/DF/icongeneric.lua +++ b/Libs/DF/icongeneric.lua @@ -14,14 +14,94 @@ end ---@field options table ---@field NextIcon number ---@field IconPool table table which store the icons created for this iconrow ----@field SetAuraWithIconTemplate fun(self:df_icongeneric, aI:aurainfo, iconTemplateTable:table) ----@field ClearIcons fun(self:df_icongeneric, resetBuffs:boolean?, resetDebuffs:boolean?) ----@field AlignAuraIcons fun(self:df_icongeneric) + +---@class df_iconrow_generic_options : table +---@field icon_width number? @The width of the icon. +---@field icon_height number? @The height of the icon. +---@field texcoord table? @The texture coordinates of the icon. +---@field show_text boolean? @Whether to show text on the icon. +---@field text_color table? @The color of the text. +---@field text_size number? @The size of the text. +---@field text_font string? @The font of the text. +---@field text_outline string? @The outline style of the text. +---@field text_anchor df_anchor? @The anchor point of the text. +---@field text_alpha_by_percent boolean? @Whether to change the alpha of the text by the percentage of the cooldown. +---@field desc_text boolean? @Whether to show description text. +---@field desc_text_color table? @The color of the description text. +---@field desc_text_size number? @The size of the description text. +---@field desc_text_font string? @The font of the description text. +---@field desc_text_outline string? @The outline style of the description text. +---@field desc_text_anchor string? @The anchor point of the description text. +---@field desc_text_rel_anchor string? @The relative anchor point of the description text. +---@field desc_text_x_offset number? @The x offset of the description text. +---@field desc_text_y_offset number? @The y offset of the description text. +---@field stack_text boolean? @Whether to show stack text. +---@field stack_text_color table? @The color of the stack text. +---@field stack_text_size number? @The size of the stack text. +---@field stack_text_font string? @The font of the stack text. +---@field stack_text_outline string? @The outline style of the stack text. +---@field stack_text_anchor string? @The anchor point of the stack text. +---@field stack_text_rel_anchor string? @The relative anchor point of the stack text. +---@field stack_text_x_offset number? @The x offset of the stack text. +---@field stack_text_y_offset number? @The y offset of the stack text. +---@field left_padding number? @The distance between the right and left sides. +---@field top_padding number? @The distance between the top and bottom sides. +---@field icon_padding number? @The distance between each icon. +---@field backdrop table? @The backdrop options. +---@field backdrop_color table? @The color of the backdrop. +---@field backdrop_border_color table? @The color of the backdrop border. +---@field anchor table? @The anchor options. +---@field grow_direction number? @The direction in which the icons grow. +---@field center_alignment boolean? @Whether to align the icons in the center. +---@field surpress_blizzard_cd_timer boolean? @Whether to suppress the Blizzard cooldown timer. +---@field surpress_tulla_omni_cc boolean? @Whether to suppress the Tulla OmniCC cooldown count. +---@field on_tick_cooldown_update boolean? @Whether to update cooldowns on every tick. +---@field cooldown_max_brightness number? @The maximum brightness of the cooldown, it is adjusted by the percent. +---@field decimal_timer boolean? @Whether to display the timer in decimal format. +---@field show_cooldown boolean? @Whether to show blizzard cooldown animation. +---@field cooldown_reverse boolean? @Whether to reverse the cooldown animation. +---@field cooldown_swipe_enabled boolean? @Whether to enable the cooldown swipe animation. +---@field cooldown_edge_texture string? @The texture for the cooldown edge. +---@field show_horizontal_swipe boolean? @Whether to show the horizontal swipe animation. +---@field swipe_alpha number? @The alpha value for the swipe animation. +---@field swipe_brightness number? @The brightness value for the swipe animation. +---@field swipe_progressive_color boolean? @Whether to use progressive color for the swipe animation. Start on Green and goes to Red, follows percent amount. +---@field swipe_color table? @When the color isn't progressive, this is the color of the swipe +---@field swipe_color_start number[]? @Whether to use yellow color for the swipe animation. +---@field swipe_color_end number[]? @Whether to use red color for the swipe animation. +---@field remove_on_finish boolean? @Whether to remove the icon when the cooldown finishes. Only usable if the icon has a identifier (from setting specific). +---@field first_icon_use_anchor boolean? @The anchor point for the first ico will use the anchor set in options.anchor. + +---@class df_iconrow_generic : df_iconrow +---@field SetCooldown fun(self:df_iconrow_generic, iconFrame:df_icongeneric) +---@field OnIconTick fun(iconFrame:df_icongeneric) +---@field FormatCooldownTime fun(thisTime:number) +---@field FormatCooldownTimeDecimal fun(formattedTime:number) +---@field GetIconGrowDirection fun(self:df_iconrow_generic):number +---@field OnOptionChanged fun(self:df_iconrow_generic, optionName:string) +---@field CreateIcon fun(self:df_iconrow_generic, iconName:string) +---@field GetIcon fun(self:df_iconrow_generic) +---@field SetStacks fun(self:df_iconrow_generic, iconFrame:df_icongeneric, bIsShown:boolean, stacksAmount:number?) +---@field AddSpecificIcon fun(self:df_iconrow_generic, identifierKey:any, spellId:number, borderColor:table, startTime:number, duration:number, forceTexture:string, descText:string, count:number, debuffType:string, caster:string, canStealOrPurge:boolean, spellName:string, isBuff:boolean, modRate:number, iconSettings:table) +---@field AddSpecificIconWithTemplate fun(self:df_iconrow_generic, iconTemplateTable:table) +---@field IsIconShown fun(self:df_iconrow_generic, identifierKey:any) +---@field SetIcon fun(self:df_iconrow_generic, spellId:number, borderColor:table, startTime:number, duration:number, iconTexture:string, descText:string, count:number, debuffType:string, caster:string, canStealOrPurge:boolean, spellName:string, isBuff:boolean, modRate:number, iconSettings:table, expirationTime:number?) +---@field RemoveSpecificIcon fun(self:df_iconrow_generic, identifierKey:any) +---@field ClearIcons fun(self:df_iconrow_generic, resetBuffs:boolean?, resetDebuffs:boolean?) +---@field AlignAuraIcons fun(self:df_iconrow_generic) +---@field SetAuraWithIconTemplate fun(self:df_iconrow_generic, auraInfo:aurainfo, iconTemplateTable:table) +---@field IconPool table +---@field NextIcon number +---@field AuraCache table +---@field shownAmount number +---@field options table +---@field SetSpecificAuraWithIconTemplate fun(self:df_iconrow_generic, identifierKey:any, auraInfo:aurainfo, iconTemplateTable:table) local unpack = unpack local CreateFrame = CreateFrame local PixelUtil = PixelUtil local GetTime = GetTime +local Clamp = detailsFramework.Math.Clamp local spellIconCache = {} local spellNameCache = {} @@ -38,9 +118,16 @@ local iconFrameOnHideScript = function(self) end end +local checkPointCallback = function(iconFrame) + if (iconFrame.timeRemaining < 3) then + + end + return true +end + detailsFramework.IconGenericMixin = { ---create a new icon frame - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame ---@param iconName string the name of the icon frame ---@return df_icongeneric CreateIcon = function(self, iconName) @@ -55,9 +142,8 @@ detailsFramework.IconGenericMixin = { ---@type texture newIcon.CooldownBrightnessTexture = newIcon:CreateTexture(nil, "artwork", nil, 2) newIcon.CooldownBrightnessTexture:SetBlendMode("ADD") - newIcon.CooldownBrightnessTexture:SetAlpha(1) - PixelUtil.SetPoint(newIcon.CooldownBrightnessTexture, "topleft", newIcon, "topleft", 0, 0) - PixelUtil.SetPoint(newIcon.CooldownBrightnessTexture, "bottomright", newIcon, "bottomright", 0, 0) + PixelUtil.SetPoint(newIcon.CooldownBrightnessTexture, "topleft", newIcon.Texture, "topleft", 0, 0) + PixelUtil.SetPoint(newIcon.CooldownBrightnessTexture, "bottomright", newIcon.Texture, "bottomright", 0, 0) ---@type texture newIcon.Border = newIcon:CreateTexture(nil, "background") @@ -80,10 +166,10 @@ detailsFramework.IconGenericMixin = { --create a overlay texture which will indicate the cooldown time newIcon.CooldownTexture = newIcon:CreateTexture(self:GetName() .. "CooldownTexture", "overlay", nil, 6) - newIcon.CooldownTexture:SetColorTexture(1, 1, 1, 1) + newIcon.CooldownTexture:SetTexture("Interface\\BUTTONS\\GreyscaleRamp64", "CLAMP", "CLAMP", "TRILINEAR") + newIcon.CooldownTexture:SetHeight(2) newIcon.CooldownTexture:SetPoint("bottomleft", newIcon.Texture, "bottomleft", 0, 0) newIcon.CooldownTexture:SetPoint("bottomright", newIcon.Texture, "bottomright", 0, 0) - newIcon.CooldownTexture:SetHeight(1) newIcon.CooldownTexture:Hide() newIcon.CooldownEdge = newIcon:CreateTexture(self:GetName() .. "CooldownEdge", "overlay", nil, 7) @@ -95,11 +181,18 @@ detailsFramework.IconGenericMixin = { newIcon.stacks = 0 newIcon:SetScript("OnHide", iconFrameOnHideScript) + local cooldownFrame = CreateFrame("cooldown", "$parentCooldownFrame", newIcon, "CooldownFrameTemplate, BackdropTemplate") + cooldownFrame:SetAllPoints() + cooldownFrame:EnableMouse(false) + cooldownFrame:SetFrameLevel(newIcon:GetFrameLevel()+1) + cooldownFrame.CountdownText = ({cooldownFrame:GetRegions()})[1] + newIcon.Cooldown = cooldownFrame + return newIcon end, ---get an icon frame from the pool - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame ---@return df_icongeneric GetIcon = function(self) ---@type df_icongeneric @@ -152,7 +245,7 @@ detailsFramework.IconGenericMixin = { end, ---adds only if not existing already in the cache - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame AddSpecificIcon = function(self, identifierKey, spellId, borderColor, startTime, duration, forceTexture, descText, count, debuffType, caster, canStealOrPurge, spellName, isBuff, modRate, iconSettings) if (not identifierKey or identifierKey == "") then return @@ -179,18 +272,32 @@ detailsFramework.IconGenericMixin = { end end, - ---set an icon frame with a template - ---@param self df_iconrow the parent frame - ---@param aI aurainfo - ---@param iconTemplateTable df_icontemplate - SetAuraWithIconTemplate = function(self, aI, iconTemplateTable) - local startTime = aI.expirationTime - aI.duration - ---@type df_icongeneric - self:SetIcon(aI.spellId, nil, startTime, aI.duration, aI.icon, nil, aI.applications, aI.dispelName, aI.sourceUnit, aI.isStealable, aI.name, aI.isHelpful, aI.timeMod, iconTemplateTable, aI.expirationTime) + SetSpecificAuraWithIconTemplate = function(self, identifierKey, auraInfo, iconTemplateTable) + if (not identifierKey or identifierKey == "") then + return + end + + if (not self.AuraCache[identifierKey]) then + ---@type df_icongeneric + local iconFrame = self:SetAuraWithIconTemplate(auraInfo, iconTemplateTable) + iconFrame.identifierKey = identifierKey + self.AuraCache[identifierKey] = true + end end, ---set an icon frame with a template - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame + ---@param auraInfo aurainfo + ---@param iconTemplateTable df_icontemplate + SetAuraWithIconTemplate = function(self, auraInfo, iconTemplateTable) + local startTime = auraInfo.expirationTime - auraInfo.duration + + ---@type df_icongeneric + return self:SetIcon(auraInfo.spellId, nil, startTime, auraInfo.duration, auraInfo.icon, nil, auraInfo.applications, auraInfo.dispelName, auraInfo.sourceUnit, auraInfo.isStealable, auraInfo.name, auraInfo.isHelpful, auraInfo.timeMod, iconTemplateTable, auraInfo.expirationTime) + end, + + ---set an icon frame with a template + ---@param self df_iconrow_generic the parent frame ---@return df_icongeneric? SetIcon = function(self, spellId, borderColor, startTime, duration, iconTexture, descText, count, debuffType, caster, canStealOrPurge, spellName, isBuff, modRate, iconSettings, expirationTime) local actualSpellName, spellIcon = spellNameCache[spellId], spellIconCache[spellId] @@ -213,6 +320,10 @@ detailsFramework.IconGenericMixin = { end end + if (iconSettings.overrideTexture) then + spellIcon = iconSettings.overrideTexture + end + if (spellIcon) then spellName = spellName or actualSpellName or "unknown_aura" modRate = modRate or 1 @@ -223,8 +334,29 @@ detailsFramework.IconGenericMixin = { iconFrame.expirationTime = expirationTime - local widthFromTexture - local heightFromTexture + local width = iconSettings.width or self.options.icon_width + local height = iconSettings.height or self.options.icon_height or width + + --adjust the width and height by scale + local scale = iconSettings.scale or 1 + width = width * scale + height = height * scale + + PixelUtil.SetSize(iconFrame, width, height) + + --set the texture points to be all points minus one + iconFrame.Texture:ClearAllPoints() + PixelUtil.SetPoint(iconFrame.Texture, "topleft", iconFrame, "topleft", 1, -1) + PixelUtil.SetPoint(iconFrame.Texture, "bottomright", iconFrame, "bottomright", -1, 1) + + iconFrame.textureWidth = math.max(iconFrame.Texture:GetWidth(), width) + iconFrame.textureHeight = math.max(iconFrame.Texture:GetHeight(), height) --for some reason, GetHeight() was returning 0 on the first call + + --cache size + iconFrame.width = width + iconFrame.height = height + + iconFrame:Show() if (iconFrame.Texture.texture ~= spellIcon or (iconSettings.coords and iconSettings.coords ~= iconFrame.currentCoords)) then iconFrame.Texture:SetTexture(spellIcon, "CLAMP", "CLAMP", iconSettings.textureFilter or "LINEAR") --"TRILINEAR" @@ -240,38 +372,13 @@ detailsFramework.IconGenericMixin = { iconFrame.Texture:SetTexCoord(0, 1, 0, 1) end - iconFrame.Texture:ClearAllPoints() - if (iconSettings.points) then + iconFrame.Texture:ClearAllPoints() for i = 1, #iconSettings.points do local point = iconSettings.points[i] iconFrame.Texture:SetPoint(point[1], iconFrame, point[2], point[3], point[4]) end - - if (iconSettings.width) then - iconFrame.Texture:SetWidth(iconSettings.width) - widthFromTexture = iconSettings.width - else - iconFrame.Texture:SetWidth(self.options.icon_width) - end - - if (iconSettings.height or iconSettings.width) then - iconFrame.Texture:SetHeight(iconSettings.height or iconSettings.width) - heightFromTexture = iconSettings.height or iconSettings.width - else - iconFrame.Texture:SetHeight(self.options.icon_height) - end - else - if (iconSettings.width) then - iconFrame.Texture:SetWidth(iconSettings.width) - iconFrame.Texture:SetHeight(iconSettings.height or iconSettings.width) - widthFromTexture = iconSettings.width - heightFromTexture = iconSettings.height or iconSettings.width - PixelUtil.SetPoint(iconFrame.Texture, "center", iconFrame, "center", 0, 0) - else - PixelUtil.SetPoint(iconFrame.Texture, "topleft", iconFrame, "topleft", 1, -1) - PixelUtil.SetPoint(iconFrame.Texture, "bottomright", iconFrame, "bottomright", -1, 1) - end + iconFrame.Texture:SetSize(width, height) end iconFrame.Texture.texture = spellIcon @@ -285,6 +392,17 @@ detailsFramework.IconGenericMixin = { end end + iconFrame:SetIgnoreParentAlpha(false) + + if (iconSettings.color) then + local r, g, b, a = detailsFramework:ParseColors(iconSettings.color) + iconFrame.Texture:SetVertexColor(r, g, b, a) + --ignore the param alpha has the settings might have an alpha for it + iconFrame:SetIgnoreParentAlpha(true) + else + iconFrame.Texture:SetVertexColor(1, 1, 1, 1) + end + if (borderColor) then iconFrame.Border:Show() iconFrame.Border:SetVertexColor(unpack(borderColor)) @@ -306,44 +424,33 @@ detailsFramework.IconGenericMixin = { iconFrame.stacks = count or 0 - if (iconSettings.scale) then - iconFrame.Texture:SetScale(iconSettings.scale) - if (widthFromTexture) then - widthFromTexture = widthFromTexture * iconSettings.scale - end - if (heightFromTexture) then - heightFromTexture = heightFromTexture * iconSettings.scale - end - else - iconFrame.Texture:SetScale(1) - end - if (iconSettings.alpha) then iconFrame.Texture:SetAlpha(iconSettings.alpha) else iconFrame.Texture:SetAlpha(1) end - iconFrame:Show() - iconFrame.textureWidth = iconFrame.Texture:GetWidth() - iconFrame.textureHeight = iconFrame.Texture:GetHeight() - PixelUtil.SetSize(iconFrame, iconFrame.textureWidth, iconFrame.textureHeight) - - --cache size - iconFrame.width = iconFrame.textureWidth - iconFrame.height = iconFrame.textureHeight - --iconFrame.Texture:SetBlendMode("ADD") iconFrame.CooldownBrightnessTexture:SetTexture(iconFrame.Texture:GetTexture()) do local left, top, c, bottom, right = iconFrame.Texture:GetTexCoord() iconFrame.CooldownBrightnessTexture:SetTexCoord(left, right, top, bottom) - iconFrame.CooldownBrightnessTexture.cords = {left, right, top, bottom} + + local coords = iconFrame.CooldownBrightnessTexture.cords + if (coords) then + coords[1] = left + coords[2] = right + coords[3] = top + coords[4] = bottom + else + iconFrame.CooldownBrightnessTexture.cords = {left, right, top, bottom} + end + iconFrame.CooldownBrightnessTexture.top = top iconFrame.CooldownBrightnessTexture.bottom = bottom - end - PixelUtil.SetPoint(iconFrame.CooldownBrightnessTexture, "bottomright", iconFrame, "bottomright", -1, 1) + PixelUtil.SetPoint(iconFrame.CooldownBrightnessTexture, "bottomright", iconFrame.Texture, "bottomright", 0, 0) + end --make information available iconFrame.spellId = spellId @@ -388,7 +495,7 @@ detailsFramework.IconGenericMixin = { end end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame ---@param iconFrame df_icongeneric SetCooldown = function(self, iconFrame) if (iconFrame.cooldownLooper) then @@ -399,69 +506,166 @@ detailsFramework.IconGenericMixin = { --iconFrame:SetScale(3) --debug - iconFrame.CooldownEdge:Hide() - iconFrame.CooldownEdge.texture = nil + if (options.show_horizontal_swipe) then + iconFrame.CooldownEdge:Show() + iconFrame.CooldownTexture:Show() + iconFrame.CooldownBrightnessTexture:Show() - detailsFramework:SetFontColor(iconFrame.CountdownText, self.options.text_color) + iconFrame.CooldownEdge.texture = nil + iconFrame.CooldownEdge:SetAlpha(0.834) - PixelUtil.SetSize(iconFrame.CooldownEdge, iconFrame.CooldownTexture:GetWidth(), 2) - PixelUtil.SetPoint(iconFrame.CooldownEdge, "topleft", iconFrame.CooldownTexture, "topleft", 0, 0) - PixelUtil.SetPoint(iconFrame.CooldownEdge, "topright", iconFrame.CooldownTexture, "topright", 0, 0) - PixelUtil.SetHeight(iconFrame.CooldownEdge, 2) + PixelUtil.SetSize(iconFrame.CooldownEdge, iconFrame.CooldownTexture:GetWidth(), 2) + PixelUtil.SetPoint(iconFrame.CooldownEdge, "topleft", iconFrame.CooldownTexture, "topleft", 0, 0) + PixelUtil.SetPoint(iconFrame.CooldownEdge, "topright", iconFrame.CooldownTexture, "topright", 0, 0) + PixelUtil.SetHeight(iconFrame.CooldownEdge, 8) - local swipe_brightness = options.swipe_brightness - iconFrame.CooldownBrightnessTexture:SetAlpha(swipe_brightness) + iconFrame.CooldownEdge:SetTexture(options.swipe_white, "CLAMP", "CLAMP", "TRILINEAR") + iconFrame.CooldownEdge.texture = options.swipe_white - local swipe_darkness = options.swipe_alpha - iconFrame.CooldownTexture:SetAlpha(swipe_darkness) - iconFrame.CooldownTexture:SetVertexColor(unpack(options.swipe_color)) + local swipe_brightness = options.swipe_brightness + iconFrame.CooldownBrightnessTexture:SetAlpha(swipe_brightness) - iconFrame.CooldownEdge:SetAlpha(0.834) + local swipe_darkness = options.swipe_alpha + iconFrame.CooldownTexture:SetAlpha(swipe_darkness) + iconFrame.CooldownTexture:SetVertexColor(unpack(options.swipe_color)) + else + iconFrame.CooldownEdge:Hide() + iconFrame.CooldownBrightnessTexture:Hide() + iconFrame.CooldownTexture:Hide() + end + + if (options.show_text) then + detailsFramework:SetFontColor(iconFrame.CountdownText, self.options.text_color) + detailsFramework:SetFontSize(iconFrame.CountdownText, self.options.text_size) + detailsFramework:SetFontFace(iconFrame.CountdownText, self.options.text_font) + detailsFramework:SetFontOutline(iconFrame.CountdownText, self.options.text_outline) + detailsFramework:SetAnchor(iconFrame.CountdownText, self.options.text_anchor, iconFrame) + iconFrame.CountdownText:Show() + iconFrame.CountdownText:SetAlpha(1) + else + iconFrame.CountdownText:Hide() + end + + if (options.show_cooldown) then + iconFrame.Cooldown:Show() + iconFrame.Cooldown:SetReverse(options.cooldown_reverse) + iconFrame.Cooldown:SetDrawSwipe(options.cooldown_swipe_enabled) + iconFrame.Cooldown:SetEdgeTexture(options.cooldown_edge_texture) --the yellow edge that follows the cooldown animation + iconFrame.Cooldown:SetHideCountdownNumbers(options.surpress_blizzard_cd_timer) + + iconFrame.Cooldown:SetSwipeTexture([[Interface\Masks\SquareMask]], 0, 0, 0, 0.3) + --iconFrame.Cooldown:SetSwipeColor(1, 1, 1, 1) + --iconFrame.Cooldown:SetSwipeColor(0, 0, 0, 0.1) + + --iconFrame.Cooldown:SetDrawEdge(true) --the same shit as above + --iconFrame.Cooldown:SetDrawSwipe(true) + --iconFrame.Cooldown:SetDrawBling(true) --edge of the animation, a thin horizontal texture + --iconFrame.Cooldown:SetEdgeScale(4) --edge of the animation, a thin horizontal texture + + if (not options.surpress_blizzard_cd_timer) then + detailsFramework:SetFontColor(iconFrame.Cooldown.CountdownText, self.options.text_color) + detailsFramework:SetFontSize(iconFrame.Cooldown.CountdownText, self.options.text_size) + detailsFramework:SetFontFace(iconFrame.Cooldown.CountdownText, self.options.text_font) + detailsFramework:SetFontOutline(iconFrame.Cooldown.CountdownText, self.options.text_outline) + end + iconFrame.Cooldown.noCooldownCount = options.surpress_tulla_omni_cc + + CooldownFrame_Set(iconFrame.Cooldown, iconFrame.startTime, iconFrame.duration, true, true, iconFrame.modRate) + + iconFrame.CooldownBrightnessTexture:Show() + else + iconFrame.Cooldown:Hide() + end self.OnIconTick(iconFrame) - local amountOfLoops = math.floor(iconFrame.duration / 0.5) + local amountOfLoops = math.floor(iconFrame.duration / 0.25) local loopEndCallback = nil - local checkPointCallback = nil - - local newLooper = detailsFramework.Schedules.NewLooper(0.5, self.OnIconTick, amountOfLoops, loopEndCallback, checkPointCallback, iconFrame) - iconFrame.cooldownLooper = newLooper + if (iconFrame.options.remove_on_finish) then + --increase the amount of loops in one, so the last loop will remove the icon + --otherwise it might finish + amountOfLoops = amountOfLoops + 1 + local newLooper = detailsFramework.Schedules.NewLooper(0.25, self.OnIconTick, amountOfLoops, loopEndCallback, checkPointCallback, iconFrame) + iconFrame.cooldownLooper = newLooper + else + local newLooper = detailsFramework.Schedules.NewLooper(0.25, self.OnIconTick, amountOfLoops, loopEndCallback, checkPointCallback, iconFrame) + iconFrame.cooldownLooper = newLooper + end end, ---@param iconFrame df_icongeneric OnIconTick = function(iconFrame) local now = GetTime() --local percent = (now - iconFrame.startTime) / iconFrame.duration --no mod rate - local percent = ((now - iconFrame.startTime) / (iconFrame.modRate or 1)) / (iconFrame.duration / (iconFrame.modRate or 1)) + local percent = (((now - iconFrame.startTime) / (iconFrame.modRate or 1)) / (iconFrame.duration / (iconFrame.modRate or 1))) or 0 local options = iconFrame.options + percent = Saturate(percent) --percent = abs(percent - 1) - local newHeight = math.min(iconFrame.textureHeight * percent, iconFrame.textureHeight) - iconFrame.CooldownTexture:SetHeight(newHeight) + iconFrame.timeRemaining = iconFrame.duration - (now - iconFrame.startTime) - PixelUtil.SetPoint(iconFrame.CooldownBrightnessTexture, "bottomright", iconFrame, "bottomright", 0, newHeight) --iconFrame.textureHeight - - local left, right, top, bottom = unpack(iconFrame.CooldownBrightnessTexture.cords) - local newBottomCord = Lerp(iconFrame.CooldownBrightnessTexture.top, iconFrame.CooldownBrightnessTexture.bottom, abs(percent - 1)) - iconFrame.CooldownBrightnessTexture:SetTexCoord(left, right, top, newBottomCord) - - if (percent > options.swipe_percent2) then - if (options.swipe_red and iconFrame.CooldownEdge.texture ~= options.swipe_red) then - iconFrame.CooldownEdge:Show() - iconFrame.CooldownEdge:SetTexture(options.swipe_red) - iconFrame.CooldownEdge.texture = options.swipe_red - end - - elseif (percent > options.swipe_percent1) then - if (options.swipe_yellow and iconFrame.CooldownEdge.texture ~= options.swipe_yellow) then - iconFrame.CooldownEdge:Show() - iconFrame.CooldownEdge:SetTexture(options.swipe_yellow) - iconFrame.CooldownEdge.texture = options.swipe_yellow + if (percent >= 1) then + --time expired + if (options.remove_on_finish) then + iconFrame:GetParent():RemoveSpecificIcon(iconFrame.identifierKey) + return + else + percent = 1 end end - --iconFrame.CountdownText:SetText(iconFrame.parentIconRow.FormatCooldownTime(iconFrame.duration - (now - iconFrame.startTime))) --no mod rate - iconFrame.CountdownText:SetText(iconFrame.parentIconRow.FormatCooldownTime((iconFrame.duration - (now - iconFrame.startTime)) / (iconFrame.modRate or 1))) - --self.CountdownText:Show() + if (options.show_horizontal_swipe) then + local newHeight = math.min(iconFrame.textureHeight * percent, iconFrame.textureHeight) + iconFrame.CooldownTexture:SetHeight(newHeight) + + PixelUtil.SetPoint(iconFrame.CooldownBrightnessTexture, "bottomright", iconFrame.Texture, "bottomright", 0, newHeight) --iconFrame.textureHeight - + local left, right, top, bottom = unpack(iconFrame.CooldownBrightnessTexture.cords) + local newBottomCord = Lerp(iconFrame.CooldownBrightnessTexture.top, iconFrame.CooldownBrightnessTexture.bottom, abs(percent - 1)) + iconFrame.CooldownBrightnessTexture:SetTexCoord(left, right, top, newBottomCord) + + --local newBrightness = Lerp(Saturate(options.cooldown_max_brightness-0.6), options.cooldown_max_brightness, percent) + --iconFrame.CooldownBrightnessTexture:SetAlpha(newBrightness) + + if (options.swipe_progressive_color) then + --interpolate from green to red + --percent goes from 0 to 1, where zero is the start of the cooldown and 1 is the end + if (options.swipe_color_start and options.swipe_color_end) then + --use the first and second color + local r1, g1, b1 = unpack(options.swipe_color_start) + local r2, g2, b2 = unpack(options.swipe_color_end) + local r, g, b = detailsFramework.Math.LerpLinearColor(percent, 1, r1, g1, b1, r2, g2, b2) + iconFrame.CooldownEdge:SetVertexColor(r, g, b, 0.834) + else + --use a solid color + iconFrame.CooldownEdge:SetVertexColor(unpack(options.swipe_color)) + end + + --iconFrame.CooldownEdge:SetVertexColor(percent, math.abs(percent-1), 0, 0.834) + local alpha = Saturate(0.2 + percent) + iconFrame.CooldownEdge:SetAlpha(alpha) + else + --use a solid color + iconFrame.CooldownEdge:SetVertexColor(unpack(options.swipe_color)) + end + end + + if (options.show_cooldown) then + if (options.cooldown_max_brightness) then + iconFrame.CooldownBrightnessTexture:SetAlpha(Lerp(0, options.cooldown_max_brightness, percent)) + local swipeAlpha = Saturate(Lerp(0, 1, percent)) + local exponentialCurve = 0.1 * math.exp(3.5 * swipeAlpha) + exponentialCurve = Saturate(exponentialCurve) + iconFrame.Cooldown:SetSwipeColor(0, 0, 0, exponentialCurve) + end + end + + --show the countdown text + if (options.show_text) then + iconFrame.CountdownText:SetText(iconFrame.parentIconRow.FormatCooldownTime((iconFrame.duration - (now - iconFrame.startTime)) / (iconFrame.modRate or 1))) + if (options.text_alpha_by_percent) then + iconFrame.CountdownText:SetAlpha(percent) + end + end end, FormatCooldownTime = function(thisTime) @@ -495,7 +699,7 @@ detailsFramework.IconGenericMixin = { end end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame ---@param identifierKey any RemoveSpecificIcon = function(self, identifierKey) if (not identifierKey or identifierKey == "") then @@ -527,7 +731,7 @@ detailsFramework.IconGenericMixin = { self:AlignAuraIcons() end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame ClearIcons = function(self, resetBuffs, resetDebuffs) resetBuffs = resetBuffs ~= false resetDebuffs = resetDebuffs ~= false @@ -560,7 +764,7 @@ detailsFramework.IconGenericMixin = { self:AlignAuraIcons() end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame AlignAuraIcons = function(self) local iconPool = self.IconPool local iconAmount = #iconPool @@ -604,22 +808,30 @@ detailsFramework.IconGenericMixin = { if (growDirection == 1) then --grow to right if (bIsFirstIcon) then - local attachSide = (bIsCenterAligned and "center") or (nWhichSide and not detailsFramework.SideIsCorner[nWhichSide] and "left") or "bottomleft" - PixelUtil.SetPoint(iconFrame, attachSide, anchorTo, attachSide, 0, 0) + if (self.options.first_icon_use_anchor) then + detailsFramework:SetAnchor(iconFrame, self.options.anchor, self) + else + local attachSide = (bIsCenterAligned and "center") or (nWhichSide and not detailsFramework.SideIsCorner[nWhichSide] and "left") or "bottomleft" + PixelUtil.SetPoint(iconFrame, attachSide, anchorTo, attachSide, 0, 0) + end else PixelUtil.SetPoint(iconFrame, "left", anchorTo, "right", xPadding, 0) end elseif (growDirection == 2) then --grow to left if (bIsFirstIcon) then - local attachSide = (bIsCenterAligned and "center") or (nWhichSide and not detailsFramework.SideIsCorner[nWhichSide] and "right") or "bottomright" - PixelUtil.SetPoint(iconFrame, attachSide, anchorTo, attachSide, 0, 0) + if (self.options.first_icon_use_anchor) then + detailsFramework:SetAnchor(iconFrame, self.options.anchor, self) + else + local attachSide = (bIsCenterAligned and "center") or (nWhichSide and not detailsFramework.SideIsCorner[nWhichSide] and "right") or "bottomright" + PixelUtil.SetPoint(iconFrame, attachSide, anchorTo, attachSide, 0, 0) + end else PixelUtil.SetPoint(iconFrame, "right", anchorTo, "left", xPadding, 0) end end - width = width + ((iconFrame.width or iconFrame:GetWidth()) * iconFrame:GetScale()) + 1 + width = width + ((iconFrame.width or iconFrame:GetWidth())) + 1 --* iconFrame:GetScale() removed the getscale as now the scale are applied to the width and height end if (bIsCenterAligned) then @@ -636,13 +848,13 @@ detailsFramework.IconGenericMixin = { end end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame GetIconGrowDirection = function(self) local side = self.options.anchor.side return detailsFramework.GrowDirectionBySide[side] end, - ---@param self df_iconrow the parent frame + ---@param self df_iconrow_generic the parent frame OnOptionChanged = function(self, optionName) if (self.SetBackdropColor) then self:SetBackdropColor(unpack(self.options.backdrop_color)) @@ -651,19 +863,18 @@ detailsFramework.IconGenericMixin = { end, } -local default_icon_row_options = { +---@type df_iconrow_generic_options +local default_iconrow_generic_options = { icon_width = 20, icon_height = 20, texcoord = {.1, .9, .1, .9}, - show_text = true, + show_text = false, text_color = {1, 1, 1, 1}, text_size = 12, text_font = "Arial Narrow", text_outline = "NONE", - text_anchor = "center", - text_rel_anchor = "center", - text_x_offset = 0, - text_y_offset = 0, + text_anchor = {side = 9, x = 0, y = 0}, + text_alpha_by_percent = false, desc_text = true, desc_text_color = {1, 1, 1, 1}, desc_text_size = 7, @@ -691,29 +902,35 @@ local default_icon_row_options = { anchor = {side = 6, x = 2, y = 0}, grow_direction = 1, --1 = to right 2 = to left center_alignment = false, --if true if will align the icons with grow_direction and then set the iconRow width to match the length used by all icons - surpress_blizzard_cd_timer = false, + + show_cooldown = false, surpress_tulla_omni_cc = false, - on_tick_cooldown_update = true, - decimal_timer = false, + decimal_timer = false, --nop, not in use cooldown_reverse = false, cooldown_swipe_enabled = true, cooldown_edge_texture = "Interface\\Cooldown\\edge", + cooldown_max_brightness = 0.7, + surpress_blizzard_cd_timer = false, + on_tick_cooldown_update = true, --nop, not in use + show_horizontal_swipe = true, + swipe_progressive_color = true, swipe_alpha = 0.5, swipe_brightness = 0.5, - swipe_color = {0, 0, 0}, - swipe_yellow = false, - swipe_red = false, - swipe_percent1 = 0.75, - swipe_percent2 = 0.90, + swipe_color = {0, 0, 0}, --this variable is having conflicts because it's in use by other things + swipe_color_start = {0, 1, 0}, + swipe_color_end = {1, 0, 0}, - --first_icon_anchor = "auto", + remove_on_finish = false, + first_icon_use_anchor = false, } + + ---@param parent frame ---@param name string? ---@param options table? ----@return df_iconrow +---@return df_iconrow_generic function detailsFramework:CreateIconRowGeneric(parent, name, options) local newIconRowFrame = CreateFrame("frame", name, parent, "BackdropTemplate") newIconRowFrame.IconPool = {} @@ -724,7 +941,7 @@ function detailsFramework:CreateIconRowGeneric(parent, name, options) detailsFramework:Mixin(newIconRowFrame, detailsFramework.IconGenericMixin) detailsFramework:Mixin(newIconRowFrame, detailsFramework.OptionsFunctions) - newIconRowFrame:BuildOptionsTable(default_icon_row_options, options) + newIconRowFrame:BuildOptionsTable(default_iconrow_generic_options, options) newIconRowFrame:SetSize(1, 1) diff --git a/Libs/DF/rounded_panel.lua b/Libs/DF/rounded_panel.lua index d7e3d998..e8929932 100644 --- a/Libs/DF/rounded_panel.lua +++ b/Libs/DF/rounded_panel.lua @@ -111,14 +111,14 @@ local cornerNames = {"TopLeft", "TopRight", "BottomLeft", "BottomRight"} local setCornerPoints = function(self, textures, width, height, xOffset, yOffset, bIsBorder) for cornerName, thisTexture in pairs(textures) do PixelUtil.SetSize(thisTexture, width or 16, height or 16) - thisTexture:SetTexture(self.options.corner_texture) + thisTexture:SetTexture(self.options.corner_texture, "CLAMP", "CLAMP", "TRILINEAR") --set the mask if (not thisTexture.MaskTexture and bIsBorder) then thisTexture.MaskTexture = self:CreateMaskTexture(nil, "background") thisTexture.MaskTexture:SetSize(74, 64) thisTexture:AddMaskTexture(thisTexture.MaskTexture) - thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]]) --1940690 + thisTexture.MaskTexture:SetTexture([[Interface\Azerite\AzeriteGoldRingRank2]], "CLAMP", "CLAMP", "TRILINEAR") --1940690 --thisTexture.MaskTexture:Hide() end @@ -300,7 +300,7 @@ detailsFramework.RoundedCornerPanelMixin = { ---@type height local frameHeight = self:GetHeight() - if (frameHeight < 32) then + if (false and frameHeight < 32) then local newCornerSize = frameHeight / 2 --set the new size of the corners on all corner textures @@ -419,6 +419,11 @@ detailsFramework.RoundedCornerPanelMixin = { return self:GetHeight() - (borderTexture:GetHeight() * 2) + 2 elseif (alignment == "horizontal") then + if (self.tabSide) then + if (self.tabSide == "left" or self.tabSide == "right") then + return self:GetWidth() - (borderTexture:GetHeight() * 2) + 2 - borderTexture:GetHeight() + end + end return self:GetWidth() - (borderTexture:GetHeight() * 2) + 2 end diff --git a/Libs/DF/scrollbox.lua b/Libs/DF/scrollbox.lua index 8065d542..6aa22419 100644 --- a/Libs/DF/scrollbox.lua +++ b/Libs/DF/scrollbox.lua @@ -334,11 +334,11 @@ local grid_scrollbox_options = { ---create a scrollbox with a grid layout ---@param parent frame ---@param name string ----@param refreshFunc function +---@param refreshFunc fun(button:frame, data:table) ---@param data table ----@param createColumnFrameFunc function +---@param createColumnFrameFunc fun(line:frame, lineIndex:number, columnIndex:number) ---@param options df_gridscrollbox_options? ----@return unknown +---@return df_gridscrollbox function detailsFramework:CreateGridScrollBox(parent, name, refreshFunc, data, createColumnFrameFunc, options) options = options or {} @@ -428,25 +428,117 @@ function detailsFramework:CreateGridScrollBox(parent, name, refreshFunc, data, c scrollBox.OnSetData = onSetData onSetData(scrollBox, data) + ---@cast scrollBox df_gridscrollbox return scrollBox end -function detailsFramework.CreateRoundedOptionsScrollBox(parent, name, onRefreshButton, onSelectOption, tbdData, createSelectorButton, gridScrollBoxOptions) +---create a scrollbox with a grid layout to be used as a menu +---@param parent frame +---@param name string? +---@param refreshMeFunc fun(gridScrollBox:df_gridscrollbox, searchText:string) +---@param refreshButtonFunc fun(button:button, data:table) +---@param clickFunc fun(button:button, data:table) +---@param onCreateButton fun(button:button, lineIndex:number, columnIndex:number) +---@param gridScrollBoxOptions df_gridscrollbox_options +---@return df_gridscrollbox +function detailsFramework:CreateMenuWithGridScrollBox(parent, name, refreshMeFunc, refreshButtonFunc, clickFunc, onCreateButton, gridScrollBoxOptions) + local dataSelected = nil + local gridScrollBox + + local onClickButtonSelectorButton = function(blizzButton, buttonDown, dfButton, data) + dataSelected = data + gridScrollBox:Refresh() + xpcall(clickFunc, geterrorhandler(), dfButton, data) + end + + --create a search bar to filter the auras + local searchText = "" + local onSearchTextChangedCallback = function(self, ...) + local text = self:GetText() + searchText = string.lower(text) + dataSelected = nil + gridScrollBox:RefreshMe() + end + + local searchBox = detailsFramework:CreateSearchBox(parent, onSearchTextChangedCallback) + ---when the scroll is refreshing the line, the line will call this function for each selection button on it ---@param button df_button ---@param data table - local refreshAuraSelectorFrame = function(button, data) + local refreshLine = function(button, data) button.data = data if (data.tooltip) then button.tooltip = data.tooltip end - xpcall(onRefreshButton, geterrorhandler(), button, data) - --set what happen when the user clicks the button - button:SetClickFunction(onSelectOption, button, data) + button:SetClickFunction(onClickButtonSelectorButton, button, data) + + if (button.data == dataSelected) then + button.widget:SetBorderCornerColor(.9, .9, .9) + else + button.widget:SetBorderCornerColor(unpack(gridScrollBoxOptions.roundedFramePreset.border_color)) + end + + xpcall(refreshButtonFunc, geterrorhandler(), button, data) end + + --create a line + local createButton = function(line, lineIndex, columnIndex) + local width = gridScrollBoxOptions.width / gridScrollBoxOptions.columns_per_line - 5 + local height = gridScrollBoxOptions.line_height + if (not height) then + height = 30 + end + + local button = detailsFramework:CreateButton(line, onClickButtonSelectorButton, width, height) + detailsFramework:AddRoundedCornersToFrame(button.widget, gridScrollBoxOptions.roundedFramePreset) + button.textsize = 11 + + button:SetHook("OnEnter", function(self) + local dfButton = self:GetObject() + GameCooltip:Reset() + if (dfButton.spellId) then + GameCooltip:SetSpellByID(dfButton.spellId) + GameCooltip:SetOwner(self) + GameCooltip:Show() + end + self:SetBorderCornerColor(.9, .9, .9) + end) + + button:SetHook("OnLeave", function(self) + GameCooltip:Hide() + local dfButton = self:GetObject() + if (dfButton.data == dataSelected) then + self:SetBorderCornerColor(.9, .9, .9) + else + self:SetBorderCornerColor(unpack(gridScrollBoxOptions.roundedFramePreset.border_color)) + end + end) + + xpcall(onCreateButton, geterrorhandler(), button, lineIndex, columnIndex) + + return button + end + + gridScrollBox = detailsFramework:CreateGridScrollBox(parent, name, refreshLine, {}, createButton, gridScrollBoxOptions) + gridScrollBox:SetBackdrop({}) + gridScrollBox:SetBackdropColor(0, 0, 0, 0) + gridScrollBox:SetBackdropBorderColor(0, 0, 0, 0) + gridScrollBox.__background:Hide() + gridScrollBox:Show() + + gridScrollBox.searchBox = searchBox + + searchBox:SetPoint("bottomleft", gridScrollBox, "topleft", 0, 2) + searchBox:SetWidth(gridScrollBoxOptions.width) + + function gridScrollBox:RefreshMe() + xpcall(refreshMeFunc, geterrorhandler(), gridScrollBox, searchBox:GetText()) + end + + return gridScrollBox end --Need to test this and check the "same_name_spells_add(value)" on the OnEnter function diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua index 56c6a1c9..ca8a6dd2 100644 --- a/Libs/DF/slider.lua +++ b/Libs/DF/slider.lua @@ -885,13 +885,26 @@ local get_switch_func = function(self) return self.OnSwitch end -local setCheckedTexture = function(self, texture, xOffSet, yOffSet) - self.checked_texture:SetTexture(texture) +local setCheckedTexture = function(self, texture, xOffSet, yOffSet, sizePercent, color) + if (texture) then + self.checked_texture:SetTexture(texture, "CLAMP", "CLAMP", "TRILINEAR") + end + if (xOffSet or yOffSet) then self.checked_texture:SetPoint("center", self.button, "center", xOffSet or -1, yOffSet or -1) else self.checked_texture:SetPoint("center", self.button, "center", -1, -1) end + + if (sizePercent and type(sizePercent) == "number") then + local width = self:GetWidth() * sizePercent + self.checked_texture:SetSize(width, width) + end + + if (color) then + local r, g, b, a = DF:ParseColors(color) + self.checked_texture:SetVertexColor(r, g, b, a) + end end local set_as_checkbok = function(self) @@ -904,6 +917,7 @@ local set_as_checkbok = function(self) self.checked_texture = checked self.SetCheckedTexture = setCheckedTexture + self.SetChecked = switch_set_value self._thumb:Hide() self._text:Hide() @@ -1041,6 +1055,14 @@ function DF:NewSwitch(parent, container, name, member, width, height, leftText, end function DFSliderMetaFunctions:SetTemplate(template) + if (type(template) == "string") then + local templateName = template + template = DF:GetTemplate("switch", templateName) + if (not template) then + print("no template found", templateName) + end + end + --slider e switch if (template.width) then PixelUtil.SetWidth(self.widget, template.width) @@ -1103,13 +1125,54 @@ function DFSliderMetaFunctions:SetTemplate(template) local r, g, b, a = DF:ParseColors(template.disabled_backdropcolor) self.backdrop_disabledcolor = {r, g, b, a} end + + if (template.is_checkbox) then + self:SetAsCheckBox() + self:SetCheckedTexture(template.checked_texture, template.checked_xoffset or 0, template.checked_yoffset or 0, template.checked_size_percent or 0.7, template.checked_color) + end + + if (template.rounded_corner) then + self:SetBackdrop(nil) + DF:AddRoundedCornersToFrame(self.widget or self, template.rounded_corner) + end end -function DF:CreateSlider (parent, w, h, min, max, step, defaultv, isDecemal, member, name, with_label, slider_template, label_template) - local slider, label = DF:NewSlider (parent, parent, name, member, w, h, min, max, step, defaultv, isDecemal, false, with_label, slider_template, label_template) - return slider, label +--DF:Mixin(DFSliderMetaFunctions, DF.SetPointMixin) +--DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) +--DF:Mixin(DFSliderMetaFunctions, DF.TooltipHandlerMixin) + +---@class df_slider : slider, df_scripthookmixin +---@field widget slider +---@field slider slider +---@field type string +---@field dframework boolean +---@field SetTemplate fun(self:df_slider, template: table|string) +---@field SetFixedParameter fun(value: any) +---@field GetFixedParameter fun() +---@field SetValueNoCallback fun(value: number) +---@field SetThumbSize fun(width:number, height:number) +---@field ClearFocus fun() + +---@param parent frame +---@param width number? default 150 +---@param height number? default 20 +---@param minValue number? default 1 +---@param maxValue number? default 2 +---@param step number? default 1 +---@param defaultv number? default to minValue +---@param isDecemal boolean? default false +---@param member string? +---@param name string? +---@param label string? +---@param sliderTemplate string|table|nil +---@param labelTemplate string|table|nil +---@return df_slider, df_label? +function DF:CreateSlider (parent, width, height, minValue, maxValue, step, defaultv, isDecemal, member, name, label, sliderTemplate, labelTemplate) + local slider, labelText = DF:NewSlider(parent, parent, name, member, width, height, minValue, maxValue, step, defaultv, isDecemal, false, label, sliderTemplate, labelTemplate) + return slider, labelText end +---@return df_slider, df_label? function DF:NewSlider (parent, container, name, member, width, height, minValue, maxValue, step, defaultValue, isDecemal, isSwitch, with_label, slider_template, label_template) if (not name) then name = "DetailsFrameworkSlider" .. DF.SliderCounter @@ -1117,7 +1180,7 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, end if (not parent) then - return error("Details! FrameWork: parent not found.", 2) + error("Details! FrameWork: parent not found.", 2) end if (not container) then @@ -1148,8 +1211,8 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, step = step or 1 defaultValue = defaultValue or minValue - width = width or 130 - height = height or 19 + width = width or 160 + height = height or 20 --default members SliderObject.lockdown = false diff --git a/Libs/DF/textentry.lua b/Libs/DF/textentry.lua index 81b81720..eae299ad 100644 --- a/Libs/DF/textentry.lua +++ b/Libs/DF/textentry.lua @@ -722,6 +722,51 @@ function detailsFramework:NewTextEntry(parent, container, name, member, width, h return newTextEntryObject, withLabel end +---create a search box with no backdrop, a magnifying glass icon and a clear search button +---@param parent frame +---@param callback any +---@return df_textentry +function detailsFramework:CreateSearchBox(parent, callback) + local onSearchPressEnterCallback = function(_, _, text, self) + callback(self) + end + + local searchBox = detailsFramework:CreateTextEntry(parent, onSearchPressEnterCallback, 220, 26) + searchBox:SetAsSearchBox() + searchBox:SetTextInsets(25, 5, 0, 0) + searchBox:SetBackdrop(nil) + searchBox:SetHook("OnTextChanged", callback) + + local file, size, flags = searchBox:GetFont() + searchBox:SetFont(file, 12, flags) + searchBox.ClearSearchButton:SetAlpha(0) + + searchBox.BottomLineTexture = searchBox:CreateTexture(nil, "border") + searchBox.BottomLineTexture:SetPoint("bottomleft", searchBox.widget, "bottomleft", -15, 0) + searchBox.BottomLineTexture:SetPoint("bottomright", searchBox.widget, "bottomright", 0, 0) + local bUseAtlasSize = false + searchBox.BottomLineTexture:SetAtlas("common-slider-track") + searchBox.BottomLineTexture:SetHeight(8) + + --create the button to clear the search box + searchBox.ClearSearchButton = CreateFrame("button", nil, searchBox.widget, "UIPanelCloseButton") + searchBox.ClearSearchButton:SetPoint("right", searchBox.widget, "right", -3, 0) + searchBox.ClearSearchButton:SetSize(10, 10) + searchBox.ClearSearchButton:SetAlpha(0.3) + searchBox.ClearSearchButton:GetNormalTexture():SetAtlas("common-search-clearbutton") + searchBox.ClearSearchButton:GetHighlightTexture():SetAtlas("common-search-clearbutton") + searchBox.ClearSearchButton:GetPushedTexture():SetAtlas("common-search-clearbutton") + + searchBox.ClearSearchButton:SetScript("OnClick", function() + searchBox:SetText("") + searchBox:PressEnter() + searchBox:ClearFocus() + end) + + return searchBox +end + + function detailsFramework:NewSpellEntry(parent, func, width, height, param1, param2, member, name) local editbox = detailsFramework:NewTextEntry(parent, parent, name, member, width, height, func, param1, param2) return editbox diff --git a/Libs/LibLuaServer/LibLuaServer.lua b/Libs/LibLuaServer/LibLuaServer.lua index 8f666006..1237f555 100644 --- a/Libs/LibLuaServer/LibLuaServer.lua +++ b/Libs/LibLuaServer/LibLuaServer.lua @@ -266,6 +266,7 @@ ---@alias addonname string name of an addon, same as the name of the ToC file. ---@alias profile table a table containing the settings of an addon, usually saved in the SavedVariables file. ---@alias profilename string name of a profile. +---@alias anchorid number a number that represents an anchor point, such as topleft, topright, bottomleft, bottomright, top, bottom, left, right, center. ---@class _G ---@field RegisterAttributeDriver fun(statedriver: frame, attribute: string, conditional: string) @@ -319,6 +320,7 @@ ---@field SetPoint fun(self: uiobject, point: anchorpoint, relativeFrame: uiobject, relativePoint: anchorpoint, xOffset: number, yOffset: number) ---@field ClearAllPoints fun(self: uiobject) ---@field CreateAnimationGroup fun(self: uiobject, name: string|nil, templateName: string|nil) : animationgroup +---@field SetIgnoreParentAlpha fun(self: region, ignore: boolean) ---@class animationgroup : uiobject ---@field CreateAnimation fun(self: animationgroup, animationType: string, name: string|nil, inheritsFrom: string|nil) : animation @@ -617,1272 +619,4574 @@ ---@field HasFocus fun(self:editbox) : boolean return true if the editbox has focus ---@field HighlightText fun(self:editbox, start:number?, finish:number?) select a portion of the text, passing zero will select the entire text +---@class slider : statusbar +---@field Enable fun(self: slider) +---@field Disable fun(self: slider) +---@field SetEnabled fun(self: slider, enable: boolean) +---@field IsEnabled fun(self: slider) : boolean +---@field GetObeyStepOnDrag fun(self: slider) : boolean +---@field GetStepsPerPage fun(self: slider) : number +---@field GetThumbTexture fun(self: slider) : texture +---@field IsDraggingThumb fun(self: slider) : boolean +---@field SetObeyStepOnDrag fun(self: slider, obeyStep: boolean) +---@field SetThumbTexture fun(self: slider, texture: textureid|texturepath) +---@field SetStepsPerPage fun(self: slider, steps: number) + +INVSLOT_FIRST_EQUIPPED = true +INVSLOT_LAST_EQUIPPED = true +LE_PARTY_CATEGORY_INSTANCE = true --functions C_ChatInfo = true -unpack = true -abs = true -IsInGroup = true -Ambiguate = true -IsInRaid = true -LE_PARTY_CATEGORY_INSTANCE = true -C_Timer = true -ceil = true -strsplit = true -INVSLOT_FIRST_EQUIPPED = true -INVSLOT_LAST_EQUIPPED = true -floor = true -tremove = true -GetSpellCharges = function(spellId) end -AddTrackedAchievement = true -CanShowAchievementUI = true -ClearAchievementComparisonUnit = true -GetAchievementCategory = true -GetAchievementComparisonInfo = true -GetAchievementCriteriaInfo = true -GetAchievementInfo = true -GetAchievementInfoFromCriteria = true -GetAchievementLink = true -GetAchievementNumCriteria = true -GetSpecializationInfo = true -GetAchievementNumRewards = true -GetCategoryInfo = true -GetCategoryList = true -GetSpecialization = true -GetCategoryNumAchievements = true -GetComparisonAchievementPoints = true -GetComparisonCategoryNumAchievements = true -GetComparisonStatistic = true -GetLatestCompletedAchievements = true -GetLatestCompletedComparisonAchievements = true -GetLatestUpdatedComparisonStatsGetLatestUpdatedStats = true -GetNextAchievement = true -GetNumComparisonCompletedAchievements = true -GetNumCompletedAchievements = true -GetPreviousAchievement = true -GetStatistic = true -GetStatisticsCategoryList = true -GetTotalAchievementPoints = true -GetTrackedAchievements = true -GetNumTrackedAchievements = true -RemoveTrackedAchievement = true -SetAchievementComparisonUnit = true -ActionButtonDown = true -ActionButtonUp = true -ActionHasRange = true -CameraOrSelectOrMoveStart = true -CameraOrSelectOrMoveStop = true -ChangeActionBarPage = true -GetActionBarPage = true -GetActionBarToggles = true -GetActionCooldown = true -GetActionCount = true -GetActionInfo = true -GetActionText = true -GetActionTexture = true -GetBonusBarOffset = true -GetMouseButtonClicked = true -GetMultiCastBarOffset = true -GetPossessInfo = true -HasAction = true -IsActionInRange = true -IsAttackAction = true -IsAutoRepeatAction = true -IsCurrentAction = true -IsConsumableAction = true -IsEquippedAction = true -IsUsableAction = true -PetHasActionBar = true -PickupAction = true -PickupPetAction = true -PlaceAction = true -SetActionBarToggles = true -StopAttack = true -TurnOrActionStart = true -TurnOrActionStop = true -UseAction = true -AcceptDuel = true -AttackTarget = true -CancelDuel = true -CancelLogout = true -ClearTutorials = true -CancelSummon = true -ConfirmSummon = true -DescendStop = true -Dismount = true -FlagTutorial = true -ForceQuit = true -GetPVPTimer = true -GetSummonConfirmAreaName = true -GetSummonConfirmSummoner = true -GetSummonConfirmTimeLeft = true -RandomRoll = true -SetPVP = true -StartDuel = true -TogglePVP = true -ToggleSheath = true -UseSoulstone = true -CanSolveArtifact = true -UIParent = true -GetArtifactInfoByRace = true -GetArtifactProgress = true -GetNumArtifactsByRace = true -GetSelectedArtifactInfo = true -IsArtifactCompletionHistoryAvailable = true -ItemAddedToArtifact = true -RemoveItemFromArtifact = true -RequestArtifactCompletionHistory = true -SocketItemToArtifact = true -AcceptArenaTeam = true -ArenaTeamInviteByName = true -ArenaTeamSetLeaderByName = true -ArenaTeamLeave = true -ArenaTeamRoster = true -ArenaTeamUninviteByName = true -ArenaTeamDisband = true -DeclineArenaTeam = true -GetArenaTeam = true -GetArenaTeamGdfInf = true -oGetArenaTeamRosterInfo = true -GetBattlefieldTeamInfo = true -GetCurrentArenaSeason = true -GetInspectArenaTeamData = true -GetNumArenaTeamMembers = true -GetPreviousArenaSeason = true -IsActiveBattlefieldArena = true -IsArenaTeamCaptain = true -IsInArenaTeam = true -CalculateAuctionDeposit = true -CanCancelAuction = true -CancelSell = true -CanSendAuctionQuery = true -CancelAuction = true -ClickAuctionSellItemButton = true -CloseAuctionHouse = true -GetAuctionHouseDepositRate = true -GetAuctionInvTypes = true -GetAuctionItemClasses = true -GetAuctionItemInfo = true -GetAuctionItemLink = true -GetAuctionItemSubClasses = true -GetAuctionItemTimeLeft = true -GetAuctionSellItemInfo = true -GetBidderAuctionItems = true -GetNumAuctionItems = true -GetOwnerAuctionItems = true -GetSelectedAuctionItem = true -IsAuctionSortReversed = true -PlaceAuctionBid = true -QueryAuctionItems = true -SetAuctionsTabShowing = true -SetSelectedAuctionItem = true -SortAuctionItems = true -StartAuction = true -BankButtonIDToInvSlotID = true -CloseBankFrame = true -GetBankSlotCost = true -GetNumBankSlots = true -PurchaseSlot = true -AcceptAreaSpiritHeal = true -AcceptBattlefieldPort = true -CancelAreaSpiritHeal = true -CanJoinBattlefieldAsGroup = true -CheckSpiritHealerDist = true -GetAreaSpiritHealerTime = true -GetBattlefieldEstimatedWaitTime = true -GetBattlefieldFlagPosition = true -GetBattlefieldInstanceExpiration = true -GetBattlefieldInstanceRunTime = true -GetBattlefieldMapIconScale = true -GetBattlefieldPortExpiration = true -GetBattlefieldPosition = true -GetBattlefieldScore = true -GetBattlefieldStatData = true -GetBattlefieldStatInfo = true -GetBattlefieldStatus = true -GetBattlefieldTimeWaited = true -GetBattlefieldWinner = true -GetBattlegroundInfo = true -GetNumBattlefieldFlagPositions = true -GetNumBattlefieldPositions = true -GetNumBattlefieldScores = true -GetNumBattlefieldStats = true -GetNumWorldStateUI = true -GetWintergraspWaitTime = true -GetWorldStateUIInfo = true -IsPVPTimerRunning = true -JoinBattlefield = true -LeaveBattlefield = true -ReportPlayerIsPVPAFK = true -RequestBattlefieldPositions = true -RequestBattlefieldScoreData = true -RequestBattlegroundInstanceInfo = true -SetBattlefieldScoreFaction = true -GetBinding = true -GetBindingAction = true -GetBindingKey = true -GetBindingText = true -GetCurrentBindingSet = true -GetNumBindings = true -LoadBindings = true -RunBinding = true -SaveBindings = true -SetBinding = true -SetBindingSpell = true -SetBindingClick = true -SetBindingItem = true -SetBindingMacro = true -SetConsoleKey = true -SetOverrideBinding = true -SetOverrideBindingSpell = true -SetOverrideBindingClick = true -SetOverrideBindingItem = true -SetOverrideBindingMacro = true -ClearOverrideBindings = true -SetMouselookOverrideBinding = true -IsModifierKeyDown = true -IsModifiedClick = true -IsMouseButtonDown = true -CancelUnitBuff = true -CancelShapeshiftForm = true -CancelItemTempEnchantment = true -GetWeaponEnchantInfo = true -UnitAura = true -UnitBuff = true -UnitDebuff = true -AddChatWindowChannel = true -ChannelBan = true -ChannelInvite = true -ChannelKick = true -ChannelModerator = true -ChannelMute = true -ChannelToggleAnnouncements = true -ChannelUnban = true -ChannelUnmoderator = true -ChannelUnmute = true -DisplayChannelOwner = true -DeclineInvite = true -EnumerateServerChannels = true -GetChannelList = true -GetChannelName = true -GetChatWindowChannels = true -JoinChannelByName = true -LeaveChannelByName = true -ListChannelByName = true -ListChannels = true -RemoveChatWindowChannel = true -SendChatMessage = true -SetChannelOwner = true -SetChannelPassword = true -AcceptResurrect = true -AcceptXPLoss = true -CheckBinderDist = true -ConfirmBinder = true -DeclineResurrect = true -DestroyTotem = true -GetBindLocation = true -GetComboPoints = true -GetCorpseRecoveryDelay = true -GetCurrentTitle = true -GetMirrorTimerInfo = true -GetMirrorTimerProgress = true -GetMoney = true -GetNumTitles = true -GetPlayerFacing = true -GetPVPDesired = true -GetReleaseTimeRemaining = true -GetResSicknessDuration = true -GetRestState = true -GetRuneCooldown = true -GetRuneCount = true -GetRuneType = true -GetTimeToWellRested = true -GetTitleName = true -GetUnitPitch = true -GetXPExhaustion = true -HasFullControl = true -HasSoulstone = true -IsFalling = true -IsFlying = true -IsFlyableArea = true -IsIndoors = true -IsMounted = true -IsOutdoors = true -IsOutOfBounds = true -IsResting = true -IsStealthed = true -IsSwimming = true -IsTitleKnown = true -IsXPUserDisabled = true -NotWhileDeadError = true -ResurrectHasSickness = true -ResurrectHasTimer = true -ResurrectGetOfferer = true -RetrieveCorpse = true -SetCurrentTitle = true -TargetTotem = true -GetArmorPenetration = true -GetAttackPowerForStat = true -GetAverageItemLevel = true -GetBlockChance = true -GetCombatRating = true -GetCombatRatingBonus = true -GetCritChance = true -GetCritChanceFromAgility = true -GetDodgeChance = true -GetExpertise = true -GetExpertisePercent = true -GetManaRegen = true -GetMaxCombatRatingBonus = true -GetParryChance = true -GetPetSpellBonusDamage = true -GetPowerRegen = true -GetSpellBonusDamage = true -GetRangedCritChance = true -GetSpellBonusHealing = true -GetSpellCritChance = true -GetShieldBlock = true -GetSpellCritChanceFromIntellect = true -GetSpellPenetration = true -AddChatWindowChannel = true -ChangeChatColor = true -ChatFrame_AddChannel = true -ChatFrame_AddMessageEventFilter = true -ChatFrame_GetMessageEventFilters = true -ChatFrame_OnHyperlinkShow = true -ChatFrame_RemoveMessageEventFilter = true -GetAutoCompleteResults = true -GetChatTypeIndex = true -GetChatWindowChannels = true -GetChatWindowInfo = true -GetChatWindowMessages = true -JoinChannelByName = true -LoggingChat = true -LoggingCombat = true -RemoveChatWindowChannel = true -RemoveChatWindowMessages = true -SetChatWindowAlpha = true -SetChatWindowColor = true -SetChatWindowDocked = true -SetChatWindowLocked = true -SetChatWindowName = true -SetChatWindowShown = true -SetChatWindowSize = true -SetChatWindowUninteractable = true -DoEmote = true -GetDefaultLanguage = true -GetLanguageByIndex = true -GetNumLanguages = true -GetRegisteredAddonMessagePrefixes = true -IsAddonMessagePrefixRegistered = true -RegisterAddonMessagePrefix = true -SendAddonMessage = true -SendChatMessage = true -CallCompanion = true -DismissCompanion = true -GetCompanionInfo = true -GetNumCompanions = true -GetCompanionCooldown = true -PickupCompanion = true -SummonRandomCritter = true -ContainerIDToInventoryID = true -GetBagName = true -GetContainerItemCooldown = true -GetContainerItemDurability = true -GetContainerItemGems = true -GetContainerItemID = true -GetContainerItemInfo = true -GetContainerItemLink = true -GetContainerNumSlots = true -GetContainerItemQuestInfo = true -GetContainerNumFreeSlots = true -OpenAllBags = true -CloseAllBags = true -PickupBagFromSlot = true -PickupContainerItem = true -PutItemInBackpack = true -PutItemInBag = true -PutKeyInKeyRing = true -SplitContainerItem = true -ToggleBackpack = true -ToggleBag = true -GetCoinText = true -GetCoinTextureString = true -GetCurrencyInfo = true -GetCurrencyListSize = true -GetCurrencyListInfo = true -ExpandCurrencyList = true -SetCurrencyUnused = true -GetNumWatchedTokens = true -GetBackpackCurrencyInfo = true -SetCurrencyBackpack = true -AutoEquipCursorItem = true -ClearCursor = true -CursorCanGoInSlot = true -CursorHasItem = true -CursorHasMoney = true -CursorHasSpell = true -DeleteCursorItem = true -DropCursorMoney = true -DropItemOnUnit = true -EquipCursorItem = true -GetCursorInfo = true -GetCursorPosition = true -HideRepairCursor = true -InRepairMode = true -PickupAction = true -PickupBagFromSlot = true -PickupContainerItem = true -PickupInventoryItem = true -PickupItem = true -PickupMacro = true -PickupMerchantItem = true -PickupPetAction = true -PickupSpell = true -PickupStablePet = true -PickupTradeMoney = true -PlaceAction = true -PutItemInBackpack = true -PutItemInBag = true -ResetCursor = true -SetCursor = true -ShowContainerSellCursor = true -ShowInspectCursor = true -ShowInventorySellCursor = true -ShowMerchantSellCursor = true -ShowRepairCursor = true -SplitContainerItem = true -GetWeaponEnchantInfo = true -ReplaceEnchant = true -ReplaceTradeEnchant = true -BindEnchant = true -CollapseFactionHeader = true -CollapseAllFactionHeaders = true -ExpandFactionHeader = true -ExpandAllFactionHeaders = true -FactionToggleAtWar = true -GetFactionInfo = true -GetNumFactions = true -GetSelectedFaction = true -GetWatchedFactionInfo = true -IsFactionInactive = true -SetFactionActive = true -SetFactionInactive = true -SetSelectedFaction = true -SetWatchedFactionIndex = true -UnitFactionGroup = true -CreateFrame = true -CreateFont = true -GetFramesRegisteredForEvent = true -GetNumFrames = true -EnumerateFrames = true -GetMouseFocus = true -ToggleDropDownMenu = true -UIFrameFadeIn = true -UIFrameFadeOut = true -UIFrameFlash = true -EasyMenu = true -AddFriend = true -AddOrRemoveFriend = true -GetFriendInfo = true -SetFriendNotes = true -GetNumFriends = true -GetSelectedFriend = true -RemoveFriend = true -SetSelectedFriend = true -ShowFriends = true -ToggleFriendsFrame = true -GetNumGlyphSockets = true -GetGlyphSocketInfo = true -GetGlyphLink = true -GlyphMatchesSocket = true -PlaceGlyphInSocket = true -RemoveGlyphFromSocket = true -SpellCanTargetGlyph = true -CanComplainChat = true -CanComplainInboxItem = true -ComplainChat = true -ComplainInboxItem = true -CloseGossip = true -ForceGossip = true -GetGossipActiveQuests = true -GetGossipAvailableQuests = true -GetGossipOptions = true -GetGossipText = true -GetNumGossipActiveQuests = true -GetNumGossipAvailableQuests = true -GetNumGossipOptions = true -SelectGossipActiveQuest = true -SelectGossipAvailableQuest = true -SelectGossipOption = true -AcceptGroup = true -ConfirmReadyCheck = true -ConvertToRaid = true -DeclineGroup = true -DoReadyCheck = true -GetLootMethod = true -GetLootThreshold = true -GetMasterLootCandidate = true -GetNumPartyMembers = true -GetRealNumPartyMembers = true -GetPartyLeaderIndex = true -GetPartyMember = true -InviteUnit = true -IsPartyLeader = true -LeaveParty = true -PromoteToLeader = true -SetLootMethod = true -SetLootThreshold = true -UninviteUnit = true -UnitInParty = true -UnitIsPartyLeader = true -AcceptGuild = true -BuyGuildCharter = true -CanEditGuildEvent = true -CanEditGuildInfo = true -CanEditMOTD = true -CanEditOfficerNote = true -CanEditPublicNote = true -CanGuildDemote = true -CanGuildInvite = true -CanGuildPromote = true -CanGuildRemove = true -CanViewOfficerNote = true -CloseGuildRegistrar = true -CloseGuildRoster = true -CloseTabardCreation = true -DeclineGuild = true -GetGuildCharterCost = true -GetGuildEventInfo = true -GetGuildInfo = true -GetGuildInfoText = true -GetGuildRosterInfo = true -GetGuildRosterLastOnline = true -GetGuildRosterMOTD = true -GetGuildRosterSelection = true -GetGuildRosterShowOffline = true -GetNumGuildEvents = true -GetNumGuildMembers = true -GetTabardCreationCost = true -GetTabardInfo = true -GuildControlAddRank = true -GuildControlDelRank = true -GuildControlGetNumRanks = true -GuildControlGetRankFlags = true -GuildControlGetRankName = true -GuildControlSaveRank = true -GuildControlSetRank = true -GuildControlSetRankFlag = true -GuildDemote = true -GuildDisband = true -GuildInfo = true -GuildInvite = true -GuildLeave = true -GuildPromote = true -GuildRoster = true -GuildRosterSetOfficerNote = true -GuildRosterSetPublicNote = true -GuildSetMOTD = true -GuildSetLeader = true -GuildUninvite = true -IsGuildLeader = true -IsInGuild = true -QueryGuildEventLog = true -SetGuildInfoText = true -SetGuildRosterSelection = true -SetGuildRosterShowOffline = true -SortGuildRoster = true -UnitGetGuildXP = true -AutoStoreGuildBankItem = true -BuyGuildBankTab = true -CanGuildBankRepair = true -CanWithdrawGuildBankMoney = true -CloseGuildBankFrame = true -DepositGuildBankMoney = true -GetCurrentGuildBankTab = true -GetGuildBankItemInfo = true -GetGuildBankItemLink = true -GetGuildBankMoney = true -GetGuildBankMoneyTransaction = true -GetGuildBankTabCost = true -GetGuildBankTabInfo = true -GetGuildBankTabPermissions = true -GetGuildBankText = true -GetGuildBankTransaction = true -GetGuildTabardFileNames = true -GetNumGuildBankMoneyTransactions = true -GetNumGuildBankTabs = true -GetNumGuildBankTransactions = true -PickupGuildBankItem = true -PickupGuildBankMoney = true -QueryGuildBankLog = true -QueryGuildBankTab = true -SetCurrentGuildBankTab = true -SetGuildBankTabInfo = true -SetGuildBankTabPermissions = true -SplitGuildBankItem = true -WithdrawGuildBankMoney = true -GetHolidayBGHonorCurrencyBonuses = true -GetInspectHonorData = true -GetPVPLifetimeStats = true -GetPVPRankInfo = true -GetPVPRankProgress = true -GetPVPSessionStats = true -GetPVPYesterdayStats = true -GetRandomBGHonorCurrencyBonuses = true -HasInspectHonorData = true -RequestInspectHonorData = true -UnitPVPName = true -UnitPVPRank = true -AddIgnore = true -AddOrDelIgnore = true -DelIgnore = true -GetIgnoreName = true -GetNumIgnores = true -GetSelectedIgnore = true -SetSelectedIgnore = true -CanInspect = true -CheckInteractDistance = true -ClearInspectPlayer = true -GetInspectArenaTeamData = true -HasInspectHonorData = true -RequestInspectHonorData = true -GetInspectHonorData = true -NotifyInspect = true -InspectUnit = true -CanShowResetInstances = true -GetBattlefieldInstanceExpiration = true -GetBattlefieldInstanceInfo = true -GetBattlefieldInstanceRunTime = true -GetInstanceBootTimeRemaining = true -GetInstanceInfo = true -GetNumSavedInstances = true -GetSavedInstanceInfo = true -IsInInstance = true -ResetInstances = true -GetDungeonDifficulty = true -SetDungeonDifficulty = true -GetInstanceDifficulty = true -GetInstanceLockTimeRemaining = true -GetInstanceLockTimeRemainingEncounter = true -AutoEquipCursorItem = true -BankButtonIDToInvSlotID = true -CancelPendingEquip = true -ConfirmBindOnUse = true -ContainerIDToInventoryID = true -CursorCanGoInSlot = true -EquipCursorItem = true -EquipPendingItem = true -GetInventoryAlertStatus = true -GetInventoryItemBroken = true -GetInventoryItemCooldown = true -GetInventoryItemCount = true -GetInventoryItemDurability = true -GetInventoryItemGems = true -GetInventoryItemID = true -GetInventoryItemLink = true -GetInventoryItemQuality = true -GetInventoryItemTexture = true -GetInventorySlotInfo = true -GetWeaponEnchantInfo = true -HasWandEquipped = true -IsInventoryItemLocked = true -KeyRingButtonIDToInvSlotID = true -PickupBagFromSlot = true -PickupInventoryItem = true -UpdateInventoryAlertStatus = true -UseInventoryItem = true -EquipItemByName = true -GetAuctionItemLink = true -GetContainerItemLink = true -GetItemCooldown = true -GetItemCount = true -GetItemFamily = true -GetItemIcon = true -GetItemInfo = true -GetItemQualityColor = true -GetItemSpell = true -GetItemStats = true -GetMerchantItemLink = true -GetQuestItemLink = true -GetQuestLogItemLink = true -GetTradePlayerItemLink = true -GetTradeSkillItemLink = true -GetTradeSkillReagentItemLink = true -GetTradeTargetItemLink = true -IsUsableItem = true -IsConsumableItem = true -IsCurrentItem = true -IsEquippedItem = true -IsEquippableItem = true -IsEquippedItemType = true -IsItemInRange = true -ItemHasRange = true -OffhandHasWeapon = true -SplitContainerItem = true -SetItemRef = true -AcceptSockets = true -ClickSocketButton = true -CloseSocketInfo = true -GetSocketItemInfo = true -GetSocketItemRefundable = true -GetSocketItemBoundTradeable = true -GetNumSockets = true -GetSocketTypes = true -GetExistingSocketInfo = true -GetExistingSocketLink = true -GetNewSocketInfo = true -GetNewSocketLink = true -SocketInventoryItem = true -SocketContainerItem = true -CloseItemText = true -ItemTextGetCreator = true -ItemTextGetItem = true -ItemTextGetMaterial = true -ItemTextGetPage = true -ItemTextGetText = true -ItemTextHasNextPage = true -ItemTextNextPage = true -ItemTextPrevPage = true -GetMinimapZoneText = true -GetRealZoneText = true -GetSubZoneText = true -GetZonePVPInfo = true -GetZoneText = true -CompleteLFGRoleCheck = true -GetLFGDeserterExpiration = true -GetLFGRandomCooldownExpiration = true -GetLFGBootProposal = true -GetLFGMode = true -GetLFGQueueStats = true -GetLFGRoles = true -GetLFGRoleUpdate = true -GetLFGRoleUpdateSlot = true -SetLFGBootVote = true -SetLFGComment = true -SetLFGRoles = true -UninviteUnit = true -UnitGroupRolesAssigned = true -UnitHasLFGDeserter = true -UnitHasLFGRandomCooldown = true -CloseLoot = true -ConfirmBindOnUse = true -ConfirmLootRoll = true -ConfirmLootSlot = true -GetLootMethod = true -GetLootRollItemInfo = true -GetLootRollItemLink = true -GetLootRollTimeLeft = true -GetLootSlotInfo = true -GetLootSlotLink = true -GetLootThreshold = true -GetMasterLootCandidate = true -GetNumLootItems = true -GetOptOutOfLoot = true -GiveMasterLoot = true -IsFishingLoot = true -LootSlot = true -LootSlotIsCoin = true -LootSlotIsCurrency = true -LootSlotIsItem = true -RollOnLoot = true -SetLootMethod = true -SetLootPortrait = true -SetLootThreshold = true -SetOptOutOfLoot = true -CursorHasMacro = true -DeleteMacro = true -GetMacroBody = true -GetMacroIconInfo = true -GetMacroItemIconInfo = true -GetMacroIndexByName = true -GetMacroInfo = true -GetNumMacroIcons = true -GetNumMacroItemIcons = true -GetNumMacros = true -PickupMacro = true -RunMacro = true -RunMacroText = true -SecureCmdOptionParse = true -StopMacro = true -AutoLootMailItem = true -CheckInbox = true -ClearSendMail = true -ClickSendMailItemButton = true -CloseMail = true -DeleteInboxItem = true -GetCoinIcon = true -GetInboxHeaderInfo = true -GetInboxItem = true -GetInboxItemLink = true -GetInboxNumItems = true -GetInboxText = true -GetInboxInvoiceInfo = true -GetNumPackages = true -GetNumStationeries = true -GetPackageInfo = true -GetSelectedStationeryTexture = true -GetSendMailCOD = true -GetSendMailItem = true -GetSendMailItemLink = true -GetSendMailMoney = true -GetSendMailPrice = true -GetStationeryInfo = true -HasNewMail = true -InboxItemCanDelete = true -ReturnInboxItem = true -SelectPackage = true -SelectStationery = true -SendMail = true -SetSendMailCOD = true -SetSendMailMoney = true -TakeInboxItem = true -TakeInboxMoney = true -TakeInboxTextItem = true -ClickLandmark = true -GetCorpseMapPosition = true -GetCurrentMapContinent = true -GetCurrentMapDungeonLevel = true -GetNumDungeonMapLevels = true -GetCurrentMapAreaID = true -GetCurrentMapZone = true -GetMapContinents = true -GetMapDebugObjectInfo = true -GetMapInfo = true -GetMapLandmarkInfo = true -GetMapOverlayInfo = true -GetMapZones = true -GetNumMapDebugObjects = true -GetNumMapLandmarks = true -GetNumMapOverlays = true -GetPlayerMapPosition = true -ProcessMapClick = true -RequestBattlefieldPositions = true -SetDungeonMapLevel = true -SetMapByID = true -SetMapToCurrentZone = true -SetMapZoom = true -SetupFullscreenScale = true -UpdateMapHighlight = true -CreateWorldMapArrowFrame = true -UpdateWorldMapArrowFrames = true -ShowWorldMapArrowFrame = true -PositionWorldMapArrowFrame = true -ZoomOut = true -BuyMerchantItem = true -BuybackItem = true -CanMerchantRepair = true -CloseMerchant = true -GetBuybackItemInfo = true -GetBuybackItemLink = true -GetMerchantItemCostInfo = true -GetMerchantItemCostItem = true -GetMerchantItemInfo = true -GetMerchantItemLink = true -GetMerchantItemMaxStack = true -GetMerchantNumItems = true -GetRepairAllCost = true -HideRepairCursor = true -InRepairMode = true -PickupMerchantItem = true -RepairAllItems = true -ShowMerchantSellCursor = true -ShowRepairCursor = true -GetNumBuybackItems = true -CastPetAction = true -ClosePetStables = true -DropItemOnUnit = true -GetPetActionCooldown = true -GetPetActionInfo = true -GetPetActionSlotUsable = true -GetPetActionsUsable = true -GetPetExperience = true -GetPetFoodTypes = true -GetPetHappiness = true -GetPetIcon = true -GetPetTimeRemaining = true -GetStablePetFoodTypes = true -GetStablePetInfo = true -HasPetSpells = true -HasPetUI = true -PetAbandon = true -PetAggressiveMode = true -PetAttack = true -IsPetAttackActive = true -PetStopAttack = true -PetCanBeAbandoned = true -PetCanBeDismissed = true -PetCanBeRenamed = true -PetDefensiveMode = true -PetDismiss = true -PetFollow = true -PetHasActionBar = true -PetPassiveMode = true -PetRename = true -PetWait = true -PickupPetAction = true -PickupStablePet = true -SetPetStablePaperdoll = true -TogglePetAutocast = true -ToggleSpellAutocast = true -GetSpellAutocast = true -AddQuestWatch = true -GetActiveLevel = true -GetActiveTitle = true -GetAvailableLevel = true -GetAvailableTitle = true -GetAvailableQuestInfo = true -GetGreetingText = true -GetNumQuestLeaderBoards = true -GetNumQuestWatches = true -GetObjectiveText = true -GetProgressText = true -GetQuestGreenRange = true -GetQuestIndexForWatch = true -GetQuestLink = true -GetQuestLogGroupNum = true -GetQuestLogLeaderBoard = true -GetQuestLogTitle = true -GetQuestReward = true -GetRewardArenaPoints = true -GetRewardHonor = true -GetRewardMoney = true -GetRewardSpell = true -GetRewardTalents = true -GetRewardText = true -GetRewardTitle = true -GetRewardXP = true -IsQuestWatched = true -IsUnitOnQuest = true -QuestFlagsPVP = true -QuestGetAutoAccept = true -RemoveQuestWatch = true -ShiftQuestWatches = true -SortQuestWatches = true -QueryQuestsCompleted = true -GetQuestsCompleted = true -QuestIsDaily = true -QuestIsWeekly = true -ClearRaidMarker = true -ConvertToRaid = true -ConvertToParty = true -DemoteAssistant = true -GetAllowLowLevelRaid = true -GetNumRaidMembers = true -GetRealNumRaidMembers = true -GetPartyAssignment = true -GetPartyAssignment = true -GetRaidRosterInfo = true -GetRaidTargetIndex = true -GetReadyCheckStatus = true -InitiateRolePoll = true -IsRaidLeader = true -IsRaidOfficer = true -PlaceRaidMarker = true -PromoteToAssistant = true -RequestRaidInfo = true -SetPartyAssignment = true -SetAllowLowLevelRaid = true -SetRaidRosterSelection = true -SetRaidSubgroup = true -SwapRaidSubgroup = true -SetRaidTarget = true -UnitInRaid = true -LFGGetDungeonInfoByID = true -GetInstanceLockTimeRemainingEncounter = true -RefreshLFGList = true -SearchLFGGetEncounterResults = true -SearchLFGGetJoinedID = true -SearchLFGGetNumResults = true -SearchLFGGetPartyResults = true -SearchLFGGetResults = true -SearchLFGJoin = true -SearchLFGLeave = true -SearchLFGSort = true -SetLFGComment = true -ClearAllLFGDungeons = true -JoinLFG = true -LeaveLFG = true -RequestLFDPartyLockInfo = true -RequestLFDPlayerLockInfo = true -SetLFGDungeon = true -SetLFGDungeonEnabled = true -SetLFGHeaderCollapsed = true -GetAddOnCPUUsage = true -GetAddOnMemoryUsage = true -GetEventCPUUsage = true -GetFrameCPUUsage = true -GetFunctionCPUUsage = true -GetScriptCPUUsage = true -ResetCPUUsage = true -UpdateAddOnCPUUsage = true -UpdateAddOnMemoryUsage = true -issecure = true -forceinsecure = true -issecurevariable = true -securecall = true -hooksecurefunc = true -InCombatLockdown = true -CombatTextSetActiveUnit = true -DownloadSettings = true -GetCVar = true -GetCVarDefault = true -GetCVarBool = true -GetCVarInfo = true -GetCurrentMultisampleFormat = true -GetCurrentResolution = true -GetGamma = true -GetMultisampleFormats = true -GetRefreshRates = true -GetScreenResolutions = true -GetVideoCaps = true -IsThreatWarningEnabled = true -RegisterCVar = true -ResetPerformanceValues = true -ResetTutorials = true -SetCVar = true -SetEuropeanNumbers = true -SetGamma = true -SetLayoutMode = true -SetMultisampleFormat = true -SetScreenResolution = true -ShowCloak = true -ShowHelm = true -ShowNumericThreat = true -ShowingCloak = true -ShowingHelm = true -UploadSettings = true -AbandonSkill = true -CastShapeshiftForm = true -CastSpell = true -CastSpellByName = true -GetMultiCastTotemSpells = true -GetNumShapeshiftForms = true -GetNumSpellTabs = true -GetShapeshiftForm = true -GetShapeshiftFormCooldown = true -GetShapeshiftFormInfo = true -GetSpellAutocast = true -GetSpellBookItemInfo = true -GetSpellBookItemName = true -GetSpellCooldown = true -GetSpellDescription = true -GetSpellInfo = true -GetSpellLink = true -GetSpellTabInfo = true -GetSpellTexture = true -GetTotemInfo = true -IsAttackSpell = true -IsAutoRepeatSpell = true -IsPassiveSpell = true -IsSpellInRange = true -IsUsableSpell = true -PickupSpell = true -QueryCastSequence = true -SetMultiCastSpell = true -SpellCanTargetUnit = true -SpellHasRange = true -SpellIsTargeting = true -SpellStopCasting = true -SpellStopTargeting = true -SpellTargetUnit = true -ToggleSpellAutocast = true -UnitCastingInfo = true -UnitChannelInfo = true -ConsoleExec = true -DetectWowMouse = true -GetBuildInfo = true -geterrorhandler = true -GetCurrentKeyBoardFocus = true -GetExistingLocales = true -GetFramerate = true -GetGameTime = true -GetLocale = true -GetCursorPosition = true -GetNetStats = true -GetRealmName = true -GetScreenHeight = true -GetScreenWidth = true -GetText = true -GetTime = true -IsAltKeyDown = true -InCinematic = true -IsControlKeyDown = true -IsDebugBuild = true -IsDesaturateSupported = true -IsLeftAltKeyDown = true -IsLeftControlKeyDown = true -IsLeftShiftKeyDown = true -IsLinuxClient = true -IsLoggedIn = true -IsMacClient = true -IsRightAltKeyDown = true -IsRightControlKeyDown = true -IsRightShiftKeyDown = true -IsShiftKeyDown = true -IsStereoVideoAvailable = true -IsWindowsClient = true -OpeningCinematic = true -PlayMusic = true -PlaySound = true -PlaySoundFile = true -ReloadUI = true -RepopMe = true -RequestTimePlayed = true -RestartGx = true -RunScript = true -Screenshot = true -SetAutoDeclineGuildInvites = true -seterrorhandler = true -StopCinematic = true -StopMusic = true -UIParentLoadAddOn = true -TakeScreenshot = true -BuyTrainerService = true -CheckTalentMasterDist = true -ConfirmTalentWipe = true -GetActiveTalentGroup = true -GetNumTalentTabs = true -GetNumTalents = true -GetTalentInfo = true -GetTalentLink = true -GetTalentPrereqs = true -GetTalentTabInfo = true -LearnTalent = true -SetActiveTalentGroup = true -GetNumTalentGroups = true -GetActiveTalentGroup = true -AddPreviewTalentPoints = true -GetGroupPreviewTalentPointsSpent = true -GetPreviewTalentPointsSpent = true -GetUnspentTalentPoints = true -LearnPreviewTalents = true -ResetGroupPreviewTalentPoints = true -ResetPreviewTalentPoints = true -AssistUnit = true -AttackTarget = true -ClearTarget = true -ClickTargetTradeButton = true -TargetLastEnemy = true -TargetLastTarget = true -TargetNearestEnemy = true -TargetNearestEnemyPlayer = true -TargetNearestFriend = true -TargetNearestFriendPlayer = true -TargetNearestPartyMember = true -TargetNearestRaidMember = true -TargetUnit = true -ToggleBackpack = true -ToggleBag = true -ToggleCharacter = true -ToggleFriendsFrame = true -ToggleSpellBook = true -TradeSkill = true -CloseTradeSkill = true -CollapseTradeSkillSubClass = true -PickupPlayerMoney = true -PickupTradeMoney = true -SetTradeMoney = true -ReplaceTradeEnchant = true -AssistUnit = true -CheckInteractDistance = true -DropItemOnUnit = true -FollowUnit = true -FocusUnit = true -ClearFocus = true -GetUnitName = true -GetUnitPitch = true -GetUnitSpeed = true -InviteUnit = true -IsUnitOnQuest = true -SpellCanTargetUnit = true -SpellTargetUnit = true -TargetUnit = true -UnitAffectingCombat = true -UnitArmor = true -UnitAttackBothHands = true -UnitAttackPower = true -UnitAttackSpeed = true -UnitAura = true -UnitBuff = true -UnitCanAssist = true -UnitCanAttack = true -UnitCanCooperate = true -UnitClass = true -UnitClassification = true -UnitCreatureFamily = true -UnitCreatureType = true -UnitDamage = true -UnitDebuff = true -UnitDefense = true -UnitDetailedThreatSituation = true -UnitExists = true -UnitFactionGroup = true -UnitGroupRolesAssigned = true -UnitGUID = true -GetPlayerInfoByGUID = true -UnitHasLFGDeserter = true -UnitHasLFGRandomCooldown = true -UnitHasRelicSlot = true -UnitHealth = true -UnitHealthMax = true -UnitInParty = true -UnitInRaid = true -UnitInBattleground = true -UnitIsInMyGuild = true -UnitInRange = true -UnitIsAFK = true -UnitIsCharmed = true -UnitIsConnected = true -UnitIsCorpse = true -UnitIsDead = true -UnitIsDeadOrGhost = true -UnitIsDND = true -UnitIsEnemy = true -UnitIsFeignDeath = true -UnitIsFriend = true -UnitIsGhost = true -UnitIsPVP = true -UnitIsPVPFreeForAll = true -UnitIsPVPSanctuary = true -UnitIsPartyLeader = true -UnitIsPlayer = true -UnitIsPossessed = true -UnitIsRaidOfficer = true -UnitIsSameServer = true -UnitIsTapped = true -UnitIsTappedByPlayer = true -UnitIsTappedByAllThreatList = true -UnitIsTrivial = true -UnitIsUnit = true -UnitIsVisible = true -UnitLevel = true -UnitMana = true -UnitManaMax = true -UnitName = true -UnitOnTaxi = true -UnitPlayerControlled = true -UnitPlayerOrPetInParty = true -UnitPlayerOrPetInRaid = true -UnitPVPName = true -UnitPVPRank = true -UnitPower = true -UnitPowerMax = true -UnitPowerType = true -UnitRace = true -UnitRangedAttack = true -UnitRangedAttackPower = true -UnitRangedDamage = true -UnitReaction = true -UnitResistance = true -UnitSelectionColor = true -UnitSex = true -UnitStat = true -UnitThreatSituation = true -UnitUsingVehicle = true -GetThreatStatusColor = true -UnitXP = true -UnitXPMax = true -SetPortraitTexture = true -SetPortraitToTexture = true -tinsert = true \ No newline at end of file + + +---linearly interpolates between two values. Example: Lerp(1, 2, 0.5) return 1.5 +---@param startValue number The starting value. +---@param endValue number The ending value. +---@param amount number The interpolation amount (between 0 and 1). +---@return number amount The interpolated value. +function Lerp(startValue, endValue, amount) return 0 end + +---clamps a value between a minimum and maximum range. Example: Clamp(17, 13, 15) return 15 +---@param value number The value to clamp. +---@param min number The minimum value of the range. +---@param max number The maximum value of the range. +---@return number value The clamped value. +function Clamp(value, min, max) return 0 end + +--lock a value to be between 0 and 1. Example: Saturate(1.324) return 1, Saturate(-0.324) return 0 +---@param value number The value to saturate. +---@return number value The saturated value. +function Saturate(value) return 0 end + +---wraps a value within a specified range. Example: Wrap(17, 13) return 4 +---@param value number The value to wrap. +---@param max number The maximum value of the range. +---@return number value The wrapped value. +function Wrap(value, max) return 0 end + +---wraps a value within a specified range using modular arithmetic. Example: ClampMod(11, 3) return 2 (11 % 3 = 2) +---@param value number The value to be wrapped. +---@param mod number The modulus defining the range. The value will be wrapped within the range from 0 to mod - 1. +---@return number value The wrapped value within the specified range. +function ClampMod(value, mod) return 0 end + +---clamps an angle value within the range of 0 to 359 degrees. +---@param value number The angle value to be clamped. +---@return number value The clamped angle value within the range of 0 to 359 degrees. +function ClampDegrees(value) return 0 end + +---negates a value if a condition is true, otherwise returns the original value. +---@param value number The value to be negated or returned. +---@param condition boolean The condition determining whether to negate the value. +---@return number value The negated value if the condition is true, otherwise the original value. +function NegateIf(value, condition) 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 +---@return string +---@nodiscard +function format(s, ...) return "" end + +table.wipe = true +wipe = true + +---returns the maximum value among the given numbers. +---@param ... number The numbers to compare. +---@return number The maximum value. +max = function(...) return 0 end + +---returns the minimum value among the given numbers. +---@param ... number The numbers to compare. +---@return number The minimum value. +min = function(...) return 0 end + +C_ChallengeMode = {} +---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 + +PixelUtil = {} + +---@param object statusbar +---@param value number +PixelUtil.SetStatusBarValue = function(object, value) end + +---@param object uiobject +---@param width number +PixelUtil.SetWidth = function(object, width) end + +---@param object uiobject +---@param height number +PixelUtil.SetHeight = function(object, height) end + +---@param object uiobject +---@param width number +---@param height number +PixelUtil.SetSize = function(object, width, height) end + +---@param object uiobject +---@param point string +---@param relativeTo uiobject +---@param relativePoint string +---@param offsetX number +---@param offsetY number +PixelUtil.SetPoint = function(object, point, relativeTo, relativePoint, offsetX, offsetY) end + +---@param desiredPixels number +---@param layoutScale number +---@return number +PixelUtil.ConvertPixelsToUI = function(desiredPixels, layoutScale) return 0 end + +---@param uiUnitSize number +---@param layoutScale number +---@param minPixels number +---@return number +PixelUtil.GetNearestPixelSize = function(uiUnitSize, layoutScale, minPixels) return 0 end + +---@return number +PixelUtil.GetPixelToUIUnitFactor = function() return 0 end + +---@param desiredPixels number +---@param region region +---@return number +PixelUtil.ConvertPixelsToUIForRegion = function(desiredPixels, region) return 0 end + +---@class aurautil +AuraUtil = {} + +---a table containing filter flags for aura filtering. +AuraUtil.AuraFilters = { + Cancelable = "CANCELABLE", -- Filter for cancelable auras. + IncludeNameplateOnly = "INCLUDE_NAME_PLATE_ONLY", -- Filter for including nameplate-only auras. + Harmful = "HARMFUL", -- Filter for harmful auras. + Raid = "RAID", -- Filter for raid auras. + NotCancelable = "NOT_CANCELABLE", -- Filter for non-cancelable auras. + Helpful = "HELPFUL", -- Filter for helpful auras. + Player = "PLAYER", -- Filter for player auras. + Maw = "MAW", -- Filter for Maw-related auras. +} + +---a function that determines if an aura is a priority debuff. +---@param spellId string The name of the aura to check. +---@return boolean bIsPriorityDebuff Whether the aura is a priority debuff. +AuraUtil.IsPriorityDebuff = function(spellId) return true end + +---a function that determines if a buff should be displayed. +---@param unit string The unit ID to check. +---@param spellId string The name of the aura to check. +---@return boolean bShouldDisplayBuff Whether the buff should be displayed. +AuraUtil.ShouldDisplayBuff = function(unit, spellId) return true end + +---a function that creates a filter string based on the provided filters. +---@param filters table A table containing aura filters. +---@return string filterString The generated filter string. +AuraUtil.CreateFilterString = function(filters) return "" end + +---a function that determines if a debuff should be displayed. +---@param unit string The unit ID to check. +---@param spellId string The name of the aura to check. +---@return boolean bShouldDisplayDebuff Whether the debuff should be displayed. +AuraUtil.ShouldDisplayDebuff = function(unit, spellId) return true end + +---a function that processes aura data. +---@param auraInfo aurainfo The aura data to process. +---@param displayOnlyDispellableDebuffs boolean Whether to display only dispellable debuffs. +---@param ignoreBuffs boolean Whether to ignore buffs. +---@param ignoreDebuffs boolean Whether to ignore debuffs. +---@param ignoreDispelDebuffs boolean Whether to ignore dispellable debuffs. +---@return number auraType The processed aura data. +AuraUtil.ProcessAura = function(auraInfo, displayOnlyDispellableDebuffs, ignoreBuffs, ignoreDebuffs, ignoreDispelDebuffs) return 0 end + +---a function that finds an aura with the specified criteria. +---@param predicate function The predicate function. +---@param unit string The unit ID to search. +---@param filter string|nil Optional filter for the type of aura to find. +---@param predicateArg1 any Optional first argument to pass to the predicate function. +---@param predicateArg2 any Optional second argument to pass to the predicate function. +---@param predicateArg3 any Optional third argument to pass to the predicate function. +AuraUtil.FindAura = function(predicate, unit, filter, predicateArg1, predicateArg2, predicateArg3) end + +---a function that finds an aura by its name. +---@param unit string The unit ID to search. +---@param auraName string The name of the aura to find. +---@param filter string|nil Optional filter for the type of aura to find. +---@return table auraData The found aura data. +AuraUtil.FindAuraByName = function(unit, auraName, filter) return table end + +---a function that provides a default comparison function for auras. +---@param auraA table The first aura to compare. +---@param auraB table The second aura to compare. +---@return boolean isEqual Whether the two auras are equal. +AuraUtil.DefaultAuraCompare = function(auraA, auraB) return true end + +---a table that updates the changed type of an aura. +AuraUtil.AuraUpdateChangedType = { + Dispel = 4, -- Updated type for dispel auras. + Debuff = 2, -- Updated type for debuff auras. + Buff = 3, -- Updated type for buff auras. + None = 1, -- Updated type for no change. +} + +---a table containing types for unit frame debuffs. +AuraUtil.UnitFrameDebuffType = { + NonBossDebuff = 5, -- Type for non-boss debuffs. + NonBossRaidDebuff = 4, -- Type for non-boss raid debuffs. + BossBuff = 2, -- Type for boss buffs. + PriorityDebuff = 3, -- Type for priority debuffs. + BossDebuff = 1, -- Type for boss debuffs. +} + +---a function that compares unit frame debuffs. +---@param auraInfo1 aurainfo +---@param auraInfo2 aurainfo +---@return table +AuraUtil.UnitFrameDebuffComparator = function(auraInfo1, auraInfo2) return table end + +---a function that unpacks aura data. +---@param auraInfo aurainfo +---@return ... Unpacked aura data. +AuraUtil.UnpackAuraData = function(auraInfo) end + +---a table containing types of dispellable debuffs. +AuraUtil.DispellableDebuffTypes = { + Poison = true, -- Type for poison debuffs. + Curse = true, -- Type for curse debuffs. + Magic = true, -- Type for magic debuffs. + Disease = true, -- Type for disease debuffs. +} + +---a function that iterates over each aura. +---@param unit string The unit ID to iterate over. +---@param filter string|nil Optional filter for the type of aura to iterate over. +---@param maxCount number|nil Optional maximum number of auras to iterate over. +---@param func function The function to call for each aura. +---@param usePackedAura boolean Whether to use packed aura data. +---@return any +AuraUtil.ForEachAura = function(unit, filter, maxCount, func, usePackedAura) end + + +C_Timer = {} +---@param delay number +---@param callback function +---@return table timerHandle +function C_Timer.NewTimer(delay, callback) return {} end + +---@param delay number +---@param callback function +function C_Timer.After(delay, callback) end + +---@param timerHandle table +function C_Timer.CancelTimer(timerHandle) end + +---@param delay number +---@param callback function +---@param repetitions number? +---@return table timerHandle +function C_Timer.NewTicker(delay, callback, repetitions) return {} end + +---@param list table +---@param i number? +---@param j number? +---@return ... +function unpack(list, i, j) end + +---@param x number +---@return number +function abs(x) return 0 end + +---@param unit string +---@return boolean +function IsInGroup(unit) return true end + +---@param name string +---@param server string|nil +---@return string +function Ambiguate(name, server) return "" end + +---@return boolean +function IsInRaid() return true end + +---@param x number +---@return number +function ceil(x) return 0 end + +---@param str string +---@param separator string +---@param limit number|nil +---@return ... +function strsplit(str, separator, limit) return "" end + +---@param x number +---@return number +function floor(x) return 0 end + +---@param table table +---@param index number +---@return any +function tremove(table, index) return nil end + +--loads a string and output a function in lua. +---@param code string The Lua code string to be executed. +---@return function func A function to be executed. +function loadstring(code) return function()end end + +---returns the number of members in the current group. +---@return number +GetNumGroupMembers = function() return 0 end + +---@param spellId number +---@return number, number, number +GetSpellCharges = function(spellId) return 0, 0, 0 end + +---@param achievementId number +AddTrackedAchievement = function(achievementId) end + +---@return boolean +CanShowAchievementUI = function() return true end +ClearAchievementComparisonUnit = function() end + +---@param achievementID number +---@return number +GetAchievementCategory = function(achievementID) return 0 end + +---@param achievementID number +---@return string, number, number, number, number, number, number, string, string, string, boolean, boolean, boolean, boolean, number +GetAchievementComparisonInfo = function(achievementID) return "", 0, 0, 0, 0, 0, 0, "", "", "", true, true, true, true, 0 end + +---@param achievementID number +---@param criteriaIndex number +---@return string, number, boolean, boolean, number, number, string, number, number, string +GetAchievementCriteriaInfo = function(achievementID, criteriaIndex) return "", 0, true, true, 0, 0, "", 0, 0, "" end + +---@param achievementID number +---@return string, number, number, number, number, number, number, string, string, string, boolean, boolean, boolean, boolean, number +GetAchievementInfo = function(achievementID) return "", 0, 0, 0, 0, 0, 0, "", "", "", true, true, true, true, 0 end + +---@param criteriaID number +---@return number +GetAchievementInfoFromCriteria = function(criteriaID) return 0 end + +---@param achievementID number +---@return string +GetAchievementLink = function(achievementID) return "" end + +---@param achievementID number +---@return number +GetAchievementNumCriteria = function(achievementID) return 0 end + +---@param specIndex number +---@param isInspect boolean +---@param isPet boolean +---@param sex number +---@param level number +---@return number, string, string, string, number, string +GetSpecializationInfo = function(specIndex, isInspect, isPet, sex, level) return 0, "", "", "", 0, "" end + +---@param achievementID number +---@return number +GetAchievementNumRewards = function(achievementID) return 0 end + +---@param categoryID number +---@return string, string, number +GetCategoryInfo = function(categoryID) return "", "", 0 end + +---@return table +GetCategoryList = function() return {} end + +---@param isInspect boolean +---@param isPet boolean +---@return number +GetSpecialization = function(isInspect, isPet) return 0 end + +---@param categoryID number +---@return number +GetCategoryNumAchievements = function(categoryID) return 0 end + +---@return number +GetComparisonAchievementPoints = function() return 0 end + +---@param categoryID number +---@return number +GetComparisonCategoryNumAchievements = function(categoryID) return 0 end + +---@param statisticID number +---@return string +GetComparisonStatistic = function(statisticID) return "" end + +---@return table +GetLatestCompletedAchievements = function() return {} end + +---@return table +GetLatestCompletedComparisonAchievements = function() return {} end + +---@return table +GetLatestUpdatedComparisonStatsGetLatestUpdatedStats = function() return {} end +---@return number +GetNextAchievement = function() return 0 end + +---@return number +GetNumComparisonCompletedAchievements = function() return 0 end + +---@return number +GetNumCompletedAchievements = function() return 0 end + +---@return number +GetPreviousAchievement = function() return 0 end + +---@param categoryID number +---@return string +GetStatistic = function(categoryID) return "" end + +---@return table +GetStatisticsCategoryList = function() return {} end + +---@return number +GetTotalAchievementPoints = function() return 0 end + +---@return table +GetTrackedAchievements = function() return {} end + +---@return number +GetNumTrackedAchievements = function() return 0 end + +---@param achievementID number +RemoveTrackedAchievement = function(achievementID) end + +---@param unit string +SetAchievementComparisonUnit = function(unit) end + +---@param slot number +ActionButtonDown = function(slot) end + +---@param slot number +ActionButtonUp = function(slot) end + +---@param slot number +---@return boolean +ActionHasRange = function(slot) return true end + +CameraOrSelectOrMoveStart = function() end + +CameraOrSelectOrMoveStop = function() end + +---@param page number +ChangeActionBarPage = function(page) end + +---@return number +GetActionBarPage = function() return 0 end + +---@return boolean, boolean, boolean +GetActionBarToggles = function() return true, true, true end + +---@param slot number +---@return number, number +GetActionCooldown = function(slot) return 0, 0 end + +---@param slot number +---@return number +GetActionCount = function(slot) return 0 end + +---@param slot number +---@return string, string, string, boolean, boolean, boolean, boolean +GetActionInfo = function(slot) return "", "", "", true, true, true, true end + +---@param slot number +---@return string +GetActionText = function(slot) return "" end + +---@param slot number +---@return string +GetActionTexture = function(slot) return "" end + +---@return number +GetBonusBarOffset = function() return 0 end + +---@return string +GetMouseButtonClicked = function() return "" end + +---@return number +GetMultiCastBarOffset = function() return 0 end + +---@param slot number +---@return boolean, string +GetPossessInfo = function(slot) return true, "" end + +---@param slot number +---@return boolean +HasAction = function(slot) return true end + +---@param slot number +---@return number +IsActionInRange = function(slot) return 0 end + +---@param slot number +---@return boolean +IsAttackAction = function(slot) return true end + +---@param slot number +---@return boolean +IsAutoRepeatAction = function(slot) return true end + +---@param slot number +---@return boolean +IsCurrentAction = function(slot) return true end + +---@param slot number +---@return boolean +IsConsumableAction = function(slot) return true end + +---@param slot number +---@return boolean +IsEquippedAction = function(slot) return true end + +---@param slot number +---@return boolean, boolean +IsUsableAction = function(slot) return true, true end + +---@return boolean +PetHasActionBar = function() return true end + +---@param slot number +PickupAction = function(slot) end + +---@param slot number +PickupPetAction = function(slot) end + +---@param slot number +PlaceAction = function(slot) end + +---@param bottomLeftState number +---@param bottomRightState number +---@param sideRightState number +---@param sideRight2State number +---@param alwaysShow number +SetActionBarToggles = function(bottomLeftState, bottomRightState, sideRightState, sideRight2State, alwaysShow) end + +StopAttack = function() end + +TurnOrActionStart = function() end + +TurnOrActionStop = function() end + +---@param slot number +---@param checkCursor boolean +UseAction = function(slot, checkCursor) end + +AcceptDuel = function() end + +AttackTarget = function() end + +CancelDuel = function() end + +CancelLogout = function() end + +ClearTutorials = function() end + +CancelSummon = function() end + +ConfirmSummon = function() end + +DescendStop = function() end + +Dismount = function() end + +---@param tutorial number +FlagTutorial = function(tutorial) end + +ForceQuit = function() end + +---@return number +GetPVPTimer = function() return 0 end + +---@return string +GetSummonConfirmAreaName = function() return "" end + +---@return string +GetSummonConfirmSummoner = function() return "" end + +---@return number +GetSummonConfirmTimeLeft = function() return 0 end +---@param min number +---@param max number +RandomRoll = function(min, max) end + +---@param enable boolean +SetPVP = function(enable) end + +---@param unit string +StartDuel = function(unit) end + +TogglePVP = function() end + +ToggleSheath = function() end + +---@param type string +UseSoulstone = function(type) end + +---@return boolean +CanSolveArtifact = function() return true end + +UIParent = {} + +---@param raceIndex number +---@return number, string, string, number, number, number, number, number +GetArtifactInfoByRace = function(raceIndex) return 0, "", "", 0, 0, 0, 0, 0 end + +---@return number, number +GetArtifactProgress = function() return 0, 0 end + +---@param raceIndex number +---@return number +GetNumArtifactsByRace = function(raceIndex) return 0 end + +---@return number, string, string, number, number, number, number, number +GetSelectedArtifactInfo = function() return 0, "", "", 0, 0, 0, 0, 0 end + +---@return boolean +IsArtifactCompletionHistoryAvailable = function() return true end + +---@param itemID number +---@return boolean +ItemAddedToArtifact = function(itemID) return true end + +---@param itemID number +RemoveItemFromArtifact = function(itemID) end + +RequestArtifactCompletionHistory = function() end + +---@param itemID number +SocketItemToArtifact = function(itemID) end + +---@param teamIndex number +AcceptArenaTeam = function(teamIndex) end + +---@param playerName string +ArenaTeamInviteByName = function(playerName) end + +---@param playerName string +ArenaTeamSetLeaderByName = function(playerName) end + +---@param teamIndex number +ArenaTeamLeave = function(teamIndex) end + +ArenaTeamRoster = function() end + +---@param playerName string +ArenaTeamUninviteByName = function(playerName) end + +ArenaTeamDisband = function() end + +DeclineArenaTeam = function() end + +---@param index number +---@return string, string, number, number, number, number, number, number, number +GetArenaTeam = function(index) return "", "", 0, 0, 0, 0, 0, 0, 0 end + +GetArenaTeamGdfInf = function() end + +---@param index number +---@param member number +---@return string, string, number, number, number, number, number, number, number +GetArenaTeamRosterInfo = function(index, member) return "", "", 0, 0, 0, 0, 0, 0, 0 end + +---@param index number +---@return number, number, number, number, number, number, number, number +GetBattlefieldTeamInfo = function(index) return 0, 0, 0, 0, 0, 0, 0, 0 end + +GetCurrentArenaSeason = function() end + +---@param unit string +---@return string, string, number, number, number, number, number, number, number +GetInspectArenaTeamData = function(unit) return "", "", 0, 0, 0, 0, 0, 0, 0 end + +---@param index number +---@return number +GetNumArenaTeamMembers = function(index) return 0 end + +GetPreviousArenaSeason = function() end + +IsActiveBattlefieldArena = function() end + +IsArenaTeamCaptain = function() end + +IsInArenaTeam = function() end + +---@param duration number +---@param itemCount number +---@param stackSize number +---@return number +CalculateAuctionDeposit = function(duration, itemCount, stackSize) return 0 end + +CanCancelAuction = function() end + +CancelSell = function() end + +CanSendAuctionQuery = function() end + +---@param index number +CancelAuction = function(index) end + +ClickAuctionSellItemButton = function() end + +CloseAuctionHouse = function() end + +---@return number +GetAuctionHouseDepositRate = function() return 0 end + +GetAuctionInvTypes = function() end + +GetAuctionItemClasses = function() end + +---@param list number +---@param index number +---@return string, string, number, number, number, number, number, number, number, number, number +GetAuctionItemInfo = function(list, index) return "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@param list number +---@param index number +---@return string +GetAuctionItemLink = function(list, index) return "" end + +GetAuctionItemSubClasses = function() end + +---@param list number +---@param index number +---@return number +GetAuctionItemTimeLeft = function(list, index) return 0 end + +---@return string, string, number, number, number, number, number, number, number, number, number +GetAuctionSellItemInfo = function() return "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@param index number +---@return string, string, number, number, number, number, number, number, number, number, number +GetBidderAuctionItems = function(index) return "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@param list number +---@return number +GetNumAuctionItems = function(list) return 0 end + +---@param index number +---@return string, string, number, number, number, number, number, number, number, number, number +GetOwnerAuctionItems = function(index) return "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@param list number +---@return number +GetSelectedAuctionItem = function(list) return 0 end + +---@return boolean +IsAuctionSortReversed = function() return true end + +---@param list number +---@param index number +---@param bid number +PlaceAuctionBid = function(list, index, bid) end + +---@param name string +---@param minLevel number +---@param maxLevel number +---@param page number +---@param isUsable boolean +---@param qualityIndex number +---@param getAll boolean +---@param exactMatch boolean +QueryAuctionItems = function(name, minLevel, maxLevel, page, isUsable, qualityIndex, getAll, exactMatch) end + +---@param show boolean +SetAuctionsTabShowing = function(show) end +---@param list number +---@param index number +SetSelectedAuctionItem = function(list, index) end + +---@param list string +---@param sort string +SortAuctionItems = function(list, sort) end + +---@param minBid number +---@param buyoutPrice number +---@param runTime number +StartAuction = function(minBid, buyoutPrice, runTime) end + +---@param buttonID number +---@return number +BankButtonIDToInvSlotID = function(buttonID) return 0 end + +CloseBankFrame = function() end + +---@return number +GetBankSlotCost = function() return 0 end + +---@return number +GetNumBankSlots = function() return 0 end + +---@param numSlots number +PurchaseSlot = function(numSlots) end + +AcceptAreaSpiritHeal = function() end + +---@param accept boolean +AcceptBattlefieldPort = function(accept) end + +CancelAreaSpiritHeal = function() end + +---@return boolean +CanJoinBattlefieldAsGroup = function() return true end + +---@return boolean +CheckSpiritHealerDist = function() return true end + +---@return number +GetAreaSpiritHealerTime = function() return 0 end + +---@return number +GetBattlefieldEstimatedWaitTime = function() return 0 end + +---@return number, number +GetBattlefieldFlagPosition = function() return 0, 0 end + +---@return number +GetBattlefieldInstanceExpiration = function() return 0 end + +---@return number +GetBattlefieldInstanceRunTime = function() return 0 end + +---@return number +GetBattlefieldMapIconScale = function() return 0 end + +---@return number +GetBattlefieldPortExpiration = function() return 0 end + +---@return number, number +GetBattlefieldPosition = function() return 0, 0 end + +---@return number, number, number, number, number, number, number, number, number, number, number +GetBattlefieldScore = function() return 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@return number, number, number +GetBattlefieldStatData = function() return 0, 0, 0 end + +---@return string, string +GetBattlefieldStatInfo = function() return "", "" end + +---@return number, string, number, number, number, number, number, number, number, number, number +GetBattlefieldStatus = function() return 0, "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@return number +GetBattlefieldTimeWaited = function() return 0 end + +---@return number +GetBattlefieldWinner = function() return 0 end + +---@return string, string, number, number, number, number, number, number, number, number, number +GetBattlegroundInfo = function() return "", "", 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@return number +GetNumBattlefieldFlagPositions = function() return 0 end + +---@return number +GetNumBattlefieldPositions = function() return 0 end + +---@return number +GetNumBattlefieldScores = function() return 0 end + +GetNumBattlefieldStats = function() end + +GetNumWorldStateUI = function() end + +GetWintergraspWaitTime = function() end + +---@param index number +GetWorldStateUIInfo = function(index) end + +IsPVPTimerRunning = function() end + +---@param index number +---@param asGroup boolean +JoinBattlefield = function(index, asGroup) end + +LeaveBattlefield = function() end + +---@param player string +ReportPlayerIsPVPAFK = function(player) end + +RequestBattlefieldPositions = function() end + +RequestBattlefieldScoreData = function() end + +RequestBattlegroundInstanceInfo = function() end + +---@param faction number +SetBattlefieldScoreFaction = function(faction) end + +---@param index number +---@return string, string, string +GetBinding = function(index) return "", "", "" end + +---@param action string +---@return string +GetBindingAction = function(action) return "" end + +---@param binding string +---@return string +GetBindingKey = function(binding) return "" end + +---@param binding string +---@return string +GetBindingText = function(binding) return "" end + +---@return number, number +GetCurrentBindingSet = function() return 0, 0 end + +GetNumBindings = function() return 0 end + +---@param which number +LoadBindings = function(which) end + +---@param binding string +RunBinding = function(binding) end + +---@param which number +SaveBindings = function(which) end + +---@param key string +---@param command string +SetBinding = function(key, command) end + +---@param key string +---@param spell string +SetBindingSpell = function(key, spell) end + +---@param key string +---@param button string +SetBindingClick = function(key, button) end + +---@param key string +---@param item string +SetBindingItem = function(key, item) end + +---@param key string +---@param macro string +SetBindingMacro = function(key, macro) end + +---@param key string +SetConsoleKey = function(key) end + +---@param key string +---@param command string +SetOverrideBinding = function(key, command) end + +---@param key string +---@param spell string +SetOverrideBindingSpell = function(key, spell) end + +---@param key string +---@param button string +SetOverrideBindingClick = function(key, button) end + +---@param key string +---@param item string +SetOverrideBindingItem = function(key, item) end + +---@param key string +---@param macro string +SetOverrideBindingMacro = function(key, macro) end + +ClearOverrideBindings = function() end + +---@param key string +SetMouselookOverrideBinding = function(key) end + +---@return boolean +IsModifierKeyDown = function() return true end +---@param action string +---@return boolean +IsModifiedClick = function(action) return true end + +---@param button string +---@return boolean +IsMouseButtonDown = function(button) return true end + +---@param unit string +---@param index number +CancelUnitBuff = function(unit, index) end + +CancelShapeshiftForm = function() end + +---@param slot number +CancelItemTempEnchantment = function(slot) end + +---@return boolean, number, number, number, number +GetWeaponEnchantInfo = function() return true, 0, 0, 0, 0 end + +---@param unit string +---@param index number +---@return string, string, string, number, number, number, string, number, string +UnitAura = function(unit, index) return "", "", "", 0, 0, 0, "", 0, "" end + +---@param unit string +---@param index number +---@return string, string, string, number, number, number, string, number, string +UnitBuff = function(unit, index) return "", "", "", 0, 0, 0, "", 0, "" end + +---@param unit string +---@param index number +---@return string, string, string, number, number, number, string, number, string +UnitDebuff = function(unit, index) return "", "", "", 0, 0, 0, "", 0, "" end + +---@param index number +---@param name string +AddChatWindowChannel = function(index, name) end +---@param channel string +---@param player string +ChannelBan = function(channel, player) end + +---@param channel string +---@param player string +ChannelInvite = function(channel, player) end + +---@param channel string +---@param player string +ChannelKick = function(channel, player) end + +---@param channel string +---@param player string +ChannelModerator = function(channel, player) end + +---@param channel string +---@param player string +ChannelMute = function(channel, player) end + +---@param channel string +ChannelToggleAnnouncements = function(channel) end + +---@param channel string +---@param player string +ChannelUnban = function(channel, player) end + +---@param channel string +---@param player string +ChannelUnmoderator = function(channel, player) end + +---@param channel string +---@param player string +ChannelUnmute = function(channel, player) end + +---@param channel string +DisplayChannelOwner = function(channel) end + +DeclineInvite = function() end + +---@return table +EnumerateServerChannels = function() return {} end + +---@return table +GetChannelList = function() return {} end + +---@param channel string +---@return string +GetChannelName = function(channel) return "" end + +---@return table +GetChatWindowChannels = function() return {} end + +---@param channel string +JoinChannelByName = function(channel) end + +---@param channel string +LeaveChannelByName = function(channel) end + +---@param channel string +---@return table +ListChannelByName = function(channel) return {} end + +---@return table +ListChannels = function() return {} end + +---@param index number +RemoveChatWindowChannel = function(index) end + +---@param msg string +---@param chatType string +---@param languageId number +---@param channel string +SendChatMessage = function(msg, chatType, languageId, channel) end + +---@param channel string +---@param newOwner string +SetChannelOwner = function(channel, newOwner) end + +---@param channel string +---@param password string +SetChannelPassword = function(channel, password) end + +AcceptResurrect = function() end + +AcceptXPLoss = function() end + +CheckBinderDist = function() end + +ConfirmBinder = function() end + +DeclineResurrect = function() end + +---@param totemType number +DestroyTotem = function(totemType) end + +---@return string +GetBindLocation = function() return "" end + +---@param unit string +---@return number +GetComboPoints = function(unit) return 0 end + +---@return number +GetCorpseRecoveryDelay = function() return 0 end + +---@return number +GetCurrentTitle = function() return 0 end + +---@param timerIndex number +---@return string, number, number, boolean +GetMirrorTimerInfo = function(timerIndex) return "", 0, 0, true end + +---@param timerIndex number +---@return number +GetMirrorTimerProgress = function(timerIndex) return 0 end + +---@return number +GetMoney = function() return 0 end + +---@return number +GetNumTitles = function() return 0 end + +---@return number +GetPlayerFacing = function() return 0 end + +---@return boolean +GetPVPDesired = function() return true end + +---@return number +GetReleaseTimeRemaining = function() return 0 end + +---@return number +GetResSicknessDuration = function() return 0 end + +---@return number, string, boolean +GetRestState = function() return 0, "", true end + +---@param runeIndex number +---@return number, number +GetRuneCooldown = function(runeIndex) return 0, 0 end + +---@param runeIndex number +---@return number +GetRuneCount = function(runeIndex) return 0 end + +---@param runeIndex number +---@return number +GetRuneType = function(runeIndex) return 0 end + +---@return number +GetTimeToWellRested = function() return 0 end + +---@param titleId number +---@return string +GetTitleName = function(titleId) return "" end + +---@param unit string +---@return number +GetUnitPitch = function(unit) return 0 end + +---@return number +GetXPExhaustion = function() return 0 end + +---@return boolean +HasFullControl = function() return true end + +---@return string +HasSoulstone = function() return "" end + +---@return boolean +IsFalling = function() return true end + +---@return boolean +IsFlying = function() return true end + +---@return boolean +IsFlyableArea = function() return true end + +---@return boolean +IsIndoors = function() return true end + +---@return boolean +IsMounted = function() return true end + +---@return boolean +IsOutdoors = function() return true end + +---@return boolean +IsOutOfBounds = function() return true end + +---@return boolean +IsResting = function() return true end + +---@return boolean +IsStealthed = function() return true end + +---@return boolean +IsSwimming = function() return true end + +---@param titleId number +---@return boolean +IsTitleKnown = function(titleId) return true end + +---@return boolean +IsXPUserDisabled = function() return true end + +NotWhileDeadError = function() end + +---@return boolean +ResurrectHasSickness = function() return true end + +---@return boolean +ResurrectHasTimer = function() return true end + +---@return string +ResurrectGetOfferer = function() return "" end + +RetrieveCorpse = function() end + +SetCurrentTitle = function() end + +TargetTotem = function() end + +---@return number +GetArmorPenetration = function() return 0 end + +---@param statId number +---@return number +GetAttackPowerForStat = function(statId) return 0 end + +---@return number +GetAverageItemLevel = function() return 0 end + +---@return number +GetBlockChance = function() return 0 end + +---@param combatRatingIdentifier number +---@return number +GetCombatRating = function(combatRatingIdentifier) return 0 end + +---@return number +GetCombatRatingBonus = function() return 0 end + +---@return number +GetCritChance = function() return 0 end + +---@param unitId string +---@return number +GetCritChanceFromAgility = function(unitId) return 0 end + +---@return number +GetDodgeChance = function() return 0 end + +---@return number +GetExpertise = function() return 0 end + +---@return number +GetExpertisePercent = function() return 0 end + +---@return number +GetManaRegen = function() return 0 end + +---@return number +GetMaxCombatRatingBonus = function() return 0 end + +---@return number +GetParryChance = function() return 0 end + +---@return number +GetPetSpellBonusDamage = function() return 0 end + +---@return number +GetPowerRegen = function() return 0 end + +---@param school number +---@return number +GetSpellBonusDamage = function(school) return 0 end + +---@return number +GetRangedCritChance = function() return 0 end + +---@return number +GetSpellBonusHealing = function() return 0 end + +---@return number +GetSpellCritChance = function() return 0 end + +---@return number +GetShieldBlock = function() return 0 end + +---@return number +GetSpellCritChanceFromIntellect = function() return 0 end + +---@return number +GetSpellPenetration = function() return 0 end + +---@param index number +---@param channelName string +AddChatWindowChannel = function(index, channelName) end + +---@param type string +---@param red number +---@param green number +---@param blue number +ChangeChatColor = function(type, red, green, blue) end + +---@param frame string +---@param channelName string +ChatFrame_AddChannel = function(frame, channelName) end + +---@param event string +---@param filterFunc function +ChatFrame_AddMessageEventFilter = function(event, filterFunc) end + +---@return table +ChatFrame_GetMessageEventFilters = function() return {} end + +---@param frame string +---@param link string +---@param text string +---@param button string +ChatFrame_OnHyperlinkShow = function(frame, link, text, button) end + +---@param event string +---@param filterFunc function +ChatFrame_RemoveMessageEventFilter = function(event, filterFunc) end + +---@return table +GetAutoCompleteResults = function() return {} end + +---@param chatType string +---@return number +GetChatTypeIndex = function(chatType) return 0 end + +---@param windowId number +---@return table +GetChatWindowChannels = function(windowId) return {} end + +---@param windowId number +---@return string +GetChatWindowInfo = function(windowId) return "" end + +---@param windowId number +---@return table +GetChatWindowMessages = function(windowId) return {} end + +---@param channelName string +JoinChannelByName = function(channelName) end + +LoggingChat = function() end + +LoggingCombat = function() end + +---@param index number +---@return boolean +RemoveChatWindowChannel = function(index) return true end + +---@param index number +---@param message string +---@return boolean +RemoveChatWindowMessages = function(index, message) return true end + +---@param index number +---@param alpha number +---@return boolean +SetChatWindowAlpha = function(index, alpha) return true end + +---@param index number +---@param red number +---@param green number +---@param blue number +---@return boolean +SetChatWindowColor = function(index, red, green, blue) return true end + +---@param index number +---@param docked boolean +---@return boolean +SetChatWindowDocked = function(index, docked) return true end + +---@param index number +---@param locked boolean +---@return boolean +SetChatWindowLocked = function(index, locked) return true end + +---@param index number +---@param name string +---@return boolean +SetChatWindowName = function(index, name) return true end + +---@param index number +---@param shown boolean +---@return boolean +SetChatWindowShown = function(index, shown) return true end + +---@param index number +---@param size number +---@return boolean +SetChatWindowSize = function(index, size) return true end + +---@param index number +---@param uninteractable boolean +---@return boolean +SetChatWindowUninteractable = function(index, uninteractable) return true end + +---@param token string +---@param unit string? +---@param hold boolean? +DoEmote = function(token, unit, hold) end + +---@return string +GetDefaultLanguage = function() return "" end + +---@param index number +---@return string +GetLanguageByIndex = function(index) return "" end + +---@return number +GetNumLanguages = function() return 0 end + +---@return table +GetRegisteredAddonMessagePrefixes = function() return {} end + +---@param prefix string +---@return boolean +IsAddonMessagePrefixRegistered = function(prefix) return true end + +---@param prefix string +RegisterAddonMessagePrefix = function(prefix) end + +---@param prefix string +---@param message string +---@param channel string +---@param target string +---@param priority string +---@return boolean +SendAddonMessage = function(prefix, message, channel, target, priority) return true end + +---@param message string +---@param chatType string +---@param language string +---@param target string +---@param target2 string +---@param channel number +---@param target3 string +---@param unknown1 number +---@param unknown2 number +---@param unknown3 number +---@return boolean +SendChatMessage = function(message, chatType, language, target, target2, channel, target3, unknown1, unknown2, unknown3) return true end + +---@param index number +CallCompanion = function(index) end + +---@param index number +DismissCompanion = function(index) end + +---@param index number +---@return string, string, string, number, boolean +GetCompanionInfo = function(index) return "", "", "", 0, true end + +---@return number +GetNumCompanions = function() return 0 end + +---@param index number +---@return number, number, number, number +GetCompanionCooldown = function(index) return 0, 0, 0, 0 end + +---@param index number +PickupCompanion = function(index) end + +---@return boolean +SummonRandomCritter = function() return true end + +---@param bagID number +---@param slot number +---@return number +ContainerIDToInventoryID = function(bagID, slot) return 0 end + +---@param bagID number +---@return string +GetBagName = function(bagID) return "" end + +---@param bagID number +---@param slot number +---@return number, number +GetContainerItemCooldown = function(bagID, slot) return 0, 0 end + +---@param bagID number +---@param slot number +---@return number, number, number, number +GetContainerItemDurability = function(bagID, slot) return 0, 0, 0, 0 end + +---@param bagID number +---@param slot number +---@return table +GetContainerItemGems = function(bagID, slot) return {} end + +---@param bagID number +---@param slot number +---@return number +GetContainerItemID = function(bagID, slot) return 0 end + +---@param bagID number +---@param slot number +---@return string, string, number, number, boolean, boolean +GetContainerItemInfo = function(bagID, slot) return "", "", 0, 0, true, true end + +---@param bagID number +---@param slot number +---@return string +GetContainerItemLink = function(bagID, slot) return "" end + +---@param bagID number +---@return number +GetContainerNumSlots = function(bagID) return 0 end + +---@param bagID number +---@param slot number +---@return string, boolean +GetContainerItemQuestInfo = function(bagID, slot) return "", true end + +---@param bagID number +---@return number +GetContainerNumFreeSlots = function(bagID) return 0 end + +OpenAllBags = function() end + +CloseAllBags = function() end + +---@param slot number +PickupBagFromSlot = function(slot) end + +---@param bagID number +---@param slot number +PickupContainerItem = function(bagID, slot) end + +PutItemInBackpack = function() end + +---@param bagID number +PutItemInBag = function(bagID) end + +PutKeyInKeyRing = function() end + +---@param bagID number +---@param slot number +---@param split number +SplitContainerItem = function(bagID, slot, split) end + +ToggleBackpack = function() end + +---@param bagID number +ToggleBag = function(bagID) end + +---@param money number +---@param separator string +---@return string +GetCoinText = function(money, separator) return "" end + +---@param money number +---@param highlight boolean +---@return string +GetCoinTextureString = function(money, highlight) return "" end + +---@param index number +---@return string, number, boolean, boolean, boolean, boolean, boolean +GetCurrencyInfo = function(index) return "", 0, true, true, true, true, true end + +---@return number +GetCurrencyListSize = function() return 0 end + +---@param index number +---@return string, number, number, boolean +GetCurrencyListInfo = function(index) return "", 0, 0, true end + +ExpandCurrencyList = function() end + +SetCurrencyUnused = function(index) end + +---@return number +GetNumWatchedTokens = function() return 0 end + +---@param currencyType number +---@return string, number, number, number, number, number +GetBackpackCurrencyInfo = function(currencyType) return "", 0, 0, 0, 0, 0 end + +---@param currencyType number +---@param backpack boolean +SetCurrencyBackpack = function(currencyType, backpack) end + +AutoEquipCursorItem = function() end + +ClearCursor = function() end + +---@param bag number +---@param slot number +---@return boolean +CursorCanGoInSlot = function(bag, slot) return true end + +---@return boolean +CursorHasItem = function() return true end + +---@return boolean +CursorHasMoney = function() return true end + +---@return boolean +CursorHasSpell = function() return true end +DeleteCursorItem = function() end + +---@param amount number +DropCursorMoney = function(amount) end + +---@param unit string +DropItemOnUnit = function(unit) end + +EquipCursorItem = function() end + +---@return string, string, number +GetCursorInfo = function() return "", "", 0 end + +---@return number, number +GetCursorPosition = function() return 0, 0 end + +HideRepairCursor = function() end + +---@return boolean +InRepairMode = function() return true end + +---@param slot number +PickupAction = function(slot) end + +---@param slot number +PickupBagFromSlot = function(slot) end + +---@param bagID number +---@param slot number +PickupContainerItem = function(bagID, slot) end + +---@param unit string +---@param slot number +PickupInventoryItem = function(unit, slot) end + +---@param itemName string +PickupItem = function(itemName) end + +---@param macroIndex number +PickupMacro = function(macroIndex) end + +---@param index number +PickupMerchantItem = function(index) end + +---@param slot number +PickupPetAction = function(slot) end + +---@param spellSlot number +PickupSpell = function(spellSlot) end + +---@param index number +PickupStablePet = function(index) end + +PickupTradeMoney = function() end + +---@param slotID number +PlaceAction = function(slotID) end + +PutItemInBackpack = function() end + +---@param bagID number +PutItemInBag = function(bagID) end + +ResetCursor = function() end + +---@param itemID number +SetCursor = function(itemID) end + +ShowContainerSellCursor = function() end + +ShowInspectCursor = function() end + +ShowInventorySellCursor = function() end + +ShowMerchantSellCursor = function() end + +ShowRepairCursor = function() end + +---@param bagID number +---@param slot number +---@param split number +SplitContainerItem = function(bagID, slot, split) end + +---@param weaponHand number +---@return string, string, number, string +GetWeaponEnchantInfo = function(weaponHand) return "", "", 0, "" end + +---@param index number +ReplaceEnchant = function(index) end + +---@param index number +ReplaceTradeEnchant = function(index) end + +---@param index number +BindEnchant = function(index) end + +---@param factionIndex number +CollapseFactionHeader = function(factionIndex) end + +CollapseAllFactionHeaders = function() end + +---@param factionIndex number +ExpandFactionHeader = function(factionIndex) end + +ExpandAllFactionHeaders = function() end + +---@param factionIndex number +FactionToggleAtWar = function(factionIndex) end + +---@param index number +---@return string, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number +GetFactionInfo = function(index) return "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 end + +---@return number +GetNumFactions = function() return 0 end + +---@return number +GetSelectedFaction = function() return 0 end + +---@return string, number, number, number, number, boolean, boolean +GetWatchedFactionInfo = function() return "", 0, 0, 0, 0, true, true end + +---@param factionIndex number +---@return boolean +IsFactionInactive = function(factionIndex) return true end + +---@param factionIndex number +SetFactionActive = function(factionIndex) end + +---@param factionIndex number +SetFactionInactive = function(factionIndex) end + +---@param factionIndex number +SetSelectedFaction = function(factionIndex) end + +---@param factionIndex number +SetWatchedFactionIndex = function(factionIndex) end + +---@param unit string +---@return string, number +UnitFactionGroup = function(unit) return "", 0 end + +---@param frameType string +---@param name string | nil +---@param parent table | nil +---@param template string | nil +---@return table +CreateFrame = function(frameType, name, parent, template) return {} end + +---@param fontName string +---@param fontHeight number +---@param fontFlags string | nil +---@return table +CreateFont = function(fontName, fontHeight, fontFlags) return {} end + +---@param eventName string +---@return table +GetFramesRegisteredForEvent = function(eventName) return {} end + +---@return number +GetNumFrames = function() return 0 end + +---@return table +EnumerateFrames = function() return {} end + +---@return table +GetMouseFocus = function() return {} end + +---@param level number +---@param menuFrame table +---@param anchor table +---@param x number +---@param y number +---@param displayMode string | nil +---@param autoHideDelay number | nil +ToggleDropDownMenu = function(level, menuFrame, anchor, x, y, displayMode, autoHideDelay) end + +---@param frame table +---@param fadeInTime number +---@param startAlpha number +---@param endAlpha number +UIFrameFadeIn = function(frame, fadeInTime, startAlpha, endAlpha) end + +---@param frame table +---@param fadeOutTime number +---@param startAlpha number +---@param endAlpha number +UIFrameFadeOut = function(frame, fadeOutTime, startAlpha, endAlpha) end + +---@param frame table +---@param fadeInTime number +---@param fadeOutTime number +---@param flashDuration number +---@param showWhenDone boolean +---@param flashInHoldTime number | nil +---@param flashOutHoldTime number | nil +UIFrameFlash = function(frame, fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime) end + +---@param menuList table +---@param menuFrame table | nil +---@param anchor table | nil +---@param x number | nil +---@param y number | nil +---@param displayMode string | nil +---@param autoHideDelay number | nil +EasyMenu = function(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay) end + +---@param name string +AddFriend = function(name) end + +---@param name string +AddOrRemoveFriend = function(name) end + +---@param index number +---@return string, string, number, number, boolean, boolean, boolean +GetFriendInfo = function(index) return "", "", 0, 0, true, true, true end + +---@param friendName string +---@param notes string +SetFriendNotes = function(friendName, notes) end + +---@return number +GetNumFriends = function() return 0 end + +---@return number +GetSelectedFriend = function() return 0 end + +---@param name string +RemoveFriend = function(name) end + +---@param index number +SetSelectedFriend = function(index) end + +ShowFriends = function() end + +ToggleFriendsFrame = function() end + +---@param index number +---@return number +GetNumGlyphSockets = function(index) return 0 end + +---@param index number +---@return string, string, number +GetGlyphSocketInfo = function(index) return "", "", 0 end + +---@param index number +---@return string +GetGlyphLink = function(index) return "" end + +---@param glyphID number +---@param socketID number +---@return boolean +GlyphMatchesSocket = function(glyphID, socketID) return true end + +---@param glyphID number +---@param socketID number +PlaceGlyphInSocket = function(glyphID, socketID) end +---@param socketID number +RemoveGlyphFromSocket = function(socketID) end + +---@param spellID number +---@return boolean +SpellCanTargetGlyph = function(spellID) return true end + +CanComplainChat = function() end + +---@param index number +---@return boolean +CanComplainInboxItem = function(index) return true end + +---@param chatID number +ComplainChat = function(chatID) end + +---@param mailID number +ComplainInboxItem = function(mailID) end + +CloseGossip = function() end + +---@param npcID number +ForceGossip = function(npcID) end + +---@return table +GetGossipActiveQuests = function() return {} end + +---@return table +GetGossipAvailableQuests = function() return {} end + +---@return table +GetGossipOptions = function() return {} end + +---@return string +GetGossipText = function() return "" end + +---@return number +GetNumGossipActiveQuests = function() return 0 end + +---@return number +GetNumGossipAvailableQuests = function() return 0 end + +---@return number +GetNumGossipOptions = function() return 0 end + +---@param questIndex number +SelectGossipActiveQuest = function(questIndex) end + +---@param questIndex number +SelectGossipAvailableQuest = function(questIndex) end + +---@param optionIndex number +SelectGossipOption = function(optionIndex) end + +AcceptGroup = function() end + +ConfirmReadyCheck = function() end + +ConvertToRaid = function() end + +DeclineGroup = function() end + +DoReadyCheck = function() end + +---@return string, string +GetLootMethod = function() return "", "" end + +---@return number +GetLootThreshold = function() return 0 end + +---@param index number +---@return string, string +GetMasterLootCandidate = function(index) return "", "" end + +---@return number +GetNumPartyMembers = function() return 0 end + +---@return number +GetRealNumPartyMembers = function() return 0 end + +---@return number +GetPartyLeaderIndex = function() return 0 end + +---@param unit string +---@return string, string, string, string, number, number +GetPartyMember = function(unit) return "", "", "", "", 0, 0 end + +---@param unit string +InviteUnit = function(unit) end + +---@param unit string +---@return boolean +IsPartyLeader = function(unit) return true end + +LeaveParty = function() end + +---@param unit string +PromoteToLeader = function(unit) end + +---@param method string +---@param masterUnit string | nil +SetLootMethod = function(method, masterUnit) end + +---@param threshold string +SetLootThreshold = function(threshold) end + +---@param unit string +UninviteUnit = function(unit) end + +---@param unit string +---@return boolean +UnitInParty = function(unit) return true end + +---@param unit string +---@return boolean +UnitIsPartyLeader = function(unit) return true end + +AcceptGuild = function() end + +BuyGuildCharter = function() end + +---@return boolean +CanEditGuildEvent = function() return true end + +---@return boolean +CanEditGuildInfo = function() return true end + +---@return boolean +CanEditMOTD = function() return true end + +---@return boolean +CanEditOfficerNote = function() return true end + +---@return boolean +CanEditPublicNote = function() return true end + +---@param unit string +---@return boolean +CanGuildDemote = function(unit) return true end + +---@param unit string +---@return boolean +CanGuildInvite = function(unit) return true end + +---@param unit string +---@return boolean +CanGuildPromote = function(unit) return true end + +---@param unit string +---@return boolean +CanGuildRemove = function(unit) return true end + +---@return boolean +CanViewOfficerNote = function() return true end + +CloseGuildRegistrar = function() end + +CloseGuildRoster = function() end + +CloseTabardCreation = function() end + +DeclineGuild = function() end + +---@return number +GetGuildCharterCost = function() return 0 end + +---@param index number +---@return string, string, number, number, number, boolean, boolean, string, string +GetGuildEventInfo = function(index) return "", "", 0, 0, 0, true, true, "", "" end + +---@return string, string, number, number, number, number, string, string, number, string +GetGuildInfo = function() return "", "", 0, 0, 0, 0, "", "", 0, "" end + +---@return string +GetGuildInfoText = function() return "" end + +---@param index number +---@return string, string, string, number, number, string, string, string, string, boolean, string, number, boolean, boolean +GetGuildRosterInfo = function(index) return "", "", "", 0, 0, "", "", "", "", true, "", 0, true, true end + +---@param index number +---@return number +GetGuildRosterLastOnline = function(index) return 0 end + +---@return string +GetGuildRosterMOTD = function() return "" end + +---@return number +GetGuildRosterSelection = function() return 0 end + +---@return boolean +GetGuildRosterShowOffline = function() return true end + +---@return number +GetNumGuildEvents = function() return 0 end + +---@return number +GetNumGuildMembers = function() return 0 end + +---@return number +GetTabardCreationCost = function() return 0 end + +---@return string, string, number, number +GetTabardInfo = function() return "", "", 0, 0 end + +---@param rankName string +GuildControlAddRank = function(rankName) end + +---@param rankOrder number +GuildControlDelRank = function(rankOrder) end + +---@return number +GuildControlGetNumRanks = function() return 0 end + +---@param rankOrder number +---@return boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean +GuildControlGetRankFlags = function(rankOrder) return true, true, true, true, true, true, true, true end + +---@param rankOrder number +---@return string +GuildControlGetRankName = function(rankOrder) return "" end + +GuildControlSaveRank = function() end + +---@param rankOrder number +---@param rankName string +GuildControlSetRank = function(rankOrder, rankName) end + +---@param rankOrder number +---@param enabled boolean +---@param allow boolean +---@param memberNote boolean +---@param officerNote boolean +---@param viewOfficerNote boolean +---@param editOfficerNote boolean +---@param invite boolean +---@param remove boolean +---@param promote boolean +---@param demote boolean +---@param speakInGuildChat boolean +---@param inviteRecruit boolean +GuildControlSetRankFlag = function(rankOrder, enabled, allow, memberNote, officerNote, viewOfficerNote, editOfficerNote, invite, remove, promote, demote, speakInGuildChat, inviteRecruit) end + +---@param unit string +---@param rankOrder number +GuildDemote = function(unit, rankOrder) end + +GuildDisband = function() end + +---@param unit string +GuildInfo = function(unit) end + +---@param unit string +GuildInvite = function(unit) end + +GuildLeave = function() end + +---@param unit string +GuildPromote = function(unit) end + +GuildRoster = function() end + +---@param unit string +---@param officerNote string +GuildRosterSetOfficerNote = function(unit, officerNote) end + +---@param unit string +---@param publicNote string +GuildRosterSetPublicNote = function(unit, publicNote) end + +---@param motd string +GuildSetMOTD = function(motd) end + +---@param unit string +GuildSetLeader = function(unit) end + +---@param unit string +GuildUninvite = function(unit) end + +---@param unit string +---@return boolean +IsGuildLeader = function(unit) return true end + +---@param unit string +---@return boolean +IsInGuild = function(unit) return true end + +---@param eventIndex number +QueryGuildEventLog = function(eventIndex) end + +---@param text string +SetGuildInfoText = function(text) end + +---@param index number +SetGuildRosterSelection = function(index) end + +---@param showOffline boolean +SetGuildRosterShowOffline = function(showOffline) end + +SortGuildRoster = function() end + +---@param unit string +---@return number +UnitGetGuildXP = function(unit) return 0 end + +---@param tab number +---@param index number +AutoStoreGuildBankItem = function(tab, index) end + +BuyGuildBankTab = function() end + +---@return boolean +CanGuildBankRepair = function() return true end + +---@return boolean +CanWithdrawGuildBankMoney = function() return true end + +CloseGuildBankFrame = function() end + +---@param amount number +DepositGuildBankMoney = function(amount) end + +---@return number +GetCurrentGuildBankTab = function() return 0 end + +---@param tab number +---@param slot number +---@return string, string, number, number +GetGuildBankItemInfo = function(tab, slot) return "", "", 0, 0 end + +---@param tab number +---@param slot number +---@return string +GetGuildBankItemLink = function(tab, slot) return "" end + +---@return number +GetGuildBankMoney = function() return 0 end + +---@param transactionIndex number +---@return number, string, number +GetGuildBankMoneyTransaction = function(transactionIndex) return 0, "", 0 end + +---@return number +GetGuildBankTabCost = function() return 0 end + +---@param tab number +---@return number, string, string, number, number +GetGuildBankTabInfo = function(tab) return 0, "", "", 0, 0 end + +---@param tab number +---@param index number +---@return boolean, boolean +GetGuildBankTabPermissions = function(tab, index) return true, true end + +---@return string +GetGuildBankText = function() return "" end + +---@param transactionIndex number +---@return string, string, string, number, number, number +GetGuildBankTransaction = function(transactionIndex) return "", "", "", 0, 0, 0 end + +---@return string, string +GetGuildTabardFileNames = function() return "", "" end + +---@return number +GetNumGuildBankMoneyTransactions = function() return 0 end + +---@return number +GetNumGuildBankTabs = function() return 0 end + +---@return number +GetNumGuildBankTransactions = function() return 0 end + +---@param tab number +---@param slot number +PickupGuildBankItem = function(tab, slot) end + +---@param amount number +PickupGuildBankMoney = function(amount) end + +---@param logIndex number +QueryGuildBankLog = function(logIndex) end + +---@param tab number +QueryGuildBankTab = function(tab) end + +---@param tab number +SetCurrentGuildBankTab = function(tab) end + +---@param tab number +---@param name string +---@param icon string +---@param isViewable boolean +---@param canDeposit boolean +SetGuildBankTabInfo = function(tab, name, icon, isViewable, canDeposit) end + +---@param tab number +---@param index number +---@param viewable boolean +---@param depositable boolean +SetGuildBankTabPermissions = function(tab, index, viewable, depositable) end + +---@param itemID number +---@param quantity number +SplitGuildBankItem = function(itemID, quantity) end + +---@param amount number +WithdrawGuildBankMoney = function(amount) end + +---@return number, number, number +GetHolidayBGHonorCurrencyBonuses = function() return 0, 0, 0 end + +---@param unit string +---@return number, number, number, number +GetInspectHonorData = function(unit) return 0, 0, 0, 0 end + +---@return number, number, number, number, number +GetPVPLifetimeStats = function() return 0, 0, 0, 0, 0 end + +---@param factionIndex number +---@return string, string, number, number, number +GetPVPRankInfo = function(factionIndex) return "", "", 0, 0, 0 end + +---@return number, number, number +GetPVPRankProgress = function() return 0, 0, 0 end + +---@return number, number, number +GetPVPSessionStats = function() return 0, 0, 0 end + +---@return number, number, number +GetPVPYesterdayStats = function() return 0, 0, 0 end + +---@return number, number, number +GetRandomBGHonorCurrencyBonuses = function() return 0, 0, 0 end + +---@param unit string +---@return boolean +HasInspectHonorData = function(unit) return true end + +---@param unit string +RequestInspectHonorData = function(unit) end + +---@param unit string +---@param name string +---@return string +UnitPVPName = function(unit, name) return "" end + +---@param unit string +---@return number +UnitPVPRank = function(unit) return 0 end + +---@param name string +AddIgnore = function(name) end + +---@param name string +---@param add boolean +AddOrDelIgnore = function(name, add) end + +---@param name string +DelIgnore = function(name) end + +---@param index number +---@return string +GetIgnoreName = function(index) return "" end + +---@return number +GetNumIgnores = function() return 0 end + +---@return number +GetSelectedIgnore = function() return 0 end + +---@param index number +SetSelectedIgnore = function(index) end + +---@param unit string +---@return boolean +CanInspect = function(unit) return true end + +---@param unit string +---@param distIndex number +---@return boolean +CheckInteractDistance = function(unit, distIndex) return true end + +ClearInspectPlayer = function() end + +---@return string, number, number +GetInspectArenaTeamData = function() return "", 0, 0 end + +---@param unit string +---@return boolean +HasInspectHonorData = function(unit) return true end + +---@param unit string +RequestInspectHonorData = function(unit) end + +---@param unit string +---@return number, number, number, number +GetInspectHonorData = function(unit) return 0, 0, 0, 0 end + +---@param unit string +NotifyInspect = function(unit) end + +---@param unit string +InspectUnit = function(unit) end + +CanShowResetInstances = function() end + +---@param talentId number +---@param specGroupIndex number? +---@param isInspect boolean? +---@param inspectUnit string? +---@return number talentID +---@return string talentName +---@return number icon +---@return boolean selected +---@return boolean available +---@return number spellID +---@return boolean unlocked +---@return number row +---@return number column +---@return boolean known +---@return boolean grantedByAura +GetPvpTalentInfoByID = function(talentId, specGroupIndex, isInspect, inspectUnit) return 0, "", 0, true, true, 0, true, 0, 0, true, true end + +---@param index number +---@return number +GetBattlefieldInstanceExpiration = function(index) return 0 end + +---@param index number +---@return string, string, number, number, number, number, boolean, boolean, boolean, boolean, boolean +GetBattlefieldInstanceInfo = function(index) return "", "", 0, 0, 0, 0, true, true, true, true, true end + +---@return number, number +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 + +---@return number +GetNumSavedInstances = function() return 0 end + +---@param index number +---@return string, string, number, boolean, boolean, boolean, boolean, number, boolean +GetSavedInstanceInfo = function(index) return "", "", 0, true, true, true, true, 0, true end + +---@return boolean bInsideInstance +---@return string instancetype +IsInInstance = function() return true, "" end + +ResetInstances = function() end + +---@return number, number +GetDungeonDifficulty = function() return 0, 0 end + +---@param difficulty number +SetDungeonDifficulty = function(difficulty) end + +---@return number +GetInstanceDifficulty = function() return 0 end + +---@return number +GetInstanceLockTimeRemaining = function() return 0 end + +---@return number +GetInstanceLockTimeRemainingEncounter = function() return 0 end + +AutoEquipCursorItem = function() end + +---@param bankButtonID number +---@return number +BankButtonIDToInvSlotID = function(bankButtonID) return 0 end + +CancelPendingEquip = function() end + +ConfirmBindOnUse = function() end + +---@param containerID number +---@param slot number +---@return number +ContainerIDToInventoryID = function(containerID, slot) return 0 end + +---@param slotID number +---@param bagID number +---@return boolean +CursorCanGoInSlot = function(slotID, bagID) return true end + +EquipCursorItem = function() end + +EquipPendingItem = function() end + +---@return boolean +GetInventoryAlertStatus = function() return true end + +---@param slotID number +---@return boolean +GetInventoryItemBroken = function(slotID) return true end + +---@param slotID number +---@return number, number +GetInventoryItemCooldown = function(slotID) return 0, 0 end + +---@param slotID number +---@return number +GetInventoryItemCount = function(slotID) return 0 end + +---@param slotID number +---@return number, number +GetInventoryItemDurability = function(slotID) return 0, 0 end + +---@param slotID number +---@return table +GetInventoryItemGems = function(slotID) return {} end + +---@param slotID number +---@return number +GetInventoryItemID = function(slotID) return 0 end + +---@param slotID number +---@return string +GetInventoryItemLink = function(slotID) return "" end + +---@param slotID number +---@return number +GetInventoryItemQuality = function(slotID) return 0 end + +---@param slotID number +---@return string +GetInventoryItemTexture = function(slotID) return "" end + +---@param slotName string +---@return string, string, number +GetInventorySlotInfo = function(slotName) return "", "", 0 end + +---@return boolean +GetWeaponEnchantInfo = function() return true end + +---@return boolean +HasWandEquipped = function() return true end + +---@param slotID number +---@return boolean +IsInventoryItemLocked = function(slotID) return true end + +---@param keyRingButtonID number +---@return number +KeyRingButtonIDToInvSlotID = function(keyRingButtonID) return 0 end + +---@param slotID number +PickupBagFromSlot = function(slotID) end + +---@param slotID number +PickupInventoryItem = function(slotID) end + +UpdateInventoryAlertStatus = function() end + +---@param slotID number +UseInventoryItem = function(slotID) end + +---@param itemName string +EquipItemByName = function(itemName) end + +---@param index number +---@return string +GetAuctionItemLink = function(index) return "" end + +---@param bagID number +---@param slot number +---@return string +GetContainerItemLink = function(bagID, slot) return "" end + +---@param slotID number +---@return number, number +GetItemCooldown = function(slotID) return 0, 0 end + +---@param itemID number +---@return number +GetItemCount = function(itemID) return 0 end + +---@param itemID number +---@return number +GetItemFamily = function(itemID) return 0 end + +---@param itemID number +---@return string +GetItemIcon = function(itemID) return "" end + +---@param itemID number +---@return string, string, string, number +GetItemInfo = function(itemID) return "", "", "", 0 end + +---@param quality number +---@return table +GetItemQualityColor = function(quality) return {} end + +---@param itemID number +---@return string +GetItemSpell = function(itemID) return "" end + +---@param itemID number +---@return table +GetItemStats = function(itemID) return {} end + +---@param index number +---@return string +GetMerchantItemLink = function(index) return "" end + +---@param questID number +---@return string +GetQuestItemLink = function(questID) return "" end + +---@param questLogIndex number +---@return string +GetQuestLogItemLink = function(questLogIndex) return "" end + +---@param index number +---@return string +GetTradePlayerItemLink = function(index) return "" end + +---@param index number +---@return string +GetTradeSkillItemLink = function(index) return "" end + +---@param tradeSkillID number +---@param reagentIndex number +---@return string +GetTradeSkillReagentItemLink = function(tradeSkillID, reagentIndex) return "" end + +---@param index number +---@return string +GetTradeTargetItemLink = function(index) return "" end + +---@param itemNameOrItemID string|number +---@return boolean +IsUsableItem = function(itemNameOrItemID) return true end + +---@param itemNameOrItemID string|number +---@return boolean +IsConsumableItem = function(itemNameOrItemID) return true end + +---@return boolean +IsCurrentItem = function() return true end + +---@param itemNameOrItemID string|number +---@return boolean +IsEquippedItem = function(itemNameOrItemID) return true end + +---@param itemNameOrItemID string|number +---@return boolean +IsEquippableItem = function(itemNameOrItemID) return true end + +---@param itemID number +---@return boolean +IsEquippedItemType = function(itemID) return true end + +---@param unit string +---@param itemID number +---@return boolean +IsItemInRange = function(unit, itemID) return true end + +---@param itemNameOrItemID string|number +---@return boolean +ItemHasRange = function(itemNameOrItemID) return true end + +---@return boolean +OffhandHasWeapon = function() return true end + +---@param bagID number +---@param slot number +---@param quantity number +SplitContainerItem = function(bagID, slot, quantity) end + +---@param link string +SetItemRef = function(link) end + +AcceptSockets = function() end + +---@param socketIndex number +ClickSocketButton = function(socketIndex) end + +CloseSocketInfo = function() end + +---@param socketIndex number +---@return string, number +GetSocketItemInfo = function(socketIndex) return "", 0 end + +---@param socketIndex number +---@return boolean +GetSocketItemRefundable = function(socketIndex) return true end + +---@param socketIndex number +---@return boolean +GetSocketItemBoundTradeable = function(socketIndex) return true end + +---@return number +GetNumSockets = function() return 0 end + +---@return table +GetSocketTypes = function() return {} end + +---@param socketIndex number +---@return string, string, number +GetExistingSocketInfo = function(socketIndex) return "", "", 0 end + +---@param socketIndex number +---@return string +GetExistingSocketLink = function(socketIndex) return "" end + +---@param socketIndex number +---@return string, string, number +GetNewSocketInfo = function(socketIndex) return "", "", 0 end + +---@param socketIndex number +---@return string +GetNewSocketLink = function(socketIndex) return "" end + +---@param slot number +SocketInventoryItem = function(slot) end + +---@param bagID number +---@param slot number +SocketContainerItem = function(bagID, slot) end + +CloseItemText = function() end + +---@return string +ItemTextGetCreator = function() return "" end + +---@return string +ItemTextGetItem = function() return "" end + +---@return string +ItemTextGetMaterial = function() return "" end + +---@param page number +---@return string +ItemTextGetPage = function(page) return "" end + +---@return string +ItemTextGetText = function() return "" end + +---@return boolean +ItemTextHasNextPage = function() return true end + +ItemTextNextPage = function() end + +ItemTextPrevPage = function() end + +---@return string +GetMinimapZoneText = function() return "" end + +---@return string +GetRealZoneText = function() return "" end + +---@return string +GetSubZoneText = function() return "" end + +---@return string, boolean, boolean +GetZonePVPInfo = function() return "", true, true end + +---@return string +GetZoneText = function() return "" end + +CompleteLFGRoleCheck = function() end + +---@return number +GetLFGDeserterExpiration = function() return 0 end + +---@return number +GetLFGRandomCooldownExpiration = function() return 0 end + +---@return number +GetLFGBootProposal = function() return 0 end + +---@return string +GetLFGMode = function() return "" end + +---@return number, number, number, number, number +GetLFGQueueStats = function() return 0, 0, 0, 0, 0 end + +---@return boolean, boolean, boolean, boolean +GetLFGRoles = function() return true, true, true, true end + +GetLFGRoleUpdate = function() end + +---@param slot number +---@return number +GetLFGRoleUpdateSlot = function(slot) return 0 end + +---@param vote number +---@param slot number +SetLFGBootVote = function(vote, slot) end + +---@param comment string +SetLFGComment = function(comment) end + +---@param tank boolean +---@param healer boolean +---@param dps boolean +SetLFGRoles = function(tank, healer, dps) end + +---@param unit string +UninviteUnit = function(unit) end + +---@param unit string +---@return string +UnitGroupRolesAssigned = function(unit) return "" end + +---@param unit string +---@return boolean +UnitHasLFGDeserter = function(unit) return true end + +---@param unit string +---@return boolean +UnitHasLFGRandomCooldown = function(unit) return true end + +CloseLoot = function() end + +ConfirmBindOnUse = function() end + +---@param rollID number +---@param roll number +ConfirmLootRoll = function(rollID, roll) end + +---@param slot number +ConfirmLootSlot = function(slot) end + +---@return string +GetLootMethod = function() return "" end + +---@param index number +---@return string, string, number +GetLootRollItemInfo = function(index) return "", "", 0 end + +---@param index number +---@return string +GetLootRollItemLink = function(index) return "" end + +---@param index number +---@return number +GetLootRollTimeLeft = function(index) return 0 end + +---@param index number +---@return string, string, number +GetLootSlotInfo = function(index) return "", "", 0 end + +---@param index number +---@return string +GetLootSlotLink = function(index) return "" end + +---@return number +GetLootThreshold = function() return 0 end + +---@param index number +---@return string +GetMasterLootCandidate = function(index) return "" end + +---@return number +GetNumLootItems = function() return 0 end + +---@return boolean +GetOptOutOfLoot = function() return true end + +---@param candidate string +---@param index number +GiveMasterLoot = function(candidate, index) end + +---@return boolean +IsFishingLoot = function() return true end + +---@param slot number +LootSlot = function(slot) end + +---@param slot number +---@return boolean +LootSlotIsCoin = function(slot) return true end + +---@param slot number +---@return boolean +LootSlotIsCurrency = function(slot) return true end + +---@param slot number +---@return boolean +LootSlotIsItem = function(slot) return true end + +---@param index number +---@param roll number +RollOnLoot = function(index, roll) end + +---@param method string +---@param masterPlayer string +SetLootMethod = function(method, masterPlayer) end + +---@param texture string +SetLootPortrait = function(texture) end + +---@param threshold number +SetLootThreshold = function(threshold) end + +---@param optOut boolean +SetOptOutOfLoot = function(optOut) end + +---@return boolean +CursorHasMacro = function() return true end + +---@param index number +DeleteMacro = function(index) end + +---@param index number +---@return string +GetMacroBody = function(index) return "" end + +---@param index number +---@return string, number, number +GetMacroIconInfo = function(index) return "", 0, 0 end + +---@param index number +---@return string, number, number +GetMacroItemIconInfo = function(index) return "", 0, 0 end + +---@param name string +---@return number +GetMacroIndexByName = function(name) return 0 end + +---@param index number +---@return string, string, string +GetMacroInfo = function(index) return "", "", "" end + +---@return number +GetNumMacroIcons = function() return 0 end + +---@return number +GetNumMacroItemIcons = function() return 0 end + +---@return number +GetNumMacros = function() return 0 end + +---@param index number +PickupMacro = function(index) end + +---@param index number +RunMacro = function(index) end + +---@param index number +RunMacroText = function(index) end + +---@param option string +---@return string +SecureCmdOptionParse = function(option) return "" end + +StopMacro = function() end + +---@param index number +AutoLootMailItem = function(index) end + +CheckInbox = function() end + +ClearSendMail = function() end + +ClickSendMailItemButton = function() end + +CloseMail = function() end + +---@param index number +DeleteInboxItem = function(index) end + +---@param currencyIndex number +---@return string +GetCoinIcon = function(currencyIndex) return "" end + +---@param index number +---@return string, boolean, boolean, boolean, boolean, boolean, boolean, number, number +GetInboxHeaderInfo = function(index) return "", true, true, true, true, true, true, 0, 0 end + +---@param index number +---@param itemIndex number +---@return string, number, number, string, number +GetInboxItem = function(index, itemIndex) return "", 0, 0, "", 0 end + +---@param index number +---@param itemIndex number +---@return string +GetInboxItemLink = function(index, itemIndex) return "" end + +---@return number +GetInboxNumItems = function() return 0 end + +---@param index number +---@return string +GetInboxText = function(index) return "" end + +---@param index number +---@return string, string, number +GetInboxInvoiceInfo = function(index) return "", "", 0 end + +---@return number +GetNumPackages = function() return 0 end + +---@return number +GetNumStationeries = function() return 0 end + +---@param index number +---@return string, boolean +GetPackageInfo = function(index) return "", true end + +---@return string +GetSelectedStationeryTexture = function() return "" end + +---@return number +GetSendMailCOD = function() return 0 end + +---@param index number +---@return string, number, number, string, number +GetSendMailItem = function(index) return "", 0, 0, "", 0 end + +---@param index number +---@return string +GetSendMailItemLink = function(index) return "" end + +---@return number +GetSendMailMoney = function() return 0 end + +---@return number +GetSendMailPrice = function() return 0 end + +---@param index number +---@return string, number +GetStationeryInfo = function(index) return "", 0 end + +---@return boolean +HasNewMail = function() return true end + +---@param index number +---@return boolean +InboxItemCanDelete = function(index) return true end + +---@param index number +ReturnInboxItem = function(index) end + +---@param index number +SelectPackage = function(index) end + +---@param index number +SelectStationery = function(index) end + +---@param subject string +---@param body string +SendMail = function(subject, body) end + +---@param codAmount number +SetSendMailCOD = function(codAmount) end + +---@param money number +SetSendMailMoney = function(money) end + +---@param index number +TakeInboxItem = function(index) end + +---@return number +TakeInboxMoney = function() return 0 end + +---@param index number +TakeInboxTextItem = function(index) end + +ClickLandmark = function() end + +---@return number, number +GetCorpseMapPosition = function() return 0, 0 end + +---@return number +GetCurrentMapContinent = function() return 0 end + +---@return number +GetCurrentMapDungeonLevel = function() return 0 end + +---@return number +GetNumDungeonMapLevels = function() return 0 end + +---@return number +GetCurrentMapAreaID = function() return 0 end + +---@return string +GetCurrentMapZone = function() return "" end + +---@return table +GetMapContinents = function() return {} end + +---@param index number +---@return string, string, number, number, number, number, number, number +GetMapDebugObjectInfo = function(index) return "", "", 0, 0, 0, 0, 0, 0 end + +---@param mapID number +---@return string, string, number, number, number, number, number, number +GetMapInfo = function(mapID) return "", "", 0, 0, 0, 0, 0, 0 end + +---@param index number +---@return string, number, number, number +GetMapLandmarkInfo = function(index) return "", 0, 0, 0 end + +---@param index number +---@return string, number, number, number, number +GetMapOverlayInfo = function(index) return "", 0, 0, 0, 0 end + +---@param continentID number +---@return table +GetMapZones = function(continentID) return {} end + +---@return number +GetNumMapDebugObjects = function() return 0 end + +---@return number +GetNumMapLandmarks = function() return 0 end + +---@return number +GetNumMapOverlays = function() return 0 end + +---@return number, number +GetPlayerMapPosition = function() return 0, 0 end + +---@param cursorType string +ProcessMapClick = function(cursorType) end + +RequestBattlefieldPositions = function() end + +---@param dungeonLevel number +SetDungeonMapLevel = function(dungeonLevel) end + +---@param mapID number +SetMapByID = function(mapID) end + +SetMapToCurrentZone = function() end + +---@param zoomLevel number +SetMapZoom = function(zoomLevel) end + +---@param mapFrame table +PositionWorldMapArrowFrame = function(mapFrame) end + +---@param index number +---@param quantity number +BuyMerchantItem = function(index, quantity) end + +---@param index number +BuybackItem = function(index) end + +---@return boolean +CanMerchantRepair = function() return true end + +CloseMerchant = function() end + +---@param index number +---@return string, string, number, number +GetBuybackItemInfo = function(index) return "", "", 0, 0 end + +---@param index number +---@return string +GetBuybackItemLink = function(index) return "" end + +---@param index number +---@return number, string, number, number, number +GetMerchantItemCostInfo = function(index) return 0, "", 0, 0, 0 end + +---@param index number +---@return string, number +GetMerchantItemCostItem = function(index) return "", 0 end + +---@param index number +---@return string, string, number, number, number, number, number, number, number +GetMerchantItemInfo = function(index) return "", "", 0, 0, 0, 0, 0, 0, 0 end + +---@param index number +---@return string +GetMerchantItemLink = function(index) return "" end + +---@param index number +---@return number +GetMerchantItemMaxStack = function(index) return 0 end + +---@return number +GetMerchantNumItems = function() return 0 end + +---@return number +GetRepairAllCost = function() return 0 end + +HideRepairCursor = function() end + +---@return boolean +InRepairMode = function() return true end + +---@param index number +PickupMerchantItem = function(index) end + +RepairAllItems = function() end + +ShowMerchantSellCursor = function() end + +ShowRepairCursor = function() end + +---@return number +GetNumBuybackItems = function() return 0 end + +---@param index number +CastPetAction = function(index) end + +ClosePetStables = function() end + +---@param unit string +---@param bagID number +---@param slot number +DropItemOnUnit = function(unit, bagID, slot) end + +---@param slotID number +---@return number, number, boolean +GetPetActionCooldown = function(slotID) return 0, 0, true end + +---@param slotID number +---@return string, string, boolean, boolean +GetPetActionInfo = function(slotID) return "", "", true, true end + +---@param slotID number +---@return boolean +GetPetActionSlotUsable = function(slotID) return true end + +---@return boolean +GetPetActionsUsable = function() return true end + +---@return number, number, number +GetPetExperience = function() return 0, 0, 0 end + +---@return table +GetPetFoodTypes = function() return {} end + +---@return number +GetPetHappiness = function() return 0 end + +---@return string +GetPetIcon = function() return "" end + +---@return number +GetPetTimeRemaining = function() return 0 end + +---@return table +GetStablePetFoodTypes = function() return {} end + +---@param index number +---@return string, number, number, string, string, boolean, boolean +GetStablePetInfo = function(index) return "", 0, 0, "", "", true, true end + +---@return boolean +HasPetSpells = function() return true end + +---@return boolean +HasPetUI = function() return true end + +PetAbandon = function() end + +PetAggressiveMode = function() end + +PetAttack = function() end + +---@return boolean +IsPetAttackActive = function() return true end + +PetStopAttack = function() end + +---@return boolean +PetCanBeAbandoned = function() return true end + +---@return boolean +PetCanBeDismissed = function() return true end + +---@return boolean +PetCanBeRenamed = function() return true end + +PetDefensiveMode = function() end + +PetDismiss = function() end + +PetFollow = function() end + +---@return boolean +PetHasActionBar = function() return true end + +PetPassiveMode = function() end + +---@param name string +PetRename = function(name) end + +PetWait = function() end + +---@param slotID number +PickupPetAction = function(slotID) end + +PickupStablePet = function() end + +SetPetStablePaperdoll = function() end + +---@param slotID number +---@param enabled boolean +TogglePetAutocast = function(slotID, enabled) end + +---@param index number +---@param enabled boolean +ToggleSpellAutocast = function(index, enabled) end + +---@param index number +---@return boolean +GetSpellAutocast = function(index) return true end + +AddQuestWatch = function() end + +---@return number +GetActiveLevel = function() return 0 end + +---@return string +GetActiveTitle = function() return "" end + +---@param questID number +---@return number +GetAvailableLevel = function(questID) return 0 end + +---@param questID number +---@return string +GetAvailableTitle = function(questID) return "" end + +---@param questIndex number +---@return string, boolean, boolean +GetAvailableQuestInfo = function(questIndex) return "", true, true end + +---@param npcID number +---@return string +GetGreetingText = function(npcID) return "" end + +---@return number +GetNumQuestLeaderBoards = function() return 0 end + +---@return number +GetNumQuestWatches = function() return 0 end + +---@param questIndex number +---@param objectiveIndex number +---@return string +GetObjectiveText = function(questIndex, objectiveIndex) return "" end + +---@param questIndex number +---@param progressIndex number +---@return string +GetProgressText = function(questIndex, progressIndex) return "" end + +---@param questLevel number +---@return boolean +GetQuestGreenRange = function(questLevel) return true end + +---@param questID number +---@return number +GetQuestIndexForWatch = function(questID) return 0 end + +---@param questID number +---@return string +GetQuestLink = function(questID) return "" end + +---@param index number +---@return number +GetQuestLogGroupNum = function(index) return 0 end + +---@param questIndex number +---@param objectiveIndex number +---@return string, string, boolean, number, number, boolean +GetQuestLogLeaderBoard = function(questIndex, objectiveIndex) return "", "", true, 0, 0, true end + +---@param index number +---@return string, number, number, number, number, boolean, boolean +GetQuestLogTitle = function(index) return "", 0, 0, 0, 0, true, true end + +---@return number, string, number, number +GetQuestReward = function() return 0, "", 0, 0 end + +---@return number +GetRewardArenaPoints = function() return 0 end + +---@return number +GetRewardHonor = function() return 0 end + +---@return number +GetRewardMoney = function() return 0 end + +---@return number +GetRewardSpell = function() return 0 end + +---@return number +GetRewardTalents = function() return 0 end + +---@return string +GetRewardText = function() return "" end + +---@return string +GetRewardTitle = function() return "" end + +---@return number +GetRewardXP = function() return 0 end + +---@param questID number +---@return boolean +IsQuestWatched = function(questID) return true end + +---@param unit string +---@param questID number +---@return boolean +IsUnitOnQuest = function(unit, questID) return true end + +QuestFlagsPVP = function() end + +---@return boolean +QuestGetAutoAccept = function() return true end + +---@param questIndex number +RemoveQuestWatch = function(questIndex) end + +---@param questIndex number +---@param offset number +ShiftQuestWatches = function(questIndex, offset) end + +SortQuestWatches = function() end + +---@param questID number +---@return boolean +QueryQuestsCompleted = function(questID) return true end + +---@return table +GetQuestsCompleted = function() return {} end + +---@param questID number +---@return boolean +QuestIsDaily = function(questID) return true end + +---@param unit string +DemoteAssistant = function(unit) end + +---@return boolean +GetAllowLowLevelRaid = function() return true end + +---@return number +GetNumRaidMembers = function() return 0 end + +---@return number +GetRealNumRaidMembers = function() return 0 end + +---@param unit string +---@return string, string +GetPartyAssignment = function(unit) return "", "" end + +---@param raidID number +---@return string, string +GetRaidRosterInfo = function(raidID) return "", "" end + +---@param unit string +---@return number +GetRaidTargetIndex = function(unit) return 0 end + +---@return boolean, boolean, boolean +GetReadyCheckStatus = function() return true, true, true end + +InitiateRolePoll = function() end + +---@return boolean +IsRaidLeader = function() return true end + +---@param unit string +---@return boolean +IsRaidOfficer = function(unit) return true end + +---@param raidTargetIndex number +PlaceRaidMarker = function(raidTargetIndex) end + +---@param unit string +PromoteToAssistant = function(unit) end + +RequestRaidInfo = function() end + +---@param unit string +---@param role string +SetPartyAssignment = function(unit, role) end + +---@param enabled boolean +SetAllowLowLevelRaid = function(enabled) end + +---@param index number +SetRaidRosterSelection = function(index) end + +---@param unit string +---@param subgroup number +SetRaidSubgroup = function(unit, subgroup) end + +---@param unit1 string +---@param unit2 string +SwapRaidSubgroup = function(unit1, unit2) end + +---@param unit string +---@param raidTargetIndex number +SetRaidTarget = function(unit, raidTargetIndex) end + +---@param unit string +---@return boolean +UnitInRaid = function(unit) return true end + +GetInstanceLockTimeRemainingEncounter = function() end + +---@param dungeonID number +SearchLFGGetEncounterResults = function(dungeonID) end + +---@return number +SearchLFGGetJoinedID = function() return 0 end + +---@return number +SearchLFGGetNumResults = function() return 0 end + +---@return number +SearchLFGGetPartyResults = function() return 0 end + +---@return number +SearchLFGGetResults = function() return 0 end + +---@param resultID number +SearchLFGJoin = function(resultID) end + +SearchLFGLeave = function() end + +---@param sortOrder string +SearchLFGSort = function(sortOrder) end + +---@param comment string +SetLFGComment = function(comment) end + +ClearAllLFGDungeons = function() end + +---@param dungeonID number +JoinLFG = function(dungeonID) end + +---@param dungeonID number +RequestLFDPlayerLockInfo = function(dungeonID) end + +---@param dungeonID number +SetLFGDungeon = function(dungeonID) end + +---@param dungeonID number +---@param enabled boolean +SetLFGDungeonEnabled = function(dungeonID, enabled) end + +---@param categoryID number +---@param collapsed boolean +SetLFGHeaderCollapsed = function(categoryID, collapsed) end + +---@param func function +---@return number +GetFunctionCPUUsage = function(func) return 0 end + +---@param varName string +---@return boolean +issecure = function(varName) return true end + +---@param func function +forceinsecure = function(func) end + +---@param varName string +---@return boolean +issecurevariable = function(varName) return true end + +---@param func function +---@vararg ... +---@return any +securecall = function(func, ...) return nil end + +---@param origFunc function +---@param hookFunc function +hooksecurefunc = function(origFunc, hookFunc) end + +InCombatLockdown = function() end + +---@param unit string +CombatTextSetActiveUnit = function(unit) end + +---@param cvarName string +---@return string +GetCVar = function(cvarName) return "" end + +---@param cvarName string +---@return string +GetCVarDefault = function(cvarName) return "" end + +---@param cvarName string +---@return boolean +GetCVarBool = function(cvarName) return true end + +---@param cvarName string +---@return table +GetCVarInfo = function(cvarName) return {} end + +---@return boolean +DownloadSettings = function() return true end + +---@return number +GetCurrentMultisampleFormat = function() return 0 end + +---@return number +GetCurrentResolution = function() return 0 end + +---@return number +GetScriptCPUUsage = function() return 0 end + +---@return boolean +ResetCPUUsage = function() return true end + +---@return boolean +UpdateAddOnCPUUsage = function() return true end + +---@return boolean +UpdateAddOnMemoryUsage = function() return true end + +---@return number, number, number +GetGamma = function() return 0, 0, 0 end + +---@return table +GetMultisampleFormats = function() return {} end + +---@param formatIndex number +---@return table +GetRefreshRates = function(formatIndex) return {} end + +---@return table +GetScreenResolutions = function() return {} end + +---@param category string +---@return boolean +GetVideoCaps = function(category) return true end + +---@return boolean +IsThreatWarningEnabled = function() return true end + +---@return boolean +ResetPerformanceValues = function() return true end + +---@return boolean +ResetTutorials = function() return true end + +---@param cvarName string +---@param value any +RegisterCVar = function(cvarName, value) end + +---@param cvarName string +---@param value any +SetCVar = function(cvarName, value) end + +SetEuropeanNumbers = function() end + +---@param gamma number +SetGamma = function(gamma) end + +---@param enabled boolean +SetLayoutMode = function(enabled) end + +---@param formatIndex number +SetMultisampleFormat = function(formatIndex) end + +---@param resolutionIndex number +SetScreenResolution = function(resolutionIndex) end + +---@param show boolean +ShowCloak = function(show) return true end + +---@param show boolean +ShowHelm = function(show) return true end + +---@param show boolean +ShowNumericThreat = function(show) return true end + +---@return boolean +ShowingCloak = function() return true end + +---@return boolean +ShowingHelm = function() return true end + +---@param settings table +UploadSettings = function(settings) + return true +end + +---@param skillIndex number +AbandonSkill = function(skillIndex) end + +---@param formIndex number +CastShapeshiftForm = function(formIndex) end + +---@param spellName string +---@param target string +CastSpell = function(spellName, target) end + +---@param spellName string +---@param target string +CastSpellByName = function(spellName, target) end + +---@param totemIndex number +---@return table +GetMultiCastTotemSpells = function(totemIndex) return {} end + +---@return number +GetNumShapeshiftForms = function() return 0 end + +---@return number +GetNumSpellTabs = function() return 0 end + +---@return number +GetShapeshiftForm = function() return 0 end + +---@param formIndex number +---@return number, number, number +GetShapeshiftFormCooldown = function(formIndex) return 0, 0, 0 end + +---@param formIndex number +---@return string, boolean, boolean, number +GetShapeshiftFormInfo = function(formIndex) return "", false, false, 0 end + +---@param spellID number +---@return boolean +GetSpellAutocast = function(spellID) return true end + +---@param spellSlot number +---@param bookType string +---@return string, string +GetSpellBookItemInfo = function(spellSlot, bookType) return "", "" end + +---@param spellSlot number +---@param bookType string +---@return string +GetSpellBookItemName = function(spellSlot, bookType) return "" end + +---@param spellID number +---@return number, number +GetSpellCooldown = function(spellID) return 0, 0 end + +---@param spellName string +---@return string +GetSpellDescription = function(spellName) return "" end + +---@param spellNameOrID string|number +---@return string, number, number, number, number, number, number, number +GetSpellInfo = function(spellNameOrID) return "", 0, 0, 0, 0, 0, 0, 0 end + +---@param spellID number +---@return string +GetSpellLink = function(spellID) return "" end + +---@param tabIndex number +---@param isFlyout boolean +---@return string, string, number, number +GetSpellTabInfo = function(tabIndex, isFlyout) return "", "", 0, 0 end + +---@param spellName string +---@return string +GetSpellTexture = function(spellName) return "" end + +---@param totemIndex number +---@return string, number, number, number, number, number, number, number, number +GetTotemInfo = function(totemIndex) return "", 0, 0, 0, 0, 0, 0, 0, 0 end + +---@param spellId number +---@return boolean +IsAttackSpell = function(spellId) return true end + +---@param spellId number +---@return boolean +IsAutoRepeatSpell = function(spellId) return true end + +---@param spellId number +---@return boolean +IsPassiveSpell = function(spellId) return true end + +---@param spellName string +---@param target string +---@return boolean +IsSpellInRange = function(spellName, target) return true end + +---@param spellName string +---@return boolean +IsUsableSpell = function(spellName) return true end + +---@param spellName string +PickupSpell = function(spellName) end + +---@param sequenceName string +---@return string +QueryCastSequence = function(sequenceName) return "" end + +---@param spellName string +---@param totemIndex number +SetMultiCastSpell = function(spellName, totemIndex) end + +---@param unit string +---@param spellName string +---@return boolean +SpellCanTargetUnit = function(unit, spellName) return true end + +---@param spellName string +---@return boolean +SpellHasRange = function(spellName) return true end + +---@return boolean +SpellIsTargeting = function() return true end + +---@return boolean +SpellStopCasting = function() return true end + +---@return boolean +SpellStopTargeting = function() return true end + +---@param unit string +SpellTargetUnit = function(unit) end + +ToggleSpellAutocast = function() end + +---@return string, string, number, number, boolean, string +UnitCastingInfo = function() return "", "", 0, 0, false, "" end + +---@return string, string, number, number, boolean, string +UnitChannelInfo = function() return "", "", 0, 0, false, "" end + +---@param command string +ConsoleExec = function(command) end + +---@return string, string, string, string +GetBuildInfo = function() return "", "", "", "" end + +---@return number +GetFramerate = function() return 0 end + +---@return number, number +GetGameTime = function() return 0, 0 end + +---@return string +GetLocale = function() return "" end + +---@return number, number +GetCursorPosition = function() return 0, 0 end + +---@return number, number, number, number +GetNetStats = function() return 0, 0, 0, 0 end + +---@return string +GetRealmName = function() return "" end + +---@return number +GetScreenHeight = function() return 0 end + +---@return number +GetScreenWidth = function() return 0 end + +---@param frame string +---@return string +GetText = function(frame) return "" end + +---@return number +GetTime = function() return 0 end + +---@return boolean +IsAltKeyDown = function() return true end + +---@return boolean +InCinematic = function() return true end + +---@return boolean +IsControlKeyDown = function() return true end + +---@return boolean +DetectWowMouse = function() return true end + +---@return function +geterrorhandler = function() return function() end end + +---@return number +GetAddOnCPUUsage = function() return 0 end + +LeaveLFG = function() end + +RequestLFDPartyLockInfo = function() end + +---@return number +GetAddOnMemoryUsage = function() return 0 end + +---@return number +GetEventCPUUsage = function() return 0 end + +---@return number +GetFrameCPUUsage = function() return 0 end + +---@param dungeonID number +LFGGetDungeonInfoByID = function(dungeonID) end + +RefreshLFGList = function() end + +---@param questID number +---@return boolean +QuestIsWeekly = function(questID) return true end + +---@param unit string +ClearRaidMarker = function(unit) end + +ConvertToRaid = function() end + +ConvertToParty = function() end + +---@return table +GetCurrentKeyBoardFocus = function() return {} end + +---@return table +GetExistingLocales = function() return {} end + +---@return boolean +IsDebugBuild = function() return true end + +---@return boolean +IsDesaturateSupported = function() return true end + +---@return boolean +IsLeftAltKeyDown = function() return true end + +---@return boolean +IsLeftControlKeyDown = function() return true end + +---@return boolean +IsLeftShiftKeyDown = function() return true end + +---@return boolean +IsLinuxClient = function() return true end + +---@return boolean +function ZoomOut() return true end + +---@param scale number +function SetupFullscreenScale(scale) end + +---@param highlightType string +---@param texturePath string +---@param textureX number +---@param textureY number +---@param pulseTexturePath string +---@param pulseTextureX number +---@param pulseTextureY number +function UpdateMapHighlight(highlightType, texturePath, textureX, textureY, pulseTexturePath, pulseTextureX, pulseTextureY) end + +---@return table +function CreateWorldMapArrowFrame() return {} end + +---@param arrowFrame table +---@param playerX number +---@param playerY number +function UpdateWorldMapArrowFrames(arrowFrame, playerX, playerY) end + +---@param arrowFrame table +function ShowWorldMapArrowFrame(arrowFrame) end + +---@return boolean +function IsLoggedIn() return true end + +---@return boolean +function IsMacClient() return true end + +---@return boolean +function IsRightAltKeyDown() return true end + +---@return boolean +function IsRightControlKeyDown() return true end + +---@return boolean +function IsRightShiftKeyDown() return true end + +---@return boolean +function IsShiftKeyDown() return true end + +---@return boolean +function IsStereoVideoAvailable() return true end + +---@return boolean +function IsWindowsClient() return true end + +---@param cinematicIndex number +function OpeningCinematic(cinematicIndex) end + +---@param musicFile string +function PlayMusic(musicFile) end + +---fire SOUNDKIT_FINISHED if runFinishCallback is true +---@param soundFile string +---@param channel string? +---@param forceNoDuplicates boolean? +---@param runFinishCallback boolean? +---@return boolean bWillPlay +---@return number soundHandle +function PlaySound(soundFile, channel, forceNoDuplicates, runFinishCallback) return true, 0 end + +---@param soundFile string +---@param channel string? +---@return boolean bWillPlay +---@return number soundHandle +function PlaySoundFile(soundFile, channel) return true, 0 end + +---@param soundHandle number +---@param fadeOutTime number? +function StopSound(soundHandle, fadeOutTime) end + +---@param soundId string|number +function MuteSoundFile(soundId) end + +---@param soundId string|number +function UnmuteSoundFile(soundId) end + +function ReloadUI() end + +function RepopMe() end + +---@return number, number, number, number +function RequestTimePlayed() return 0, 0, 0, 0 end + +function RestartGx() end + +---@param script string +function RunScript(script) end + +function Screenshot() end + +---@param autoDecline boolean +function SetAutoDeclineGuildInvites(autoDecline) end + +---@param errorHandler function +function seterrorhandler(errorHandler) end + +function StopCinematic() end + +function StopMusic() end + +---@param addonName string +function UIParentLoadAddOn(addonName) end + +---@param delay number +function TakeScreenshot(delay) end + +---@param trainerIndex number +---@param talentIndex number +function BuyTrainerService(trainerIndex, talentIndex) end + +---@return number, number +function CheckTalentMasterDist() return 0, 0 end + +function ConfirmTalentWipe() end + +---@return number +function GetActiveTalentGroup() return 0 end + +---@return number +function GetNumTalentTabs() return 0 end + +---@param tabIndex number +---@return number +function GetNumTalents(tabIndex) return 0 end + +---@param tabIndex number +---@param talentIndex number +---@param isInspect boolean +---@return string, string, string, number, number, boolean +function GetTalentInfo(tabIndex, talentIndex, isInspect) return "", "", "", 0, 0, true end + +---@param tabIndex number +---@param talentIndex number +---@param isInspect boolean +---@return string +function GetTalentLink(tabIndex, talentIndex, isInspect) return "" end + +---@param tabIndex number +---@param talentIndex number +---@param isInspect boolean +---@return number +function GetTalentPrereqs(tabIndex, talentIndex, isInspect) return 0 end + +---@param tabIndex number +---@return string, string, number, number, number, number +function GetTalentTabInfo(tabIndex) return "", "", 0, 0, 0, 0 end + +---@param tabIndex number +---@param talentIndex number +function LearnTalent(tabIndex, talentIndex) end + +---@param talentGroup number +function SetActiveTalentGroup(talentGroup) end + +---@return number +function GetNumTalentGroups() return 0 end + +---@return number +function GetActiveTalentGroup() return 0 end + +---@param amount number +function AddPreviewTalentPoints(amount) end + +---@param talentGroup number +---@return number +function GetGroupPreviewTalentPointsSpent(talentGroup) return 0 end + +---@return number +function GetPreviewTalentPointsSpent() return 0 end + +---@return number +function GetUnspentTalentPoints() return 0 end + +function LearnPreviewTalents() end + +---@param talentGroup number +function ResetGroupPreviewTalentPoints(talentGroup) end + +function ResetPreviewTalentPoints() end + +---@param unit string +function AssistUnit(unit) end + +function AttackTarget() end + +function ClearTarget() end + +function ClickTargetTradeButton() end + +function TargetLastEnemy() end + +function TargetLastTarget() end + +function TargetNearestEnemy() end + +function TargetNearestEnemyPlayer() end + +function TargetNearestFriend() end + +function TargetNearestFriendPlayer() end + +function TargetNearestPartyMember() end + +function TargetNearestRaidMember() end + +---@param unit string +function TargetUnit(unit) end + +function ToggleBackpack() end + +function ToggleBag() end + +function ToggleCharacter() end + +function ToggleFriendsFrame() end + +function ToggleSpellBook() end + +function TradeSkill() end + +function CloseTradeSkill() end + +---@param index number +function CollapseTradeSkillSubClass(index) end + +---@param amount number +function PickupPlayerMoney(amount) end + +---@param amount number +function PickupTradeMoney(amount) end + +---@param money number +function SetTradeMoney(money) end + +---@param slotId number +function ReplaceTradeEnchant(slotId) end + +---@param unit string +function AssistUnit(unit) end + +---@param unit string +---@param maxDistance number +---@return boolean +function CheckInteractDistance(unit, maxDistance) return true end + +---@param itemName string +---@param unit string +function DropItemOnUnit(itemName, unit) end + +---@param unit string +function FollowUnit(unit) end + +---@param unit string +function FocusUnit(unit) end + +function ClearFocus() end + +---@param unit string +---@return string +function GetUnitName(unit) return "" end + +---@param unit string +---@return number +function GetUnitPitch(unit) return 0 end + +---@param unit string +---@return number +function GetUnitSpeed(unit) return 0 end + +---@param unit string +function InviteUnit(unit) end + +---@param unit string +---@param questID number +---@return boolean +function IsUnitOnQuest(unit, questID) return true end + +---@param spellNameOrID string|number +---@param unit string +---@return boolean +function SpellCanTargetUnit(spellNameOrID, unit) return true end + +---@param unit string +function SpellTargetUnit(unit) end + +---@param unit string +function TargetUnit(unit) end + +---@param unit string +---@return boolean +function UnitAffectingCombat(unit) return true end + +---@param unit string +---@return number +function UnitArmor(unit) return 0 end + +---@param unit string +---@return number +function UnitAttackBothHands(unit) return 0 end + +---@param unit string +---@return number +function UnitAttackPower(unit) return 0 end + +---@param unit string +---@return number +function UnitAttackSpeed(unit) return 0 end + +---@param unit string +---@param index number +---@param filter string|nil +---@return string, number, string, number, number, string +function UnitAura(unit, index, filter) return "", 0, "", 0, 0, "" end + +---@param unit string +---@param index number +---@param filter string|nil +---@return string, number, string, number, number, string +function UnitBuff(unit, index, filter) return "", 0, "", 0, 0, "" end + +---@param unit string +---@return boolean +function UnitCanAssist(unit) return true end + +---@param unit string +---@return boolean +function UnitCanAttack(unit) return true end + +---@param unit string +---@return boolean +function UnitCanCooperate(unit) return true end + +---@param unit string +---@return string, string +function UnitClass(unit) return "", "" end + +---@param unit string +---@return string +function UnitClassification(unit) return "" end + +---@param unit string +---@return string +function UnitCreatureFamily(unit) return "" end + +---@param unit string +---@return string +function UnitCreatureType(unit) return "" end + +---@param unit string +---@return number, number, number, number +function UnitDamage(unit) return 0, 0, 0, 0 end + +---@param unit string +---@param index number +---@param filter string|nil +---@return string, number, string, number, number, string +function UnitDebuff(unit, index, filter) return "", 0, "", 0, 0, "" end + +---@param unit string +---@return number +function UnitDefense(unit) return 0 end + +---@param unit string +---@param mobUnit string +---@return number, string, number, number, number +function UnitDetailedThreatSituation(unit, mobUnit) return 0, "", 0, 0, 0 end + +---@param unit string +---@return boolean +function UnitExists(unit) return true end + +---@param unit string +---@return string +function UnitFactionGroup(unit) return "" end + +---@param unit string +---@return string +function UnitGUID(unit) return "" end + +---@param guid string +---@return string, string, string, string +function GetPlayerInfoByGUID(guid) return "", "", "", "" end + +---@param unit string +---@return boolean +function UnitHasLFGDeserter(unit) return true end + +---@param unit string +---@return boolean +function UnitHasLFGRandomCooldown(unit) return true end + +---@param unit string +---@return boolean +function UnitHasRelicSlot(unit) return true end + +---@param unit string +---@return number +function UnitHealth(unit) return 0 end + +---@param unit string +---@return number +function UnitHealthMax(unit) return 0 end + +---@param unit string +---@return boolean +function UnitInParty(unit) return true end + +---@param unit string +---@return boolean +function UnitInRaid(unit) return true end + +---@param unit string +---@return boolean +function UnitInBattleground(unit) return true end + +---@param unit string +---@return boolean +function UnitIsInMyGuild(unit) return true end + +---@param unit string +---@return boolean +function UnitInRange(unit) return true end + +---@param unit string +---@return boolean +function UnitIsAFK(unit) return true end + +---@param unit string +---@return boolean +function UnitIsCharmed(unit) return true end + +---@param unit string +---@return boolean +function UnitIsConnected(unit) return true end + +---@param unit string +---@return boolean +function UnitIsCorpse(unit) return true end + +---@param unit string +---@return boolean +function UnitIsDead(unit) return true end + +---@param unit string +---@return boolean +function UnitIsDeadOrGhost(unit) return true end + +---@param unit string +---@return boolean +function UnitIsDND(unit) return true end + +---@param unit string +---@return boolean +function UnitIsEnemy(unit) return true end + +---@param unit string +---@return boolean +function UnitIsFeignDeath(unit) return true end + +---@param unit string +---@return boolean +function UnitIsFriend(unit) return true end + +---@param unit string +---@return boolean +function UnitIsGhost(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPVP(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPVPFreeForAll(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPVPSanctuary(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPartyLeader(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPlayer(unit) return true end + +---@param unit string +---@return boolean +function UnitIsPossessed(unit) return true end + +---@param unit string +---@return boolean +function UnitIsRaidOfficer(unit) return true end + +---@param unit string +---@return boolean +function UnitIsSameServer(unit) return true end + +---@param unit string +---@return boolean +function UnitIsTapped(unit) return true end + +---@param unit string +---@return boolean +function UnitIsTappedByPlayer(unit) return true end + +---@param unit string +---@return boolean +function UnitIsTappedByAllThreatList(unit) return true end + +---@param unit string +---@return boolean +function UnitIsTrivial(unit) return true end + +---@param unit1 string +---@param unit2 string +---@return boolean +function UnitIsUnit(unit1, unit2) return true end + +---@param unit string +---@return boolean +function UnitIsVisible(unit) return true end + +---@param unit string +---@return number +function UnitLevel(unit) return 0 end + +---@param unit string +---@return number +function UnitMana(unit) return 0 end + +---@param unit string +---@return number +function UnitManaMax(unit) return 0 end + +---@param unit string +---@return string +function UnitName(unit) return "" end + +---@param unit string +---@return boolean +function UnitOnTaxi(unit) return true end + +---@param unit string +---@return boolean +function UnitPlayerControlled(unit) return true end + +---@param unit string +---@return boolean +function UnitPlayerOrPetInParty(unit) return true end + +---@param unit string +---@return boolean +function UnitPlayerOrPetInRaid(unit) return true end + +---@param unit string +---@return string +function UnitPVPName(unit) return "" end + +---@param unit string +---@return number +function UnitPVPRank(unit) return 0 end + +---@param unit string +---@param powerType number +---@return number +function UnitPower(unit, powerType) return 0 end + +---@param unit string +---@param powerType number +---@return number +function UnitPowerMax(unit, powerType) return 0 end + +---@param unit string +---@param powerType number +---@return number +function UnitPowerType(unit, powerType) return 0 end + +---@param unit string +---@return string +function UnitRace(unit) return "" end + +---@param unit string +function UnitRangedAttack(unit) end + +---@param unit string +---@return number +function UnitRangedAttackPower(unit) return 0 end + +---@param unit string +---@return number, number +function UnitRangedDamage(unit) return 0, 0 end + +---@param unit string +---@param otherUnit string +---@return number +function UnitReaction(unit, otherUnit) return 0 end + +---@param unit string +---@param school number +---@return number +function UnitResistance(unit, school) return 0 end + +---@param unit string +---@return number, number, number, number +function UnitSelectionColor(unit) return 0, 0, 0, 0 end + +---@param unit string +---@return number +function UnitSex(unit) return 0 end + +---@param unit string +---@param index number +---@return number +function UnitStat(unit, index) return 0 end + +---@param unit string +---@param mobUnit string +---@return number, string, number, number, number +function UnitThreatSituation(unit, mobUnit) return 0, "", 0, 0, 0 end + +---@param unit string +---@return boolean +function UnitUsingVehicle(unit) return true end + +---@param status number +---@return number, number, number +function GetThreatStatusColor(status) return 0, 0, 0 end + +---@param unit string +---@return number +function UnitXP(unit) return 0 end + +---@param unit string +---@return number +function UnitXPMax(unit) return 0 end + +---@param frame table +---@param texture string +function SetPortraitTexture(frame, texture) end + +---@param frame table +---@param texture string +function SetPortraitToTexture(frame, texture) end + +---@param table table +---@param value any +function tinsert(table, value) end diff --git a/boot.lua b/boot.lua index 7451c751..68177c37 100644 --- a/boot.lua +++ b/boot.lua @@ -18,8 +18,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12294 - Details.alpha_build_counter = 12294 --if this is higher than the regular counter, use it instead + Details.build_counter = 12307 + Details.alpha_build_counter = 12307 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter @@ -158,9 +158,16 @@ do --change logs --[=[ + --]=] local news = { + {"v10.2.5.12307.155", "February 13th, 2024"}, + "Fixed the deaths display, where the windows wasn't usig custom text scripts.", + "Fixed an issue with custom displays, where it was unable to use class colors in their texts.", + "More development and bug fixes on the new Mythic+ Run Completion panel.", + "Framework Update.", + {"v10.2.5.12294.155", "February 08th, 2024"}, "General fixes applied to the Mythic+ Panel.", "The Mythic+ section in the options panel can now be translated.", diff --git a/classes/class_custom.lua b/classes/class_custom.lua index a410b1c4..066a433d 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -2,6 +2,7 @@ local _ = nil _detalhes.custom_function_cache = {} local addonName, Details222 = ... + local Details = _detalhes ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --local pointers @@ -11,17 +12,17 @@ local tinsert = table.insert local ipairs = ipairs local unpack = table.unpack or unpack - local _GetSpellInfo = _detalhes.getspellinfo + local _GetSpellInfo = Details.getspellinfo local IsInRaid = IsInRaid local IsInGroup = IsInGroup - local stringReplace = _detalhes.string.replace + local stringReplace = Details.string.replace local Loc = LibStub("AceLocale-3.0"):GetLocale("Details") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --constants - local classCustom = _detalhes.atributo_custom + local classCustom = Details.atributo_custom classCustom.mt = {__index = classCustom} local combatContainers = { @@ -35,7 +36,7 @@ classCustom._InstanceLastCombatShown = {} classCustom._TargetActorsProcessed = {} - local ToKFunctions = _detalhes.ToKFunctions + local ToKFunctions = Details.ToKFunctions local SelectedToKFunction = ToKFunctions[1] local UsingCustomRightText = false local UsingCustomLeftText = false @@ -86,25 +87,25 @@ local func local scriptTypeName = "search" - if (_detalhes.custom_function_cache [instanceObject.customName]) then - func = _detalhes.custom_function_cache [instanceObject.customName] + if (Details.custom_function_cache [instanceObject.customName]) then + func = Details.custom_function_cache [instanceObject.customName] else local errortext func, errortext = loadstring (customObject.script) if (func) then DetailsFramework:SetEnvironment(func) - _detalhes.custom_function_cache [instanceObject.customName] = func + Details.custom_function_cache [instanceObject.customName] = func else - _detalhes:Msg("|cFFFF9900error compiling code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) + Details:Msg("|cFFFF9900error compiling code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) end if (customObject.tooltip) then local tooltip_script, errortext = loadstring (customObject.tooltip) if (tooltip_script) then DetailsFramework:SetEnvironment(tooltip_script) - _detalhes.custom_function_cache [instanceObject.customName .. "Tooltip"] = tooltip_script + Details.custom_function_cache [instanceObject.customName .. "Tooltip"] = tooltip_script else - _detalhes:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) + Details:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) end scriptTypeName = "tooltip" end @@ -113,9 +114,9 @@ local total_script, errortext = loadstring (customObject.total_script) if (total_script) then DetailsFramework:SetEnvironment(total_script) - _detalhes.custom_function_cache [instanceObject.customName .. "Total"] = total_script + Details.custom_function_cache [instanceObject.customName .. "Total"] = total_script else - _detalhes:Msg("|cFFFF9900error compiling total code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) + Details:Msg("|cFFFF9900error compiling total code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) end scriptTypeName = "total" end @@ -124,24 +125,24 @@ local percent_script, errortext = loadstring (customObject.percent_script) if (percent_script) then DetailsFramework:SetEnvironment(percent_script) - _detalhes.custom_function_cache [instanceObject.customName .. "Percent"] = percent_script + Details.custom_function_cache [instanceObject.customName .. "Percent"] = percent_script else - _detalhes:Msg("|cFFFF9900error compiling percent code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) + Details:Msg("|cFFFF9900error compiling percent code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext) end scriptTypeName = "percent" end end if (not func) then - _detalhes:Msg(Loc ["STRING_CUSTOM_FUNC_INVALID"], func) - _detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) + Details:Msg(Loc ["STRING_CUSTOM_FUNC_INVALID"], func) + Details:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) end local okey, _total, _top, _amount = pcall (func, combatObject, instance_container, instanceObject) if (not okey) then local errorText = _total - _detalhes:Msg("|cFFFF9900error on display " .. customObject:GetName() .. " (" .. scriptTypeName .. ")|r:", errorText) - return _detalhes:EndRefresh(instanceObject, 0, combatObject, combatObject[1]) + Details:Msg("|cFFFF9900error on display " .. customObject:GetName() .. " (" .. scriptTypeName .. ")|r:", errorText) + return Details:EndRefresh(instanceObject, 0, combatObject, combatObject[1]) end total = _total or 0 @@ -178,7 +179,7 @@ end end instanceObject:EsconderScrollBar() - return _detalhes:EndRefresh (instanceObject, total, combatObject, nil) + return Details:EndRefresh (instanceObject, total, combatObject, nil) end if (amount > #instance_container._ActorTable) then @@ -195,8 +196,8 @@ -- key name value need to be formated if (customObject) then - local percent_script = _detalhes.custom_function_cache [instanceObject.customName .. "Percent"] - local total_script = _detalhes.custom_function_cache [instanceObject.customName .. "Total"] + local percent_script = Details.custom_function_cache [instanceObject.customName .. "Percent"] + local total_script = Details.custom_function_cache [instanceObject.customName .. "Total"] local okey for index, actor in ipairs(instance_container._ActorTable) do @@ -206,8 +207,8 @@ if (percent_script) then okey, percent = pcall (percent_script, floor(actor.value), top, total, combatObject, instanceObject, actor) if (not okey) then - _detalhes:Msg("|cFFFF9900percent script error|r:", percent) - return _detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) + Details:Msg("|cFFFF9900percent script error|r:", percent) + return Details:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) end else percent = format ("%.1f", floor(actor.value) / total * 100) @@ -216,8 +217,8 @@ if (total_script) then local okey, value = pcall (total_script, floor(actor.value), top, total, combatObject, instanceObject, actor) if (not okey) then - _detalhes:Msg("|cFFFF9900total script error|r:", value) - return _detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) + Details:Msg("|cFFFF9900total script error|r:", value) + return Details:EndRefresh (instanceObject, 0, combatObject, combatObject [1]) end if (type(value) == "number") then @@ -252,7 +253,7 @@ classCustom:Refresh (instanceObject, instance_container, combatObject, force, total, top, customObject) - return _detalhes:EndRefresh (instanceObject, total, combatObject, combatObject [container_index]) + return Details:EndRefresh (instanceObject, total, combatObject, combatObject [container_index]) end @@ -288,11 +289,11 @@ elseif (source == "[raid]") then - if (_detalhes.in_combat and instance.segmento == 0 and not export) then + if (Details.in_combat and instance.segmento == 0 and not export) then if (container_index == 1) then - combat_container = _detalhes.cache_damage_group + combat_container = Details.cache_damage_group elseif (container_index == 2) then - combat_container = _detalhes.cache_healing_group + combat_container = Details.cache_healing_group end end @@ -319,7 +320,7 @@ end elseif (source == "[player]") then - local pindex = combat [container_index]._NameIndexTable [_detalhes.playername] + local pindex = combat [container_index]._NameIndexTable [Details.playername] if (pindex) then local actor = combat [container_index]._ActorTable [pindex] local actortotal = func (_, actor, source, target, spellid, combat, instance_container) @@ -379,8 +380,8 @@ end end - local percent_script = _detalhes.custom_function_cache [instance.customName .. "Percent"] - local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"] + local percent_script = Details.custom_function_cache [instance.customName .. "Percent"] + local total_script = Details.custom_function_cache [instance.customName .. "Total"] local bars_show_data = instance.row_info.textR_show_data local bars_brackets = instance:GetBarBracket() @@ -399,7 +400,7 @@ local row1 = barContainer [1] row1.minha_tabela = nil row1.lineText1:SetText(Loc ["STRING_TOTAL"]) - row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combatElapsedTime) .. ")") + row1.lineText4:SetText(Details:ToK2 (total) .. " (" .. Details:ToK (total / combatElapsedTime) .. ")") row1:SetValue(100) local r, g, b = unpack(instance.total_bar.color) @@ -435,7 +436,7 @@ local row1 = barContainer [1] row1.minha_tabela = nil row1.lineText1:SetText(Loc ["STRING_TOTAL"]) - row1.lineText4:SetText(_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combatElapsedTime) .. ")") + row1.lineText4:SetText(Details:ToK2 (total) .. " (" .. Details:ToK (total / combatElapsedTime) .. ")") row1:SetValue(100) local r, g, b = unpack(instance.total_bar.color) @@ -493,8 +494,8 @@ --local value, top, total, combat, instance = ... okey, percent = pcall (percent_script, self.value, top, total, combat, instance, self) if (not okey) then - _detalhes:Msg("|cFFFF9900error on custom display function|r:", percent) - return _detalhes:EndRefresh (instance, 0, combat, combat [1]) + Details:Msg("|cFFFF9900error on custom display function|r:", percent) + return Details:EndRefresh (instance, 0, combat, combat [1]) end else if (percentage_type == 1) then @@ -512,8 +513,8 @@ if (total_script) then local okey, value = pcall (total_script, self.value, top, total, combat, instance, self) if (not okey) then - _detalhes:Msg("|cFFFF9900error on custom display function|r:", value) - return _detalhes:EndRefresh (instance, 0, combat, combat [1]) + Details:Msg("|cFFFF9900error on custom display function|r:", value) + return Details:EndRefresh (instance, 0, combat, combat [1]) end if (instance.use_multi_fontstrings) then @@ -554,7 +555,7 @@ -- update tooltip function -- if (self.id) then - local school = _detalhes.spell_school_cache[self.nome] + local school = Details.spell_school_cache[self.nome] if (school) then local schoolColor = Details.spells_school[school] if (not schoolColor) then @@ -611,7 +612,7 @@ esta_barra.last_value = esta_porcentagem --reseta o ultimo valor da barra - if (_detalhes.is_using_row_animations and forcar) then + if (Details.is_using_row_animations and forcar) then esta_barra.tem_animacao = 0 esta_barra:SetScript("OnUpdate", nil) end @@ -620,7 +621,7 @@ elseif (esta_porcentagem ~= esta_barra.last_value) then --continua mostrando a mesma tabela ent�o compara a porcentagem --apenas atualizar - if (_detalhes.is_using_row_animations) then + if (Details.is_using_row_animations) then local upRow = barras_container [whichRowLine-1] if (upRow) then @@ -641,14 +642,14 @@ end end - function classCustom:RefreshBarra(esta_barra, instancia, from_resize) + function classCustom:RefreshBarra(thisBar, instanceObject, bFromResize) local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally - if (from_resize) then + if (bFromResize) then if (self.id) then - local school = _detalhes.spell_school_cache[self.nome] - if (school) then - local schoolColor = Details.spells_school[school] + local schoolData = Details.spell_school_cache[self.nome] + if (schoolData) then + local schoolColor = Details.spells_school[schoolData] if (not schoolColor) then schoolColor = Details.spells_school[1] end @@ -662,64 +663,64 @@ end end - _detalhes:SetBarColors(esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b) + self:SetBarColors(thisBar, instanceObject, actor_class_color_r, actor_class_color_g, actor_class_color_b) --we need a customized icon settings for custom displays. if (self.classe == "UNKNOW") then - esta_barra.icone_classe:SetTexture("Interface\\LFGFRAME\\LFGROLE_BW") - esta_barra.icone_classe:SetTexCoord(.25, .5, 0, 1) - esta_barra.icone_classe:SetVertexColor(1, 1, 1) + thisBar.icone_classe:SetTexture("Interface\\LFGFRAME\\LFGROLE_BW") + thisBar.icone_classe:SetTexCoord(.25, .5, 0, 1) + thisBar.icone_classe:SetVertexColor(1, 1, 1) elseif (self.classe == "UNGROUPPLAYER") then if (self.enemy) then - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord(0, 1, 0, 1) + if (Details.faction_against == "Horde") then + thisBar.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Orc_Male") + thisBar.icone_classe:SetTexCoord(0, 1, 0, 1) else - esta_barra.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord(0, 1, 0, 1) + thisBar.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Human_Male") + thisBar.icone_classe:SetTexCoord(0, 1, 0, 1) end else - if (_detalhes.faction_against == "Horde") then - esta_barra.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Human_Male") - esta_barra.icone_classe:SetTexCoord(0, 1, 0, 1) + if (Details.faction_against == "Horde") then + thisBar.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Human_Male") + thisBar.icone_classe:SetTexCoord(0, 1, 0, 1) else - esta_barra.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Orc_Male") - esta_barra.icone_classe:SetTexCoord(0, 1, 0, 1) + thisBar.icone_classe:SetTexture("Interface\\ICONS\\Achievement_Character_Orc_Male") + thisBar.icone_classe:SetTexCoord(0, 1, 0, 1) end end - esta_barra.icone_classe:SetVertexColor(1, 1, 1) + thisBar.icone_classe:SetVertexColor(1, 1, 1) elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord(0.25, 0.49609375, 0.75, 1) - esta_barra.icone_classe:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b) + thisBar.icone_classe:SetTexture(instanceObject.row_info.icon_file) + thisBar.icone_classe:SetTexCoord(0.25, 0.49609375, 0.75, 1) + thisBar.icone_classe:SetVertexColor(actor_class_color_r, actor_class_color_g, actor_class_color_b) else if (self.id) then - esta_barra.icone_classe:SetTexCoord(0.078125, 0.921875, 0.078125, 0.921875) - esta_barra.icone_classe:SetTexture(self.icon) + thisBar.icone_classe:SetTexCoord(0.078125, 0.921875, 0.078125, 0.921875) + thisBar.icone_classe:SetTexture(self.icon) else - if (instancia.row_info.use_spec_icons) then + if (instanceObject.row_info.use_spec_icons) then if ((self.spec and self.spec ~= 0) or (self.my_actor.spec and self.my_actor.spec ~= 0)) then - esta_barra.icone_classe:SetTexture(instancia.row_info.spec_file) - esta_barra.icone_classe:SetTexCoord(unpack(_detalhes.class_specs_coords[self.spec or self.my_actor.spec])) + thisBar.icone_classe:SetTexture(instanceObject.row_info.spec_file) + thisBar.icone_classe:SetTexCoord(unpack(Details.class_specs_coords[self.spec or self.my_actor.spec])) else - esta_barra.icone_classe:SetTexture([[Interface\AddOns\Details\images\classes_small]]) - esta_barra.icone_classe:SetTexCoord(unpack(Details.class_coords[self.classe])) + thisBar.icone_classe:SetTexture([[Interface\AddOns\Details\images\classes_small]]) + thisBar.icone_classe:SetTexCoord(unpack(Details.class_coords[self.classe])) end else - esta_barra.icone_classe:SetTexture(instancia.row_info.icon_file) - esta_barra.icone_classe:SetTexCoord(unpack(Details.class_coords[self.classe])) + thisBar.icone_classe:SetTexture(instanceObject.row_info.icon_file) + thisBar.icone_classe:SetTexCoord(unpack(Details.class_coords[self.classe])) end end - esta_barra.icone_classe:SetVertexColor(1, 1, 1) + thisBar.icone_classe:SetVertexColor(1, 1, 1) end --left text - self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText) + self:SetBarLeftText(thisBar, instanceObject, enemy, arena_enemy, arena_ally, UsingCustomLeftText) - esta_barra.lineText1:SetSize(esta_barra:GetWidth() - esta_barra.lineText4:GetStringWidth() - 20, 15) + thisBar.lineText1:SetSize(thisBar:GetWidth() - thisBar.lineText4:GetStringWidth() - 20, 15) end @@ -829,7 +830,7 @@ end if (class == "UNKNOW") then --try once again - class = _detalhes:GetClass(actor.nome or actor.name) + class = Details:GetClass(actor.nome or actor.name) if (class and class ~= "UNKNOW") then actor.classe = class end @@ -839,7 +840,7 @@ local newActor = setmetatable({ nome = actor.nome or actor.name, classe = class, - value = _detalhes:GetOrderNumber(), + value = Details:GetOrderNumber(), is_custom = true, color = actor.color, }, classCustom.mt) @@ -847,7 +848,7 @@ newActor.customColor = actor.customColor newActor.name_complement = name_complement - newActor.displayName = actor.displayName or (_detalhes:GetOnlyName(newActor.nome) .. (name_complement or "")) + newActor.displayName = actor.displayName or (Details:GetOnlyName(newActor.nome) .. (name_complement or "")) newActor:SetSpecId(actor.spec) @@ -935,19 +936,19 @@ local actorObject = self.my_actor if (actorObject.id) then - _detalhes:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actorObject.id)), "yellow", 1, select(3, _GetSpellInfo(actorObject.id)), 0.90625, 0.109375, 0.15625, 0.875, false, 18) + Details:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actorObject.id)), "yellow", 1, select(3, _GetSpellInfo(actorObject.id)), 0.90625, 0.109375, 0.15625, 0.875, false, 18) else - _detalhes:AddTooltipSpellHeaderText (customObject:GetName(), "yellow", 1, customObject:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875, false, 18) + Details:AddTooltipSpellHeaderText (customObject:GetName(), "yellow", 1, customObject:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875, false, 18) end - _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6) + Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.6) if (customObject:IsScripted()) then if (customObject.tooltip) then - local func = _detalhes.custom_function_cache [instanceObject.customName .. "Tooltip"] + local func = Details.custom_function_cache [instanceObject.customName .. "Tooltip"] local okey, errortext = pcall(func, actorObject, instanceObject.showing, instanceObject, keydown) if (not okey) then - _detalhes:Msg("|cFFFF9900error on custom display tooltip function|r:", errortext) + Details:Msg("|cFFFF9900error on custom display tooltip function|r:", errortext) return false end end @@ -1044,14 +1045,14 @@ function classCustom:RemoveCustom (index) - if (not _detalhes.tabela_instancias) then + if (not Details.tabela_instancias) then --do not remove customs while the addon is loading. return end - table.remove (_detalhes.custom, index) + table.remove (Details.custom, index) - for _, instance in ipairs(_detalhes.tabela_instancias) do + for _, instance in ipairs(Details.tabela_instancias) do if (instance.atributo == 5 and instance.sub_atributo == index) then instance:ResetAttribute() elseif (instance.atributo == 5 and instance.sub_atributo > index) then @@ -1062,33 +1063,33 @@ end end - _detalhes.switch:OnRemoveCustom (index) + Details.switch:OnRemoveCustom (index) end --export for plugins - function _detalhes:RemoveCustomObject (object_name) - for index, object in ipairs(_detalhes.custom) do + function Details:RemoveCustomObject (object_name) + for index, object in ipairs(Details.custom) do if (object.name == object_name) then return classCustom:RemoveCustom (index) end end end - function _detalhes:ResetCustomFunctionsCache() - Details:Destroy(_detalhes.custom_function_cache) + function Details:ResetCustomFunctionsCache() + Details:Destroy(Details.custom_function_cache) end - function _detalhes.refresh:r_atributo_custom() + function Details.refresh:r_atributo_custom() --check for non used temp displays - if (_detalhes.tabela_instancias) then + if (Details.tabela_instancias) then - for i = #_detalhes.custom, 1, -1 do - local custom_object = _detalhes.custom [i] + for i = #Details.custom, 1, -1 do + local custom_object = Details.custom [i] if (custom_object.temp) then --check if there is a instance showing this custom local showing = false - for index, instance in ipairs(_detalhes.tabela_instancias) do + for index, instance in ipairs(Details.tabela_instancias) do if (instance.atributo == 5 and instance.sub_atributo == i) then showing = true end @@ -1102,37 +1103,37 @@ end --restore metatable and indexes - for index, custom_object in ipairs(_detalhes.custom) do + for index, custom_object in ipairs(Details.custom) do setmetatable(custom_object, classCustom) custom_object.__index = classCustom end end - function _detalhes.clear:c_atributo_custom() - for _, custom_object in ipairs(_detalhes.custom) do + function Details.clear:c_atributo_custom() + for _, custom_object in ipairs(Details.custom) do custom_object.__index = nil end end function classCustom:UpdateSelectedToKFunction() - SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation] - FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation] - TooltipMaximizedMethod = _detalhes.tooltip.maximize_method + SelectedToKFunction = ToKFunctions [Details.ps_abbreviation] + FormatTooltipNumber = ToKFunctions [Details.tooltip.abbreviation] + TooltipMaximizedMethod = Details.tooltip.maximize_method classCustom:UpdateDamageDoneBracket() classCustom:UpdateHealingDoneBracket() end - function _detalhes:InstallCustomObject (object) + function Details:InstallCustomObject (object) local have = false if (object.script_version) then - for _, custom in ipairs(_detalhes.custom) do + for _, custom in ipairs(Details.custom) do if (custom.name == object.name and (custom.script_version and custom.script_version >= object.script_version) ) then have = true break end end else - for _, custom in ipairs(_detalhes.custom) do + for _, custom in ipairs(Details.custom) do if (custom.name == object.name) then have = true break @@ -1141,27 +1142,27 @@ end if (not have) then - for i, custom in ipairs(_detalhes.custom) do + for i, custom in ipairs(Details.custom) do if (custom.name == object.name) then - table.remove (_detalhes.custom, i) + table.remove (Details.custom, i) break end end - setmetatable(object, _detalhes.atributo_custom) - object.__index = _detalhes.atributo_custom - _detalhes.custom [#_detalhes.custom+1] = object + setmetatable(object, Details.atributo_custom) + object.__index = Details.atributo_custom + Details.custom [#Details.custom+1] = object end end function Details222.GetCustomDisplayIDByName(customDisplayName) - for customDisplayID, customObject in ipairs(_detalhes.custom) do + for customDisplayID, customObject in ipairs(Details.custom) do if (customObject.name == customDisplayName) then return customDisplayID end end end - function _detalhes:AddDefaultCustomDisplays() + function Details:AddDefaultCustomDisplays() local PotionUsed = { name = Loc ["STRING_CUSTOM_POT_DEFAULT"], icon = [[Interface\ICONS\INV_Potion_03]], @@ -1280,8 +1281,8 @@ table.remove (self.custom, i) end end - setmetatable(PotionUsed, _detalhes.atributo_custom) - PotionUsed.__index = _detalhes.atributo_custom + setmetatable(PotionUsed, Details.atributo_custom) + PotionUsed.__index = Details.atributo_custom self.custom [#self.custom+1] = PotionUsed end @@ -1366,8 +1367,8 @@ table.remove (self.custom, i) end end - setmetatable(Healthstone, _detalhes.atributo_custom) - Healthstone.__index = _detalhes.atributo_custom + setmetatable(Healthstone, Details.atributo_custom) + Healthstone.__index = Details.atributo_custom self.custom [#self.custom+1] = Healthstone end @@ -1430,8 +1431,8 @@ table.remove (self.custom, i) end end - setmetatable(DamageActivityTime, _detalhes.atributo_custom) - DamageActivityTime.__index = _detalhes.atributo_custom + setmetatable(DamageActivityTime, Details.atributo_custom) + DamageActivityTime.__index = Details.atributo_custom self.custom [#self.custom+1] = DamageActivityTime end @@ -1492,8 +1493,8 @@ table.remove (self.custom, i) end end - setmetatable(HealActivityTime, _detalhes.atributo_custom) - HealActivityTime.__index = _detalhes.atributo_custom + setmetatable(HealActivityTime, Details.atributo_custom) + HealActivityTime.__index = Details.atributo_custom self.custom [#self.custom+1] = HealActivityTime end @@ -1588,8 +1589,8 @@ end end if (not have) then - setmetatable(CC_Done, _detalhes.atributo_custom) - CC_Done.__index = _detalhes.atributo_custom + setmetatable(CC_Done, Details.atributo_custom) + CC_Done.__index = Details.atributo_custom for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_CC_DONE"]) then @@ -1722,8 +1723,8 @@ end end if (not have) then - setmetatable(CC_Received, _detalhes.atributo_custom) - CC_Received.__index = _detalhes.atributo_custom + setmetatable(CC_Received, Details.atributo_custom) + CC_Received.__index = Details.atributo_custom for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_CC_RECEIVED"]) then @@ -1982,8 +1983,8 @@ end end if (not have) then - setmetatable(MySpells, _detalhes.atributo_custom) - MySpells.__index = _detalhes.atributo_custom + setmetatable(MySpells, Details.atributo_custom) + MySpells.__index = Details.atributo_custom for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_MYSPELLS"]) then @@ -2074,8 +2075,8 @@ end end if (not have) then - setmetatable(DamageOnSkullTarget, _detalhes.atributo_custom) - DamageOnSkullTarget.__index = _detalhes.atributo_custom + setmetatable(DamageOnSkullTarget, Details.atributo_custom) + DamageOnSkullTarget.__index = Details.atributo_custom for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSKULL"]) then @@ -2204,8 +2205,8 @@ end end if (not have) then - setmetatable(DamageOnAnyTarget, _detalhes.atributo_custom) - DamageOnAnyTarget.__index = _detalhes.atributo_custom + setmetatable(DamageOnAnyTarget, Details.atributo_custom) + DamageOnAnyTarget.__index = Details.atributo_custom for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET"]) then @@ -2390,8 +2391,8 @@ table.remove (self.custom, i) end end - setmetatable(DynamicOverallDamage, _detalhes.atributo_custom) - DynamicOverallDamage.__index = _detalhes.atributo_custom + setmetatable(DynamicOverallDamage, Details.atributo_custom) + DynamicOverallDamage.__index = Details.atributo_custom self.custom [#self.custom+1] = DynamicOverallDamage end @@ -2491,13 +2492,13 @@ table.remove (self.custom, i) end end - setmetatable(DamageOnShields, _detalhes.atributo_custom) - DamageOnShields.__index = _detalhes.atributo_custom + setmetatable(DamageOnShields, Details.atributo_custom) + DamageOnShields.__index = Details.atributo_custom self.custom [#self.custom+1] = DamageOnShields end --------------------------------------- - _detalhes:ResetCustomFunctionsCache() + Details:ResetCustomFunctionsCache() end diff --git a/classes/class_damage.lua b/classes/class_damage.lua index 0cf437c4..3a5f6db0 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -327,8 +327,18 @@ function Details.Sort4Reverse(table1, table2) --[[exported]] return table1[4] < table2[4] end -function Details:GetTextColor(instanceObject, actorObject) - if (instanceObject.row_info.textL_class_colors) then +function Details:GetTextColor(instanceObject, textSide) + local actorObject = self + textSide = textSide or "left" + + local bUseClassColor = false + if (textSide == "left") then + bUseClassColor = instanceObject.row_info.textL_class_colors + elseif (textSide == "right") then + bUseClassColor = instanceObject.row_info.textR_class_colors + end + + if (bUseClassColor) then return unpack(Details.class_colors[actorObject.classe or "UNKNOW"]) else return unpack(instanceObject.row_info.fixed_text_color) @@ -3179,9 +3189,12 @@ function Details:SetBarLeftText(bar, instance, enemy, arenaEnemy, arenaAlly, usi barNumber = bar.colocacao .. ". " end - --translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019) if (instance.row_info.textL_translit_text) then - self.displayName = Translit:Transliterate(self.displayName, "!") + if (not self.transliteratedName) then + --translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019) + self.transliteratedName = Translit:Transliterate(self.displayName, "!") + end + self.displayName = self.transliteratedName or self.displayName end if (enemy) then @@ -3282,12 +3295,12 @@ function Details:SetBarColors(bar, instance, r, g, b, a) --[[exported]] --~color end if (instance.row_info.textL_class_colors) then - local textColor_Red, textColor_Green, textColor_Blue = Details:GetTextColor(instance, self) + local textColor_Red, textColor_Green, textColor_Blue = self:GetTextColor(instance, "left") bar.lineText1:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) --the r, g, b color passed are the color used on the bar, so if the bar is not using class color, the text is painted with the fixed color for the bar end if (instance.row_info.textR_class_colors) then - local textColor_Red, textColor_Green, textColor_Blue = Details:GetTextColor(instance, self) + local textColor_Red, textColor_Green, textColor_Blue = self:GetTextColor(instance, "right") bar.lineText2:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) bar.lineText3:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) bar.lineText4:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) diff --git a/classes/class_heal.lua b/classes/class_heal.lua index cea2aaf3..6baffba1 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -1372,15 +1372,14 @@ function healingClass:ToolTip_HealingDone (instancia, numero, barra, keydown) --TOP Curados ActorSkillsContainer = self.targets - for target_name, amount in pairs(ActorSkillsContainer) do + for targetName, amount in pairs(ActorSkillsContainer) do if (amount > 0) then - --translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019) if (instancia.row_info.textL_translit_text) then - target_name = Translit:Transliterate(target_name, "!") + targetName = Translit:Transliterate(targetName, "!") end - tinsert(ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100}) + tinsert(ActorHealingTargets, {targetName, amount, amount / ActorTotal * 100}) end end _table_sort (ActorHealingTargets, _detalhes.Sort2) diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 7067d229..a6153e73 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -574,55 +574,85 @@ function atributo_misc:ReportSingleDebuffUptimeLine (misc_actor, instance) return _detalhes:Reportar (report_table, {_no_current = true, _no_inverse = true, _custom = true}) end +---index[1] is the death log +---index[2] is the death time +---index[3] is the name of the player +---index[4] is the class of the player +---index[5] is the max health +---index[6] is the time of the fight as string +---@field death boolean +---@field last_cooldown table +---@field dead_at number --combat time when the player died +---@field spec number + ---update a row in an instance (window) showing death logs ----@param morte table +---@param deathTable table ---@param whichRowLine number ---@param rankPosition number ----@param instance table -function atributo_misc:UpdateDeathRow(morte, whichRowLine, rankPosition, instance) --todo: change this function name - morte["dead"] = true - local thisRow = instance.barras[whichRowLine] +---@param instanceObject table +function atributo_misc:UpdateDeathRow(deathTable, whichRowLine, rankPosition, instanceObject) --todo: change this function name + local playerName, playerClass, deathTime, deathCombatTime, deathTimeString, playerMaxHealth, deathEvents, lastCooldown, spec = Details:UnpackDeathTable(deathTable) + + deathTable["dead"] = true + local thisRow = instanceObject.barras[whichRowLine] if (not thisRow) then print("DEBUG: problema com "..whichRowLine.." "..rankPosition) return end - thisRow.minha_tabela = morte + thisRow.minha_tabela = deathTable - morte.nome = morte[3] --void an issue while resizing the window - morte.minha_barra = whichRowLine + deathTable.nome = playerName + deathTable.minha_barra = whichRowLine thisRow.colocacao = rankPosition - if (not getmetatable(morte)) then - setmetatable(morte, {__call = RefreshBarraMorte}) - morte._custom = true + if (not getmetatable(deathTable)) then + setmetatable(deathTable, {__call = RefreshBarraMorte}) + deathTable._custom = true + end + + local bUseCustomLeftText = instanceObject.row_info.textL_enable_custom_text + + local actorObject = instanceObject:GetCombat():GetContainer(DETAILS_ATTRIBUTE_MISC):GetActor(playerName) + if (actorObject) then + actorObject:SetBarLeftText(thisRow, instanceObject, false, false, false, bUseCustomLeftText) + else + Details:SetBarLeftText(thisRow, instanceObject, false, false, false, bUseCustomLeftText) + end + + if (instanceObject.row_info.textL_class_colors) then + local textColor_Red, textColor_Green, textColor_Blue = actorObject:GetTextColor(instanceObject, "left") + thisRow.lineText1:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) --the r, g, b color passed are the color used on the bar, so if the bar is not using class color, the text is painted with the fixed color for the bar + end + + if (instanceObject.row_info.textR_class_colors) then + local textColor_Red, textColor_Green, textColor_Blue = actorObject:GetTextColor(instanceObject, "right") + thisRow.lineText4:SetTextColor(textColor_Red, textColor_Green, textColor_Blue) --the r, g, b color passed are the color used on the bar, so if the bar is not using class color, the text is painted with the fixed color for the bar end - thisRow.lineText1:SetText(rankPosition .. ". " .. morte[3]:gsub(("%-.*"), "")) thisRow.lineText2:SetText("") thisRow.lineText3:SetText("") - thisRow.lineText4:SetText(morte[6]) + thisRow.lineText4:SetText(deathTimeString) + + local r, g, b, a = actorObject:GetBarColor() + actorObject:SetBarColors(thisRow, instanceObject, r, g, b, a) thisRow:SetValue(100) if (thisRow.hidden or thisRow.fading_in or thisRow.faded) then Details.FadeHandler.Fader(thisRow, "out") end - --seta a cor da barra e a cor do texto caso eles esteja mostrando com a cor da classe - local r, g, b, a = unpack(_detalhes.class_colors[morte[4]]) - _detalhes:SetBarColors(thisRow, instance, r, g, b, a) - - if (instance.row_info.use_spec_icons) then - local nome = morte[3] - local spec = instance.showing (1, nome) and instance.showing (1, nome).spec or (instance.showing (2, nome) and instance.showing (2, nome).spec) + if (instanceObject.row_info.use_spec_icons) then + local nome = deathTable[3] + local spec = instanceObject.showing (1, nome) and instanceObject.showing (1, nome).spec or (instanceObject.showing (2, nome) and instanceObject.showing (2, nome).spec) if (spec and spec ~= 0) then - thisRow.icone_classe:SetTexture(instance.row_info.spec_file) + thisRow.icone_classe:SetTexture(instanceObject.row_info.spec_file) thisRow.icone_classe:SetTexCoord(unpack(_detalhes.class_specs_coords[spec])) else - if (CLASS_ICON_TCOORDS [morte[4]]) then - thisRow.icone_classe:SetTexture(instance.row_info.icon_file) - thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [morte[4]])) + if (CLASS_ICON_TCOORDS [deathTable[4]]) then + thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file) + thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [deathTable[4]])) else local texture, l, r, t, b = Details:GetUnknownClassIcon() thisRow.icone_classe:SetTexture(texture) @@ -630,9 +660,9 @@ function atributo_misc:UpdateDeathRow(morte, whichRowLine, rankPosition, instanc end end else - if (CLASS_ICON_TCOORDS [morte[4]]) then - thisRow.icone_classe:SetTexture(instance.row_info.icon_file) - thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [morte[4]])) + if (CLASS_ICON_TCOORDS [deathTable[4]]) then + thisRow.icone_classe:SetTexture(instanceObject.row_info.icon_file) + thisRow.icone_classe:SetTexCoord(unpack(CLASS_ICON_TCOORDS [deathTable[4]])) else local texture, l, r, t, b = Details:GetUnknownClassIcon() thisRow.icone_classe:SetTexture(texture) @@ -642,8 +672,8 @@ function atributo_misc:UpdateDeathRow(morte, whichRowLine, rankPosition, instanc thisRow.icone_classe:SetVertexColor(1, 1, 1) - if (thisRow.mouse_over and not instance.baseframe.isMoving) then --precisa atualizar o tooltip - gump:UpdateTooltip (whichRowLine, thisRow, instance) + if (thisRow.mouse_over and not instanceObject.baseframe.isMoving) then --precisa atualizar o tooltip + gump:UpdateTooltip (whichRowLine, thisRow, instanceObject) end thisRow.lineText1:SetSize(thisRow:GetWidth() - thisRow.lineText4:GetStringWidth() - 20, 15) diff --git a/core/util.lua b/core/util.lua index db3e230c..26b152b5 100644 --- a/core/util.lua +++ b/core/util.lua @@ -458,17 +458,17 @@ ---@return {key1: unixtime, key2: spellid} ---@return specializationid specId function Details:UnpackDeathTable(deathTable) - local deathevents = deathTable[1] - local deathtime = deathTable[2] - local playername = deathTable[3] - local playerclass = deathTable[4] - local playermaxhealth = deathTable[5] - local deathtimestring = deathTable[6] - local lastcooldown = deathTable.last_cooldown - local deathcombattime = deathTable.dead_at + local deathEvents = deathTable[1] + local deathTime = deathTable[2] + local playerName = deathTable[3] + local playerClass = deathTable[4] + local playerMaxHealth = deathTable[5] + local deathTimeString = deathTable[6] + local lastCooldown = deathTable.last_cooldown + local deathCombatTime = deathTable.dead_at local spec = deathTable.spec - return playername, playerclass, deathtime, deathcombattime, deathtimestring, playermaxhealth, deathevents, lastcooldown, spec + return playerName, playerClass, deathTime, deathCombatTime, deathTimeString, playerMaxHealth, deathEvents, lastCooldown, spec end ---get a random fraction number diff --git a/frames/window_mythicplus/deprecated.lua b/frames/window_mythicplus/deprecated.lua new file mode 100644 index 00000000..b51b8736 --- /dev/null +++ b/frames/window_mythicplus/deprecated.lua @@ -0,0 +1,95 @@ + +--old small window for the end of mythic plus runs + +if (false and Details222.MythicPlus.Level and Details222.MythicPlus.Level < 28 and not Details.user_is_patreon_supporter) then + --create the panel + if (not mythicDungeonFrames.ReadyFrame) then + mythicDungeonFrames.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate") + local readyFrame = mythicDungeonFrames.ReadyFrame + + local textColor = {1, 0.8196, 0, 1} + local textSize = 11 + + local roundedCornerTemplate = { + roundness = 6, + color = {.1, .1, .1, 0.98}, + border_color = {.05, .05, .05, 0.834}, + } + + detailsFramework:AddRoundedCornersToFrame(readyFrame, roundedCornerTemplate) + + local titleLabel = DetailsFramework:CreateLabel(readyFrame, "Details! Mythic Run Completed!", 12, "yellow") + titleLabel:SetPoint("top", readyFrame, "top", 0, -7) + titleLabel.textcolor = textColor + + local closeButton = detailsFramework:CreateCloseButton(readyFrame, "$parentCloseButton") + closeButton:SetPoint("topright", readyFrame, "topright", -2, -2) + closeButton:SetScale(1.4) + closeButton:SetAlpha(0.823) + + readyFrame:SetSize(255, 120) + readyFrame:SetPoint("center", UIParent, "center", 300, 0) + readyFrame:SetFrameStrata("LOW") + readyFrame:EnableMouse(true) + readyFrame:SetMovable(true) + --DetailsFramework:ApplyStandardBackdrop(readyFrame) + --DetailsFramework:CreateTitleBar (readyFrame, "Details! Mythic Run Completed!") + + readyFrame:Hide() + + --register to libwindow + local LibWindow = LibStub("LibWindow-1.1") + LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.finished_run_frame) + LibWindow.RestorePosition(readyFrame) + LibWindow.MakeDraggable(readyFrame) + LibWindow.SavePosition(readyFrame) + + --show button + ---@type df_button + readyFrame.ShowChartButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic") + readyFrame.ShowChartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE")) + readyFrame.ShowChartButton:SetPoint("topleft", readyFrame, "topleft", 5, -30) + readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0) + readyFrame.ShowChartButton.textcolor = textColor + + --disable feature check box (dont show this again) + local on_switch_enable = function(self, _, value) + Details.mythic_plus.show_damage_graphic = not value + end + + local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") + notAgainSwitch:ClearAllPoints() + notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0) + notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5) + notAgainSwitch:SetAsCheckBox() + notAgainLabel.textSize = textSize + + local timeNotInCombatLabel = DetailsFramework:CreateLabel(readyFrame, "Time not in combat:", textSize, "orangered") + timeNotInCombatLabel:SetPoint("bottomleft", notAgainSwitch, "topleft", 0, 7) + local timeNotInCombatAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, "orangered") + timeNotInCombatAmount:SetPoint("left", timeNotInCombatLabel, "left", 130, 0) + + local elapsedTimeLabel = DetailsFramework:CreateLabel(readyFrame, "Run Time:", textSize, textColor) + elapsedTimeLabel:SetPoint("bottomleft", timeNotInCombatLabel, "topleft", 0, 5) + local elapsedTimeAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, textColor) + elapsedTimeAmount:SetPoint("left", elapsedTimeLabel, "left", 130, 0) + + readyFrame.TimeNotInCombatAmountLabel = timeNotInCombatAmount + readyFrame.ElapsedTimeAmountLabel = elapsedTimeAmount + end + + mythicDungeonFrames.ReadyFrame:Show() + + --update the run time and time not in combat + local elapsedTime = Details222.MythicPlus.time or 1507 + mythicDungeonFrames.ReadyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime) + + local overallMythicDungeonCombat = Details:GetCurrentCombat() + if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then + local combatTime = overallMythicDungeonCombat:GetCombatTime() + local notInCombat = elapsedTime - combatTime + mythicDungeonFrames.ReadyFrame.TimeNotInCombatAmountLabel.text = DetailsFramework:IntegerToTimer(notInCombat) .. " (" .. math.floor(notInCombat / elapsedTime * 100) .. "%)" + end + + return +end \ No newline at end of file diff --git a/frames/window_mythicplus/window_end_of_run.lua b/frames/window_mythicplus/window_end_of_run.lua index 82a89322..8da4d6a0 100644 --- a/frames/window_mythicplus/window_end_of_run.lua +++ b/frames/window_mythicplus/window_end_of_run.lua @@ -20,8 +20,8 @@ local mythicDungeonCharts = Details222.MythicPlus.Charts.Listener local mythicDungeonFrames = Details222.MythicPlus.Frames --debug ---_G.DetailsMythicDungeonChartHandler = mythicDungeonCharts - +_G.MythicDungeonFrames = mythicDungeonFrames +--/run _G.MythicDungeonFrames.ShowEndOfMythicPlusPanel(true) local createPlayerBanner = function(parent, name) local template = "ChallengeModeBannerPartyMemberTemplate" @@ -336,100 +336,6 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel(bIsDebug) Details222.MythicPlus.Level = Details222.MythicPlus.Level or 2 end - --feature under development - if (false and Details222.MythicPlus.Level and Details222.MythicPlus.Level < 28 and not Details.user_is_patreon_supporter) then - --create the panel - if (not mythicDungeonFrames.ReadyFrame) then - mythicDungeonFrames.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate") - local readyFrame = mythicDungeonFrames.ReadyFrame - - local textColor = {1, 0.8196, 0, 1} - local textSize = 11 - - local roundedCornerTemplate = { - roundness = 6, - color = {.1, .1, .1, 0.98}, - border_color = {.05, .05, .05, 0.834}, - } - - detailsFramework:AddRoundedCornersToFrame(readyFrame, roundedCornerTemplate) - - local titleLabel = DetailsFramework:CreateLabel(readyFrame, "Details! Mythic Run Completed!", 12, "yellow") - titleLabel:SetPoint("top", readyFrame, "top", 0, -7) - titleLabel.textcolor = textColor - - local closeButton = detailsFramework:CreateCloseButton(readyFrame, "$parentCloseButton") - closeButton:SetPoint("topright", readyFrame, "topright", -2, -2) - closeButton:SetScale(1.4) - closeButton:SetAlpha(0.823) - - readyFrame:SetSize(255, 120) - readyFrame:SetPoint("center", UIParent, "center", 300, 0) - readyFrame:SetFrameStrata("LOW") - readyFrame:EnableMouse(true) - readyFrame:SetMovable(true) - --DetailsFramework:ApplyStandardBackdrop(readyFrame) - --DetailsFramework:CreateTitleBar (readyFrame, "Details! Mythic Run Completed!") - - readyFrame:Hide() - - --register to libwindow - local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.mythicrun_chart_frame_ready) - LibWindow.RestorePosition(readyFrame) - LibWindow.MakeDraggable(readyFrame) - LibWindow.SavePosition(readyFrame) - - --show button - ---@type df_button - readyFrame.ShowChartButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic") - readyFrame.ShowChartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE")) - readyFrame.ShowChartButton:SetPoint("topleft", readyFrame, "topleft", 5, -30) - readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0) - readyFrame.ShowChartButton.textcolor = textColor - - --disable feature check box (dont show this again) - local on_switch_enable = function(self, _, value) - Details.mythic_plus.show_damage_graphic = not value - end - - local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") - notAgainSwitch:ClearAllPoints() - notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0) - notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5) - notAgainSwitch:SetAsCheckBox() - notAgainLabel.textSize = textSize - - local timeNotInCombatLabel = DetailsFramework:CreateLabel(readyFrame, "Time not in combat:", textSize, "orangered") - timeNotInCombatLabel:SetPoint("bottomleft", notAgainSwitch, "topleft", 0, 7) - local timeNotInCombatAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, "orangered") - timeNotInCombatAmount:SetPoint("left", timeNotInCombatLabel, "left", 130, 0) - - local elapsedTimeLabel = DetailsFramework:CreateLabel(readyFrame, "Run Time:", textSize, textColor) - elapsedTimeLabel:SetPoint("bottomleft", timeNotInCombatLabel, "topleft", 0, 5) - local elapsedTimeAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, textColor) - elapsedTimeAmount:SetPoint("left", elapsedTimeLabel, "left", 130, 0) - - readyFrame.TimeNotInCombatAmountLabel = timeNotInCombatAmount - readyFrame.ElapsedTimeAmountLabel = elapsedTimeAmount - end - - mythicDungeonFrames.ReadyFrame:Show() - - --update the run time and time not in combat - local elapsedTime = Details222.MythicPlus.time or 1507 - mythicDungeonFrames.ReadyFrame.ElapsedTimeAmountLabel.text = DetailsFramework:IntegerToTimer(elapsedTime) - - local overallMythicDungeonCombat = Details:GetCurrentCombat() - if (overallMythicDungeonCombat:GetCombatType() == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL) then - local combatTime = overallMythicDungeonCombat:GetCombatTime() - local notInCombat = elapsedTime - combatTime - mythicDungeonFrames.ReadyFrame.TimeNotInCombatAmountLabel.text = DetailsFramework:IntegerToTimer(notInCombat) .. " (" .. math.floor(notInCombat / elapsedTime * 100) .. "%)" - end - - return - end - --create the panel if (not mythicDungeonFrames.ReadyFrame) then mythicDungeonFrames.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate") @@ -457,7 +363,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel(bIsDebug) closeButton:SetAlpha(0.823) readyFrame:SetSize(355, 390) - readyFrame:SetPoint("center", UIParent, "center", 300, 0) + readyFrame:SetPoint("center", UIParent, "center", 350, 0) readyFrame:SetFrameStrata("LOW") readyFrame:EnableMouse(true) readyFrame:SetMovable(true) @@ -465,11 +371,60 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel(bIsDebug) --register to libwindow local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.mythicrun_chart_frame_ready) + LibWindow.RegisterConfig(readyFrame, Details.mythic_plus.finished_run_frame) LibWindow.RestorePosition(readyFrame) LibWindow.MakeDraggable(readyFrame) LibWindow.SavePosition(readyFrame) + --waiting for loot label + local waitingForLootLabel = DetailsFramework:CreateLabel(readyFrame, "Waiting for loot", 12, "silver") + waitingForLootLabel:SetPoint("bottom", readyFrame, "bottom", 0, 54) + waitingForLootLabel:Hide() + local waitingForLootDotsAnimationLabel = DetailsFramework:CreateLabel(readyFrame, "...", 12, "silver") + waitingForLootDotsAnimationLabel:SetPoint("left", waitingForLootLabel, "right", 0, 0) + waitingForLootDotsAnimationLabel:Hide() + + --make a text dot animation, which will show no dots at start and then "." then ".." then "..." and back to "" and so on + function readyFrame.StartTextDotAnimation() + --update the Waiting for Loot labels + waitingForLootLabel:Show() + waitingForLootDotsAnimationLabel:Show() + + local dots = waitingForLootDotsAnimationLabel + local dotsCount = 0 + local maxDots = 3 + local maxLoops = 24 + + local dotsTimer = C_Timer.NewTicker(0.5, function() + dotsCount = dotsCount + 1 + + if (dotsCount > maxDots) then + dotsCount = 0 + end + + local dotsText = "" + for i = 1, dotsCount do + dotsText = dotsText .. "." + end + + dots:SetText(dotsText) + end, maxLoops) + + waitingForLootDotsAnimationLabel.dotsTimer = dotsTimer + end + + function readyFrame.StopTextDotAnimation() + waitingForLootLabel:Hide() + waitingForLootDotsAnimationLabel:Hide() + if (waitingForLootDotsAnimationLabel.dotsTimer) then + waitingForLootDotsAnimationLabel.dotsTimer:Cancel() + end + end + + readyFrame:SetScript("OnHide", function(self) + readyFrame.StopTextDotAnimation() + end) + --warning footer local warningFooter = DetailsFramework:CreateLabel(readyFrame, "Under development.", 9, "yellow") warningFooter:SetPoint("bottom", readyFrame, "bottom", 0, 20) @@ -590,13 +545,14 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel(bIsDebug) --print("equip loc:", itemEquipLoc) if (effectiveILvl > 300) then --avoid showing loot that isn't items - local rarityColor = ITEM_QUALITY_COLORS[itemQuality] lootSquare.LootIconBorder:SetVertexColor(rarityColor.r, rarityColor.g, rarityColor.b, 1) lootSquare.LootIcon:SetTexture(GetItemIcon(itemID)) lootSquare.LootItemLevel:SetText(effectiveILvl or "0") + readyFrame.StopTextDotAnimation() + --print("loot info:", itemLink, effectiveILvl, itemQuality) lootSquare:Show() end @@ -637,11 +593,15 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel(bIsDebug) readyFrame.YouBeatTheTimerLabel = youBeatTheTimerLabel readyFrame.KeystoneUpgradeLabel = keystoneUpgradeLabel readyFrame.RantingLabel = rantingLabel - end + end --end of creating of the readyFrame + + --mythic+ finished, showing the readyFrame for the user local readyFrame = mythicDungeonFrames.ReadyFrame readyFrame:Show() + readyFrame.StartTextDotAnimation() + for i = 1, #readyFrame.PlayerBanners do --hide the lootSquare readyFrame.PlayerBanners[i].LootSquare:Hide() diff --git a/functions/profiles.lua b/functions/profiles.lua index 28153444..bbe2a6c9 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1606,7 +1606,7 @@ local default_global_data = { last_mythicrun_chart = {}, mythicrun_chart_frame = {}, mythicrun_chart_frame_minimized = {}, - mythicrun_chart_frame_ready = {}, + finished_run_frame = {}, --end of mythic+ panel mythicrun_time_type = 1, --1: combat time (the amount of time the player is in combat) 2: run time (the amount of time it took to finish the mythic+ run) }, --implementar esse time_type quando estiver dando refresh na janela @@ -2003,7 +2003,7 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod mythicPlusSettings.last_mythicrun_chart = {} mythicPlusSettings.mythicrun_chart_frame = {} mythicPlusSettings.mythicrun_chart_frame_minimized = {} - mythicPlusSettings.mythicrun_chart_frame_ready = {} + mythicPlusSettings.finished_run_frame = {} --make the max amount of segments be 30 Details.segments_amount = 40