mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Achievements: Implemented DefeatDungeonEncounter and DefeatDungeonEncounterWhileElegibleForLoot criteria types
This commit is contained in:
@@ -432,6 +432,12 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
|
||||
dungeonEncounter = bossInfo->GetDungeonEncounterForDifficulty(instance->GetDifficultyID());
|
||||
if (dungeonEncounter)
|
||||
{
|
||||
instance->DoOnPlayers([&](Player* player)
|
||||
{
|
||||
if (!player->IsLockedToDungeonEncounter(dungeonEncounter->ID))
|
||||
player->UpdateCriteria(CriteriaType::DefeatDungeonEncounterWhileElegibleForLoot, dungeonEncounter->ID);
|
||||
});
|
||||
|
||||
DoUpdateCriteria(CriteriaType::DefeatDungeonEncounter, dungeonEncounter->ID);
|
||||
SendBossKillCredit(dungeonEncounter->ID);
|
||||
if (dungeonEncounter->CompleteWorldStateID)
|
||||
|
||||
Reference in New Issue
Block a user