mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Fix despawn, change foreach to for
This commit is contained in:
parent
11256e800c
commit
e58b1abd6b
2 changed files with 31 additions and 26 deletions
|
@ -2691,6 +2691,20 @@ namespace HISP.Server
|
|||
}
|
||||
return itemList.ToArray();
|
||||
}
|
||||
public static void DecrementDroppedItemDespawnTimer()
|
||||
{
|
||||
using (MySqlConnection db = new MySqlConnection(ConnectionString))
|
||||
{
|
||||
db.Open();
|
||||
|
||||
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "UPDATE DroppedItems SET DespawnTimer=DespawnTimer-1";
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
sqlCommand.Dispose();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddDroppedItem(DroppedItems.DroppedItem item)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue