public static void Invoke(pWardenObjectiveState oldState, pWardenObjectiveState newState) { bool mainComplete = oldState.main_status != newState.main_status && newState.main_status == eWardenObjectiveStatus.WardenObjectiveItemSolved; bool secondComplete = oldState.second_status != newState.second_status && newState.second_status == eWardenObjectiveStatus.WardenObjectiveItemSolved; bool thirdComplete = oldState.third_status != newState.third_status && newState.third_status == eWardenObjectiveStatus.WardenObjectiveItemSolved; var blocks = EventListenerDataBlock.GetAllBlocks(); var exp = RundownManager.GetActiveExpeditionData(); foreach (var block in blocks) { if (block.Type == EventListenerType.ObjectiveComplete) { foreach (var expedition in block.ForExpeditions) { if (expedition.ExpeditionIndex == exp.expeditionIndex && expedition.Tier == exp.tier) { if ((!block.CompleteObjective_Layers.Contains(LG_LayerType.MainLayer) || mainComplete) && (!block.CompleteObjective_Layers.Contains(LG_LayerType.SecondaryLayer) || secondComplete) && (!block.CompleteObjective_Layers.Contains(LG_LayerType.ThirdLayer) || thirdComplete)) { EventSequenceManager.StartSequence(block.EventSequenceOnActivate); } break; } } } } }
private void OnStateChanged(pWardenObjectiveState oldState, pWardenObjectiveState newState, bool isRecall) { }
internal static void Postfix(pWardenObjectiveState oldState, pWardenObjectiveState newState, bool isRecall) { Logger.Verbose("Global: ObjectiveStateChanged"); GlobalMessage.OnObjectiveStateChanged?.Invoke(oldState, newState, isRecall); }