Core/Quests: Implemented quest popups
This commit is contained in:
1 parent
3dcba98482
commit
05250fe4ad
6 files changed
+26
-24
No files matched your search
@@ -332,17 +332,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (me && e.action.questOffer.directAdd == 0)
|
||||
{
|
||||
if (pTarget->CanTakeQuest(q, true))
|
||||
if (WorldSession* session = pTarget->GetSession())
|
||||
{
|
||||
PlayerMenu menu(session);
|
||||
menu.SendQuestGiverQuestDetails(q, me->GetGUID(), true);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player guidLow %u - offering quest %u", pTarget->GetGUID().GetCounter(), e.action.questOffer.questID);
|
||||
}
|
||||
if (pTarget->CanTakeQuest(q, true) && q->IsAutoAccept())
|
||||
{
|
||||
pTarget->AddQuestAndCheckCompletion(q, nullptr);
|
||||
pTarget->PlayerTalkClass->SendQuestGiverQuestDetails(q, pTarget->GetGUID(), true, true);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player guidLow %u - discovering quest %u", pTarget->GetGUID().GetCounter(), e.action.questOffer.questID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(*itr)->ToPlayer()->AddQuestAndCheckCompletion(q, nullptr);
|
||||
pTarget->AddQuestAndCheckCompletion(q, nullptr);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player guidLow %u - quest %u added",
|
||||
pTarget->GetGUID().GetCounter(), e.action.questOffer.questID);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user