Hello, I am new to this forum and I have registered, because I am looking for information about a modification that I am trying to make to the game, it is something very "simple", I will detail it.
In the example game WoW Classic or Wow ltk classic, when looting items or buying items, the new items will be highlighted. I have tried several ways to implement it in wow ltk the old client but I don't get it.
Thank you and excuse my English I use a translator since I only speak Spanish.
Code:
local frame = CreateFrame("Frame")
function frame:OnEvent(event, arg1)
if event == "BAG_UPDATE" then
for bag = 0, 4 do
for slot = 1, GetContainerNumSlots(bag) do
local itemLink = GetContainerItemLink(bag, slot)
if itemLink then
local _, _, _, _, _, _, _, _, _, _, _, itemClassID, itemSubClassID = GetItemInfo(itemLink)
local isNewItem = C_NewItems.IsNewItem(bag, slot)
if isNewItem then
local itemButton = _G["ContainerFrame" .. bag + 1 .. "Item" .. slot]
if itemButton then
itemButton.NewItemTexture:Show() -- Mostrar la textura de nuevo ítem
end
end
end
end
end
end
end
frame:RegisterEvent("BAG_UPDATE")
frame:SetScript("OnEvent", frame.OnEvent)