C_NewItems.IsNewItem

From Warcraft Wiki
Jump to navigation Jump to search

Returns true if the item in the inventory slot is flagged as new.

isNew = C_NewItems.IsNewItem(containerIndex, slotIndex)

Arguments

containerIndex
number - BagID of the container.
slotIndex
number - ID of the inventory slot within the container.

Returns

isNew
boolean - Returns true if the inventory slot holds a newly-acquired item; otherwise false (empty slot or a non-new item).

Patch changes

Mists of Pandaria Patch 5.4.0 (2013-09-10): Added.[1]

See also

  • C_NewItems.RemoveNewItem(bag, slot) - Used by FrameXML/ContainerFrame.lua to clear the new-item flag after interacting with the new item or closing the bags.
  • IsBattlePayItem(bag, slot) - Used by FrameXML/ContainerFrame.lua to emphasise recent purchases from the In-Game Store.[2]

References

 
  1. ^ 2013-09-09, ContainerFrame.lua, version 5.4.0.17359, near line 330, archived at Townlong-Yak
  2. ^ 2013-09-09, ContainerFrame.lua, version 6.0.2.19033, near line 330, archived at Townlong-Yak