mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 21:32:52 +01:00
* Add support for basedmg and baserangeddmg values in creature_classlevelstats.
* Remove mindmg, maxdmg, attackpower and ranged field in creature_template and add Dmg_Mod, Rangeddmg_Mod field. --HG-- branch : trunk
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "SharedDefines.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
/*#######################################
|
||||
######## ########
|
||||
@@ -865,7 +866,8 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
|
||||
float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE);
|
||||
|
||||
/* difference in AP between current attack power and base value from DB */
|
||||
float att_pwr_change = GetTotalAttackPowerValue(attType) - GetCreatureInfo()->attackpower;
|
||||
CreatureBaseStats const* stats = objmgr.GetCreatureBaseStats(getLevel(), GetCreatureInfo()->unit_class);
|
||||
float att_pwr_change = GetTotalAttackPowerValue(attType) - stats->GenerateAttackPower(GetCreatureInfo());
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user