mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
* Do not make nonphysical damage spells that use EffectWeaponDmg (like Seal of Command) receive total damage mod % auras twice - based on nos4r2zod's patch for MaNGOS
--HG-- branch : trunk
This commit is contained in:
@@ -409,7 +409,7 @@ void Player::UpdateShieldBlockValue()
|
||||
SetUInt32Value(PLAYER_SHIELD_BLOCK, GetShieldBlockValue());
|
||||
}
|
||||
|
||||
void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, float& min_damage, float& max_damage)
|
||||
void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& min_damage, float& max_damage)
|
||||
{
|
||||
UnitMods unitMod;
|
||||
UnitMods attPower;
|
||||
@@ -436,7 +436,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, fl
|
||||
float base_value = GetModifierValue(unitMod, BASE_VALUE) + GetTotalAttackPowerValue(attType)/ 14.0f * att_speed;
|
||||
float base_pct = GetModifierValue(unitMod, BASE_PCT);
|
||||
float total_value = GetModifierValue(unitMod, TOTAL_VALUE);
|
||||
float total_pct = GetModifierValue(unitMod, TOTAL_PCT);
|
||||
float total_pct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
|
||||
|
||||
float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE);
|
||||
float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE);
|
||||
@@ -476,7 +476,7 @@ void Player::UpdateDamagePhysical(WeaponAttackType attType)
|
||||
float mindamage;
|
||||
float maxdamage;
|
||||
|
||||
CalculateMinMaxDamage(attType,false,mindamage,maxdamage);
|
||||
CalculateMinMaxDamage(attType, false, true, mindamage, maxdamage);
|
||||
|
||||
switch(attType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user