From 45ffd4bd072fa6c23495d1b3292148ec59a0973d Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 20 Apr 2024 16:43:31 +0800 Subject: [PATCH] [Equip score] Skip can take more check --- src/PlayerbotAI.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 68b4a3f6..5038832e 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4408,11 +4408,12 @@ InventoryResult PlayerbotAI::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, if (pItem->IsBindedNotWith(bot)) return EQUIP_ERR_DONT_OWN_THAT_ITEM; - - // check count of items (skip for auto move for same player from bank) - InventoryResult res = bot->CanTakeMoreSimilarItems(pItem); - if (res != EQUIP_ERR_OK) - return res; + + // Yunfan: skip it + // // check count of items (skip for auto move for same player from bank) + // InventoryResult res = bot->CanTakeMoreSimilarItems(pItem); + // if (res != EQUIP_ERR_OK) + // return res; ScalingStatDistributionEntry const* ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; // check allowed level (extend range to upper values if MaxLevel more or equal max player level, this let GM set high level with 1...max range items) @@ -4427,7 +4428,7 @@ InventoryResult PlayerbotAI::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, if (!bot->CanUseAttackType(bot->GetAttackBySlot(eslot))) return EQUIP_ERR_NOT_WHILE_DISARMED; - res = bot->CanUseItem(pItem, not_loading); + InventoryResult res = bot->CanUseItem(pItem, not_loading); if (res != EQUIP_ERR_OK) return res;