mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Quests: Only prompt the player to take the next quest in a chain if he meets the conditions for that quest.
This commit is contained in:
@@ -298,10 +298,14 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
|
||||
// Send next quest
|
||||
if (Quest const* nextQuest = _player->GetNextQuest(guid, quest))
|
||||
{
|
||||
if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true) && _player->CanTakeQuest(nextQuest, true))
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
// Only send the quest to the player if the conditions are met
|
||||
if (_player->CanTakeQuest(nextQuest, true))
|
||||
{
|
||||
if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true))
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextQuest, guid, true);
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextQuest, guid, true);
|
||||
}
|
||||
}
|
||||
|
||||
questgiver->AI()->sQuestReward(_player, quest, reward);
|
||||
@@ -316,10 +320,14 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
|
||||
// Send next quest
|
||||
if (Quest const* nextQuest = _player->GetNextQuest(guid, quest))
|
||||
{
|
||||
if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true) && _player->CanTakeQuest(nextQuest, true))
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
// Only send the quest to the player if the conditions are met
|
||||
if (_player->CanTakeQuest(nextQuest, true))
|
||||
{
|
||||
if (nextQuest->IsAutoAccept() && _player->CanAddQuest(nextQuest, true))
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextQuest, guid, true);
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextQuest, guid, true);
|
||||
}
|
||||
}
|
||||
|
||||
questGiver->AI()->QuestReward(_player, quest, reward);
|
||||
|
||||
Reference in New Issue
Block a user