Core/Achievements: Optimized resetting achievement criteria by condition and changed the functionality to properly reset all possible criteria with given condition

Port From (https://github.com/TrinityCore/TrinityCore/commit/6f7ff9a3efd10cd4f776a67540109e7bb774f1c5)
This commit is contained in:
hondacrx
2020-05-06 17:52:14 -04:00
parent 4f6447cc0b
commit 43fcc558e4
8 changed files with 53 additions and 46 deletions
+3 -3
View File
@@ -774,9 +774,9 @@ namespace Game.Entities
UpdateCriteria(CriteriaTypes.DeathAtMap, 1);
UpdateCriteria(CriteriaTypes.Death, 1);
UpdateCriteria(CriteriaTypes.DeathInDungeon, 1);
ResetCriteria(CriteriaTypes.BgObjectiveCapture, (uint)CriteriaCondition.NoDeath);
ResetCriteria(CriteriaTypes.HonorableKill, (uint)CriteriaCondition.NoDeath);
ResetCriteria(CriteriaTypes.GetKillingBlows, (uint)CriteriaCondition.NoDeath);
// reset all death criterias
ResetCriteria(CriteriaCondition.NoDeath, 0);
}
base.SetDeathState(s);