mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-12-01 21:12:50 +08:00
[Warnings] Fix warnings
This commit is contained in:
@@ -4115,7 +4115,8 @@ bool BGTactics::selectObjective(bool reset)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -4503,7 +4504,7 @@ bool BGTactics::atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<ui
|
|||||||
if (f == vFlagIds.end())
|
if (f == vFlagIds.end())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!go->isSpawned() || !go->GetGoState() == GO_STATE_READY)
|
if (!go->isSpawned() || go->GetGoState() != GO_STATE_READY)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!bot->CanUseBattlegroundObject(go) && bgType != BATTLEGROUND_WS)
|
if (!bot->CanUseBattlegroundObject(go) && bgType != BATTLEGROUND_WS)
|
||||||
@@ -4644,6 +4645,8 @@ bool BGTactics::atFlag(std::vector<BattleBotPath*> const& vPaths, std::vector<ui
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ bool BuyAction::Execute(Event event)
|
|||||||
case ITEM_USAGE_SKILL:
|
case ITEM_USAGE_SKILL:
|
||||||
needMoneyFor = NeedMoneyFor::tradeskill;
|
needMoneyFor = NeedMoneyFor::tradeskill;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needMoneyFor == NeedMoneyFor::none)
|
if (needMoneyFor == NeedMoneyFor::none)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
uint32 FindLastSeparator(std::string const text, std::string const sep)
|
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)
|
if (pos == std::string::npos)
|
||||||
return pos;
|
return pos;
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ bool CastCustomSpellAction::Execute(Event event)
|
|||||||
|
|
||||||
Item* itemTarget = nullptr;
|
Item* itemTarget = nullptr;
|
||||||
|
|
||||||
uint32 pos = FindLastSeparator(text, " ");
|
size_t pos = FindLastSeparator(text, " ");
|
||||||
uint32 castCount = 1;
|
uint32 castCount = 1;
|
||||||
if (pos != std::string::npos)
|
if (pos != std::string::npos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
bool CustomStrategyEditAction::Execute(Event event)
|
bool CustomStrategyEditAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
std::string text = event.getParam();
|
std::string text = event.getParam();
|
||||||
uint32 pos = text.find(" ");
|
size_t pos = text.find(" ");
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
return PrintHelp();
|
return PrintHelp();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ bool RangeAction::Execute(Event event)
|
|||||||
PrintRange("flee");
|
PrintRange("flee");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 pos = param.find(" ");
|
size_t pos = param.find(" ");
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ void TalkToQuestGiverAction::ProcessQuest(Quest const* quest, Object* questGiver
|
|||||||
case QUEST_STATUS_FAILED:
|
case QUEST_STATUS_FAILED:
|
||||||
out << "|cffff0000Failed|r";
|
out << "|cffff0000Failed|r";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out << ": " << chat->FormatQuest(quest);
|
out << ": " << chat->FormatQuest(quest);
|
||||||
@@ -257,6 +259,8 @@ bool TurnInQueryQuestAction::Execute(Event event)
|
|||||||
case QUEST_STATUS_REWARDED:
|
case QUEST_STATUS_REWARDED:
|
||||||
out << "|cffff0000Rewarded|r";
|
out << "|cffff0000Rewarded|r";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out << ": " << chat->FormatQuest(quest);
|
out << ": " << chat->FormatQuest(quest);
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
inline int strcmpi(char const* s1, char const* s2)
|
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;
|
return *s1 - *s2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ uint32 MoneyNeededForValue::Calculate()
|
|||||||
case NeedMoneyFor::tradeskill:
|
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)
|
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;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return moneyWanted;
|
return moneyWanted;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
inline int strcmpi(char const* s1, char const* s2)
|
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;
|
return *s1 - *s2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user