Fix a bunch of shit

This commit is contained in:
2024-12-21 10:36:32 +01:00
parent c8d4f32d5d
commit 1536a636bd
6 changed files with 14 additions and 15 deletions

View File

@@ -1,9 +1,7 @@
---@diagnostic disable: missing-return, lowercase-global ---@diagnostic disable: missing-return, lowercase-global
---@param frameType string ---@overload fun(frameType: string): table
---@param name string ---@overload fun(frameType: string, name: string): table
---@param parent table ---@overload fun(frameType: string, name: string, parent: table): table
---@param template string ---@overload fun(frameType: string, name: string, parent: table, template: string): table
---@return table frame function CreateFrame(frameType, name, parent, template) end
---Creates a new Frame object
function CreateFrame(frameType, name, parent, template) end

View File

@@ -1,8 +1,6 @@
---@diagnostic disable: missing-return, lowercase-global ---@diagnostic disable: missing-return, lowercase-global
---@param itemID number ---@param itemName string
---@param itemName string
---@param itemLink string
---@return string name ---@return string name
---@return string link ---@return string link
---@return number quality ---@return number quality
@@ -15,4 +13,6 @@
---@return string texture ---@return string texture
---@return number vendorPrice ---@return number vendorPrice
---Returns information about an item, by name, link or id. Will only return item information if it is directly available in memory. An item is present in memory if: It has been seen this session, OR It's present in Cache/enUS/Item-sparse.dba, where enUS is the user's locale If item information is not readily available, the client will first look on disk in DBFilesClient/Item-sparse.db2. If an item is found there, the client fires the GET_ITEM_INFO_RECEIVED event and keeps the result in memory for further GetItemInfo requests. If an item is not found on disk either, the client will send a server request for it. If the request fails, nothing happens. If the request succeeds, the client stores the item in memory and writes it to Cache/Locale/Item-sparse.dba. The client will never send more than one server request per id per session. ---Returns information about an item, by name, link or id. Will only return item information if it is directly available in memory. An item is present in memory if: It has been seen this session, OR It's present in Cache/enUS/Item-sparse.dba, where enUS is the user's locale If item information is not readily available, the client will first look on disk in DBFilesClient/Item-sparse.db2. If an item is found there, the client fires the GET_ITEM_INFO_RECEIVED event and keeps the result in memory for further GetItemInfo requests. If an item is not found on disk either, the client will send a server request for it. If the request fails, nothing happens. If the request succeeds, the client stores the item in memory and writes it to Cache/Locale/Item-sparse.dba. The client will never send more than one server request per id per session.
function GetItemInfo(itemID, itemName, itemLink) end ---@overload fun(itemID: number): table
---@overload fun(itemLink: string): table
function GetItemInfo(itemName) end

View File

@@ -9,4 +9,5 @@
---@field roll boolean ---@field roll boolean
---@field texture number Texture file ID ---@field texture number Texture file ID
---@return LootInfo[]
function GetLootInfo() end function GetLootInfo() end

View File

@@ -5,6 +5,6 @@
---@return string item ---@return string item
---@return number quantity ---@return number quantity
---@return number quality ---@return number quality
---@return 1nil locked ---@return number? locked (1 if locked, nil if not)
---Returns information about an item available as loot ---Returns information about an item available as loot
function GetLootSlotInfo(slot) end function GetLootSlotInfo(slot) end

View File

@@ -1,9 +1,9 @@
---@diagnostic disable: missing-return, lowercase-global ---@diagnostic disable: missing-return, lowercase-global
---@param unit string ---@param unit string
---@param name string
---@return string class ---@return string class
---@return string classFileName ---@return string classFileName
---@return number classIndex ---@return number classIndex
---Returns a unit's class. The second return (classFileName) can be used for locale-independent verification of a unit's class, or to look up class-related data in various global tables: RAID_CLASS_COLORS provides a standard color for each class (as seen in the default who, guild, calendar, and raid UIs) CLASS_ICON_TCOORDS provides coordinates to locate each class' icon within the "Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes" texture For non-player units, the first return (class) will be the unit's name; to always get a localized class name regardless of unit type, use UnitClassBase instead. ---Returns a unit's class. The second return (classFileName) can be used for locale-independent verification of a unit's class, or to look up class-related data in various global tables: RAID_CLASS_COLORS provides a standard color for each class (as seen in the default who, guild, calendar, and raid UIs) CLASS_ICON_TCOORDS provides coordinates to locate each class' icon within the "Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes" texture For non-player units, the first return (class) will be the unit's name; to always get a localized class name regardless of unit type, use UnitClassBase instead.
function UnitClass(unit, name) end ---@overload fun(name: string)
function UnitClass(unit) end

View File

@@ -2,7 +2,7 @@
---@param sep string ---@param sep string
---@param text string ---@param text string
---@param limit number ---@param limit number?
---@return string ... ---@return string ...
---Splits a string based on another seperator string. Also available as string.split (though not provided by the Lua standard library). ---Splits a string based on another seperator string. Also available as string.split (though not provided by the Lua standard library).
function strsplit(sep, text, limit) end function strsplit(sep, text, limit) end