Scripts/Commands: Fix .quest complete to properly work with PvP kill quests. Closes #16321.

This commit is contained in:
Treeston
2018-08-14 16:09:51 +02:00
parent 9f3e6bfe9b
commit 077bf43ab5
3 changed files with 35 additions and 20 deletions

View File

@@ -230,6 +230,11 @@ public:
player->KillCreditGO(creature);
}
// player kills
if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_PLAYER_KILL))
if (uint32 reqPlayers = quest->GetPlayersSlain())
player->KilledPlayerCreditForQuest(reqPlayers, quest);
// If the quest requires reputation to complete
if (uint32 repFaction = quest->GetRepObjectiveFaction())
{