Add C_NewItems module with functions for managing new item flags in inventory

This commit is contained in:
2025-05-17 20:14:29 +02:00
parent b1cc8ed86c
commit 06f0726dc4

22
C_NewItems.lua Normal file
View File

@@ -0,0 +1,22 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---
--- C_NewItems is a namespace for functions related to new item flags in the player's inventory.
---
--- @class C_NewItems
C_NewItems = {
--- Clears the new item flag on all items in the player's inventory.
--- @return nil
ClearAll = function() end,
--- Returns true if the item in the inventory slot is flagged as new.
--- @param containerIndex number: The index of the container.
--- @param slotIndex number: The index of the slot.
--- @return boolean: isNew
IsNewItem = function(containerIndex, slotIndex) end,
--- Clears the "new item" flag.
--- @param containerIndex number: The index of the container.
--- @param slotIndex number: The index of the slot.
RemoveNewItem = function(containerIndex, slotIndex) end,
}