mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2026-01-27 14:52:26 -08: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:
parent
fa9638a1b1
commit
dfdedd36bb
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue