mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Warnings] Fix warnings
This commit is contained in:
@@ -3123,7 +3123,7 @@ bool PlayerbotAI::HasAuraToDispel(Unit* target, uint32 dispelType)
|
||||
#ifndef WIN32
|
||||
inline int strcmpi(char const* s1, char const* s2)
|
||||
{
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2);
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2) {}
|
||||
return *s1 - *s2;
|
||||
}
|
||||
#endif
|
||||
@@ -3951,6 +3951,8 @@ std::string const PlayerbotAI::HandleRemoteCommand(std::string const command)
|
||||
case NeedMoneyFor::guild:
|
||||
out << "guild";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
out << " | " << ChatHelper::formatMoney(AI_VALUE2(uint32, "free money for", i)) << " / " << ChatHelper::formatMoney(AI_VALUE2(uint32, "money needed for", i)) << "\n";
|
||||
|
||||
@@ -1285,7 +1285,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
|
||||
"ROUND( position_z / 50), "
|
||||
"t.entry "
|
||||
"HAVING "
|
||||
"count(*) > 10) AS g "
|
||||
"count(*) > 7) AS g "
|
||||
"INNER JOIN creature c ON g.guid = c.guid "
|
||||
"INNER JOIN creature_template t on c.id1 = t.entry "
|
||||
"ORDER BY "
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -13,6 +13,7 @@ class PlayerbotAI;
|
||||
class FindPlayerPredicate
|
||||
{
|
||||
public:
|
||||
virtual ~FindPlayerPredicate() = default;
|
||||
virtual bool Check(Unit* /*unit*/) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user