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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2014, 01:01 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Quote:
Originally Posted by Esildor View Post
Grabbing the entity with:

Code:
my $mjarak = $entity_list->GetMobByNpcTypeID(4770039);
if ($mjarak) {
Is working fine. Is there any reason that doing EntityList::IsMobSpawnedByNpcTypeID() any better?
It does the same thing, but in code, so you don't have to worry about go through the quest system. It also makes sure the NPC is alive, since the enity list can contain mobs that are dead and will be quickly removed :P (they get removed on the next cycle)
Reply With Quote
  #2  
Old 06-20-2014, 01:45 AM
Esildor
Hill Giant
 
Join Date: Feb 2010
Posts: 207
Lightbulb

Quote:
Originally Posted by demonstar55 View Post
It does the same thing, but in code, so you don't have to worry about go through the quest system. It also makes sure the NPC is alive, since the enity list can contain mobs that are dead and will be quickly removed :P (they get removed on the next cycle)
That seems silly, why would it contain dead mobs?

Also, you said in code but not in the quest system, what exactly do you mean by that, it wouldn't be handled in a perl for example?
Reply With Quote
  #3  
Old 06-20-2014, 02:11 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Quote:
Originally Posted by Esildor View Post
That seems silly, why would it contain dead mobs?
If I remember correctly, to prevent re-entrancy issues. Lots of things iterate through the NPC list, often with more than one iteration "in progress" at one time. Removing an NPC from the list at the "top level" iteration will make all the other iterations in progress stale and buggy. Much safer to flag the NPC as dead now and then remove it from the list on the next "bottom level" iteration (the NPC::Process cycle).

Because code, in other words.
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 12:52 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