From 4896e35996eb0949964d8eedfc6ff0a9cc2c39f9 Mon Sep 17 00:00:00 2001 From: IBM5100 <141636677+IBM5100o@users.noreply.github.com> Date: Sun, 16 Jun 2024 22:38:50 +0800 Subject: [PATCH] v1.1.2-2 v1.1.2-2 --- HDT_BGrank/BGrank.cs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/HDT_BGrank/BGrank.cs b/HDT_BGrank/BGrank.cs index 9f610e5..338a671 100644 --- a/HDT_BGrank/BGrank.cs +++ b/HDT_BGrank/BGrank.cs @@ -252,11 +252,12 @@ private void GetOppNames() } if (allPass) { - if (BattleTagModOn(tmpNames)) + // For those who use the BattleTag MOD + for (int i = 0; i < tmpNames.Count; i++) { - for (int i = 0; i < tmpNames.Count; i++) + int index = tmpNames[i].IndexOf('#'); + if (index > 0) { - int index = tmpNames[i].LastIndexOf('#'); tmpNames[i] = tmpNames[i].Substring(0, index); } } @@ -287,17 +288,5 @@ private static dynamic[] GetPlayerTiles(dynamic leaderboardMgr) } return result.ToArray(); } - - private bool BattleTagModOn(List nameList) - { - foreach (string name in nameList) - { - if (!name.Contains('#')) - { - return false; - } - } - return true; - } } } \ No newline at end of file