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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 09-10-2012, 12:29 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This was added to PEQ with the AA timer fix and I forgot to mention it.
Reply With Quote
  #3  
Old 01-16-2013, 12:33 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

The change to AA.cpp appears to never hit the repo, although it was working on PEQ for a while, was there a reason for this?
Reply With Quote
  #4  
Old 01-16-2013, 12:51 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Not sure why that happened. But, it's on SVN now.
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 01:24 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