示例#1
0
        internal static async void StatusCheck()
        {
            if (WaitGameStart)
            {
                if (!GetSelectedReceiveStatus())
                {
                    return;
                }
                WaitGameStart = false;
                AutoRG.CancelAsync();
                MainWorker.MapFileWatcher.EnableRaisingEvents = false;
                await Task.Delay(500);

                CameraInit();
                GameDelay = Settings.GameDelay;
                if (Settings.IsAutoLoad)
                {
                    await Task.Delay(3000);

                    LoadCodeSelect();
                }
            }
            else
            {
                if (!WaitLobby && CurrentMusicState == MusicState.BattleNet)
                {
                    GameDelay = 50;
                    WaitLobby = true;
                    Warcraft3Info.Refresh();
                }
                if (!WaitLobby || GameDelay != 100)
                {
                    return;
                }
                GameDelay = 550;
                if (Settings.IsCheatMapCheck && !LoadedFiles.IsLoadedMap(out _))
                {
                    MainWorker.MapFileWatcher.EnableRaisingEvents = true;
                }
                if (File.Exists($"{DocumentPath}\\Replay\\LastReplay.w3g"))
                {
                    try
                    {
                        File.Delete($"{DocumentPath}\\Replay\\CirnixReplay.w3g");
                        File.Move($"{DocumentPath}\\Replay\\LastReplay.w3g", $"{DocumentPath}\\Replay\\CirnixReplay.w3g");
                    }
                    catch
                    {
                        // Delete : CirnixReplay.w3g 경로에 대한 액세스가 거부되었습니다.
                        // 백신때문으로 유추
                    }
                }
                WaitLobby     = false;
                WaitGameStart = true;
            }
        }
示例#2
0
        internal static void LoadCodeSelect()
        {
            string MapPath;

            if (!LoadedFiles.IsLoadedMap(out MapPath))
            {
                SendMsg(true, "로드된 맵이 없습니다.");
                return;
            }
            MapPath = MapPath.Substring(MapPath.IndexOf(@"\Warcraft III\Maps\") + 14);

            if (MapPath.Contains("twrpg"))
            {
                Delay(3000);
                LoadCode2();
            }
            else
            {
                LoadCode();
            }
        }