Rework how XTarget auto haters work

This should cause the auto haters to be shared with other toons who might be
interested (group/raid) like live.

There maybe some bugs since there is a lot of complex interactions here.
This commit is contained in:
Michael Cook (mackal)
2017-02-17 21:04:48 -05:00
parent 8177f7d9bb
commit 9f4604ec3e
14 changed files with 435 additions and 71 deletions
+3 -3
View File
@@ -2432,9 +2432,9 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
Mob* mypet = this->GetPet();
Mob* myowner = this->GetOwner();
Mob* targetmob = this->GetTarget();
bool on_hatelist = CheckAggro(other);
if(other){
bool on_hatelist = CheckAggro(other);
AddRampage(other);
if (on_hatelist) { // odd reason, if you're not on the hate list, subtlety etc don't apply!
// Spell Casting Subtlety etc
@@ -2510,7 +2510,7 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
hate_list.AddEntToHateList(other, hate, damage, bFrenzy, !iBuffTic);
if(other->IsClient())
if(other->IsClient() && !on_hatelist)
other->CastToClient()->AddAutoXTarget(this);
#ifdef BOTS
@@ -2549,7 +2549,7 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
if(!owner->GetSpecialAbility(IMMUNE_AGGRO))
{
hate_list.AddEntToHateList(owner, 0, 0, false, !iBuffTic);
if(owner->IsClient())
if(owner->IsClient() && !CheckAggro(owner))
owner->CastToClient()->AddAutoXTarget(this);
}
}