Core/Achievements: Fixed achievement criteria StartEvent and FailEvent

* Criteria using StartEvent cannot be updated without that event triggering first (not only for timed achievements)
* Implemented most StartEvent and FailEvent types
* Fixed saving criteria removed by RemoveCriteriaProgress
Port From (https://github.com/TrinityCore/TrinityCore/commit/41a20b1e4008d450d075847ef1fe367f0e3a240f)
This commit is contained in:
hondacrx
2024-01-30 10:22:01 -05:00
parent 902b217d88
commit a1cb1d95ee
16 changed files with 148 additions and 211 deletions
+8
View File
@@ -97,7 +97,15 @@ namespace Game.Scenarios
{
_currentstep = step;
if (step != null)
{
SetStepState(step, ScenarioStepState.InProgress);
foreach (ObjectGuid guid in _players)
{
Player player = Global.ObjAccessor.GetPlayer(_map, guid);
if (player != null)
player.StartCriteria(CriteriaStartEvent.BeginScenarioStep, step.Id);
}
}
ScenarioState scenarioState = new();
BuildScenarioState(scenarioState);