mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Quests: Fixed WPE exploit that allowed to accept any quest
This commit is contained in:
@@ -455,6 +455,12 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
||||
if (!_player->IsInSameRaidWith(originalPlayer))
|
||||
return;
|
||||
|
||||
if (!!originalPlayer->CanShareQuest(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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user