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 12-19-2006, 02:46 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default Error in quest::depop()

If you spawn 2 or more mobs in the same zone with the same npc_types ID and then call quest::depop(npctypes ID), it will always depop the first mob it finds in the npc list, but it won't depop the 2nd or any other mobs with that ID. Subsequent calls to quest::depop(npctypes ID) will also fail to depop the 2nd or more mobs with that ID.

I have corrected this bug with the code below:

Please replace the questmgr::depop(int) method in the questmgr.cpp file with the method below:

Code:
void QuestManager::depop(int npc_type) {
	if (npc_type != 0){
		Mob * tmp = entity_list.GetMobByNpcTypeID(npc_type);

		if (tmp) {
			if(tmp != npc)
			{
				tmp->CastToNPC()->Depop();
				entity_list.RemoveNPC(tmp->GetID());
				entity_list.RemoveMob(tmp->GetID());
			}
			else
				depop_npc = true;
		}
	}
	else {	//depop self
		depop_npc = true;
	}
}
This code will allow you to depop any number of mobs with the same ID. Basically, you would cal questmgr::depop(npctypes ID) once for each mob of this type you want to despawn.

Please add this to the server code. I and Sesmar have both tested this and find that it works as expected. Thank you!
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
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 05:32 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