|
|
@ -19,8 +19,7 @@ namespace NightmareCoreWeb2 |
|
|
|
public List<Character> Characters { get; set; } |
|
|
|
public List<Character> Characters { get; set; } |
|
|
|
public List<AccountAccess> Access { get; set; } |
|
|
|
public List<AccountAccess> Access { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Account(int id) |
|
|
|
public static Account AccountByID(int id) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
MySqlConnection conn = new MySqlConnection(Program.connStr); |
|
|
|
MySqlConnection conn = new MySqlConnection(Program.connStr); |
|
|
@ -33,7 +32,7 @@ namespace NightmareCoreWeb2 |
|
|
|
{ |
|
|
|
{ |
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
return new Account(rdr.GetString(0)); |
|
|
|
new Account(rdr.GetString(0)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
catch (Exception e) |
|
|
@ -41,9 +40,9 @@ namespace NightmareCoreWeb2 |
|
|
|
Console.WriteLine(e); |
|
|
|
Console.WriteLine(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Account(string username) |
|
|
|
public Account(string username) |
|
|
|
{ |
|
|
|
{ |
|
|
|
MySqlConnection conn = new MySqlConnection(Program.connStr); |
|
|
|
MySqlConnection conn = new MySqlConnection(Program.connStr); |
|
|
@ -115,7 +114,7 @@ namespace NightmareCoreWeb2 |
|
|
|
Console.WriteLine(e); |
|
|
|
Console.WriteLine(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
foreach (var access in this.Access) |
|
|
|
foreach (var access in this.Access) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (access.RealmID == -1 && access.RealmID >= 1) |
|
|
|
if (access.RealmID == -1 && access.RealmID >= 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|