mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Item): Fixed incorrect damage mod for Heirloom 2H weapons (#15443)
* cherry-pick commit (13fa60ab86)
Co-authored-by: robinsch <robinsch@users.noreply.github.com>
This commit is contained in:
@@ -6822,8 +6822,10 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt
|
||||
if (extraDPS)
|
||||
{
|
||||
float average = extraDPS * proto->Delay / 1000.0f;
|
||||
minDamage = 0.7f * average;
|
||||
maxDamage = 1.3f * average;
|
||||
float mod = ssv->IsTwoHand(proto->ScalingStatValue) ? 0.2f : 0.3f;
|
||||
|
||||
minDamage = (1.0f - mod) * average;
|
||||
maxDamage = (1.0f + mod) * average;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1518,6 +1518,16 @@ struct ScalingStatValuesEntry
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IsTwoHand(uint32 mask) const
|
||||
{
|
||||
if (mask & 0x7E00)
|
||||
{
|
||||
if (mask & 0x00000400) return true;
|
||||
if (mask & 0x00001000) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[[nodiscard]] uint32 getSpellBonus(uint32 mask) const
|
||||
{
|
||||
if (mask & 0x00008000) return spellPower;
|
||||
|
||||
Reference in New Issue
Block a user