Thread Tools Display Modes
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
07-19-07, 03:22 PM   #2
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
I would check blizzard's files, find the loop that adds those items, and hook the functions that executes the loop adding one more iteration to it with your fake item.
  Reply With Quote
07-19-07, 03:41 PM   #3
Geboran
A Rage Talon Dragon Guard
Join Date: Dec 2006
Posts: 308
Why would you want to do this anyway?

*curious*
__________________
------------------------------------------
Geboran - Level 70 Paladin
<Evolution>
Stormreaver (US), Alliance
  Reply With Quote
07-19-07, 04:10 PM   #4
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Originally Posted by Geboran
*curious*
Now that you say that, I'm curious too
  Reply With Quote
07-19-07, 04:24 PM   #5
Dez
A Deviate Faerie Dragon
 
Dez's Avatar
Join Date: Jul 2007
Posts: 14
Lol screenshots of hogger dropping epix?
  Reply With Quote
07-19-07, 05:43 PM   #6
Gemini_II
A Molten Giant
 
Gemini_II's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 762
Correct me if I am mistaken, but wouldn't doing something like this not be possible without causing a disconnect? Effectively linking a fake item...
__________________
Retired prior to 3.2, before all challenge was removed.

  Reply With Quote
07-19-07, 05:55 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
If it's really a fake, made up item, I believe so... If it's some random epic that exists in the game already and you/your server has already seen it, then it may be possible.....
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
07-22-07, 06:01 AM   #8
robthedude
Don't Panic
 
robthedude's Avatar
Join Date: Oct 2006
Posts: 364
This could be used in Ephemeral, Ephemeral lets you create items purely for use with guild events and roleplay, if those items could be 'added' to the loot table of monsters or bosses, then guildmasters could create quests for their guild that function and appear just like normal quests
__________________

  Reply With Quote

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

Thread Tools
Display Modes

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