Core/Quest - fix incorrect answer when sharing (#27529)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
kvolk2git
2022-04-17 18:27:00 +03:00
committed by GitHub
parent 5384fc194f
commit c65ccefe16

View File

@@ -569,15 +569,32 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
if (!receiver || receiver == sender)
continue;
if (!receiver->SatisfyQuestStatus(quest, false))
if (!receiver->GetPlayerSharingQuest().IsEmpty())
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_HAVE_QUEST);
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_BUSY);
continue;
}
if (receiver->GetQuestStatus(questId) == QUEST_STATUS_COMPLETE)
switch (receiver->GetQuestStatus(questId))
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_FINISH_QUEST);
case QUEST_STATUS_REWARDED:
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_FINISH_QUEST);
continue;
}
case QUEST_STATUS_INCOMPLETE:
case QUEST_STATUS_COMPLETE:
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_HAVE_QUEST);
continue;
}
default:
break;
}
if (!receiver->SatisfyQuestLog(false))
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_LOG_FULL);
continue;
}
@@ -593,18 +610,6 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
continue;
}
if (!receiver->SatisfyQuestLog(false))
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_LOG_FULL);
continue;
}
if (receiver->GetPlayerSharingQuest())
{
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_BUSY);
continue;
}
sender->SendPushToPartyResponse(receiver, QUEST_PARTY_MSG_SHARING_QUEST);
if ((quest->IsAutoComplete() && quest->IsRepeatable() && !quest->IsDailyOrWeekly()) || quest->HasFlag(QUEST_FLAGS_AUTOCOMPLETE))