Merge branch 'master' of github.com:TShock/TShock
This commit is contained in:
commit
9d193ba651
2 changed files with 5 additions and 11 deletions
|
|
@ -19,7 +19,7 @@ namespace TShockAPI
|
|||
|
||||
public static string saveDir = "./tshock/";
|
||||
|
||||
public static Version VersionNum = new Version(2, 0, 0, 1);
|
||||
public static Version VersionNum = new Version(2, 0, 0, 2);
|
||||
|
||||
public static string VersionCodename = "UnrealIRCd ftw (irc.shankshock.com #terraria)";
|
||||
|
||||
|
|
|
|||
|
|
@ -139,20 +139,14 @@ namespace TShockAPI
|
|||
/// <returns>int player</returns>
|
||||
public static int FindPlayer(string ply)
|
||||
{
|
||||
/*int pl = -1;
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
{
|
||||
if ((ply.ToLower()) == Main.player[i].name.ToLower())
|
||||
{
|
||||
pl = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return pl;*/
|
||||
List<int> found = new List<int>();
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
{
|
||||
if (Main.player[i].name.ToLower().Equals(ply.ToLower()))
|
||||
return i;
|
||||
if (Main.player[i].name.ToLower().Contains(ply.ToLower()))
|
||||
found.Add(i);
|
||||
}
|
||||
if (found.Count == 1)
|
||||
return found[0];
|
||||
else if (found.Count > 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue