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:
@@ -4115,7 +4115,8 @@ bool BGTactics::selectObjective(bool reset)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -4503,7 +4504,7 @@ bool BGTactics::atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<ui
|
||||
if (f == vFlagIds.end())
|
||||
continue;
|
||||
|
||||
if (!go->isSpawned() || !go->GetGoState() == GO_STATE_READY)
|
||||
if (!go->isSpawned() || go->GetGoState() != GO_STATE_READY)
|
||||
continue;
|
||||
|
||||
if (!bot->CanUseBattlegroundObject(go) && bgType != BATTLEGROUND_WS)
|
||||
@@ -4644,6 +4645,8 @@ bool BGTactics::atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<ui
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ bool BuyAction::Execute(Event event)
|
||||
case ITEM_USAGE_SKILL:
|
||||
needMoneyFor = NeedMoneyFor::tradeskill;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (needMoneyFor == NeedMoneyFor::none)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
uint32 FindLastSeparator(std::string const text, std::string const sep)
|
||||
{
|
||||
uint32 pos = text.rfind(sep);
|
||||
size_t pos = text.rfind(sep);
|
||||
if (pos == std::string::npos)
|
||||
return pos;
|
||||
|
||||
@@ -64,7 +64,7 @@ bool CastCustomSpellAction::Execute(Event event)
|
||||
|
||||
Item* itemTarget = nullptr;
|
||||
|
||||
uint32 pos = FindLastSeparator(text, " ");
|
||||
size_t pos = FindLastSeparator(text, " ");
|
||||
uint32 castCount = 1;
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
bool CustomStrategyEditAction::Execute(Event event)
|
||||
{
|
||||
std::string text = event.getParam();
|
||||
uint32 pos = text.find(" ");
|
||||
size_t pos = text.find(" ");
|
||||
if (pos == std::string::npos)
|
||||
return PrintHelp();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ bool RangeAction::Execute(Event event)
|
||||
PrintRange("flee");
|
||||
}
|
||||
|
||||
uint32 pos = param.find(" ");
|
||||
size_t pos = param.find(" ");
|
||||
if (pos == std::string::npos)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ void TalkToQuestGiverAction::ProcessQuest(Quest const* quest, Object* questGiver
|
||||
case QUEST_STATUS_FAILED:
|
||||
out << "|cffff0000Failed|r";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
out << ": " << chat->FormatQuest(quest);
|
||||
@@ -257,6 +259,8 @@ bool TurnInQueryQuestAction::Execute(Event event)
|
||||
case QUEST_STATUS_REWARDED:
|
||||
out << "|cffff0000Rewarded|r";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
out << ": " << chat->FormatQuest(quest);
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#ifndef WIN32
|
||||
inline int strcmpi(char const* s1, char const* s2)
|
||||
{
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2);
|
||||
return *s1 - *s2;
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2) {}
|
||||
return *s1 - *s2;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ uint32 MoneyNeededForValue::Calculate()
|
||||
case NeedMoneyFor::tradeskill:
|
||||
moneyWanted = (level * level * level); //Or level^3 (10s @ lvl10, 3g @ lvl30, 20g @ lvl60, 50g @ lvl80): Todo replace (Should be buyable reagents that combined allow crafting of usefull items)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return moneyWanted;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#ifndef WIN32
|
||||
inline int strcmpi(char const* s1, char const* s2)
|
||||
{
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2);
|
||||
return *s1 - *s2;
|
||||
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2) {}
|
||||
return *s1 - *s2;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user