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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-13-2012, 04:53 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default COMMITTED: Extended Targets Clearing Targets

Targets should be removed after losing aggro with various skills (FM/FD/Escape)

Code:
Index: EQEmuServer/zone/AA.cpp
===================================================================
--- EQEmuServer/zone/AA.cpp     (revision 2184)
+++ EQEmuServer/zone/AA.cpp     (working copy)
@@ -480,7 +480,7 @@
                        break;

                case aaActionFadingMemories:
-                       entity_list.RemoveFromTargets(this);
+                       entity_list.RemoveFromTargets(this, true);
                        SetInvisible(1);
                        break;
Index: EQEmuServer/zone/entity.cpp
===================================================================
--- EQEmuServer/zone/entity.cpp (revision 2184)
+++ EQEmuServer/zone/entity.cpp (working copy)
@@ -1388,8 +1388,12 @@

                m->RemoveFromHateList(mob);

-               if(RemoveFromXTargets && m->IsClient())
-                       m->CastToClient()->RemoveXTarget(mob, false);
+               if(RemoveFromXTargets)
+                       if(m->IsClient())
+                               m->CastToClient()->RemoveXTarget(mob, false);
+                       // FadingMemories calls this function passing the client.
+                       else if(mob->IsClient())
+                               mob->CastToClient()->RemoveXTarget(m, false);

        }
 }
@@ -3231,10 +3235,10 @@
                        // For client targets if the mob that hated us is 35+
                        // there is a 3 outta 5 chance he adds us to feign memory
                        if(targ->IsClient()){
-                               if (iterator.GetData()->GetLevel() >= 35){
-                                       if(MakeRandomInt(1,100)<=60){
-                                               iterator.GetData()->AddFeignMemory(targ->CastToClient());
-                                       }
+                               if (iterator.GetData()->GetLevel() >= 35 && (MakeRandomInt(1,100)<=60)){
+                                       iterator.GetData()->AddFeignMemory(targ->CastToClient());
+                               } else {
+                                       targ->CastToClient()->RemoveXTarget(iterator.GetData(), false);
                                }
                        }
                }
@@ -3249,6 +3253,7 @@
        while(iterator.MoreElements())
        {
                iterator.GetData()->RemoveFromFeignMemory(targ);
+               targ->CastToClient()->RemoveXTarget(iterator.GetData(), false);
                iterator.Advance();
        }
 }

Last edited by cavedude; 09-13-2012 at 01:46 PM..
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 09:33 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3