Exemple #1
0
 public async void ReloadSysMsg()
 {
     if (SystemMessageNamer == null)
     {
         var path = File.Exists(Path.Combine(App.DataPath, $"opcodes/sysmsg.{ReleaseVersion / 100}.map"))
             ?
                    Path.Combine(App.DataPath, $"opcodes/sysmsg.{ReleaseVersion / 100}.map")
             :
                    File.Exists(Path.Combine(App.DataPath, $"opcodes/sysmsg.{Version}.map"))
                 ? Path.Combine(App.DataPath, $"opcodes/sysmsg.{Version}.map")
                 : "";
         if (path == "")
         {
             if (ProxyInterface.Instance.IsStubAvailable)
             {
                 var destPath = Path.Combine(App.DataPath, $"opcodes/sysmsg.{Version}.map").Replace("\\", "/");
                 if (await ProxyInterface.Instance.Stub.DumpSysMsg(destPath))
                 {
                     SystemMessageNamer = new OpCodeNamer(destPath);
                     return;
                 }
             }
             TccMessageBox.Show($"sysmsg.{ReleaseVersion / 100}.map or sysmsg.{Version}.map not found.\nWait for update or use tcc-stub to automatically retreive sysmsg files from game client.\nTCC will now close.", MessageBoxType.Error);
             App.Close();
             return;
         }
         SystemMessageNamer = new OpCodeNamer(path);
     }
     SystemMessageNamer?.Reload(Version, ReleaseVersion);
 }
 public void ReloadSysMsg()
 {
     if (SystemMessageNamer == null)
     {
         var path = File.Exists(Path.Combine(App.DataPath, $"opcodes/sysmsg.{ReleaseVersion / 100}.map"))
             ?
                    Path.Combine(App.DataPath, $"opcodes/sysmsg.{ReleaseVersion / 100}.map")
             :
                    File.Exists(Path.Combine(App.DataPath, $"opcodes/sysmsg.{Version}.map"))
                 ? Path.Combine(App.DataPath, $"opcodes/sysmsg.{Version}.map")
                 : "";
         SystemMessageNamer = new OpCodeNamer(path);
     }
     SystemMessageNamer?.Reload(Version, ReleaseVersion);
 }