Skip to content

Commit

Permalink
fix: check if the player has the HH quest (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyeriah authored Oct 22, 2023
1 parent 65e5470 commit 3489512
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Bracket_1_19/scripts/events/hallows_end.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ class unit_headless_horseman_script : public UnitScript
{
killer->GetMap()->DoForAllPlayers([&](Player* player)
{
player->CompleteQuest(QUEST_HEADLESS_HORSEMAN);

if (Quest const* quest = sObjectMgr->GetQuestTemplate(QUEST_HEADLESS_HORSEMAN))
if (player->HasQuest(QUEST_HEADLESS_HORSEMAN))
{
player->RewardQuest(quest, 0, nullptr, true, true);
player->CompleteQuest(QUEST_HEADLESS_HORSEMAN);

if (Quest const* quest = sObjectMgr->GetQuestTemplate(QUEST_HEADLESS_HORSEMAN))
{
player->RewardQuest(quest, 0, nullptr, true, true);
}
}
});
}
Expand Down

0 comments on commit 3489512

Please sign in to comment.