mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Item): Mirror client logic when determining whether to apply… (#16861)
fix(Core/Item): Mirror client logic when determining whether to apply feral AP Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -752,8 +752,10 @@ struct ItemTemplate
|
|||||||
|
|
||||||
[[nodiscard]] int32 getFeralBonus(int32 extraDPS = 0) const
|
[[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
|
// 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;
|
int32 bonus = int32((extraDPS + getDPS()) * 14.0f) - 767;
|
||||||
if (bonus < 0)
|
if (bonus < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user