Skip to content

Commit

Permalink
PATCH v3.0.1 (Force Login included for those with Riot Client problems)
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruki1707 committed Feb 24, 2022
1 parent a4dd9c9 commit a824ec8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 14 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<p align="center">
<img src="https://i.imgur.com/6sh6Mng.png" width="250" height="250"><br>
<a href="https://github.com/weedeej/ValorantCC/releases/latest/download/ValorantCC.exe">
<img src="https://i.imgur.com/6sh6Mng.png" width="250" height="250"><br></a>
<a href="https://discord.gg/ME5EdK8U9v" target="_blank"><img src="https://img.shields.io/discord/867305541697273906?color=7289da&style=flat-square&label=Discord&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iNTAwLjAwMDAwMHB0IiBoZWlnaHQ9IjUwMC4wMDAwMDBwdCIgdmlld0JveD0iMCAwIDUwMC4wMDAwMDAgNTAwLjAwMDAwMCIKIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsNTAwLjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTM4NyA0OTkzIGMtNCAtMyAtNyAtOTE1IC03IC0yMDI1I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MAotNTQ0IDEgLTU1MSAxOCAtNCA5IC03IDE1MiAtNyAzMTggMCAyNDAgMyAzMDQgMTQgMzE3IDEyIDE2IDExNSAxNyAxMjk2IDE3CjEwOTIgMCAxMjg5IC0yIDEzMjMgLTE0eiIvPgo8L2c+Cjwvc3ZnPgo=" alt="Discord"></a>
<a href="https://github.com/weedeej/ValorantCC/releases/latest/download/ValorantCC.exe" target="_blank"><img src="https://img.shields.io/github/downloads/weedeej/ValorantCC/total.svg?color=000&logo=github&logoColor=ffffff&style=flat-square&label=Downloads"></a>
<a href="https://github.com/weedeej/ValorantCC/releases/latest" target="_blank"><img src="https://img.shields.io/github/v/tag/weedeej/ValorantCC?color=a6ffaf&label=Version&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI%2BCjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iNTEyLjAwMDAwMHB0IiBoZWlnaHQ9IjUxMi4wMDAwMDBwdCIgdmlld0JveD0iMCAwIDUxMi4wMDAwMDAgNTEyLjAwMDAwMCIKIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiPgoKPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsNTEyLjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTIzMzAgNTExMCBjLTQ5NCAtNDggLTk1MCAtMjMwIC0xMzU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2NyAxNiAxNjQgMzYgMjE1IDQzIDEzMSAxOSA0MzIgMjAgNTY3IDF6Ii8%2BCjxwYXRoIGQ9Ik0yNDQ0IDQwMDkgYy0xMDAgLTM4IC0xODEgLTE0OCAtMTkxIC0yNTggLTE2IC0xNzkgMTI2IC0zMzQgMzA3Ci0zMzQgMjQxIDAgMzg5IDI2NCAyNjIgNDY3IC03OSAxMjcgLTIzNyAxNzkgLTM3OCAxMjV6Ii8%2BCjxwYXRoIGQ9Ik0yNDkyIDI5MzUgYy02MyAtMTkgLTExMSAtNjEgLTEzOCAtMTE5IGwtMjQgLTUxIDAgLTc1MCBjMCAtNzA5IDEKLTc1MiAxOSAtNzkwIDY3IC0xNDQgMjU1IC0xODEgMzcwIC03MiAxOCAxOCA0MiA1MCA1MiA3MiAxOCAzOCAxOSA4MSAxOSA3OTAKbDAgNzUwIC0yNCA1MSBjLTI4IDU5IC03NSAxMDAgLTE0MiAxMjAgLTU3IDE3IC03NiAxNyAtMTMyIC0xeiIvPgo8L2c%2BCjwvc3ZnPgo%3D&logoColor=ffffff&style=flat-square"></a><br>
<a href="https://github.com/weedeej/ValorantCC/releases/latest" target="_blank"><img src="https://img.shields.io/github/v/tag/weedeej/ValorantCC?color=a6ffaf&label=Version&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI%2BCjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iNTEyLjAwMDAwMHB0IiBoZWlnaHQ9IjUxMi4wMDAwMDBwdCIgdmlld0JveD0iMCA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IgMCAtMTkxIC0xNiAtMzI5IC01OSAtNTA2IC0xODIgLTc0MSAtNzg0IC0xMzQzCi0xNTI1IC0xNTI1IC0xNzcgLTQzIC0zMTUgLTU5IC01MDYgLTU5IC0xOTEgMCAtMzI5IDE2IC01MDYgNTkgLTc0MSAxODIKLTEzNDMgNzg0IC0xNTI1IDE1MjUgLTQzIDE3NyAtNTkgMzE1IC01OSA1MDYgMCAxOTEgMTYgMzI5IDU5IDUwNiAxODIgNzQyCjc4NCAxMzQ0IDE1MjcgMTUyNSA2NyAxNiAxNjQgMzYgMjE1IDQzIDEzMSAxOSA0MzIgMjAgNTY3IDF6Ii8%2BCjxwYXRoIGQ9Ik0yNDQ0IDQwMDkgYy0xMDAgLTM4IC0xODEgLTE0OCAtMTkxIC0yNTggLTE2IC0xNzkgMTI2IC0zMzQgMzA3Ci0zMzQgMjQxIDAgMzg5IDI2NCAyNjIgNDY3IC03OSAxMjcgLTIzNyAxNzkgLTM3OCAxMjV6Ii8%2BCjxwYXRoIGQ9Ik0yNDkyIDI5MzUgYy02MyAtMTkgLTExMSAtNjEgLTEzOCAtMTE5IGwtMjQgLTUxIDAgLTc1MCBjMCAtNzA5IDEKLTc1MiAxOSAtNzkwIDY3IC0xNDQgMjU1IC0xODEgMzcwIC03MiAxOCAxOCA0MiA1MCA1MiA3MiAxOCAzOCAxOSA4MSAxOSA3OTAKbDAgNzUwIC0yNCA1MSBjLTI4IDU5IC03NSAxMDAgLTE0MiAxMjAgLTU3IDE3IC03NiAxNyAtMTMyIC0xeiIvPgo8L2c%2BCjwvc3ZnPgo%3D&logoColor=ffffff&style=flat-square"></a><br><br>
<a href="https://github.com/weedeej/ValorantCC/releases/latest/download/ValorantCC.exe">
<img src="https://user-images.githubusercontent.com/72423267/155449163-47663da0-7d1c-4525-bc2e-23d9f4e91dd9.png" width="300"></a>
</p>

# ValorantCC (Valorant Crosshair Changer) [Download Here](https://github.com/weedeej/ValorantCC/releases/latest/download/ValorantCC.exe)
# ValorantCC (Valorant Crosshair Changer)
Change your Crosshair's color to **ANY** color you want for style and/or visiblity.
![image](https://user-images.githubusercontent.com/87055977/155284250-d01577c2-5661-43b1-8759-a6a8525e7709.png)

Expand Down
1 change: 1 addition & 0 deletions ValorantCC/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ComboBox x:Name="profiles" Grid.Column="1" SelectionChanged="profiles_SelectionChanged" SelectedIndex="0" IsEditable="True" IsReadOnly="True" Text="Profiles" TextBoxBase.TextChanged="profiles_TextChanged" Background="#FF232429" Foreground="White" Margin="0,-1,2,1" FontFamily="Quicksand" TextBlock.FontFamily="Segoe UI Semibold" TextBlock.FontWeight="Bold"/>
</Grid>
<fa:ImageAwesome Icon="CircleOutlineNotch" Spin="True" Height="48" Width="48" Foreground="White" Name="spinner" Margin="0,0,0,5" Loaded="spinner_Loaded"/>
<Button x:Name="ForceLoginBtn" HorizontalAlignment="Center" Style="{DynamicResource MahApps.Styles.Button.MetroWindow.Base}" BorderThickness="0" Background="#FF0079FF" Padding="0" Content="Force Login" Cursor="Hand" Height="30" VerticalAlignment="Center" Width="124" FontFamily="Quicksand" FontSize="11" FontWeight="DemiBold" TextBlock.FontFamily="Segoe UI Semibold" TextBlock.FontWeight="Bold" Margin="0,20,0,15" Click="ForceLoginBtn_Click"/>
<Grid Name="ch_display">

<Image x:Name="CrosshairBG" Source="{StaticResource crosshairBG0}" Margin="1,3,-1,3"/>
Expand Down
8 changes: 8 additions & 0 deletions ValorantCC/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public partial class MainWindow : MetroWindow
public API ValCCAPI;
public int SelectedIndex;
public bool LoggedIn;
public bool PressedForceLogin = false;
private string _sharecode;
private FetchResponse? sharedProfileResp;
public MainWindow()
Expand Down Expand Up @@ -392,5 +393,12 @@ private void _zoom_ValueChanged(object sender, RoutedPropertyChangedEventArgs<do
{
Trace.WriteLine(_zoom.Value);
}

private void ForceLoginBtn_Click(object sender, RoutedEventArgs e)
{
PressedForceLogin = true;
ForceLoginBtn.Content = "Forcing Loging . . .";
ForceLoginBtn.Background = (Brush)bc.ConvertFrom("#FF44464F");
}
}
}
Binary file added ValorantCC/Resources/Download ValorantCC HD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions ValorantCC/SubWindow/src/CreateRender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enum ButtonType
static Style style;
static Random rand = new Random();
static BrushConverter bc = new BrushConverter();
static ImageBrush previousBG = null;
static List<ImageBrush> imageSources = new List<ImageBrush>();
static ImageBrush RandomBG => imageSources[rand.Next(0, imageSources.Count - 1)];

Expand All @@ -33,12 +34,16 @@ static CreateRender()

public static async Task<UIElement> GenerateRender(this ProfilesWindow profilesWindow, PublicProfile profile)
{
// This will be changed and will be replaced with more efficient method of rendering multiple settings.
//More random BG xd
var RandomBGC = RandomBG;
while (RandomBGC == previousBG)
RandomBGC = RandomBG;
previousBG = RandomBGC;

// Main border
Border template = new Border()
{
Background = RandomBG,
Background = RandomBGC,
CornerRadius = new CornerRadius(7, 7, 25, 25),
MinHeight = 95,
MaxHeight = 95,
Expand Down
2 changes: 1 addition & 1 deletion ValorantCC/ValorantCC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyVersion></AssemblyVersion>
<FileVersion></FileVersion>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<SignAssembly>false</SignAssembly>
</PropertyGroup>

Expand Down
19 changes: 11 additions & 8 deletions ValorantCC/src/BackgroundAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ public async void LoopCheck()
{
string LockfilePath = Environment.GetEnvironmentVariable("LocalAppData") + "\\Riot Games\\Riot Client\\Config\\lockfile"; //Copy pasted from Auth.cs because why not?
bool lockfilexists = false;
int FlagExistsCount = 0;
main.ch_display.Visibility = Visibility.Collapsed;
main.buttons_group.Visibility = Visibility.Collapsed;
main.controls_group.Visibility = Visibility.Collapsed;
main.ForceLoginBtn.Visibility = Visibility.Collapsed;
while (true)
{
if (AuthObj.CheckLockFile(LockfilePath) && !lockfilexists)
Expand All @@ -31,9 +33,12 @@ public async void LoopCheck()
main.StatusTxt.Text = "Waiting for session. . .";
lockfilexists = true;
}
if (!await LoginFlagExists())
if (!await LoginFlagExists() && !main.PressedForceLogin)
{
await Task.Delay(1500);
FlagExistsCount++;
if (FlagExistsCount > 10)
main.ForceLoginBtn.Visibility = Visibility.Visible;
continue;
}
if (lockfilexists && AuthObj.ObtainLockfileData(LockfilePath).Success)
Expand All @@ -45,6 +50,7 @@ public async void LoopCheck()
if (!main.LoggedIn)
{
main.StatusTxt.Text = "Failed. Please login to Riot Client or Start Valorant.";
main.ForceLoginBtn.Visibility = Visibility.Collapsed;
await Task.Delay(1500);
continue;
}
Expand All @@ -67,14 +73,15 @@ public async void LoopCheck()
main.chkbxShareable.Visibility = Visibility.Visible;

main.spinner.Visibility = Visibility.Collapsed;
main.ForceLoginBtn.Visibility = Visibility.Collapsed;
main.spinner.Spin = false;
main.UpdateLayout();
Trace.WriteLine(main.Height + " || " + OriginalHeight);
main.Top = main.Top - (main.Height - OriginalHeight) / 2;

return;
}
await Task.Delay(1500);
await Task.Delay(500);
}
}

Expand All @@ -85,17 +92,13 @@ public async static Task<bool> LoginFlagExists()

string content;
using (FileStream fileStream = File.Open(log.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
using (StreamReader sr = new StreamReader(fileStream))
{
content = (String)sr.ReadToEnd().Clone();
}
}

bool t = false;
if (content.Contains("riot-messaging-service: State is now Connected"))
{
t = true;
}

await Task.Delay(1);
return t;
}
Expand Down

0 comments on commit a824ec8

Please # to comment.