mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
[Warnings] Fix warnings
This commit is contained in:
@@ -196,12 +196,13 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
||||
Item* oldItem = bot->GetItemByPos(dest);
|
||||
|
||||
//No item equiped
|
||||
if (!oldItem)
|
||||
if (!oldItem) {
|
||||
if (shouldEquip)
|
||||
return ITEM_USAGE_EQUIP;
|
||||
else {
|
||||
return ITEM_USAGE_BAD_EQUIP;
|
||||
}
|
||||
}
|
||||
|
||||
ItemTemplate const* oldItemProto = oldItem->GetTemplate();
|
||||
float oldScore = PlayerbotFactory::CalculateItemScore(oldItemProto->ItemId, bot);
|
||||
@@ -215,12 +216,13 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
||||
}
|
||||
|
||||
// Bigger quiver
|
||||
if (itemProto->Class == ITEM_CLASS_QUIVER)
|
||||
if (!oldItem || oldItemProto->ContainerSlots < itemProto->ContainerSlots)
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user