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
@@ -439,7 +439,7 @@ namespace Game.BattleGrounds.Zones
//update world state to show correct flag carrier
UpdateFlagState(Team.Horde, WSGFlagState.OnPlayer);
player.CastSpell(player, WSGSpellId.SilverwingFlag, true);
player.StartCriteriaTimer(CriteriaStartEvent.BeSpellTarget, WSGSpellId.SilverwingFlagPicked);
//player.StartCriteria(CriteriaStartEvent.BeSpellTarget, WSGSpellId.SilverwingFlagPicked);
if (_flagState[1] == WSGFlagState.OnPlayer)
_bothFlagsKept = true;
@@ -461,7 +461,7 @@ namespace Game.BattleGrounds.Zones
//update world state to show correct flag carrier
UpdateFlagState(Team.Alliance, WSGFlagState.OnPlayer);
player.CastSpell(player, WSGSpellId.WarsongFlag, true);
player.StartCriteriaTimer(CriteriaStartEvent.BeSpellTarget, WSGSpellId.WarsongFlagPicked);
//player.StartCriteriaTimer(CriteriaStartEvent.BeSpellTarget, WSGSpellId.WarsongFlagPicked);
if (_flagState[0] == WSGFlagState.OnPlayer)
_bothFlagsKept = true;