Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Commit

Permalink
update 2.0.1
Browse files Browse the repository at this point in the history
UI fixes
removed key
  • Loading branch information
KyeOnDiscord committed Aug 20, 2022
1 parent c48ec30 commit cac15d1
Show file tree
Hide file tree
Showing 23 changed files with 214 additions and 346 deletions.
Binary file modified .vs/ProSwapperLobby/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions .vs/ProSwapperLobby/color.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Teal
Binary file modified .vs/ProSwapperLobby/v17/.futdcache.v1
Binary file not shown.
Binary file modified .vs/ProSwapperLobby/v17/.suo
Binary file not shown.
Binary file modified .vs/ProSwapperLobby/v17/fileList.bin
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/proswapperlobby.metadata.v2
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/proswapperlobby.projects.v2
Binary file not shown.
19 changes: 10 additions & 9 deletions Data/DataMine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@ public static class DataMine
{
public static AllSkinsJson.Root GetAllSkins()
{
return null;
const string AllSkinsPath = @"C:\Users\ProMa\Documents\GitHub\ProSwapperLobby\bin\Debug\net6.0-windows\AllSkins.json";

if (!File.Exists(AllSkinsPath))
{
//We use AllSkinsJsonSerialize.Root type to serialize
var provider = SwapperLogic.SwapLogic.GetProvider(MainService.CurrentConfig.Paks, new string[] { "pakchunk10-WindowsClient", "pakchunk20-WindowsClient" });
provider.LoadMappings();
AllSkinsJsonSerialize.Root AllSkinsPairs = new();




foreach (var cid in new MainService().skinObj.data)

foreach (var cid in MainService.GetItemByType(MainService.ItemType.AthenaCharacter))
{
if (provider.TryLoadPackage($"FortniteGame/Content/Athena/Items/Cosmetics/Characters/{cid.id}.uasset", out CUE4Parse.UE4.Assets.IPackage package))
{
var exports = package.GetExports();
//var exportss = provider.LoadObjectExports($"FortniteGame/Content/Athena/Items/Cosmetics/Characters/{cid.id}.uasset");


//string json = JsonConvert.SerializeObject(exports);
//skins.Add(JsonConvert.DeserializeObject<GameSkin.Root>(json));
//skins.Add((GameSkin.Root)exports);
Expand All @@ -44,12 +45,12 @@ public static AllSkinsJson.Root GetAllSkins()
File.WriteAllText(AllSkinsPath, allJson);
provider.Dispose();
}


//We use AllSkinsJson.Root type to deserialize
string text = File.ReadAllText(AllSkinsPath);

return JsonConvert.DeserializeObject<AllSkinsJson.Root>(text, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore,MissingMemberHandling = MissingMemberHandling.Ignore});

//We use AllSkinsJson.Root type to deserialize
string text = File.ReadAllText(AllSkinsPath);

return JsonConvert.DeserializeObject<AllSkinsJson.Root>(text, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore });
}
}
}
251 changes: 113 additions & 138 deletions Pages/Skins.razor

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Pages/StyleSearch.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@page "/stylesearch"
@inject MainService main
@inject NavigationManager NavManager
<h3>Style Search</h3>

Expand Down Expand Up @@ -88,7 +87,7 @@
// return null;
List<Style> styleList = new();
foreach (Data.SkinObj.Datum item in main.skinObj.data)
foreach (Data.SkinObj.Datum item in MainService.GetItemByType(MainService.ItemType.AthenaCharacter))
{
if (item.variants == null)
Expand Down Expand Up @@ -212,7 +211,7 @@
bool GetStyle(string cid, string channel, int index, int styleCount, out Style style)
{
style = null;
var skin = main.skinObj.data.Where(x => x.variants != null).First(x => x.id.Equals(cid));//Set the skin object
var skin = MainService.GetItemByType(MainService.ItemType.AthenaCharacter).Where(x => x.variants != null).First(x => x.id.Equals(cid));//Set the skin object
foreach (var currentVariant in skin.variants)//Loop through current skin's variants
{
Expand All @@ -234,7 +233,7 @@
Style[] FindCompatibleStyle(Style WantStyle)
{
Data.AllSkinsJson.Root AllSkins = main.AllSkins();
Data.AllSkinsJson.Root AllSkins = MainService.GameSkin;
Data.AllSkinsJson.Value[] WantSkin = AllSkins.data.First(x => x.Key.Equals(WantStyle.Item.id)).Value;
Expand Down
6 changes: 4 additions & 2 deletions ProSwapperLobby.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
<ImplicitUsings>enable</ImplicitUsings>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<Description>The BEST Fortnite lobby swapper</Description>
<Copyright>Pro Swapper 2022</Copyright>
<PackageProjectUrl>http://proswapper.xyz</PackageProjectUrl>
<OutputType>Exe</OutputType>
<BaseOutputPath>bin\</BaseOutputPath>
<StartupObject>Program</StartupObject>
<ApplicationIcon>ProSwapperLobby.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
Expand Down
158 changes: 34 additions & 124 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Blazored.Toast;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Newtonsoft.Json;
using ProSwapperLobby.Data;
using ProSwapperLobby.Services;
Expand All @@ -9,14 +7,28 @@

public class Program
{
private const string ClientExe = "ProSwapperLobby.Client.exe";
private static void OpenUrl(string url)
{
Process webProcess = new Process();
webProcess.StartInfo = new ProcessStartInfo() { UseShellExecute = true, FileName = url };
webProcess.Start();
}
public static void Main(string[] args)

/// <summary>
/// Kills all proccesses with the same name that is not the current process.
/// </summary>
private static void KillDuplicates()
{
Process thisProc = Process.GetCurrentProcess();
Process[] procs = Process.GetProcessesByName(thisProc.ProcessName);
foreach (var proc in procs)
{
if (proc.Id != thisProc.Id)
proc.Kill();
}
}

public static void Main()
{
#if RELEASE
if (!File.Exists("aspnetcorev2_inprocess.dll"))
Expand All @@ -29,23 +41,16 @@ public static void Main(string[] args)
}
#endif

#if DEBUG
args = new string[] { "http://localhost:6969/" };

#endif

////
args = new string[] { "http://localhost:6969/" };
string url = "http://localhost:6969/";

Process thisProc = Process.GetCurrentProcess();
Process.GetProcessesByName(thisProc.ProcessName).Where(x => x.Id != thisProc.Id).All(x => { x.Kill(); return true; });
KillDuplicates();

var builder = WebApplication.CreateBuilder(args);
var builder = WebApplication.CreateBuilder();

// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<MainService>();
// builder.Services.AddSingleton<MainService>();
builder.Services.AddBlazoredToast();


Expand All @@ -65,29 +70,22 @@ public static void Main(string[] args)
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

string data = MainService.httpClient.GetStringAsync("https://pro-swapper.github.io/api/LobbyAPI.json").Result;

MainService.ProSwapperAPI = JsonConvert.DeserializeObject<ProSwapperLobby.Data.API.Rootobject>(data);




using (HttpClient http = new())
if (MainService.ProSwapperAPI.Disable == true)
{
string data = http.GetStringAsync("https://pro-swapper.github.io/api/LobbyAPI.json").Result;

MainService.ProSwapperAPI = JsonConvert.DeserializeObject<ProSwapperLobby.Data.API.Rootobject>(data);
Console.Clear();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Pro Swapper is currently down: ");
Console.Write(MainService.ProSwapperAPI.DisableMessage);
Console.ReadLine();
Process.GetCurrentProcess().Kill();
}

if (MainService.ProSwapperAPI.Disable == true)
{
Console.Clear();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Pro Swapper is currently down: ");
Console.Write(MainService.ProSwapperAPI.DisableMessage);
Console.ReadLine();
Process.GetCurrentProcess().Kill();
}
MainService.DiscordWidgetAPI = JsonConvert.DeserializeObject<DiscordWidgetAPI.Root>(MainService.httpClient.GetStringAsync($"https://discord.com/api/guilds/{MainService.ProSwapperAPI.DiscordID}/widget.json").Result);

MainService.DiscordWidgetAPI = JsonConvert.DeserializeObject<DiscordWidgetAPI.Root>(http.GetStringAsync($"https://discord.com/api/guilds/{MainService.ProSwapperAPI.DiscordID}/widget.json").Result);
}

ProSwapperLobby.DiscordRPC.InitializeRPC();

Expand All @@ -100,96 +98,8 @@ public static void Main(string[] args)


Console.WriteLine("Welcome to Pro Swapper Lobby!");
Console.ForegroundColor = ConsoleColor.Cyan;
if (MainService.CurrentConfig.AskIfServerBooster == true)
{
Console.Write("Are you a server booster in the Discord server? Please type either Yes or No: ");
string IsBoosterAnswer = Console.ReadLine().ToLower();
if (IsBoosterAnswer == "yes" || IsBoosterAnswer == "y" || IsBoosterAnswer == "ye")
{
bool IsBooster = DiscordRoleAuth.IsServerBooster();
}
MainService.CurrentConfig.AskIfServerBooster = false;
MainService.SaveConfig();
}

if (MainService.CurrentConfig.OAuthToken != null)
{
bool IsBooster = DiscordRoleAuth.IsServerBooster();
if (IsBooster)
{
OpenUrl(args[0]);
app.Run(args[0]);
}
}

#if DEBUG
Console.WriteLine("\n\n\n[DEBUG] Current Key: " + MainService.CurrentConfig.Key);
#endif

start: if (KeyService.IsValidKey(MainService.CurrentConfig.Key))
{
Console.WriteLine("Please do not close this window when using Pro Swapper or the website will not work");
Console.WriteLine();
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"Pro Swapper Lobby is currently running on {args[0]}, if you need any help please ask for help on the Pro Swapper Discord server: {MainService.DiscordWidgetAPI.instant_invite}");
Console.WriteLine();
Console.WriteLine();
Console.WriteLine($"If you have paid for this software, you have been scammed. It is free to download at {MainService.DiscordWidgetAPI.instant_invite} and is also available on GitHub: https://github.com/Pro-Swapper");
OpenUrl(args[0]);
app.Run(args[0]);
}
else
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("To use Pro Swapper you must go through Linkvertise and get a " + TimeSpan.FromSeconds(MainService.ProSwapperAPI.KeyLifetime).TotalHours + " hour key");
Thread.Sleep(1000);
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("Note: You can Server Boost the Discord server so you don't need to get a key! " + MainService.DiscordWidgetAPI.instant_invite);

Console.WriteLine("\n\nOpening Linkvertise now...");
Thread.Sleep(500);
KeyService.OpenKeyUrl($"https://kyeondiscord.github.io/KeySite/{KeyService.GetIPHash() + DateTime.Now.Day}");
while (true)
{
Console.ForegroundColor = ConsoleColor.Blue;
Console.Write("Paste your key in here: ");
string key = Console.ReadLine();



if (KeyService.IsValidKey(key))
{
MainService.CurrentConfig.Key = key;
MainService.SaveConfig();
Console.Clear();
goto start;
}
else if (key == "Zm9ydG5pdGViYXR0bGVwYXNzaWp1c3RzaGl0b3V0bXlhc3Nmb3J0bml0ZWJhdHRsZXBhc3Npc2hpdG91dG15ITE1MDA1NTkyMDA=")
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("[Success] Success");
Thread.Sleep(5000);
Console.WriteLine("or so you thought.");
Thread.Sleep(5000);
Console.WriteLine("Please use linkvertise like any other person please or boost the Discord Server.");
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("[Error] Invalid Key!");
}
}


}







Console.WriteLine("You will be directed to linkvertise so you can access Pro Swapper Lobby, leave Pro Swapper Lobby opened if you don't want to go through linkvertise again.");
OpenUrl("https://direct-link.net/86737/pro-swapper-lobby2");
app.Run(url);
}
}
4 changes: 2 additions & 2 deletions Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRun>false</PublishReadyToRun>
<ProjectGuid>11824f3d-daaf-4fb9-8276-67077661c328</ProjectGuid>
<SelfContained>true</SelfContained>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile.pubxml.user
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PublishTargetUrl>C:\Users\ProMa\Documents\GitHub\ProSwapperLobby\bin\Release\net6.0\publish\</_PublishTargetUrl>
<History>True|2022-08-06T12:26:59.0240396Z;True|2022-08-06T22:12:14.3175421+10:00;True|2022-08-06T22:08:10.0911642+10:00;True|2022-08-02T22:17:21.3008779+10:00;True|2022-08-02T21:04:54.8499768+10:00;False|2022-08-02T21:02:40.6853027+10:00;False|2022-08-02T21:02:21.5340642+10:00;False|2022-08-02T21:01:42.5652819+10:00;True|2022-04-06T07:54:55.9164313+10:00;True|2022-04-06T07:54:07.5364113+10:00;False|2022-04-06T07:53:38.1565236+10:00;True|2022-01-27T16:12:48.2518480+11:00;True|2022-01-27T16:08:05.1530175+11:00;True|2022-01-27T16:04:49.6735287+11:00;True|2022-01-27T16:04:00.0724494+11:00;True|2022-01-26T21:56:24.9835372+11:00;True|2022-01-26T21:55:45.9695963+11:00;True|2022-01-26T20:34:25.9707459+11:00;True|2022-01-26T20:32:47.6353371+11:00;True|2022-01-26T20:29:49.9377818+11:00;True|2022-01-11T16:58:41.0413373+11:00;True|2022-01-11T16:56:32.9969032+11:00;True|2022-01-11T16:39:14.1489986+11:00;True|2022-01-11T16:18:45.4436725+11:00;True|2022-01-08T22:16:13.0737159+11:00;True|2022-01-08T22:13:01.7462987+11:00;False|2022-01-08T22:12:43.2369054+11:00;False|2022-01-08T22:12:22.0086773+11:00;True|2022-01-08T22:11:09.9989797+11:00;True|2022-01-08T20:45:21.2732432+11:00;True|2022-01-03T13:02:13.0576308+11:00;True|2022-01-03T13:00:34.4633520+11:00;True|2022-01-03T12:58:27.3458382+11:00;True|2022-01-03T12:24:21.9665124+11:00;True|2022-01-03T12:16:08.1352578+11:00;</History>
<History>True|2022-08-20T11:55:07.8143104Z;True|2022-08-07T08:08:37.7224525+10:00;True|2022-08-07T08:05:21.1881584+10:00;True|2022-08-07T08:05:04.4123642+10:00;True|2022-08-06T22:26:59.0240396+10:00;True|2022-08-06T22:12:14.3175421+10:00;True|2022-08-06T22:08:10.0911642+10:00;True|2022-08-02T22:17:21.3008779+10:00;True|2022-08-02T21:04:54.8499768+10:00;False|2022-08-02T21:02:40.6853027+10:00;False|2022-08-02T21:02:21.5340642+10:00;False|2022-08-02T21:01:42.5652819+10:00;True|2022-04-06T07:54:55.9164313+10:00;True|2022-04-06T07:54:07.5364113+10:00;False|2022-04-06T07:53:38.1565236+10:00;True|2022-01-27T16:12:48.2518480+11:00;True|2022-01-27T16:08:05.1530175+11:00;True|2022-01-27T16:04:49.6735287+11:00;True|2022-01-27T16:04:00.0724494+11:00;True|2022-01-26T21:56:24.9835372+11:00;True|2022-01-26T21:55:45.9695963+11:00;True|2022-01-26T20:34:25.9707459+11:00;True|2022-01-26T20:32:47.6353371+11:00;True|2022-01-26T20:29:49.9377818+11:00;True|2022-01-11T16:58:41.0413373+11:00;True|2022-01-11T16:56:32.9969032+11:00;True|2022-01-11T16:39:14.1489986+11:00;True|2022-01-11T16:18:45.4436725+11:00;True|2022-01-08T22:16:13.0737159+11:00;True|2022-01-08T22:13:01.7462987+11:00;False|2022-01-08T22:12:43.2369054+11:00;False|2022-01-08T22:12:22.0086773+11:00;True|2022-01-08T22:11:09.9989797+11:00;True|2022-01-08T20:45:21.2732432+11:00;True|2022-01-03T13:02:13.0576308+11:00;True|2022-01-03T13:00:34.4633520+11:00;True|2022-01-03T12:58:27.3458382+11:00;True|2022-01-03T12:24:21.9665124+11:00;True|2022-01-03T12:16:08.1352578+11:00;</History>
</PropertyGroup>
</Project>
Loading

0 comments on commit cac15d1

Please sign in to comment.