mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-13 23:33:47 +00:00
quest confirm accept(group quest)
This commit is contained in:
18
src/strategy/actions/QuestConfirmAcceptAction.cpp
Normal file
18
src/strategy/actions/QuestConfirmAcceptAction.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "QuestConfirmAcceptAction.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
bool QuestConfirmAcceptAction::Execute(Event event)
|
||||
{
|
||||
WorldPacket packet(event.getPacket());
|
||||
uint32 questId;
|
||||
packet >> questId;
|
||||
|
||||
WorldPacket sendPacket(CMSG_QUEST_CONFIRM_ACCEPT);
|
||||
sendPacket << questId;
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
|
||||
if (!quest || !bot->CanAddQuest(quest, true)) {
|
||||
return false;
|
||||
}
|
||||
bot->GetSession()->HandleQuestConfirmAccept(sendPacket);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user