mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +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:
@@ -1710,7 +1710,7 @@ void Player::Update(uint32 p_time)
|
||||
|
||||
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
|
||||
{
|
||||
if (now > m_Last_tick && _restTime > 0) // freeze update
|
||||
if (now > m_Last_tick && _restTime > 0) // freeze update
|
||||
{
|
||||
time_t currTime = time(NULL);
|
||||
time_t timeDiff = currTime - _restTime;
|
||||
@@ -10244,7 +10244,7 @@ uint8 Player::FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) c
|
||||
{
|
||||
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);
|
||||
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 (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);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user