|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here. |
02-25-2009, 08:27 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
as far as I can tell on LIVE attuneable item did not tried to auto-equip itself - it went directly into your bags
|
|
|
|
02-25-2009, 10:55 PM
|
Discordant
|
|
Join Date: May 2004
Posts: 290
|
|
Good point. Here is a simple change to make them not auto equip.
In zone\inventory.cpp around line 381
Change
Code:
// #1: Try to auto equip
if (try_worn && inst.IsEquipable(GetBaseRace(), GetClass()) && inst.GetItem()->ReqLevel<=level)
to
Code:
// #1: Try to auto equip
if (try_worn && inst.IsEquipable(GetBaseRace(), GetClass()) && inst.GetItem()->ReqLevel<=level && !inst.GetItem()->Attuneable)
And this will set the instnodrop flag upon zoning if the item was equipped somehow (like with MQ) and bypasses the popup window.
in common\shareddb.cpp around line 483
Change
Code:
if (item) {
sint16 put_slot_id = SLOT_INVALID;
ItemInst inst(item, charges);
if (instnodrop)
inst.SetInstNoDrop(true);
if (color > 0)
inst.SetColor(color);
if(charges==255)
inst.SetCharges(-1);
else
to
Code:
if (item) {
sint16 put_slot_id = SLOT_INVALID;
ItemInst inst(item, charges);
if (instnodrop || (slot_id >= 0 && slot_id <= 21 && inst.GetItem()->Attuneable))
inst.SetInstNoDrop(true);
if (color > 0)
inst.SetColor(color);
if(charges==255)
inst.SetCharges(-1);
else
|
|
|
|
02-26-2009, 12:19 AM
|
|
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
I just tested this out, attuneable items do persist over zoning/camping and no longer auto-loot. However, they lose their no drop flag when you loot the item off your corpse. We're probably losing the flag when it gets transferred to the corpse.
Also, I confirmed that you can trade them to NPCs, however you can't sell them in bazaar. Since they are no drop, they won't appear in your item list after placing in the trader's satchel.
So, all that needs to be done is put in a NPC trade check, and correct the transfer to corpses and back then this will be 100%.
Last edited by cavedude; 02-26-2009 at 08:32 AM..
|
|
|
|
02-26-2009, 12:30 AM
|
|
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,450
|
|
Have not tested this, but this should work hopefully. I probably messed it up but something along the lines of this should work, heh.
PlayerCorpse.cpp
Code:
void Corpse::MoveItemToCorpse(Client *client, ItemInst *item, sint16 equipslot)
{
int bagindex;
sint16 interior_slot;
ItemInst *interior_item;
AddItem(item->GetItem()->ID, item->GetCharges(), equipslot, item->GetAugmentItemID(0), item->GetAugmentItemID(1), item->GetAugmentItemID(2), item->GetAugmentItemID(3), item->GetAugmentItemID(4));
if(item->IsType(ItemClassContainer))
{
for(bagindex = 0; bagindex <= 10; bagindex++)
{
interior_slot = Inventory::CalcSlotId(equipslot, bagindex);
interior_item = client->GetInv().GetItem(interior_slot);
if(interior_item->IsInstNoDrop)
{
interior_item->SetInstNoDrop(true);
}
if(interior_item)
{
AddItem(interior_item->GetItem()->ID, interior_item->GetCharges(), interior_slot, interior_item->GetAugmentItemID(0), interior_item->GetAugmentItemID(1), interior_item->GetAugmentItemID(2), interior_item->GetAugmentItemID(3), interior_item->GetAugmentItemID(4));
client->DeleteItemInInventory(interior_slot);
}
}
}
client->DeleteItemInInventory(equipslot);
}
|
|
|
|
02-26-2009, 10:25 AM
|
Discordant
|
|
Join Date: May 2004
Posts: 290
|
|
Thanks guys, I'll try to get the NPC trade thing and the corpse flag done when I get home tonite.
Secrets, this doesn't look proper though. You're setting a flag that is already set.
Code:
if(interior_item->IsInstNoDrop)
{
interior_item->SetInstNoDrop(true);
}
I'm wondering if you meant to do..
Code:
if(item->IsInstNoDrop())
{
interior_item->SetInstNoDrop(true);
}
|
02-26-2009, 03:06 PM
|
|
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
The PlayerCorpse change is a bad, bad change! I accidentally put it up on TGC without testing and it caused players to lose all but 1 bag in their top inventory slot when they died, and caused a zone crash. That'll teach me to upload files when I am half asleep. Good thing we keep daily backups.
Theeper: Yes, if the change was good that's the syntax you'd use.
|
02-26-2009, 09:43 PM
|
|
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,450
|
|
Quote:
Originally Posted by cavedude
The PlayerCorpse change is a bad, bad change! I accidentally put it up on TGC without testing and it caused players to lose all but 1 bag in their top inventory slot when they died, and caused a zone crash. That'll teach me to upload files when I am half asleep. Good thing we keep daily backups.
Theeper: Yes, if the change was good that's the syntax you'd use.
|
Heh, yeah. I'm still learning C++. Sorry about that.
I guess that doesn't work, then. Back to the drawing board!
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:31 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|