public static void AddPurification(ItemAdding.Purification_ purification)
 {
     MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
     cmd.Insert("itemadding")
         .Insert("uid", purification.ItemUID)
         .Insert("addingtype", 0)
         .Insert("addingid", purification.PurificationItemID)
         .Insert("addinglevel", purification.PurificationLevel)
         .Insert("duration", purification.PurificationDuration)
         .Insert("addedon", purification.AddedOn.Ticks).Execute();
 }
 public static void AddExtraEffect(ItemAdding.Refinery_ extraeffect)
 {
     MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
     cmd.Insert("itemadding")
         .Insert("uid", extraeffect.ItemUID)
         .Insert("addingtype", 1)
         .Insert("addingid", extraeffect.EffectID)
         .Insert("addinglevel", extraeffect.EffectLevel)
         .Insert("addingpercent", extraeffect.EffectPercent)
         .Insert("duration", extraeffect.EffectDuration)
         .Insert("addedon", extraeffect.AddedOn.Ticks).Execute();
 }
        public void SendExtras(Client.GameState client)
        {
            if (client == null)
                return;

            if (RefineItem != 0)
            {
                Refinery.RefineryItem rI = RefineStats;
                if (rI != null)
                {
                    client.Send(new Game_ItemSoul()
                    {
                        ID = rI.Identifier,
                        Identifier = UID,
                        Level = rI.Level,
                        Mode = Game_ItemSoul.Types.Refine,
                        Percent = rI.Percent,
                        Type = 1,
                        Time = (UInt32)(RefineryTime.Subtract(DateTime.Now).TotalSeconds)
                    });
                }
            }

            ItemAdding add = new ItemAdding(true);
            if (Purification.Available)
                add.Append(Purification);
            if (ExtraEffect.Available)
                add.Append(ExtraEffect);
            if (Purification.Available || ExtraEffect.Available)
                client.Send(add);

            if (Lock == 2)
            {
                ItemLock itemLock = new ItemLock(true);
                itemLock.UID = UID;
                itemLock.ID = ItemLock.UnlockDate;
                itemLock.dwParam = (uint)(UnlockEnd.Year * 10000 + UnlockEnd.Month * 100 + UnlockEnd.Day);
                client.Send(itemLock);
            }
        }