Fix map data hopefully.

This commit is contained in:
SilicaAndPina 2021-02-24 09:52:36 +13:00
parent b80984b92e
commit 83e274c828
7 changed files with 170 additions and 144 deletions

View file

@ -3936,6 +3936,21 @@ namespace HISP.Server
}
}
public static void RemoveDespawningItems()
{
using (MySqlConnection db = new MySqlConnection(ConnectionString))
{
db.Open();
MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "DELETE FROM droppeditems WHERE despawnTimer <=0";
sqlCommand.Prepare();
sqlCommand.ExecuteNonQuery();
sqlCommand.Dispose();
}
}
public static void RemoveDroppedItem(int randomId)
{
using (MySqlConnection db = new MySqlConnection(ConnectionString))
@ -3984,7 +3999,7 @@ namespace HISP.Server
MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "UPDATE DroppedItems SET DespawnTimer=DespawnTimer-5";
sqlCommand.CommandText = "UPDATE DroppedItems SET DespawnTimer=DespawnTimer-1";
sqlCommand.ExecuteNonQuery();
sqlCommand.Dispose();