Core/Achievements: Implemented DefeatDungeonEncounter and DefeatDungeonEncounterWhileElegibleForLoot criteria types
Port From (https://github.com/TrinityCore/TrinityCore/commit/765f86fdc001ce352a706d2950197b1007d9afce)
This commit is contained in:
@@ -384,6 +384,12 @@ namespace Game.Maps
|
||||
dungeonEncounter = bossInfo.GetDungeonEncounterForDifficulty(instance.GetDifficultyID());
|
||||
if (dungeonEncounter != null)
|
||||
{
|
||||
instance.DoOnPlayers(player =>
|
||||
{
|
||||
if (!player.IsLockedToDungeonEncounter(dungeonEncounter.Id))
|
||||
player.UpdateCriteria(CriteriaType.DefeatDungeonEncounterWhileElegibleForLoot, dungeonEncounter.Id);
|
||||
});
|
||||
|
||||
DoUpdateCriteria(CriteriaType.DefeatDungeonEncounter, dungeonEncounter.Id);
|
||||
SendBossKillCredit(dungeonEncounter.Id);
|
||||
if (dungeonEncounter.CompleteWorldStateID != 0)
|
||||
|
||||
Reference in New Issue
Block a user