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.
This commit is contained in:
2025-05-17 17:11:53 +02:00
parent 0954354d7a
commit 72956add4a
2 changed files with 80 additions and 0 deletions

15
C_NamePlate.lua Normal file
View File

@@ -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,
}

65
WeakAuras.lua Normal file
View File

@@ -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.