View Single Post
  #25  
Old 09-27-2011, 01:42 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I don't think people have any issue with adding the option to set perma-rooted mobs to use a normal hate table vs attacking the closest as they currently do. Seems like there are 2 debates; One being that there is already an option to just set the runspeed to a very low rate to simulate perma-rooted with the same properties as an unrooted mob. The other is that a rule could be added to set it to either handle it one way or the other server-wide for all NPCs.

One solution that would work for both would be to make it a special attack code. Though, I think the simplest solution would be to make it a rule that allows you to toggle if you want ALL perma-rooted mobs to act the same way as reported from Live, or if you want to leave the option to have some attack the closest (runspeed 0.0) and some attack the highest hate (runspeed 0.000001).

Maybe something like this would work out for everyone:

MobAI.cpp
Code:
Index: trunk/EQEmuServer/zone/MobAI.cpp
===================================================================
--- trunk/EQEmuServer/zone/MobAI.cpp	(revision 2021)
+++ trunk/EQEmuServer/zone/MobAI.cpp	(working copy)
@@ -773,7 +773,7 @@

 	if (engaged) 
 	{
-		if (IsRooted())
+		if (IsRooted() && (RuleB(Aggro, PermaRootedAttacksNearest) || !permarooted))
 			SetTarget(hate_list.GetClosest(this));
 		else
 		{
And this to the aggro section of common/ruletypes.h
Code:
RULE_BOOL ( Aggro, PermaRootedAttacksNearest, true )
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote