From deef45eae2ffc1b6e351def686ef0cc2d6987425 Mon Sep 17 00:00:00 2001 From: MallocNull Date: Tue, 15 Jul 2014 23:17:34 -0500 Subject: [PATCH] minor corrections aoe takes too long --- bot/bot/ConditionHolder.cs | 1 + bot/bot/_G.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/bot/ConditionHolder.cs b/bot/bot/ConditionHolder.cs index 2d27e43..07d14e3 100644 --- a/bot/bot/ConditionHolder.cs +++ b/bot/bot/ConditionHolder.cs @@ -34,6 +34,7 @@ namespace bot { } else { } + str = condstring.Substring((pair[0] == 0) ? 0 : _G.indexOfNth(condstring, ';', pair[0] + 1) + 1, _G.indexOfNth(condstring, ';', pair[1] + 2) + 1); str = Int32.Parse(str.Substring(0, str.IndexOf(','))) - 1 + str.Substring(str.IndexOf(',')); diff --git a/bot/bot/_G.cs b/bot/bot/_G.cs index a382195..e184049 100644 --- a/bot/bot/_G.cs +++ b/bot/bot/_G.cs @@ -96,7 +96,8 @@ namespace bot { int fcount = 0; for(int i = 0; i < str.Length; i++) { if(str[i] == c) fcount++; - if(fcount == index) return i; + if(fcount == index) + return i; } return -1; }