Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-08-2012, 10:00 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Here's a update to the Corpse::QueryLoot portion of this patch.

It's not a required fix, but it does differentiate the shown and hidden items on a player's corpse. This is a direct replacement and not a patch.


[PlayerCorpse.cpp::Corpse::QueryLoot]
Code:
void Corpse::QueryLoot(Client* to) {
	int x = 0;
	to->Message(0, "Coin: %ip %ig %is %ic", platinum, gold, silver, copper);

	ItemList::iterator cur,end;
	cur = itemlist.begin();
	end = itemlist.end();
	for(; cur != end; cur++) {
		ServerLootItem_Struct* sitem = *cur;

		if (IsPlayerCorpse()) {
			if (sitem->equipSlot >= 251 && sitem->equipSlot <= 340)
				sitem->lootslot = 0xFFFF;
			else
				x < 30 ? sitem->lootslot = x : sitem->lootslot = 0xFFFF; // this con value needs to reflect corpselootlimit in MakeLootRequestPackets
			const Item_Struct* item = database.GetItem(sitem->item_id);

			if (item)
				to->Message((sitem->lootslot == 0xFFFF), "  LootSlot: %i (EquipSlot: %i) Item: %s (%d) with %i %s", sitem->lootslot, sitem->equipSlot, item->Name, item->ID, sitem->charges, sitem->charges==1?"charge":"charges");
			else
				to->Message((sitem->lootslot == 0xFFFF), "  Error: 0x%04x", sitem->item_id);
			if (sitem->lootslot != 0xFFFF)
				x++;
		}
		else {
			sitem->lootslot=x;
			const Item_Struct* item = database.GetItem(sitem->item_id);
			
			if (item)
				to->Message(0, "  LootSlot: %i Item: %s (%d) with %i %s", sitem->lootslot, item->Name, item->ID, sitem->charges, sitem->charges==1?"charge":"charges");
			else
				to->Message(0, "  Error: 0x%04x", sitem->item_id);
			x++;
		}
	}
	to->Message(0, "%i items on %s.", x, this->GetName());
}
__________________
Uleat of Bertoxxulous

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