Skip to content

Commit

Permalink
v1.0.9
Browse files Browse the repository at this point in the history
v1.0.9
  • Loading branch information
IBM5100o committed Jun 12, 2024
1 parent 6d2d0b5 commit 3f4871c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
14 changes: 10 additions & 4 deletions HDT_BGrank/BGrank.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ public class BGrank
private bool namesReady = false;
private bool playerReady = false;
private bool leaderBoardReady = false;
private bool isReset = true;

private Mirror mirror = null;
private List<string> oppNames = new List<string>();
private Dictionary<string, int> unsortDict = new Dictionary<string, int>();
private Dictionary<string, string> leaderBoard = new Dictionary<string, string>();

public void Reset()
private void Reset()
{
done = false;
failToGetData = false;
Expand Down Expand Up @@ -71,10 +72,15 @@ public void OnUpdate()

if (Core.Game.IsInMenu)
{
Reset();
if (!isReset)
{
Reset();
isReset = true;
}
}
else if (!done && Core.Game.IsBattlegroundsMatch)
{
isReset = false;
if (failToGetData) { done = true; }
else if (!namesReady) { GetOppNames(); }
else if (leaderBoardReady)
Expand Down Expand Up @@ -226,7 +232,7 @@ private void GetOppNames()
{
if (!playerReady) { return; }

// The code below is from: https://github.com/Zero-to-Heroes/unity-spy-.net4.5/tree/master
// The code below is from: https://github.com/Zero-to-Heroes/unity-spy-.net4.5
try
{
string myName = Reflection.Client.GetMatchInfo().LocalPlayer.Name;
Expand Down Expand Up @@ -254,7 +260,7 @@ private void GetOppNames()
if (oppNames.Count != 0) { namesReady = true; }
}

// The code below is from: https://github.com/Zero-to-Heroes/unity-spy-.net4.5/tree/master
// The code below is from: https://github.com/Zero-to-Heroes/unity-spy-.net4.5
private static dynamic[] GetPlayerTiles(dynamic leaderboardMgr)
{
var result = new List<dynamic>();
Expand Down
4 changes: 2 additions & 2 deletions HDT_BGrank/BGrankPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void OnLoad()
public void OnUnload()
{
MenuItem.IsChecked = false;
rank.Reset();
rank.ClearMemory();
rank = null;
}

Expand Down Expand Up @@ -87,7 +87,7 @@ private void CreateMenuItem()

public Version Version
{
get { return new Version(1, 0, 8); }
get { return new Version(1, 0, 9); }
}

}
Expand Down
3 changes: 3 additions & 0 deletions HDT_BGrank/LeaderBoardPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<Grid x:Name="LeaderGrid" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.RenderTransform>
<ScaleTransform x:Name="GridTransform" ScaleX="1" ScaleY="1"/>
</Grid.RenderTransform>
<TextBlock x:Name="LeaderText" Text="&#xA;123 12345&#xA;123 12345&#xA;123 12345&#xA;123 12345&#xA;123 12345&#xA;123 12345&#xA;123 12345" Foreground="#FFE8E3E3" Background="#FF272424" FontSize="20" HorizontalAlignment="Left" VerticalAlignment="Top" MouseDown="LeaderText_MouseDown" MouseUp="LeaderText_MouseUp" MouseMove="LeaderText_MouseMove"/>
<Button x:Name="DeleteButton" Content="X" Width="25" Height="25" Click="DeleteButton_Click" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="10"/>
<Button x:Name="HiddenButton" Content="" Width="25" Height="25" Click="HiddenButton_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,0,0,0" FontSize="12"/>
Expand Down
2 changes: 2 additions & 0 deletions HDT_BGrank/LeaderBoardPanel.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public LeaderBoardPanel()

public void OnUpdate(BGrank rank)
{
GridTransform.ScaleX = Core.OverlayWindow.Width / 1920.0;
GridTransform.ScaleY = Core.OverlayWindow.Height / 1080.0;
if (Core.Game.IsInMenu)
{
Visibility = Visibility.Hidden;
Expand Down
4 changes: 2 additions & 2 deletions HDT_BGrank/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.8")]
[assembly: AssemblyFileVersion("1.0.8")]
[assembly: AssemblyVersion("1.0.9")]
[assembly: AssemblyFileVersion("1.0.9")]

0 comments on commit 3f4871c

Please sign in to comment.