mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 01:53:47 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -12437,6 +12437,14 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/)
|
||||
if (!CanDualWield() && (offItem->GetTemplate()->InventoryType == INVTYPE_WEAPONOFFHAND || offItem->GetTemplate()->InventoryType == INVTYPE_WEAPON))
|
||||
force = true;
|
||||
|
||||
// unequip offhand weapon if player main hand weapon is a polearm or staff or fishing pole
|
||||
if (Item* mhWeapon = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
|
||||
if (ItemTemplate const* mhWeaponProto = mhWeapon->GetTemplate())
|
||||
if (mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM ||
|
||||
mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF ||
|
||||
mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_FISHING_POLE)
|
||||
force = true;
|
||||
|
||||
// need unequip offhand for 2h-weapon without TitanGrip (in any from hands)
|
||||
if (!force && (CanTitanGrip() || (offItem->GetTemplate()->InventoryType != INVTYPE_2HWEAPON && !IsTwoHandUsed())))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user