[Equip score] Skip can take more check

This commit is contained in:
Yunfan Li
2024-04-20 16:43:31 +08:00
parent 924c1a2197
commit 45ffd4bd07

View File

@@ -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;