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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2008, 04:16 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default HUGE Bug - Attuneable items don't work

I just discovered that Attuneable items revert to dropeable state as soon as you zone after been attuned.

this is realy bad. my entire server is build on attuneable items actualy becomign no drop - as they should - as global part fo server economy, in order for whoel thing to function.

could you guys look into this please?
Reply With Quote
  #2  
Old 06-27-2008, 04:24 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Off the top of my head, because making a specific item NODROP where the global item is not, it would require something being defined, probably in the inventory table in the database, that says so.

Checking the Wiki for the inventory table, there is a column called instnodrop:

Quote:
instnodrop

* This might keep a record of whether an attunable item has been attuned so that it is now no trade. But not completely certain on that.
I would start by checking the item in your inventory table to see if that is set. If not, we'd have to start look through the source to find out why not.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #3  
Old 07-01-2008, 10:07 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

I don't think attuneable items work at all. They will attune, but once you zone, it's not attuned anymore. It doesn't appear to set the "instnodrop" field in the inventory table when you attune the item. Even manually setting the field doesn't seem to do anything .. unless it's supposed to be some odd value that I didn't try.

I can't find anything about attuneable items in the opcodes, so either it's called something else, or it's not there at all.
Reply With Quote
  #4  
Old 07-01-2008, 02:26 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Well, it looks like it was added into the source:

Quote:
==01/15/2005
Doodman: Fixed charges/quantity
Doodman: Fixed IsStackable()
Doodman: Fixed some empty Handle() functons.
Doodman: Added instance level nodrop.
Required SQL:
alter table inventory add instnodrop tinyint(1) unsigned default 0 not null;
The following is where instnodrop is referenced in the source:

common/patches/Titanium.cpp
common/Item.h
common/Item.cpp
common/shareddb.cpp

Looking at all of that, it seems the main issue is that SetInstNodrop() is never called anywhere, but it seems like the client sets it, which is probably why it shows as nodrop until you zone. I have a feeling this probably is related to a missing OpCode or some other packet telling the server it's now nodrop.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #5  
Old 01-24-2009, 01:17 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

BUMP!
So guys- any new info on this one?
Reply With Quote
  #6  
Old 02-25-2009, 09:21 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Here's a start on getting attuneable items working. Items are flagged as No Trade and remain No Trade when zoning
and logging off.

This is with rev 361 compiled Windows XP.

Set the instnodrop flag when an item is placed into a gear slot that has it's attuneable flag set. (This probably needs to be done somewhere else).

In zone\inventory.cpp around line 901 change

Code:
		// Not dealing with charges - just do direct swap
		if(src_inst && dst_slot_id<22 && dst_slot_id>0)
			SetMaterial(dst_slot_id,src_inst->GetItem()->ID);
		mlog(INVENTORY__SLOTS, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
		m_inv.SwapItem(src_slot_id, dst_slot_id);
to

Code:
		// Not dealing with charges - just do direct swap
		if(src_inst && dst_slot_id<22 && dst_slot_id>0) {
			if (src_inst->GetItem()->Attuneable) {
				src_inst->SetInstNoDrop(true);
			}
			SetMaterial(dst_slot_id,src_inst->GetItem()->ID);
		}
		mlog(INVENTORY__SLOTS, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id);
		m_inv.SwapItem(src_slot_id, dst_slot_id);

Then, move the instnodrop field in the item serialization code a couple spots over in the Titanium patch file.

In patches\Titanium.cpp near line 871, change

Code:
	MakeAnyLenString(&instance,
		"%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|",
		stackable ? charges : 0,
		0,
		(merchant_slot==0) ? slot_id : merchant_slot,
		inst->GetPrice(),
		(merchant_slot==0) ? 1 : inst->GetMerchantCount(),
		0,
		//merchant_slot,	//instance ID, bullshit for now
		(merchant_slot==0) ? inst->GetSerialNumber() : merchant_slot,
		inst->IsInstNoDrop() ? 1 : 0,		//not sure where this field is
		(stackable ? ((inst->GetItem()->ItemType == ItemTypePotion) ? 1 : 0) : charges),
		0,
		0
	);
to

Code:
	MakeAnyLenString(&instance,
		"%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|%i|",
		stackable ? charges : 0,
		0,
		(merchant_slot==0) ? slot_id : merchant_slot,
		inst->GetPrice(),
		(merchant_slot==0) ? 1 : inst->GetMerchantCount(),
		0,
		//merchant_slot,	//instance ID, bullshit for now
		(merchant_slot==0) ? inst->GetSerialNumber() : merchant_slot,
		0,
		(stackable ? ((inst->GetItem()->ItemType == ItemTypePotion) ? 1 : 0) : charges),
		inst->IsInstNoDrop() ? 1 : 0,
		0
	);
- You can still trade attuned items to NPC's and maybe sell in the bazaar, but you can't trade to players or sell to vendors. I will put in some checks for these later.
- When items are autoequipped from loot, it bypasses the "Attune" popup that happens when you manually equip stuff. Need to at least put a check on startup to flag the items. I'm not sure of the popup behaviour on Live though.
- I didn't look into the other client serializations because I can't test them.

I thought ChaosSlayer might want to test it out now though.
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 03:44 AM.


 

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