mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
[Warnings] Fix warnings
This commit is contained in:
parent
ab9339dffa
commit
4636b6e5b6
@ -960,6 +960,8 @@ void PlayerbotAI::ChangeEngine(BotState type)
|
|||||||
case BOT_STATE_DEAD:
|
case BOT_STATE_DEAD:
|
||||||
// LOG_DEBUG("playerbots", "=== {} DEAD ===", bot->GetName().c_str());
|
// LOG_DEBUG("playerbots", "=== {} DEAD ===", bot->GetName().c_str());
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -196,12 +196,13 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
|||||||
Item* oldItem = bot->GetItemByPos(dest);
|
Item* oldItem = bot->GetItemByPos(dest);
|
||||||
|
|
||||||
//No item equiped
|
//No item equiped
|
||||||
if (!oldItem)
|
if (!oldItem) {
|
||||||
if (shouldEquip)
|
if (shouldEquip)
|
||||||
return ITEM_USAGE_EQUIP;
|
return ITEM_USAGE_EQUIP;
|
||||||
else {
|
else {
|
||||||
return ITEM_USAGE_BAD_EQUIP;
|
return ITEM_USAGE_BAD_EQUIP;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ItemTemplate const* oldItemProto = oldItem->GetTemplate();
|
ItemTemplate const* oldItemProto = oldItem->GetTemplate();
|
||||||
float oldScore = PlayerbotFactory::CalculateItemScore(oldItemProto->ItemId, bot);
|
float oldScore = PlayerbotFactory::CalculateItemScore(oldItemProto->ItemId, bot);
|
||||||
@ -215,12 +216,13 @@ ItemUsage ItemUsageValue::QueryItemUsageForEquip(ItemTemplate const* itemProto)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bigger quiver
|
// Bigger quiver
|
||||||
if (itemProto->Class == ITEM_CLASS_QUIVER)
|
if (itemProto->Class == ITEM_CLASS_QUIVER) {
|
||||||
if (!oldItem || oldItemProto->ContainerSlots < itemProto->ContainerSlots)
|
if (!oldItem || oldItemProto->ContainerSlots < itemProto->ContainerSlots) {
|
||||||
return ITEM_USAGE_EQUIP;
|
return ITEM_USAGE_EQUIP;
|
||||||
else {
|
} else {
|
||||||
return ITEM_USAGE_NONE;
|
return ITEM_USAGE_NONE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool existingShouldEquip = true;
|
bool existingShouldEquip = true;
|
||||||
if (oldItemProto->Class == ITEM_CLASS_WEAPON && !sRandomItemMgr->CanEquipWeapon(bot->getClass(), oldItemProto))
|
if (oldItemProto->Class == ITEM_CLASS_WEAPON && !sRandomItemMgr->CanEquipWeapon(bot->getClass(), oldItemProto))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user