From 8c42a03328466c0fc6291b2c3f6a1c0e458a507a Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Mon, 31 Jul 2023 04:59:21 +0200 Subject: [PATCH] =?UTF-8?q?fix(Core/Item):=20Mirror=20client=20logic=20whe?= =?UTF-8?q?n=20determining=20whether=20to=20apply=E2=80=A6=20(#16861)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Item): Mirror client logic when determining whether to apply feral AP Co-authored-by: Shauren --- src/server/game/Entities/Item/ItemTemplate.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index 30eb7860f..3f9b79acd 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -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)