mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
add log console + drop quest info
This commit is contained in:
@@ -15,6 +15,7 @@ bool AcceptAllQuestsAction::ProcessQuest(Quest const* quest, Object* questGiver)
|
|||||||
|
|
||||||
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
{
|
{
|
||||||
|
LOG_INFO("playerbots", "Quest [ {} ] accepted", quest->GetTitle());
|
||||||
bot->Say("Quest [ " + text_quest + " ] accepted", LANG_UNIVERSAL);
|
bot->Say("Quest [ " + text_quest + " ] accepted", LANG_UNIVERSAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ bool DropQuestAction::Execute(Event event)
|
|||||||
bot->RemoveRewardedQuest(entry);
|
bot->RemoveRewardedQuest(entry);
|
||||||
bot->RemoveActiveQuest(entry, false);
|
bot->RemoveActiveQuest(entry, false);
|
||||||
|
|
||||||
|
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
|
{
|
||||||
|
const Quest* pQuest = sObjectMgr->GetQuestTemplate(entry);
|
||||||
|
LOG_INFO("playerbots", "Quest [ {} ] dropped", pQuest->GetTitle());
|
||||||
|
bot->Say("Quest [ " + ChatHelper::FormatQuest(pQuest) + " ] dropped", LANG_UNIVERSAL);
|
||||||
|
}
|
||||||
|
|
||||||
botAI->TellMaster("Quest removed");
|
botAI->TellMaster("Quest removed");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ bool QuestAction::CompleteQuest(Player* player, uint32 entry)
|
|||||||
player->CompleteQuest(entry);
|
player->CompleteQuest(entry);
|
||||||
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
{
|
{
|
||||||
|
LOG_INFO("playerbots", "Quest [ {} ] completed", pQuest->GetTitle());
|
||||||
bot->Say("Quest [ " + ChatHelper::FormatQuest(pQuest) + " ] completed", LANG_UNIVERSAL);
|
bot->Say("Quest [ " + ChatHelper::FormatQuest(pQuest) + " ] completed", LANG_UNIVERSAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,6 +251,7 @@ bool QuestUpdateCompleteAction::Execute(Event event)
|
|||||||
{
|
{
|
||||||
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
if (botAI->HasStrategy("debug quest", BotState::BOT_STATE_NON_COMBAT) || botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
{
|
{
|
||||||
|
LOG_INFO("playerbots", "Quest [ {} ] completed", qInfo->GetTitle());
|
||||||
bot->Say("Quest [ " + ChatHelper::FormatQuest(qInfo) + " ] completed", LANG_UNIVERSAL);
|
bot->Say("Quest [ " + ChatHelper::FormatQuest(qInfo) + " ] completed", LANG_UNIVERSAL);
|
||||||
}
|
}
|
||||||
botAI->TellMasterNoFacing("Quest completed " + ChatHelper::FormatQuest(qInfo));
|
botAI->TellMasterNoFacing("Quest completed " + ChatHelper::FormatQuest(qInfo));
|
||||||
|
|||||||
Reference in New Issue
Block a user