item stat 624 (hate gain % mod) now supported

This commit is contained in:
Emagi 2025-08-14 09:06:17 -04:00
parent a7260e9f72
commit 097ee61ea4

View File

@ -1329,7 +1329,7 @@ float Entity::CalculateMitigation(int8 type, int8 damage_type, int16 effective_l
void Entity::AddHate(Entity* attacker, sint32 hate, bool ignore_pet_behavior) {
if(!attacker || GetHP() <= 0 || attacker->GetHP() <= 0)
return;
if(IsInSpawnGroup(attacker))
return; // can't aggro your own members
@ -1933,8 +1933,11 @@ sint32 Entity::CalculateHateAmount(Spawn* target, sint32 amt) {
amt = CalculateFormulaByStat(amt, ITEM_STAT_TAUNT_AND_COMBAT_ART_DAMAGE);
amt = CalculateFormulaByStat(amt, ITEM_STAT_ABILITY_MODIFIER);
return amt;
float multiplier = 1.0f + (GetInfoStruct()->get_hate_mod() / 100.0f);
amt = static_cast<sint32>(amt * multiplier);
return std::max(1, amt);
}
sint32 Entity::CalculateHealAmount(Spawn* target, sint32 amt, int8 crit_mod, bool* crit, bool skip_crit_mod) {