Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-19-07, 02:00 PM   #1
1337D00D
A Defias Bandit
Join Date: Jun 2007
Posts: 2
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?
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Adding an "item" to the loot window.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off