mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8237] Apply attack power multiplier to creature bonus attackpower.
Note: mindmg/maxdmg in creature_template expected including attackpower part in its. attackpower field only show part of attackpower not affected by AP multiplier. Thanks also to Seizer for take part in reseach and patch review. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6b2b58cec9
commit
e947acd59c
5 changed files with 11 additions and 3 deletions
|
|
@ -803,7 +803,9 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
|
|||
|
||||
UnitMods unitMod = UNIT_MOD_DAMAGE_MAINHAND;
|
||||
|
||||
float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType);
|
||||
/* difference in AP between current attack power and base value from DB */
|
||||
float att_pwr_change = GetTotalAttackPowerValue(attType) - GetCreatureInfo()->attackpower;
|
||||
float base_value = GetModifierValue(unitMod, BASE_VALUE) + (att_pwr_change * GetAPMultiplier(attType, false) / 14.0f);
|
||||
float base_pct = GetModifierValue(unitMod, BASE_PCT);
|
||||
float total_value = GetModifierValue(unitMod, TOTAL_VALUE);
|
||||
float total_pct = GetModifierValue(unitMod, TOTAL_PCT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue