More hate fixes

Refix double spell casting subtlety
Fix double spell casting subtlety for beneficial spells
Move 100 initial bonus to AddToHateList so melee get it as well
Lower prox aggro since the 100 bonus is in AddToHateList now
This commit is contained in:
Michael Cook (mackal) 2015-09-17 01:46:40 -04:00
parent b24f1914ab
commit 211462456c
2 changed files with 17 additions and 16 deletions

View File

@ -45,7 +45,7 @@ void EntityList::CheckClientAggro(Client *around)
continue;
if (mob->CheckWillAggro(around) && !mob->CheckAggro(around))
mob->AddToHateList(around, 100);
mob->AddToHateList(around, 25);
}
}
@ -1115,15 +1115,13 @@ int32 Mob::CheckAggroAmount(uint16 spell_id, Mob *target, bool isproc)
int HateMod = RuleI(Aggro, SpellAggroMod);
HateMod += GetFocusEffect(focusSpellHateMod, spell_id);
//Live AA - Spell casting subtlety
HateMod += aabonuses.hatemod + spellbonuses.hatemod + itembonuses.hatemod;
AggroAmount = (AggroAmount * HateMod) / 100;
}
// initial aggro gets a bonus 100 besides for dispel or hate override
if (!dispel && spells[spell_id].HateAdded == 0 && !on_hatelist)
AggroAmount += 100;
// We add this 100 in AddToHateList so we need to account for the oddities here
if (dispel && spells[spell_id].HateAdded > 0 && !on_hatelist)
AggroAmount -= 100;
return AggroAmount + spells[spell_id].bonushate + nonModifiedAggro;
}
@ -1181,9 +1179,6 @@ int32 Mob::CheckHealAggroAmount(uint16 spell_id, Mob *target, uint32 heal_possib
int HateMod = RuleI(Aggro, SpellAggroMod);
HateMod += GetFocusEffect(focusSpellHateMod, spell_id);
//Live AA - Spell casting subtlety
HateMod += aabonuses.hatemod + spellbonuses.hatemod + itembonuses.hatemod;
AggroAmount = (AggroAmount * HateMod) / 100;
}

View File

@ -2429,17 +2429,23 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
Mob* targetmob = this->GetTarget();
if(other){
bool on_hatelist = CheckAggro(other);
AddRampage(other);
int hatemod = 100 + other->spellbonuses.hatemod + other->itembonuses.hatemod + other->aabonuses.hatemod;
if (on_hatelist) { // odd reason, if you're not on the hate list, subtlety etc don't apply!
// Spell Casting Subtlety etc
int hatemod = 100 + other->spellbonuses.hatemod + other->itembonuses.hatemod + other->aabonuses.hatemod;
int32 shieldhatemod = other->spellbonuses.ShieldEquipHateMod + other->itembonuses.ShieldEquipHateMod + other->aabonuses.ShieldEquipHateMod;
int32 shieldhatemod = other->spellbonuses.ShieldEquipHateMod + other->itembonuses.ShieldEquipHateMod + other->aabonuses.ShieldEquipHateMod;
if (shieldhatemod && other->HasShieldEquiped())
hatemod += shieldhatemod;
if (shieldhatemod && other->HasShieldEquiped())
hatemod += shieldhatemod;
if(hatemod < 1)
hatemod = 1;
hate = ((hate * (hatemod))/100);
if(hatemod < 1)
hatemod = 1;
hate = ((hate * (hatemod))/100);
} else {
hate += 100; // 100 bonus initial aggro
}
}
if(IsPet() && GetOwner() && GetOwner()->GetAA(aaPetDiscipline) && IsHeld() && !IsFocused()) { //ignore aggro if hold and !focus