PDA

View Full Version : COMMITTED: Extended Targets Clearing Targets


demonstar55
08-13-2012, 04:53 AM
Targets should be removed after losing aggro with various skills (FM/FD/Escape)

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();
}
}

cavedude
09-10-2012, 12:29 PM
This was added to PEQ with the AA timer fix and I forgot to mention it.

demonstar55
01-16-2013, 12:33 PM
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?

cavedude
01-16-2013, 12:51 PM
Not sure why that happened. But, it's on SVN now.