Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-29-2013, 08:02 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Prespawn this a good idea or no?

Before NPCs spawn I want to set entity variables to them if they have certain special attacks.. that way I can just use the entity variables to dictate what special attacks I want to add to them if any...

My Perl script works well with this so far as in it skips mobs that already have Special attacks set in the database and adds special attacks to the mobs that do not have any (usually trash mobs).

The second loop is only to check if they have ANY of them so that my scaling script will skip them in the process of adding special attacks to NPCs.

My question is... would this bog down the server at all adding that many entity variables to an NPC? Mainly the first loop that adds the specific entity variables based on the type they have.



Code:
void NPC::mod_prespawn(Spawn2 *sp) 
{

	for( int i = 1; i < 36; i++ )
	{
		if(GetSpecialAbility(i))
		{
			const char* HasAbility = "1";
			const char* SpecialList[] = {"SPECATK_SUMMON", "SPECATK_ENRAGE", "SPECATK_RAMPAGE", "SPECATK_AREA_RAMPAGE", "SPECATK_FLURRY", "SPECATK_TRIPLE", "SPECATK_QUAD", "SPECATK_INNATE_DW", "SPECATK_BANE", "SPECATK_MAGICAL", "SPECATK_RANGED_ATK", "UNSLOWABLE", "UNMEZABLE", "UNCHARMABLE", "UNSTUNABLE", "UNSNAREABLE", "UNFEARABLE", "UNDISPELLABLE", "IMMUNE_MELEE", "IMMUNE_MAGIC", "IMMUNE_FLEEING", "IMMUNE_MELEE_EXCEPT_BANE", "IMMUNE_MELEE_NONMAGICAL", "IMMUNE_AGGRO", "IMMUNE_AGGRO_ON", "IMMUNE_CASTING_FROM_RANGE", "IMMUNE_FEIGN_DEATH", "IMMUNE_TAUNT", "NPC_TUNNELVISION", "NPC_NO_BUFFHEAL_FRIENDS", "IMMUNE_PACIFY", "LEASH", "TETHER", "DESTRUCTIBLE_OBJECT", "NO_HARM_FROM_CLIENT"};
			SetEntityVariable(SpecialList[i-1], HasAbility);
		}
	}

	for( int i = 1; i < 36; i++ )
	{
		if(GetSpecialAbility(i))
		{
			const char* HasAbility = "1";
			const char* Stuff = "HasSpecial";
			SetEntityVariable(Stuff, HasAbility);
			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 06:53 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