mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 20:13:48 +00:00
fix(Core): Bag/Fishing pole equip (#1860)
* fix(Core): Bag/Fishing pole equip - Fix bug When your bags are full and you equip a fishing pole, from 2x one handed weapon, it equip the fishing pole, than 1 weapon goes into bag and the other goes into the mailbox from "customer support". -Do not allow equip 2 fishing poles for Warrior
This commit is contained in:
@@ -10244,7 +10244,7 @@ uint8 Player::FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) c
|
|||||||
{
|
{
|
||||||
if (ItemTemplate const* mhWeaponProto = mhWeapon->GetTemplate())
|
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)
|
if (mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF)
|
||||||
{
|
{
|
||||||
const_cast<Player*>(this)->AutoUnequipOffhandIfNeed(true);
|
const_cast<Player*>(this)->AutoUnequipOffhandIfNeed(true);
|
||||||
break;
|
break;
|
||||||
@@ -10254,7 +10254,7 @@ uint8 Player::FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) c
|
|||||||
|
|
||||||
if (GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
if (GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||||
{
|
{
|
||||||
if (proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || proto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF || proto->SubClass == ITEM_SUBCLASS_WEAPON_FISHING_POLE)
|
if (proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || proto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF)
|
||||||
{
|
{
|
||||||
const_cast<Player*>(this)->AutoUnequipOffhandIfNeed(true);
|
const_cast<Player*>(this)->AutoUnequipOffhandIfNeed(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user