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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-19-2011, 06:41 AM
Zothen
Hill Giant
 
Join Date: Apr 2011
Location: Germany
Posts: 163
Exclamation

Forgot 2 changes for aggro behavior:

aggro.cpp
Mob::CheckWillAggro()

Code:
	if
	(
	//old InZone check taken care of above by !mob->CastToClient()->Connected()
	(
		( GetINT() <= 75 )
		||( mob->IsClient() && mob->CastToClient()->IsSitting() )
		||( mob->GetLevelCon(GetLevel()) != CON_GRAY )		

	)

aggro.cpp
EntityList::GetHatedCount()

Code:
	for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) {

		NPC* mob = iterator.GetData();

		if(!mob || (mob == exclude)) continue;
		
		if(!mob->IsEngaged()) continue;

		if(mob->IsFeared() || mob->IsMezzed()) continue;

		if(attacker->GetLevelCon(mob->GetLevel()) == CON_GRAY) continue;

		if(!mob->CheckAggro(attacker)) continue;

		float AggroRange = mob->GetAggroRange();

		// Square it because we will be using DistNoRoot
			
		AggroRange = AggroRange * AggroRange;

		if(mob->DistNoRoot(*attacker) > AggroRange) continue;

		Count++;

	}

aggro.cpp
EntityList::AIYellForHelp()

Code:
			//if they are in range, make sure we are not green...
			//then jump in if they are our friend
			if(attacker->GetLevelCon(mob->GetLevel()) != CON_GRAY)	
			{
				bool useprimfaction = false;
				if(mob->GetPrimaryFaction() == sender->CastToNPC()->GetPrimaryFaction())
				{
					const NPCFactionList *cf = database.GetNPCFactionEntry(mob->GetNPCFactionID());
					if(cf){
						if(cf->assistprimaryfaction != 0)
							useprimfaction = true;
					}
				}
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:43 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