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:
parent
8214873e28
commit
4811a14bd6
1 changed files with 14 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue