diff --git a/src/strategy/actions/QuestConfirmAcceptAction.cpp b/src/strategy/actions/QuestConfirmAcceptAction.cpp index ab580432..a3bd6bb9 100644 --- a/src/strategy/actions/QuestConfirmAcceptAction.cpp +++ b/src/strategy/actions/QuestConfirmAcceptAction.cpp @@ -13,6 +13,9 @@ bool QuestConfirmAcceptAction::Execute(Event event) if (!quest || !bot->CanAddQuest(quest, true)) { return false; } + std::ostringstream out; + out << "Quest: " << chat->FormatQuest(quest) << " confirm accept"; + botAI->TellMaster(out); bot->GetSession()->HandleQuestConfirmAccept(sendPacket); return true; } \ No newline at end of file diff --git a/src/strategy/actions/QuestConfirmAcceptAction.h b/src/strategy/actions/QuestConfirmAcceptAction.h index ced56e2c..5b10b292 100644 --- a/src/strategy/actions/QuestConfirmAcceptAction.h +++ b/src/strategy/actions/QuestConfirmAcceptAction.h @@ -16,10 +16,10 @@ class Player; class PlayerbotAI; class WorldObject; -class QuestConfirmAcceptAction : public QuestAction +class QuestConfirmAcceptAction : public Action { public: - QuestConfirmAcceptAction(PlayerbotAI* botAI) : QuestAction(botAI, "quest confirm accept") {} + QuestConfirmAcceptAction(PlayerbotAI* botAI) : Action(botAI, "quest confirm accept") {} bool Execute(Event event) override; }; diff --git a/src/strategy/actions/TalkToQuestGiverAction.cpp b/src/strategy/actions/TalkToQuestGiverAction.cpp index a26eb583..a0e1b62e 100644 --- a/src/strategy/actions/TalkToQuestGiverAction.cpp +++ b/src/strategy/actions/TalkToQuestGiverAction.cpp @@ -8,6 +8,7 @@ #include "ItemUsageValue.h" #include "Object.h" #include "Playerbots.h" +#include "QuestDef.h" #include "WorldPacket.h" void TalkToQuestGiverAction::ProcessQuest(Quest const* quest, Object* questGiver) @@ -238,6 +239,7 @@ bool TurnInQueryQuestAction::Execute(Event event) } } std::ostringstream out; + out << "Quest "; switch (status) { case QUEST_STATUS_COMPLETE: @@ -252,6 +254,9 @@ bool TurnInQueryQuestAction::Execute(Event event) case QUEST_STATUS_FAILED: out << "|cffff0000Failed|r"; break; + case QUEST_STATUS_REWARDED: + out << "|cffff0000Rewarded|r"; + break; } out << ": " << chat->FormatQuest(quest); diff --git a/src/strategy/actions/WorldPacketActionContext.h b/src/strategy/actions/WorldPacketActionContext.h index 2fa38164..4646da2f 100644 --- a/src/strategy/actions/WorldPacketActionContext.h +++ b/src/strategy/actions/WorldPacketActionContext.h @@ -24,6 +24,7 @@ #include "QuestAction.h" #include "PassLeadershipToMasterAction.h" #include "PetitionSignAction.h" +#include "QuestConfirmAcceptAction.h" #include "ReadyCheckAction.h" #include "RememberTaxiAction.h" #include "ReviveFromCorpseAction.h" @@ -36,6 +37,7 @@ #include "TradeStatusAction.h" #include "UseMeetingStoneAction.h" #include "NamedObjectContext.h" +#include "QuestConfirmAcceptAction.h" class PlayerbotAI; @@ -92,6 +94,7 @@ class WorldPacketActionContext : public NamedObjectContext creators["see spell"] = &WorldPacketActionContext::see_spell; creators["arena team accept"] = &WorldPacketActionContext::arena_team_accept; creators["turn in query quest"] = &WorldPacketActionContext::turn_in_query_quest; + creators["quest confirm accept"] = &WorldPacketActionContext::quest_confirm_accept; } private: @@ -143,6 +146,7 @@ class WorldPacketActionContext : public NamedObjectContext static Action* see_spell(PlayerbotAI* botAI) { return new SeeSpellAction(botAI); } static Action* arena_team_accept(PlayerbotAI* botAI) { return new ArenaTeamAcceptAction(botAI); } static Action* turn_in_query_quest(PlayerbotAI* botAI) { return new TurnInQueryQuestAction(botAI); } + static Action* quest_confirm_accept(PlayerbotAI* botAI) { return new QuestConfirmAcceptAction(botAI); } }; #endif