mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-09-09 10:45:15 -05:00
Track the player's last search time.
This commit is contained in:
@@ -334,6 +334,8 @@ namespace PkmnFoundations.GTS
|
||||
response.Write(record.Save(), 0, 292);
|
||||
}
|
||||
|
||||
Database.Instance.GtsSetLastSearch4(pid);
|
||||
|
||||
} break;
|
||||
|
||||
// the exchange request uploads a record of the exchangee pokemon
|
||||
|
||||
@@ -335,6 +335,8 @@ namespace PkmnFoundations.GTS
|
||||
response.Write(record.Save(), 0, 296);
|
||||
}
|
||||
|
||||
Database.Instance.GtsSetLastSearch5(pid);
|
||||
|
||||
} break;
|
||||
|
||||
// the exchange request uploads a record of the exchangee pokemon
|
||||
|
||||
@@ -500,6 +500,17 @@ namespace PkmnFoundations.Data
|
||||
WithTransaction(tran => GtsLogTrade4(tran, record, timeWithdrawn, partner_pid));
|
||||
}
|
||||
|
||||
public void GtsSetLastSearch4(MySqlTransaction tran, int pid)
|
||||
{
|
||||
tran.ExecuteNonQuery("UPDATE GtsProfiles4 SET TimeLastSearch = " +
|
||||
"GETUTCDATE() WHERE pid = @pid", new MySqlParameter("@pid", pid));
|
||||
}
|
||||
|
||||
public override void GtsSetLastSearch4(int pid)
|
||||
{
|
||||
WithTransaction(tran => GtsSetLastSearch4(tran, pid));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Battle Tower 4
|
||||
@@ -1423,6 +1434,17 @@ namespace PkmnFoundations.Data
|
||||
_params2);
|
||||
}
|
||||
|
||||
public void GtsSetLastSearch5(MySqlTransaction tran, int pid)
|
||||
{
|
||||
tran.ExecuteNonQuery("UPDATE GtsProfiles5 SET TimeLastSearch = " +
|
||||
"GETUTCDATE() WHERE pid = @pid", new MySqlParameter("@pid", pid));
|
||||
}
|
||||
|
||||
public override void GtsSetLastSearch5(int pid)
|
||||
{
|
||||
WithTransaction(tran => GtsSetLastSearch5(tran, pid));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Battle Subway 5
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace PkmnFoundations.Data
|
||||
public abstract int GtsAvailablePokemon4();
|
||||
|
||||
public abstract void GtsLogTrade4(GtsRecord4 record, DateTime ? timeWithdrawn, int ? partner_pid);
|
||||
public abstract void GtsSetLastSearch4(int pid);
|
||||
#endregion
|
||||
|
||||
#region Battle Tower 4
|
||||
@@ -113,6 +114,7 @@ namespace PkmnFoundations.Data
|
||||
public abstract int GtsAvailablePokemon5();
|
||||
|
||||
public abstract void GtsLogTrade5(GtsRecord5 record, DateTime ? timeWithdrawn, int ? partner_pid);
|
||||
public abstract void GtsSetLastSearch5(int pid);
|
||||
#endregion
|
||||
|
||||
#region Other Gamestats 5
|
||||
|
||||
Reference in New Issue
Block a user