Core/Quests: Fixed party accept quests

(cherry picked from commit 48940e292f)
This commit is contained in:
Shauren
2016-01-12 19:41:27 +01:00
parent a254bdff59
commit f6b60d461e

View File

@@ -124,7 +124,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPackets::Quest::QuestG
CLOSE_GOSSIP_CLEAR_DIVIDER();
return;
}
if (_player->GetGroup() != playerQuestObject->GetGroup() || (_player != playerQuestObject && !playerQuestObject->GetGroup()))
if (!_player->IsInSameRaidWith(playerQuestObject))
{
CLOSE_GOSSIP_CLEAR_DIVIDER();
return;
@@ -474,17 +474,22 @@ void WorldSession::HandleQuestConfirmAccept(WorldPackets::Quest::QuestConfirmAcc
if (!_player->IsInSameRaidWith(originalPlayer))
return;
if (!originalPlayer->CanShareQuest(packet.QuestID))
if (!originalPlayer->IsActiveQuest(packet.QuestID))
return;
if (!_player->CanTakeQuest(quest, true))
return;
if (_player->CanAddQuest(quest, true))
{
_player->AddQuestAndCheckCompletion(quest, NULL); // NULL, this prevent DB script from duplicate running
_player->SetDivider(ObjectGuid::Empty);
if (quest->GetSrcSpell() > 0)
_player->CastSpell(_player, quest->GetSrcSpell(), true);
}
}
_player->SetDivider(ObjectGuid::Empty);
}
void WorldSession::HandleQuestgiverCompleteQuest(WorldPackets::Quest::QuestGiverCompleteQuest& packet)