Core/DB: refactor(creature_template): closes #1181 (#1322)

* refactor(creature_template): closes #1181

* chore: improve code readability
This commit is contained in:
Francesco Borzì
2019-01-20 11:39:32 +01:00
committed by Viste(Кирилл)
parent e8d73a553f
commit 7c7c5eb203
9 changed files with 37 additions and 27 deletions

View File

@@ -1089,7 +1089,7 @@ void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized,
float basePct = GetModifierValue(unitMod, BASE_PCT);
float totalValue = GetModifierValue(unitMod, TOTAL_VALUE);
float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
float dmgMultiplier = GetCreatureTemplate()->dmg_multiplier; // = dmg_multiplier * _GetDamageMod(rank);
float dmgMultiplier = GetCreatureTemplate()->DamageModifier; // = DamageModifier * _GetDamageMod(rank);
minDamage = ((weaponMinDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct;
maxDamage = ((weaponMaxDamage + baseValue) * dmgMultiplier * basePct + totalValue) * totalPct;