View Single Post
  #11  
Old 09-24-2012, 07:28 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, the problem with attunable items and corpses is that our item instance struct that is used for corpses doesn't have a field for inst_no_drop to store if the item is attuned or not.

Code:
struct ServerLootItem_Struct {
	uint32	item_id;
	sint16	equipSlot;
	int8	charges;
	int16	lootslot;
	uint32 aug1;
	uint32 aug2;
	uint32 aug3;
	uint32 aug4;
	uint32 aug5;
	int8 minlevel;
	int8 maxlevel;
};
So, when items on a corpse are saved to the DB, the don't save the attuned settings for each item as they should. The problem is that we cannot adjust this struct without breaking all existing corpses due to their data all being stored in a blob which is defined by the corpse struct which includes the item struct above. Adjusting that struct would cause the existing corpse blobs to read incorrectly and it would break them from being able to load.

In order to really fix this issue, the best way would be to get all corpse data out of the blobs as we currently store them so that each field is saved into individual DB fields. I have done a little work on this, but it is a fairly involved task and nothing has been committed for it yet. Ideally, we would get rid of the corpse blobs as well as the blobs used for storing the player profile, which would greatly reduce the current limitations we have with both of those systems.

If your server does not leave items on corpses, then you could use attuned items without risk of the exploit to unattune the items. You would need to use the right return items plugin to do so, however. I posted that plugin here:

http://www.eqemulator.org/forums/sho...39&postcount=6

Using attunable items is definitely the way to go for what the OP is wanting to do. You may need to do some special stuff to make it work the way you want, but it is possible. For example, you could use SummonItem() when you originally give the item to the player and you can set it to attuned at the time it is summoned so it will be no drop. Then, you could allow them to turn the item in to an NPC and have that NPC summon the same item for them without it being set to attuned so it would be tradeable. Though, once equiped, it will always become no drop again. To chance the mechanics much more than that, it would require some custom coding for how attuned items are dealt with.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote