Fix map data hopefully.

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

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();