mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(CORE/Quests): Quest dialog fails to close with follow-up quest (#6309)
- Fixes the problem with the quest dialog which doesn't close/update on a follow-up quest if there is no space in the inventory - Closes: https://github.com/azerothcore/azerothcore-wotlk/issues/6296
This commit is contained in:
@@ -297,10 +297,22 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
|
||||
// Send next quest
|
||||
if (Quest const* nextQuest = _player->GetNextQuest(guid, quest))
|
||||
{
|
||||
if (_player->CanAddQuest(nextQuest, false) && _player->CanTakeQuest(nextQuest, false))
|
||||
if (_player->CanTakeQuest(nextQuest, false))
|
||||
{
|
||||
if (nextQuest->IsAutoAccept())
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
{
|
||||
// QUEST_FLAGS_AUTO_ACCEPT was not used by Blizzard.
|
||||
if (_player->CanAddQuest(nextQuest, false))
|
||||
{
|
||||
_player->AddQuestAndCheckCompletion(nextQuest, object);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Auto accept is set for a custom quest and there is no inventory space
|
||||
_player->PlayerTalkClass->SendCloseGossip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextQuest, guid, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user