示例#1
0
文件: Line.cs 项目: 745c5412/tera-emu
        public Boolean RemoveBidHouseItemAtLine(BidHouseItem BHI)
        {
            byte    cat       = (byte)(BHI.getQuantity(false) - 1);
            Boolean canDelete = Categories[cat].Remove(BHI);

            Tri(cat);
            return(canDelete);
        }
示例#2
0
 public static void Add(BidHouseItem BHI)
 {
     try
     {
         MySqlCommand Command = new MySqlCommand()
         {
             Connection  = DatabaseManager.Provider.getConnection(),
             CommandText = "REPLACE INTO `bidhouse_items` VALUES(@map,@owner,@price,@count,@item);",
         };
         Command.Prepare();
         Command.Parameters.AddWithValue("@map", BHI.MapID);
         Command.Parameters.AddWithValue("@owner", BHI.Owner);
         Command.Parameters.AddWithValue("@price", BHI.Price);
         Command.Parameters.AddWithValue("@count", BHI.getQuantity(false));
         Command.Parameters.AddWithValue("@item", BHI.Item.ID);
         Command.ExecuteNonQuery();
     }
     catch (Exception e)
     {
         Logger.Error("Can't execute query : " + e.ToString());
     }
 }