Animation speed now properly scales

That is, the increase in attack speed is the same as the increase in
animation speed. Previously, this was only the case for absolute
increases. Now percentage increases do so, as well.
This commit is contained in:
Mike Hoffert 2014-07-19 22:24:23 -06:00
parent 3165e41014
commit a829fe580a
1 changed files with 9 additions and 1 deletions

View File

@ -941,8 +941,16 @@ int AttackSkillType::getTotalSpeed(const TotalUpgrade *totalUpgrade) const{
return result;
}
// Get the amount to boost the attack animation speed by (based on attack-speed upgrades)
int AttackSkillType::getAnimSpeedBoost(const TotalUpgrade *totalUpgrade) const{
return totalUpgrade->getAttackSpeed(this);
// Same calculation as in TotalUpgrade::sum, but bypassing the use of the value
// list (which is for the attack speed, not animation speed)
if(totalUpgrade->getAttackRangeIsMultiplier()) {
return animSpeed * (totalUpgrade->getAttackSpeed(NULL) / (double)100);
}
else {
return totalUpgrade->getAttackSpeed(NULL);
}
}
string AttackSkillType::toString(bool translatedValue) const{