1337D00D |
07-19-07 02:00 PM |
Adding an "item" to the loot window.
How exactly would I add a "fake item" to the loot frame correctly? What I've tried is to hook GetNumLootItems to include an extra slot, then when you see that extra slot it displays an icon and text so it looks like it's an item.
The problem is, you can't add it to the new slot, but you can add it to existing slots.
Code:
local CookieLootSlot = 0;
GetNumLootItemsOld = GetNumLootItems;
function GetNumLootItems()
CookieLootSlot = GetNumLootItemsOld()+1;
return GetNumLootItemsOld()+1; -- Create extra slot in lootframe.
end
GetLootSlotInfoOld = GetLootSlotInfo;
function GetLootSlotInfo(id)
if id == CookieLootSlot then
return "somepath","Cookie",1,1; -- If its the cookie loot slot then make the fake item.
else
return GetLootSlotInfoOld(id);
end
end
Any ideas?
|