[Warnings] Fix warnings

This commit is contained in:
Yunfan Li
2024-06-22 18:47:00 +08:00
parent 5318e4b49d
commit ab9339dffa
4 changed files with 9 additions and 4 deletions

View File

@@ -199,8 +199,9 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
if (!oldItem)
if (shouldEquip)
return ITEM_USAGE_EQUIP;
else
else {
return ITEM_USAGE_BAD_EQUIP;
}
ItemTemplate const* oldItemProto = oldItem->GetTemplate();
float oldScore = PlayerbotFactory::CalculateItemScore(oldItemProto->ItemId, bot);
@@ -217,8 +218,9 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
if (itemProto->Class == ITEM_CLASS_QUIVER)
if (!oldItem || oldItemProto->ContainerSlots < itemProto->ContainerSlots)
return ITEM_USAGE_EQUIP;
else
else {
return ITEM_USAGE_NONE;
}
bool existingShouldEquip = true;
if (oldItemProto->Class == ITEM_CLASS_WEAPON && !sRandomItemMgr->CanEquipWeapon(bot->getClass(), oldItemProto))