Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-16-2012, 02:46 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Well, let's look at the code, it's pretty short and simple.

Code:
void Corpse::RemoveItem(int16 lootslot)
{

	if (lootslot == 0xFFFF)
		return;
	
	ItemList::iterator cur,end;
	cur = itemlist.begin();
	end = itemlist.end();
	for(; cur != end; cur++) {
		ServerLootItem_Struct* sitem = *cur;
		if (sitem->lootslot == lootslot)
		{
			RemoveItem(sitem);
			return;
		}
	}
}
Ok, it's looking for the slot number you pass in to match the lootslot on the ServerLootItem. So, let's look where that is assigned.

The only place I can see is Corpse::MakeLootRequestPackets where it is assigned 0xFFFF, and then a few lines later to a sequential value.

That function appears to be called when someone actually clicks on a corpse to loot it which may be later than you run your perl code.

NPC::AddLootDrop seems like a logical place to assign a value to ServerLootItem_Struct::lootslot, but I didn't see anything in there that would do so. ServerLootItem_Struct has no constructor, so what ends up in there by default is probably uninitialized garbage of some sort.

Short answer is I would guess that function isn't all that useful the way it is now. Maybe it should just take an index into the list of items and delete that index which is what it seems you want. Even if the code you're using is in EVENT_LOOT, I'm not sure it's possible to prevent the current item from being looted by deleting it, but that's just my guess.
Reply With Quote
 


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:51 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3