Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2023-08-01 23:21:36 +08:00
10 changed files with 556 additions and 54 deletions

View File

@@ -752,8 +752,10 @@ struct ItemTemplate
[[nodiscard]] int32 getFeralBonus(int32 extraDPS = 0) const
{
constexpr uint32 feralApEnabledInventoryTypeMaks = 1 << INVTYPE_WEAPON | 1 << INVTYPE_2HWEAPON | 1 << INVTYPE_WEAPONMAINHAND | 1 << INVTYPE_WEAPONOFFHAND;
// 0x02A5F3 - is mask for Melee weapon from ItemSubClassMask.dbc
if (Class == ITEM_CLASS_WEAPON && (1 << SubClass) & 0x02A5F3)
if (Class == ITEM_CLASS_WEAPON && (1 << InventoryType) & feralApEnabledInventoryTypeMaks)
{
int32 bonus = int32((extraDPS + getDPS()) * 14.0f) - 767;
if (bonus < 0)