Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2010, 12:10 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default Adding Equipment to Pets

I am working on pet focii, and have decided to go ahead and work through adding the equipment that automatically comes equipped on focused pets instead of just leaving it at equations for the pet's stats. This is my first time working with equipment, so I've been having a little trouble figuring out how to actually add the item. Since the item added is a summoned item, I see where the following code is used when a player summons an item gets the item_struct and creates an ItemInst from it.

Code:
ItemInst *SummonedItem=NULL;

const Item_Struct *item = database.GetItem(spell.base[i]);
SummonedItem=database.CreateItem(spell.base[i],charges);
However, the code that gives an item to a pet, either only requires the itemIDs (AddItem) or the Item_Struct (AddLootDrop), not the full ItemInst (and it appears the npc only stores the itemID for equipment). Would I be able to just use the itemID or item_struct to equip the pet, or would I need to make an ItemInst for the pet? And which function would be best to take itemIDs loaded from the database and turned into items that are equipped by the pet?

Also, I noticed that npcs (and therefore pets) only have 9 slots for equipment, but in doing research for working on pet focus items, I ran across multiple accounts of pets going rogue (such as after a charm), with the pet dying and showing a list of 15 or 16 items (the usual 9 plus 2 rings, face, waist, neck, back, and shoulders). I know pets can equip face, waist, and back, due to summoned pet equipment for those slots (Muzzle of Mardu, Girdle of Magi'kot, Elemental Defender), but I don't see anywhere those slots are being accounted for. Am I missing something, or do these slots need to be added for pets for them to equip these items?
Reply With Quote
  #2  
Old 01-29-2010, 02:34 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

NPC inventory is tricky. Behind the scenes they have a loot list but not an inventory; there's one devised from the material slots but it isn't exactly the same as you've noticed. It has a limitation on the visible slots.

It was something I was going to address after I finished up spells.
Reply With Quote
  #3  
Old 01-29-2010, 09:43 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

But do they gain stats, etc. from the items in the loot table? If not, I guess I will work on it with the assumption that while those slots won't work now, they will in the future.

Maybe as a short term fix, something can be worked out so that pets' stats are calculated based on all items in their loot table, not just for those 9 slots.

Otherwise, I guess when loading the items, it just wouldn't find a slot for them.
Reply With Quote
Reply


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

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

Forum Jump

   

All times are GMT -4. The time now is 07:52 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3