Core/Spells: corrected scaling formulars based on PaperDollFrame.lua data

This commit is contained in:
Ovahlord committed 2018-10-07 12:07:10 +02:00
1 parent c4b503e2c9
commit 6b95898a2a
2 files changed
+19 -20

No files matched your search

+12 -3
View File
@@ -1079,9 +1079,18 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
if (ranged)
return;
float ap_per_strength = 2.0f;
float val = GetStat(STAT_STRENGTH);
val *= ap_per_strength;
float ap_per_agility = 2.0f;
float val = 0.0f;
if (IsHunterPet())
{
if (Unit* owner = GetOwner())
{
// Base attack power value at level 85 is 932
float agility = std::max(0.0f, owner->GetCreateStat(STAT_AGILITY) - 20.0f);
val += (agility * ap_per_agility) * 2.478f;
}
}
UnitMods unitMod = UNIT_MOD_ATTACK_POWER;