Пример #1
0
        private void Events_AllEvent(object sender, dynamic e)
        {
            if (!EliteAPI.IsReady)
            {
                return;
            }
            string commandName = $"((EliteAPI.{Wrapper.GetEventName(e)}))";

            if (commandName.Contains("Status"))
            {
                //Set status variables.
                SetVariables(Wrapper.GetVariables());
            }
            string macroGUID = vmCommand.CommandExists(commandName);

            if (macroGUID != null)
            {
                //Set event variables.
                EliteAPI.Logger.Log(Severity.Debug, $"Executing VoiceMacro command '{commandName}'.");
                SetVariables(Wrapper.GetEventVariables(e));
                vmCommand.ExecuteMacro(macroGUID);
            }
            else
            {
                EliteAPI.Logger.Log(Severity.Debug, $"VoiceMacro command '{commandName}' was not found, continuing.");
            }
        }
Пример #2
0
        private static void Events_AllEvent(object sender, dynamic e)
        {
            if (!EliteAPI.IsReady)
            {
                return;
            }
            string commandName = $"((EliteAPI.{Wrapper.GetEventName(e)}))";

            if (commandName.Contains("Status"))
            {
                //Set status variables.
                SetVariables(Wrapper.GetVariables());
            }
            if (proxy.CommandExists(commandName))
            {
                //Set event variables.
                EliteAPI.Logger.Log(Severity.Debug, $"Executing VoiceAttack command '{commandName}'.");
                SetVariables(Wrapper.GetEventVariables(e));
                proxy.ExecuteCommand(commandName);
            }
            else
            {
                EliteAPI.Logger.Log(Severity.Debug, $"VoiceAttack command '{commandName}' was not found, continuing.");
            }
        }