Skip to content

Commit

Permalink
update 0.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
KyeOnDiscord committed Oct 29, 2022
1 parent 13e51f0 commit 71debb1
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 45 deletions.
2 changes: 1 addition & 1 deletion ProSwapperIngame.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Version>0.0.9.8</Version>
<Version>0.0.9.9</Version>
<Company>Pro Swapper</Company>
<Authors>Pro Swapper</Authors>
<Product>Pro Swapper</Product>
Expand Down
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<SelfContained>true</SelfContained>
<PublishReadyToRun>false</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile.pubxml.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2022-10-24T22:31:20.1481374Z;True|2022-10-25T09:30:49.9696022+11:00;False|2022-10-25T09:30:28.1148177+11:00;True|2022-10-08T13:06:54.2392630+11:00;True|2022-10-08T10:49:25.6319467+11:00;True|2022-10-08T10:43:40.7930740+11:00;False|2022-10-08T10:39:00.3698608+11:00;True|2022-10-08T10:37:10.2634888+11:00;True|2022-10-08T10:35:04.6524750+11:00;False|2022-10-08T10:34:19.0981982+11:00;True|2022-10-08T10:24:54.9712627+11:00;True|2022-10-08T10:14:53.4056533+11:00;True|2022-10-08T10:14:35.8036807+11:00;True|2022-10-08T10:12:43.0804908+11:00;False|2022-10-08T10:09:40.7310076+11:00;True|2022-10-03T22:03:07.0785869+11:00;True|2022-10-03T22:02:45.9093587+11:00;True|2022-10-03T22:01:58.8914253+11:00;True|2022-10-03T21:59:10.2110068+11:00;True|2022-10-03T21:56:18.1087035+11:00;True|2022-10-03T21:52:23.2405572+11:00;True|2022-10-03T21:46:38.9389392+11:00;True|2022-10-03T21:40:37.1193102+11:00;True|2022-10-03T21:33:10.5693744+11:00;True|2022-10-03T21:32:01.9711248+11:00;True|2022-10-03T21:30:24.0514356+11:00;True|2022-10-03T21:27:37.0842793+11:00;True|2022-10-03T21:17:54.7279286+11:00;True|2022-10-03T21:14:20.5283885+11:00;True|2022-10-03T20:41:09.2694669+11:00;True|2022-10-03T20:37:54.3210822+11:00;True|2021-12-24T10:36:29.3709626+11:00;True|2021-10-17T19:51:00.7007913+11:00;True|2021-10-10T17:58:05.7451017+11:00;True|2021-10-10T17:56:17.8759729+11:00;True|2021-10-10T17:50:08.4323651+11:00;True|2021-09-23T12:09:29.6117163+10:00;True|2021-09-23T12:07:28.7086188+10:00;True|2021-09-23T11:24:43.3059181+10:00;True|2021-09-23T11:24:09.6924440+10:00;True|2021-09-23T11:23:18.5990470+10:00;True|2021-09-23T11:21:46.3683739+10:00;True|2021-09-23T11:21:22.6569365+10:00;False|2021-09-23T11:21:15.1477071+10:00;True|2021-09-23T11:20:56.6817090+10:00;True|2021-09-23T11:20:36.9947513+10:00;True|2021-09-23T11:19:58.3993126+10:00;True|2021-09-23T11:19:23.7110527+10:00;True|2021-09-23T11:19:02.4950688+10:00;True|2021-09-23T11:16:20.4936425+10:00;True|2021-09-23T11:10:19.1998482+10:00;True|2021-09-16T21:35:33.5993894+10:00;True|2021-09-16T21:34:53.9246237+10:00;True|2021-09-16T21:33:33.8188512+10:00;True|2021-09-16T21:31:38.1319241+10:00;True|2021-09-12T17:29:04.0050517+10:00;False|2021-09-12T17:27:39.5485891+10:00;True|2021-08-22T15:28:51.8956088+10:00;True|2021-08-22T15:28:35.4327033+10:00;True|2021-08-09T07:31:17.0313249+10:00;True|2021-08-09T07:30:33.4773731+10:00;True|2021-08-08T13:19:14.9318317+10:00;True|2021-08-07T09:47:42.2380479+10:00;True|2021-08-07T09:44:15.7556843+10:00;True|2021-08-07T09:43:24.8791601+10:00;True|2021-08-07T09:42:40.0153901+10:00;True|2021-08-07T08:37:52.6588995+10:00;True|2021-08-07T08:33:04.4418657+10:00;True|2021-08-07T07:21:32.4617544+10:00;True|2021-07-31T17:39:15.0131315+10:00;True|2021-07-31T17:38:01.2404138+10:00;True|2021-07-31T17:37:12.7546145+10:00;True|2021-07-31T17:30:14.3945147+10:00;True|2021-07-31T17:28:58.7763627+10:00;True|2021-07-31T17:28:43.3400502+10:00;True|2021-07-31T17:27:34.4886752+10:00;True|2021-06-10T21:09:38.6172669+10:00;True|2021-06-10T21:04:46.0146872+10:00;True|2021-06-05T15:01:43.2548593+10:00;True|2021-06-05T15:01:08.4990500+10:00;True|2021-06-05T12:20:39.8038624+10:00;True|2021-06-05T12:19:39.7875578+10:00;True|2021-06-05T12:18:35.0782623+10:00;True|2021-06-05T12:16:23.4178977+10:00;True|2021-06-03T20:44:36.3268966+10:00;False|2021-06-03T20:43:47.6172066+10:00;True|2021-06-03T20:31:57.2891741+10:00;True|2021-06-03T20:24:17.5271595+10:00;False|2021-06-03T20:23:32.1551067+10:00;True|2021-06-01T21:41:54.6469940+10:00;True|2021-06-01T21:41:32.8203704+10:00;True|2021-05-30T21:16:40.1619720+10:00;True|2021-05-30T21:16:18.7262187+10:00;True|2021-05-30T20:42:08.5125841+10:00;True|2021-05-30T17:35:42.1810331+10:00;True|2021-05-30T17:35:27.2108782+10:00;True|2021-05-30T17:33:28.8056733+10:00;False|2021-05-30T17:33:09.5307735+10:00;True|2021-05-30T17:31:04.4951019+10:00;True|2021-05-30T17:28:38.6215363+10:00;</History>
<History>True|2022-10-29T22:32:04.5342819Z;True|2022-10-30T09:06:33.3428873+11:00;True|2022-10-30T09:01:55.6790004+11:00;True|2022-10-25T09:31:20.1481374+11:00;True|2022-10-25T09:30:49.9696022+11:00;False|2022-10-25T09:30:28.1148177+11:00;True|2022-10-08T13:06:54.2392630+11:00;True|2022-10-08T10:49:25.6319467+11:00;True|2022-10-08T10:43:40.7930740+11:00;False|2022-10-08T10:39:00.3698608+11:00;True|2022-10-08T10:37:10.2634888+11:00;True|2022-10-08T10:35:04.6524750+11:00;False|2022-10-08T10:34:19.0981982+11:00;True|2022-10-08T10:24:54.9712627+11:00;True|2022-10-08T10:14:53.4056533+11:00;True|2022-10-08T10:14:35.8036807+11:00;True|2022-10-08T10:12:43.0804908+11:00;False|2022-10-08T10:09:40.7310076+11:00;True|2022-10-03T22:03:07.0785869+11:00;True|2022-10-03T22:02:45.9093587+11:00;True|2022-10-03T22:01:58.8914253+11:00;True|2022-10-03T21:59:10.2110068+11:00;True|2022-10-03T21:56:18.1087035+11:00;True|2022-10-03T21:52:23.2405572+11:00;True|2022-10-03T21:46:38.9389392+11:00;True|2022-10-03T21:40:37.1193102+11:00;True|2022-10-03T21:33:10.5693744+11:00;True|2022-10-03T21:32:01.9711248+11:00;True|2022-10-03T21:30:24.0514356+11:00;True|2022-10-03T21:27:37.0842793+11:00;True|2022-10-03T21:17:54.7279286+11:00;True|2022-10-03T21:14:20.5283885+11:00;True|2022-10-03T20:41:09.2694669+11:00;True|2022-10-03T20:37:54.3210822+11:00;True|2021-12-24T10:36:29.3709626+11:00;True|2021-10-17T19:51:00.7007913+11:00;True|2021-10-10T17:58:05.7451017+11:00;True|2021-10-10T17:56:17.8759729+11:00;True|2021-10-10T17:50:08.4323651+11:00;True|2021-09-23T12:09:29.6117163+10:00;True|2021-09-23T12:07:28.7086188+10:00;True|2021-09-23T11:24:43.3059181+10:00;True|2021-09-23T11:24:09.6924440+10:00;True|2021-09-23T11:23:18.5990470+10:00;True|2021-09-23T11:21:46.3683739+10:00;True|2021-09-23T11:21:22.6569365+10:00;False|2021-09-23T11:21:15.1477071+10:00;True|2021-09-23T11:20:56.6817090+10:00;True|2021-09-23T11:20:36.9947513+10:00;True|2021-09-23T11:19:58.3993126+10:00;True|2021-09-23T11:19:23.7110527+10:00;True|2021-09-23T11:19:02.4950688+10:00;True|2021-09-23T11:16:20.4936425+10:00;True|2021-09-23T11:10:19.1998482+10:00;True|2021-09-16T21:35:33.5993894+10:00;True|2021-09-16T21:34:53.9246237+10:00;True|2021-09-16T21:33:33.8188512+10:00;True|2021-09-16T21:31:38.1319241+10:00;True|2021-09-12T17:29:04.0050517+10:00;False|2021-09-12T17:27:39.5485891+10:00;True|2021-08-22T15:28:51.8956088+10:00;True|2021-08-22T15:28:35.4327033+10:00;True|2021-08-09T07:31:17.0313249+10:00;True|2021-08-09T07:30:33.4773731+10:00;True|2021-08-08T13:19:14.9318317+10:00;True|2021-08-07T09:47:42.2380479+10:00;True|2021-08-07T09:44:15.7556843+10:00;True|2021-08-07T09:43:24.8791601+10:00;True|2021-08-07T09:42:40.0153901+10:00;True|2021-08-07T08:37:52.6588995+10:00;True|2021-08-07T08:33:04.4418657+10:00;True|2021-08-07T07:21:32.4617544+10:00;True|2021-07-31T17:39:15.0131315+10:00;True|2021-07-31T17:38:01.2404138+10:00;True|2021-07-31T17:37:12.7546145+10:00;True|2021-07-31T17:30:14.3945147+10:00;True|2021-07-31T17:28:58.7763627+10:00;True|2021-07-31T17:28:43.3400502+10:00;True|2021-07-31T17:27:34.4886752+10:00;True|2021-06-10T21:09:38.6172669+10:00;True|2021-06-10T21:04:46.0146872+10:00;True|2021-06-05T15:01:43.2548593+10:00;True|2021-06-05T15:01:08.4990500+10:00;True|2021-06-05T12:20:39.8038624+10:00;True|2021-06-05T12:19:39.7875578+10:00;True|2021-06-05T12:18:35.0782623+10:00;True|2021-06-05T12:16:23.4178977+10:00;True|2021-06-03T20:44:36.3268966+10:00;False|2021-06-03T20:43:47.6172066+10:00;True|2021-06-03T20:31:57.2891741+10:00;True|2021-06-03T20:24:17.5271595+10:00;False|2021-06-03T20:23:32.1551067+10:00;True|2021-06-01T21:41:54.6469940+10:00;True|2021-06-01T21:41:32.8203704+10:00;True|2021-05-30T21:16:40.1619720+10:00;True|2021-05-30T21:16:18.7262187+10:00;True|2021-05-30T20:42:08.5125841+10:00;True|2021-05-30T17:35:42.1810331+10:00;True|2021-05-30T17:35:27.2108782+10:00;True|2021-05-30T17:33:28.8056733+10:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
16 changes: 10 additions & 6 deletions src/Classes/Oodle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static byte[] Compress(byte[] Buffer, OodleFormat oodleFormat = OodleForm
public static KeyValuePair<OodleFormat, OodleCompressionLevel> FindBestCompressionSettings(byte[] buffer)
{
var bestSize = int.MaxValue;
var bestFormat = OodleFormat.OodleLZ_Compressor_Selkie;
var bestFormat = OodleFormat.OodleLZ_Compressor_Kraken;
var bestLevel = OodleCompressionLevel.OodleLZ_CompressionLevel_Fast;

foreach (OodleFormat format in Enum.GetValues(typeof(OodleFormat)))
Expand Down Expand Up @@ -77,11 +77,15 @@ public enum OodleFormat

// NEW COMPRESSORS :
OodleLZ_Compressor_Kraken = 8, // Fast decompression and high compression ratios, amazing!
OodleLZ_Compressor_Leviathan = 13, // Leviathan = Kraken's big brother with higher compression, slightly slower decompression.
OodleLZ_Compressor_Mermaid = 9, // Mermaid is between Kraken & Selkie - crazy fast, still decent compression.
OodleLZ_Compressor_Selkie = 11, // Selkie is a super-fast relative of Mermaid. For maximum decode speed.
OodleLZ_Compressor_Hydra = 12, // Hydra, the many-headed beast = Leviathan, Kraken, Mermaid, or Selkie (see $OodleLZ_About_Hydra)
OodleLZ_Compressor_LZB16 = 4, //still supported
//OodleLZ_Compressor_Leviathan = 13, // Leviathan = Kraken's big brother with higher compression, slightly slower decompression.
//OodleLZ_Compressor_Mermaid = 9, // Mermaid is between Kraken & Selkie - crazy fast, still decent compression.
//OodleLZ_Compressor_Selkie = 11, // Selkie is a super-fast relative of Mermaid. For maximum decode speed.
//OodleLZ_Compressor_Hydra = 12, // Hydra, the many-headed beast = Leviathan, Kraken, Mermaid, or Selkie (see $OodleLZ_About_Hydra)
//OodleLZ_Compressor_LZB16 = 4, //still supported




/* Deprecated compressors
OodleLZ_Compressor_BitKnit = 10, // no longer supported as of Oodle 2.9.0
OodleLZ_Compressor_LZB16 = 4, // DEPRECATED but still supported
Expand Down
18 changes: 12 additions & 6 deletions src/Classes/api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public enum AESSource
Manual
}

public static void UpdateAPI()
public static bool UpdateAPI()
{
string rawAPIFile = global.ProSwapperFolder + "api.ProSwapper";
string rawGlobalFile = global.ProSwapperFolder + "global.ProSwapper";
Expand All @@ -83,7 +83,10 @@ public static void UpdateAPI()
});
byte[] compressedapi = MessagePackSerializer.ConvertFromJson(json, MessagePackSerializerOptions.Standard);
File.WriteAllBytes($"{global.version}.json", ByteCompression.Compress(compressedapi));

apidata.discordurl = globalapi.discordurl;
apidata.version = globalapi.version;
apidata.status[0] = globalapi.status[0];
return true;
#else

try
Expand Down Expand Up @@ -124,16 +127,19 @@ public static void UpdateAPI()
apidata = JsonConvert.DeserializeObject<APIRoot>(MessagePackSerializer.ConvertToJson(ByteCompression.Decompress(rawAPI)));
globalapi = JsonConvert.DeserializeObject<GlobalAPI.Root>(rawGlobal);
}
apidata.discordurl = globalapi.discordurl;
apidata.version = globalapi.version;
apidata.status[0] = globalapi.status[0];
return true;
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show($"Pro Swapper needs an Internet connection to run, if you are already connected to the Internet Pro Swapper's API may be blocked in your country, please use a VPN or try disabling your firewall, if you are already doing this please refer to this error: \n\n{ex.Message}");
Program.logger.LogError(ex.Message);
Main.ThrowError($"Pro Swapper needs an Internet connection to run, if you are already connected to the Internet Pro Swapper's API may be blocked in your country, please use a VPN or try disabling your firewall, if you are already doing this please refer to this error: \n\n{ex.Message}", true);
return false;
}
#endif
apidata.discordurl = globalapi.discordurl;
apidata.version = globalapi.version;
apidata.status[0] = globalapi.status[0];

}

public class Asset
Expand Down
7 changes: 6 additions & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ private static void Main()


logger.Log($"Fetching latest data from API");
api.UpdateAPI();
if (!api.UpdateAPI())
{
logger.Log($"ERROR -> Could not fetch latest data from API");
MessageBox.Show("Could not fetch latest data from API! Please try again later!", "Pro Swapper", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Process.GetCurrentProcess().Kill();
}
string apiversion = api.apidata.version;
double TimeNow = global.GetEpochTime();

Expand Down
Loading

0 comments on commit 71debb1

Please sign in to comment.