[Warning] Fix

This commit is contained in:
Yunfan Li
2024-07-18 23:33:48 +08:00
parent 9dc494f407
commit f4c43aa920
4 changed files with 7 additions and 4 deletions

View File

@@ -137,6 +137,8 @@ std::string const QueryItemUsageAction::QueryItemUsage(ItemTemplate const* item)
return "Auctionhouse"; return "Auctionhouse";
case ITEM_USAGE_AMMO: case ITEM_USAGE_AMMO:
return "Ammunition"; return "Ammunition";
default:
break;
} }
return ""; return "";

View File

@@ -588,11 +588,12 @@ void ChatReplyAction::ChatReplyDo(Player* bot, uint32 type, uint32 guid1, uint32
if (ChannelMgr* cMgr = ChannelMgr::forTeam(bot->GetTeamId())) if (ChannelMgr* cMgr = ChannelMgr::forTeam(bot->GetTeamId()))
{ {
std::string worldChan = "World"; 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) if (bot->GetTeamId() == TEAM_ALLIANCE)
chn->Say(bot->GetGUID(), c, LANG_COMMON); chn->Say(bot->GetGUID(), c, LANG_COMMON);
else else
chn->Say(bot->GetGUID(), c, LANG_ORCISH); chn->Say(bot->GetGUID(), c, LANG_ORCISH);
}
} }
} }
else else

View File

@@ -151,7 +151,7 @@ void TrainerAction::TellFooter(uint32 totalCost)
bool MaintenanceAction::Execute(Event event) bool MaintenanceAction::Execute(Event event)
{ {
if (!sPlayerbotAIConfig->maintenanceCommand) { 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; return false;
} }
botAI->TellMaster("I'm maintaining"); botAI->TellMaster("I'm maintaining");
@@ -187,7 +187,7 @@ bool RemoveGlyphAction::Execute(Event event)
bool AutoGearAction::Execute(Event event) bool AutoGearAction::Execute(Event event)
{ {
if (!sPlayerbotAIConfig->autoGearCommand) { 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; return false;
} }
botAI->TellMaster("I'm auto gearing"); botAI->TellMaster("I'm auto gearing");

View File

@@ -51,5 +51,5 @@ void GenericRogueNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& trig
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"often", "often",
NextAction::array(0, new NextAction("unstealth", 10.0f), NULL))); NextAction::array(0, new NextAction("unstealth", 30.0f), NULL)));
} }