Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-31-2002, 06:12 PM
alkrun
Sarnak
 
Join Date: Jan 2002
Posts: 66
Default NPC Loot bugfix

This is to correct corpses from poofing even when you leave items on the corpse. It's just a check to see if the loot count is zero.


client_process.cpp - line(1226) - OP_EndLootRequest handler

Code:
APPLAYER* outapp = new APPLAYER;
outapp->opcode = OP_LootComplete;
outapp->size = 0;
QueuePacket(outapp);
delete outapp;

//NEW CODE
if(entity->IsNPC()){
	NPC *pNpc = (NPC*)entity;
	if(pNpc->CountLoot() == 0){
		outapp = new APPLAYER;
		outapp->opcode = OP_DeleteSpawn;
		outapp->size = sizeof(DeleteSpawn_Struct);
		outapp->pBuffer = new uchar[outapp->size];
		DeleteSpawn_Struct* delspawn = (DeleteSpawn_Struct*)outapp->pBuffer;
		delspawn->spawn_id = entity->GetID();
		delspawn->ds_unknown1 = 0;
		entity_list.QueueClients(this, outapp, false);
		delete outapp;
		entity_list.RemoveEntity(entity->GetID());
	}
}
//END NEW CODE

outapp = new APPLAYER;
outapp->opcode = OP_SpawnAppearance;
outapp->size = sizeof(SpawnAppearance2_Struct);
outapp->pBuffer = new uchar[outapp->size];
SpawnAppearance2_Struct* sa_out = (SpawnAppearance2_Struct*)outapp->pBuffer;
sa_out->spawn_id = id;
sa_out->type = 0x0e;
sa_out->parameter = 110; // stand...
entity_list.QueueClients(this, app);
delete outapp;

break;
}
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 10:09 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