[Rule] Remove hard coded initial aggro in favor or an adjustable Rule (#4333)

* [Rule] Remove hard coded initial aggro in favor or an adjustable Rule

* Adjustments per comments
This commit is contained in:
Fryguy
2024-05-26 06:56:36 -04:00
committed by GitHub
parent f70078d62a
commit fccb205a1d
2 changed files with 10 additions and 4 deletions
+8 -4
View File
@@ -3089,12 +3089,16 @@ void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bo
// Spell Casting Subtlety etc
int64 hatemod = 100 + other->spellbonuses.hatemod + other->itembonuses.hatemod + other->aabonuses.hatemod;
if (hatemod < 1)
if (hatemod < 1) {
hatemod = 1;
}
hate = ((hate * (hatemod)) / 100);
}
else {
hate += 100; // 100 bonus initial aggro
} else {
if (IsCharmed()){
hate += RuleI(Aggro, InitialPetAggroBonus);
} else {
hate += RuleI(Aggro, InitialAggroBonus);
}
}
// Pet that is /pet hold on will not add to their hate list if they're not engaged