*Try to fix enormous amount of some ap related spells. This may not fix all issues.
--HG-- branch : trunk
This commit is contained in:
1 parent
d344d4b6e9
commit
13fd0ed366
2 files changed
+5
-9
No files matched your search
+4
-8
@@ -10459,17 +10459,13 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
|
||||
{
|
||||
if (attType == RANGED_ATTACK)
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS);
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
|
||||
float ap = (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER)) * float(GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS));
|
||||
return ap < 0.0f ? 0.0f : ap ;
|
||||
}
|
||||
else
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS);
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
|
||||
float ap = (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER)) * float(GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS));
|
||||
return ap < 0.0f ? 0.0f : ap ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user