1 parent
be57c96863
commit
c5d909693b
4 files changed
+39
-12
No files matched your search
@@ -11738,14 +11738,20 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
|
||||
{
|
||||
if (attType == RANGED_ATTACK)
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER);
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER)
|
||||
+ GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS)
|
||||
- GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG);
|
||||
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
|
||||
}
|
||||
else
|
||||
{
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER);
|
||||
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER)
|
||||
+ GetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS)
|
||||
- GetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_NEG);
|
||||
|
||||
if (ap < 0)
|
||||
return 0.0f;
|
||||
return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
|
||||
|
||||
Reference in new issue
Block a user