From f4c43aa9206f8ca0cded3899ae266b14717c4026 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Thu, 18 Jul 2024 23:33:48 +0800 Subject: [PATCH] [Warning] Fix --- src/strategy/actions/QueryItemUsageAction.cpp | 2 ++ src/strategy/actions/SayAction.cpp | 3 ++- src/strategy/actions/TrainerAction.cpp | 4 ++-- src/strategy/rogue/GenericRogueNonCombatStrategy.cpp | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/strategy/actions/QueryItemUsageAction.cpp b/src/strategy/actions/QueryItemUsageAction.cpp index 1357d914..2a894ced 100644 --- a/src/strategy/actions/QueryItemUsageAction.cpp +++ b/src/strategy/actions/QueryItemUsageAction.cpp @@ -137,6 +137,8 @@ std::string const QueryItemUsageAction::QueryItemUsage(ItemTemplate const* item) return "Auctionhouse"; case ITEM_USAGE_AMMO: return "Ammunition"; + default: + break; } return ""; diff --git a/src/strategy/actions/SayAction.cpp b/src/strategy/actions/SayAction.cpp index 074b4e22..02f03499 100644 --- a/src/strategy/actions/SayAction.cpp +++ b/src/strategy/actions/SayAction.cpp @@ -588,11 +588,12 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32 if (ChannelMgr* cMgr = ChannelMgr::forTeam(bot->GetTeamId())) { std::string worldChan = "World"; - if (Channel* chn = cMgr->GetJoinChannel(worldChan.c_str(), 0)) + if (Channel* chn = cMgr->GetJoinChannel(worldChan.c_str(), 0)) { if (bot->GetTeamId() == TEAM_ALLIANCE) chn->Say(bot->GetGUID(), c, LANG_COMMON); else chn->Say(bot->GetGUID(), c, LANG_ORCISH); + } } } else diff --git a/src/strategy/actions/TrainerAction.cpp b/src/strategy/actions/TrainerAction.cpp index af1e7a7c..231dea7d 100644 --- a/src/strategy/actions/TrainerAction.cpp +++ b/src/strategy/actions/TrainerAction.cpp @@ -151,7 +151,7 @@ void TrainerAction::TellFooter(uint32 totalCost) bool MaintenanceAction::Execute(Event event) { if (!sPlayerbotAIConfig->maintenanceCommand) { - botAI->TellMaster("maintenance command is not allowed, please check the configuration."); + botAI->TellError("maintenance command is not allowed, please check the configuration."); return false; } botAI->TellMaster("I'm maintaining"); @@ -187,7 +187,7 @@ bool RemoveGlyphAction::Execute(Event event) bool AutoGearAction::Execute(Event event) { if (!sPlayerbotAIConfig->autoGearCommand) { - botAI->TellMaster("autogear command is not allowed, please check the configuration."); + botAI->TellError("autogear command is not allowed, please check the configuration."); return false; } botAI->TellMaster("I'm auto gearing"); diff --git a/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp b/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp index 74d95313..b28da727 100644 --- a/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp +++ b/src/strategy/rogue/GenericRogueNonCombatStrategy.cpp @@ -51,5 +51,5 @@ void GenericRogueNonCombatStrategy::InitTriggers(std::vector& trig triggers.push_back(new TriggerNode( "often", - NextAction::array(0, new NextAction("unstealth", 10.0f), NULL))); + NextAction::array(0, new NextAction("unstealth", 30.0f), NULL))); }