add water balloon game functionality

This commit is contained in:
SilicaAndPina 2021-04-29 19:49:38 +12:00
parent e95140d708
commit 79b4b76c5d
7 changed files with 82 additions and 4 deletions

View file

@ -1593,6 +1593,26 @@ namespace HISP.Server
}
}
public static void EradicateItemFromExistance(int itemId)
{
using (MySqlConnection db = new MySqlConnection(ConnectionString))
{
db.Open();
MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "DELETE FROM Inventory WHERE itemId=@itemId";
sqlCommand.Parameters.AddWithValue("@itemId", itemId);
sqlCommand.Prepare();
sqlCommand.ExecuteNonQuery();
sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "DELETE FROM DroppedItems WHERE itemId=@itemId";
sqlCommand.Parameters.AddWithValue("@itemId", itemId);
sqlCommand.Prepare();
sqlCommand.ExecuteNonQuery();
sqlCommand.Dispose();
}
}
public static void SetTrackedItemCount(int playerId, Tracking.TrackableItem what, int count)