Exemplo n.º 1
0
        private void postToTTSIfNeeded(string server, App.Network.EventType eventType, int[] args)
        {
            if (eventType != App.Network.EventType.FATE_BEGIN && eventType != App.Network.EventType.MATCH_ALERT)
            {
                return;
            }
            if (isTTSEnable == false)
            {
                return;
            }

            string head = networks.Count <= 1 ? "" : "[" + server + "] ";

            switch (eventType)
            {
            case App.Network.EventType.MATCH_ALERT:
                //text += getTextRoulette(args[0]) + "|"; pos++;
                //text += getTextInstance(args[1]) + "|"; pos++;
                if (isDutyAlertEnable)
                {
                    TTS(head + getFinderTextNotification(args[0], args[1]));
                }
                break;

            case App.Network.EventType.FATE_BEGIN:
                //text += getTextFate(args[0]) + "|" + getTextFateArea(args[0]) + "|"; pos++;
                if (SelectedFates.Contains(args[0].ToString()))
                {
                    TTS(head + getTextFateArea(args[0]) + " " + getTextFate(args[0]));
                }
                break;
            }
        }
Exemplo n.º 2
0
        private void Network_onReceiveEvent(int pid, App.Network.EventType eventType, int[] args)
        {
            string server = (networks[pid].process.MainModule.FileName.Contains("KOREA") ? "KOREA" : "GLOBAL");
            string text   = "[ACTFATE]" + ((char)007) + pid + ((char)007) + server + ((char)007) + eventType + ((char)007);


            int pos = 0;

            switch (eventType)
            {
            case App.Network.EventType.INSTANCE_ENTER:
            case App.Network.EventType.INSTANCE_EXIT:
                if (args.Length > 0)
                {
                    text += getTextInstance(args[0]) + ((char)007); pos++;
                }
                break;

            case App.Network.EventType.FATE_BEGIN:
            case App.Network.EventType.FATE_PROGRESS:
            case App.Network.EventType.FATE_END:
                text += getTextFate(args[0]) + ((char)007) + getTextFateArea(args[0]) + ((char)007); pos++;
                break;

            case App.Network.EventType.MATCH_BEGIN:
                text += (App.Network.MatchType)args[0] + ((char)007); pos++;
                switch ((App.Network.MatchType)args[0])
                {
                case App.Network.MatchType.ROULETTE:
                    text += getTextRoulette(args[1]) + ((char)007); pos++;
                    break;

                case App.Network.MatchType.SELECTIVE:
                    text += args[1] + ((char)007); pos++;
                    int p = pos;
                    for (int i = p; i < args.Length; i++)
                    {
                        text += getTextInstance(args[i]) + ((char)007); pos++;
                    }
                    break;
                }
                break;

            case App.Network.EventType.MATCH_END:
                text += (App.Network.MatchEndType)args[0] + ((char)007); pos++;
                break;

            case App.Network.EventType.MATCH_PROGRESS:
                text += getTextInstance(args[0]) + ((char)007); pos++;
                break;

            case App.Network.EventType.MATCH_ALERT:
                text += getTextRoulette(args[0]) + ((char)007); pos++;
                text += (args[1].ToString() + ((char)007).ToString());
                text += getTextInstance(args[1]) + ((char)007); pos++;
                break;
            }
            for (int i = pos; i < args.Length; i++)
            {
                text += args[i] + ((char)007);
            }

            //sendToACT(text);
            postToToastWindowsNotificationIfNeeded(server, eventType, args);
            postToURLIfNeeded(server, eventType, args);
            postToTTSIfNeeded(server, eventType, args);
        }
Exemplo n.º 3
0
        private void Network_onReceiveEvent(int pid, App.Network.EventType eventType, int[] args)
        {
            string server = (networks[pid].process.MainModule.FileName.Contains("KOREA") ? "KOREA" : "GLOBAL");
            string text   = pid + "|" + server + "|" + eventType + "|";


            int pos = 0; bool isFate = false;

            switch (eventType)
            {
            case App.Network.EventType.INSTANCE_ENTER:
            case App.Network.EventType.INSTANCE_EXIT:
                if (args.Length > 0)
                {
                    text += getTextInstance(args[0]) + "|"; pos++;
                }
                break;

            case App.Network.EventType.FATE_BEGIN:
            case App.Network.EventType.FATE_PROGRESS:
            case App.Network.EventType.FATE_END:
                isFate = true;
                text  += getTextFate(args[0]) + "|" + getTextFateArea(args[0]) + "|"; pos++;
                break;

            case App.Network.EventType.MATCH_BEGIN:
                text += (App.Network.MatchType)args[0] + "|"; pos++;
                switch ((App.Network.MatchType)args[0])
                {
                case App.Network.MatchType.ROULETTE:
                    text += getTextRoulette(args[1]) + "|"; pos++;
                    break;

                case App.Network.MatchType.SELECTIVE:
                    text += args[1] + "|"; pos++;
                    int p = pos;
                    for (int i = p; i < args.Length; i++)
                    {
                        text += getTextInstance(args[i]) + "|"; pos++;
                    }
                    break;
                }
                break;

            case App.Network.EventType.MATCH_END:
                text += (App.Network.MatchEndType)args[0] + "|"; pos++;
                break;

            case App.Network.EventType.MATCH_PROGRESS:
                text += getTextInstance(args[0]) + "|"; pos++;
                break;

            case App.Network.EventType.MATCH_ALERT:
                text += getTextRoulette(args[0]) + "|"; pos++;
                text += getTextInstance(args[1]) + "|"; pos++;
                break;
            }

            for (int i = pos; i < args.Length; i++)
            {
                text += args[i] + "|";
            }

            if (isFate)
            {
                text += args[0] + "|";
            }

            sendToACT(text);

            postToToastWindowsNotificationIfNeeded(server, eventType, args);
            postToTelegramIfNeeded(server, eventType, args);
        }