mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-09-14 05:05:14 -05:00
Added function to retrieve a player's last search time.
This commit is contained in:
@@ -512,6 +512,19 @@ namespace PkmnFoundations.Data
|
||||
WithTransaction(tran => GtsSetLastSearch4(tran, pid));
|
||||
}
|
||||
|
||||
public DateTime ? GtsGetLastSearch4(MySqlTransaction tran, int pid)
|
||||
{
|
||||
object result = tran.ExecuteScalar("SELECT TimeLastSearch " +
|
||||
"FROM GtsProfiles4 WHERE pid = @pid", new MySqlParameter("@pid", pid));
|
||||
if (result == null || result is DBNull) return null;
|
||||
return (DateTime)result;
|
||||
}
|
||||
|
||||
public override DateTime ? GtsGetLastSearch4(int pid)
|
||||
{
|
||||
return WithTransaction(tran => GtsGetLastSearch4(tran, pid));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Battle Tower 4
|
||||
@@ -1447,6 +1460,19 @@ namespace PkmnFoundations.Data
|
||||
WithTransaction(tran => GtsSetLastSearch5(tran, pid));
|
||||
}
|
||||
|
||||
public DateTime? GtsGetLastSearch5(MySqlTransaction tran, int pid)
|
||||
{
|
||||
object result = tran.ExecuteScalar("SELECT TimeLastSearch " +
|
||||
"FROM GtsProfiles5 WHERE pid = @pid", new MySqlParameter("@pid", pid));
|
||||
if (result == null || result is DBNull) return null;
|
||||
return (DateTime)result;
|
||||
}
|
||||
|
||||
public override DateTime? GtsGetLastSearch5(int pid)
|
||||
{
|
||||
return WithTransaction(tran => GtsGetLastSearch5(tran, pid));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Battle Subway 5
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace PkmnFoundations.Data
|
||||
|
||||
public abstract void GtsLogTrade4(GtsRecord4 record, DateTime ? timeWithdrawn, int ? partner_pid);
|
||||
public abstract void GtsSetLastSearch4(int pid);
|
||||
public abstract DateTime ? GtsGetLastSearch4(int pid);
|
||||
#endregion
|
||||
|
||||
#region Battle Tower 4
|
||||
@@ -115,6 +116,7 @@ namespace PkmnFoundations.Data
|
||||
|
||||
public abstract void GtsLogTrade5(GtsRecord5 record, DateTime ? timeWithdrawn, int ? partner_pid);
|
||||
public abstract void GtsSetLastSearch5(int pid);
|
||||
public abstract DateTime ? GtsGetLastSearch5(int pid);
|
||||
#endregion
|
||||
|
||||
#region Other Gamestats 5
|
||||
|
||||
Reference in New Issue
Block a user