From 72956add4a3a921f3fdf44b006a9c3283ce95c73 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sat, 17 May 2025 17:11:53 +0200 Subject: [PATCH] Add C_NamePlate and WeakAuras modules - Introduced C_NamePlate for nameplate-related functions, including GetNamePlateForUnit and GetNamePlates. - Added WeakAuras module with various utility functions and methods for managing aura conditions and tooltips. --- C_NamePlate.lua | 15 ++++++++++++ WeakAuras.lua | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 C_NamePlate.lua create mode 100644 WeakAuras.lua diff --git a/C_NamePlate.lua b/C_NamePlate.lua new file mode 100644 index 0000000..9b9306f --- /dev/null +++ b/C_NamePlate.lua @@ -0,0 +1,15 @@ +---@meta +--- +--- C_NamePlate is a namespace for functions related to nameplates. +--- +--- @class C_NamePlate +C_NamePlate = { + --- @param unit string + --- @return Frame|nil + --- Returns the nameplate frame for a given unit. + GetNamePlateForUnit = function(unit) end, + + --- @return table + --- Returns a table of all nameplates currently shown. + GetNamePlates = function() end, +} diff --git a/WeakAuras.lua b/WeakAuras.lua new file mode 100644 index 0000000..f8fdb87 --- /dev/null +++ b/WeakAuras.lua @@ -0,0 +1,65 @@ +---@meta + +--- @param unit string +--- @return string +function WA_ClassColorName(unit) end +-- Args: unit (string) +-- Returns: The name of the unit with class color formatting. + +--- @param string string +--- @param numCharacters number +--- @return string +function WA_Utf8Sub(string, numCharacters) end +-- Args: string (string), numCharacters (number) +-- Returns: Shortened string, handling non-standard characters. + +-- Variables + +-- WeakAuras.GetActiveConditions(aura_env.id, aura_env.cloneId) +-- Returns a table containing booleans for each Condition your Aura contains. + +-- WeakAuras.CurrentEncounter +-- A table that holds encounter information for a fight. +-- Access via: id (encounter_id), zone_id (ZoneMapID), boss_guids ({}). + +-- Functions +---@class WeakAuras +WeakAuras = { + --- @param eventName string + --- @param ... any + ScanEvents = function(eventName, ...) end, + --- @return boolean + IsOptionsOpen = function() end, + --- @param setID number + --- @return number + GetNumSetItemsEquipped = function(setID) end, + + --- @param unit string + --- @param index number + --- @param filter string + --- @return string, string, number + GetAuraTooltipInfo = function(unit, index, filter) end, +} + +-- Custom Glows +local LCG = LibStub("LibCustomGlow-1.0") + +--- @param frame any +--- @param color table +--- @param numberOfLines number +--- @param speed number +--- @param length number +--- @param thickness number +--- @param xOffset number +--- @param yOffset number +--- @param border boolean +--- @param key string +function LCG.PixelGlow_Start(frame, color, numberOfLines, speed, length, thickness, xOffset, yOffset, border, key) end +-- Args: frame (UI element), color (table), numberOfLines (number), speed (number), length (number), thickness (number), xOffset (number), yOffset (number), border (boolean), key (string) +-- Starts pixel glow on the specified frame. + +--- @param frame any +--- @param key string +function LCG.PixelGlow_Stop(frame, key) end +-- Args: frame (UI element), key (string, optional) +-- Stops pixel glow on the specified frame.