mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 20:13:48 +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)
|
if (extraDPS)
|
||||||
{
|
{
|
||||||
float average = extraDPS * proto->Delay / 1000.0f;
|
float average = extraDPS * proto->Delay / 1000.0f;
|
||||||
minDamage = 0.7f * average;
|
float mod = ssv->IsTwoHand(proto->ScalingStatValue) ? 0.2f : 0.3f;
|
||||||
maxDamage = 1.3f * average;
|
|
||||||
|
minDamage = (1.0f - mod) * average;
|
||||||
|
maxDamage = (1.0f + mod) * average;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1518,6 +1518,16 @@ struct ScalingStatValuesEntry
|
|||||||
return 0;
|
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
|
[[nodiscard]] uint32 getSpellBonus(uint32 mask) const
|
||||||
{
|
{
|
||||||
if (mask & 0x00008000) return spellPower;
|
if (mask & 0x00008000) return spellPower;
|
||||||
|
|||||||
Reference in New Issue
Block a user