Пример #1
0
        void GMmakeitem(int itemID, byte PlusValue)
        {
            try
            {
                WorldMgr.Items sitem = new WorldMgr.Items();
                sitem.Model     = itemID;
                sitem.Ids       = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                sitem.UniqueID  = sitem.Ids.GetUniqueID;
                sitem.amount    = 1;
                sitem.PlusValue = PlusValue;
                sitem.x         = Character.Position.x;
                sitem.z         = Character.Position.z;
                sitem.y         = Character.Position.y;
                sitem.xSec      = Character.Position.xSec;
                sitem.ySec      = Character.Position.ySec;
                sitem.CalculateNewPosition();
                #region Amount definition
                if (ObjData.Manager.ItemBase[sitem.Model].Equip)
                {
                    sitem.Type = 2;
                }
                else
                {
                    sitem.Type = 3;
                }
                #endregion

                sitem.fromType  = 5;
                sitem.fromOwner = 0;
                sitem.downType  = false;
                sitem.Owner     = Character.Account.ID;
                Helpers.Manager.WorldItem.Add(sitem);

                sitem.Send(Packet.ObjectSpawn(sitem), true);
                Print.Format("[Gameserver:" + Character.Information.Name + " Has created:  {0}", ObjData.Manager.ItemBase[itemID].Name);
            }
            catch (Exception ex)
            {
                Console.WriteLine("GM_MakeItem: {0}", ex);
            }
        }
Пример #2
0
        public void MonsterDrop()
        {
            try
            {
                if (GetDie || Die)
                {
                    if (Type != 16)
                    {
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        // Set Target Information
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        PlayerMgr sys = (PlayerMgr)GetTarget();
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        // If There's no target return
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        if (sys == null)
                        {
                            return;
                        }

                        sbyte Leveldiff  = (sbyte)(sys.Character.Information.Level - ObjData.Manager.ObjectBase[ID].Level);
                        int   Amountinfo = 0;

                        if (Math.Abs(Leveldiff) < 10 || Math.Abs(Leveldiff) == 0)
                        {
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            // Gold Drop
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            #region Gold
                            int Golddrop = Rnd.Next(ObjData.Manager.LevelGold[ObjData.Manager.ObjectBase[ID].Level].min, ObjData.Manager.LevelGold[ObjData.Manager.ObjectBase[ID].Level].max);
                            Amountinfo = 0;
                            if (Type == 4 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold))
                            {
                                Amountinfo = Convert.ToByte(Rnd.Next(1, 3));
                            }
                            if (Type == 3 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold))
                            {
                                Amountinfo = Convert.ToByte(Rnd.Next(4, 6));
                            }
                            if (Type == 1 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold))
                            {
                                Amountinfo = Convert.ToByte(Rnd.Next(1, 3));
                            }
                            if (Type == 0 && (Rnd.Next(0, 200) < 100 * Helpers.Settings.Rate.Gold))
                            {
                                Amountinfo = 1;
                            }

                            for (byte a = 1; a <= Amountinfo;)
                            {
                                WorldMgr.Items Gold_Drop = new WorldMgr.Items();

                                Gold_Drop.amount = Golddrop * Helpers.Settings.Rate.Gold;
                                Gold_Drop.Model  = 1;

                                if (Gold_Drop.amount < 1000)
                                {
                                    Gold_Drop.Model = 1;
                                }
                                else if (Gold_Drop.amount > 1000 && Gold_Drop.amount < 10000)
                                {
                                    Gold_Drop.Model = 2;
                                }
                                else if (Gold_Drop.amount > 10000)
                                {
                                    Gold_Drop.Model = 3;
                                }

                                Gold_Drop.Ids      = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                                Gold_Drop.UniqueID = Gold_Drop.Ids.GetUniqueID;
                                Gold_Drop.x        = x;
                                Gold_Drop.z        = z;
                                Gold_Drop.y        = y;
                                Gold_Drop.xSec     = xSec;
                                Gold_Drop.ySec     = ySec;
                                Gold_Drop.Type     = 1;
                                Gold_Drop.downType = true;
                                Gold_Drop.fromType = 5;
                                Gold_Drop.CalculateNewPosition();

                                Helpers.Manager.WorldItem.Add(Gold_Drop);
                                Gold_Drop.Send(Client.Packet.ObjectSpawn(Gold_Drop), true);
                                a++;

                                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                // Send Info To Grabpet
                                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                if (((PlayerMgr)GetTarget()).Character.Grabpet.Active)
                                {
                                    ((PlayerMgr)GetTarget()).Pet_PickupItem(Gold_Drop);
                                }
                            }
                            #endregion
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            // Drop Database
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            #region Drop Databases
                            foreach (KeyValuePair <string, ObjData.drop_database> p in ObjData.Manager.DropBase)
                            {
                                Amountinfo = p.Value.GetAmount(ObjData.Manager.ObjectBase[ID].Type, p.Key);
                                if (Amountinfo > 0)
                                {
                                    for (byte c = 1; c <= Amountinfo; c++)
                                    {
                                        Items Dropped_Item = new Items();
                                        Dropped_Item.Model = p.Value.GetDrop(ObjData.Manager.ObjectBase[ID].Level, ID, p.Key, sys.Character.Information.Race);
                                        if (Dropped_Item.Model == -1)
                                        {
                                            continue;
                                        }
                                        Dropped_Item.Ids       = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                                        Dropped_Item.UniqueID  = Dropped_Item.Ids.GetUniqueID;
                                        Dropped_Item.PlusValue = Function.Items.RandomPlusValue();
                                        Dropped_Item.MagAtt    = Function.Items.RandomStatValue();
                                        Dropped_Item.x         = x;
                                        Dropped_Item.z         = z;
                                        Dropped_Item.y         = y;
                                        Dropped_Item.xSec      = xSec;
                                        Dropped_Item.ySec      = ySec;
                                        Dropped_Item.Type      = p.Value.GetSpawnType(p.Key);
                                        Dropped_Item.fromType  = 5;
                                        Dropped_Item.downType  = true;
                                        Dropped_Item.fromOwner = UniqueID;
                                        Dropped_Item.amount    = p.Value.GetQuantity(Type, p.Key);
                                        Dropped_Item.Owner     = ((PlayerMgr)GetTarget()).Character.Account.ID;
                                        Dropped_Item.CalculateNewPosition();
                                        Helpers.Manager.WorldItem.Add(Dropped_Item);
                                        Dropped_Item.Send(Client.Packet.ObjectSpawn(Dropped_Item), true);
                                    }
                                }
                            }
                        }
                        #endregion
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Drop system error: {0}", ex);
            }
        }
        public void MonsterDrop()
        {
            try
            {
                if (GetDie || Die)
                {
                    if (Type != 16)
                    {
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        // Set Target Information
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        PlayerMgr sys = (PlayerMgr)GetTarget();
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        // If There's no target return
                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                        if (sys == null) return;

                        sbyte Leveldiff = (sbyte)(sys.Character.Information.Level - ObjData.Manager.ObjectBase[ID].Level);
                        int Amountinfo = 0;

                        if (Math.Abs(Leveldiff) < 10 || Math.Abs(Leveldiff) == 0)
                        {
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            // Gold Drop
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            #region Gold
                            int Golddrop = Rnd.Next(ObjData.Manager.LevelGold[ObjData.Manager.ObjectBase[ID].Level].min, ObjData.Manager.LevelGold[ObjData.Manager.ObjectBase[ID].Level].max);
                            Amountinfo = 0;
                            if (Type == 4 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold)) Amountinfo = Convert.ToByte(Rnd.Next(1, 3));
                            if (Type == 3 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold)) Amountinfo = Convert.ToByte(Rnd.Next(4, 6));
                            if (Type == 1 && (Rnd.Next(0, 200) < 200 * Helpers.Settings.Rate.Gold)) Amountinfo = Convert.ToByte(Rnd.Next(1, 3));
                            if (Type == 0 && (Rnd.Next(0, 200) < 100 * Helpers.Settings.Rate.Gold)) Amountinfo = 1;

                            for (byte a = 1; a <= Amountinfo;)
                            {
                                WorldMgr.Items Gold_Drop = new WorldMgr.Items();

                                Gold_Drop.amount = Golddrop * Helpers.Settings.Rate.Gold;
                                Gold_Drop.Model = 1;

                                if (Gold_Drop.amount < 1000)
                                    Gold_Drop.Model = 1;
                                else if (Gold_Drop.amount > 1000 && Gold_Drop.amount < 10000)
                                    Gold_Drop.Model = 2;
                                else if (Gold_Drop.amount > 10000)
                                    Gold_Drop.Model = 3;

                                Gold_Drop.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                                Gold_Drop.UniqueID = Gold_Drop.Ids.GetUniqueID;
                                Gold_Drop.x = x;
                                Gold_Drop.z = z;
                                Gold_Drop.y = y;
                                Gold_Drop.xSec = xSec;
                                Gold_Drop.ySec = ySec;
                                Gold_Drop.Type = 1;
                                Gold_Drop.downType = true;
                                Gold_Drop.fromType = 5;
                                Gold_Drop.CalculateNewPosition();

                                Helpers.Manager.WorldItem.Add(Gold_Drop);
                                Gold_Drop.Send(Client.Packet.ObjectSpawn(Gold_Drop), true);
                                a++;

                                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                // Send Info To Grabpet
                                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                if (((PlayerMgr)GetTarget()).Character.Grabpet.Active)
                                {
                                    ((PlayerMgr)GetTarget()).Pet_PickupItem(Gold_Drop);
                                }
                            }
                            #endregion
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            // Drop Database
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            #region Drop Databases
                            foreach (KeyValuePair<string, ObjData.drop_database> p in ObjData.Manager.DropBase)
                            {
                                Amountinfo = p.Value.GetAmount(ObjData.Manager.ObjectBase[ID].Type, p.Key);
                                if (Amountinfo > 0)
                                {
                                    for (byte c = 1; c <= Amountinfo; c++)
                                    {
                                        Items Dropped_Item = new Items();
                                        Dropped_Item.Model = p.Value.GetDrop(ObjData.Manager.ObjectBase[ID].Level, ID, p.Key, sys.Character.Information.Race);
                                        if (Dropped_Item.Model == -1) continue;
                                        Dropped_Item.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                                        Dropped_Item.UniqueID = Dropped_Item.Ids.GetUniqueID;
                                        Dropped_Item.PlusValue = Function.Items.RandomPlusValue();
                                        Dropped_Item.MagAtt = Function.Items.RandomStatValue();
                                        Dropped_Item.x = x;
                                        Dropped_Item.z = z;
                                        Dropped_Item.y = y;
                                        Dropped_Item.xSec = xSec;
                                        Dropped_Item.ySec = ySec;
                                        Dropped_Item.Type = p.Value.GetSpawnType(p.Key);
                                        Dropped_Item.fromType = 5;
                                        Dropped_Item.downType = true;
                                        Dropped_Item.fromOwner = UniqueID;
                                        Dropped_Item.amount = p.Value.GetQuantity(Type, p.Key);
                                        Dropped_Item.Owner = ((PlayerMgr)GetTarget()).Character.Account.ID;
                                        Dropped_Item.CalculateNewPosition();
                                        Helpers.Manager.WorldItem.Add(Dropped_Item);
                                        Dropped_Item.Send(Client.Packet.ObjectSpawn(Dropped_Item), true);
                                    }
                                }
                            }
                        }
                        #endregion

                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Drop system error: {0}", ex);
            }
        }
        void GMmakeitem(int itemID, byte PlusValue)
        {
            try
            {
                WorldMgr.Items sitem = new WorldMgr.Items();
                sitem.Model = itemID;
                sitem.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                sitem.UniqueID = sitem.Ids.GetUniqueID;
                sitem.amount = 1;
                sitem.PlusValue = PlusValue;
                sitem.x = Character.Position.x;
                sitem.z = Character.Position.z;
                sitem.y = Character.Position.y;
                sitem.xSec = Character.Position.xSec;
                sitem.ySec = Character.Position.ySec;
                sitem.CalculateNewPosition();
                #region Amount definition
                if (ObjData.Manager.ItemBase[sitem.Model].Equip)
                    sitem.Type = 2;
                else
                    sitem.Type = 3;
                #endregion

                sitem.fromType = 5;
                sitem.fromOwner = 0;
                sitem.downType = false;
                sitem.Owner = Character.Account.ID;
                Helpers.Manager.WorldItem.Add(sitem);

                sitem.Send(Packet.ObjectSpawn(sitem), true);
                Print.Format("[Gameserver:" + Character.Information.Name + " Has created:  {0}", ObjData.Manager.ItemBase[itemID].Name);
            }
            catch (Exception ex)
            {
                Console.WriteLine("GM_MakeItem: {0}", ex);
            }
        }
        /////////////////////////////////////////////////////////////////////////////////
        // Drop Item
        /////////////////////////////////////////////////////////////////////////////////
        void Player_DropItem(byte slot)
        {
            #region Drop Item
            try
            {
                if (Character.Action.nAttack) return;
                if (Character.Action.sAttack) return;
                if (Character.Stall.Stallactive) return;
                if (Character.State.Exchanging) return;
                if (Character.Alchemy.working) return;
                if (Character.State.Busy) return;
                if (Character.Network.Guild.UsingStorage) return;
                //Else we continue
                else
                {
                    //Get item information from slot.
                    ObjData.slotItem item = GetItem((uint)Character.Information.CharacterID, slot, 0);
                    //Check if the item is a item mall item before dropping.
                    if (ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.AVATAR28D ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.CHANGESKIN ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.GLOBALCHAT ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.INVENTORYEXPANSION ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.REVERSESCROLL ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.STALLDECORATION ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.WAREHOUSE ||
                        ObjData.Manager.ItemBase[item.ID].Etctype == ObjData.item_database.EtcType.AVATAR28D ||
                        ObjData.Manager.ItemBase[item.ID].Type == ObjData.item_database.ArmorType.AVATAR ||
                        ObjData.Manager.ItemBase[item.ID].Type == ObjData.item_database.ArmorType.AVATARATTACH ||
                        ObjData.Manager.ItemBase[item.ID].Type == ObjData.item_database.ArmorType.AVATARHAT ||
                        ObjData.Manager.ItemBase[item.ID].Pettype == ObjData.item_database.PetType.ATTACKPET ||
                        ObjData.Manager.ItemBase[item.ID].Pettype == ObjData.item_database.PetType.GRABPET)
                        return;
                    //If the id model is lower then 4 dont allow to drop.
                    //Gold drop requires another drop part.
                    if (item.ID < 4) return;
                    //Anti hack check
                    int owner = Convert.ToInt32(DB.GetData("SELECT * FROM char_items WHERE id='" + item.dbID + "'", "owner"));
                    //If the player really is the owner of this item we continue to drop it.
                    if (owner == Character.Information.CharacterID)
                    {
                        //Check for item amount.
                        if (item.Amount <= ObjData.Manager.ItemBase[item.ID].Max_Stack)
                        {
                            //Spawn new item globally
                            WorldMgr.Items sitem = new WorldMgr.Items();
                            sitem.Model = item.ID;
                            sitem.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                            sitem.UniqueID = sitem.Ids.GetUniqueID;
                            sitem.amount = item.Amount;
                            sitem.PlusValue = item.PlusValue;
                            sitem.x = Character.Position.x;
                            sitem.z = Character.Position.z;
                            sitem.y = Character.Position.y;
                            sitem.CalculateNewPosition();
                            sitem.xSec = Character.Position.xSec;
                            sitem.ySec = Character.Position.ySec;

                            #region Amount definition
                            if (ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.BLADE ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.CH_SHIELD ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_SHIELD ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.BOW ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_AXE ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_CROSSBOW ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_DAGGER ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_DARKSTAFF ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_HARP ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_STAFF ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_SWORD ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_TSTAFF ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EU_TSWORD ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.GLAVIE ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.SPEAR ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.SWORD ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.EARRING ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.RING ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.NECKLACE ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.ARMOR ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.GARMENT ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.GM ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.HEAVY ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.LIGHT ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.PROTECTOR ||
                                 ObjData.Manager.ItemBase[sitem.Model].Itemtype == ObjData.item_database.ItemType.AVATAR ||
                                 ObjData.Manager.ItemBase[sitem.Model].Type == ObjData.item_database.ArmorType.ROBE)
                                sitem.Type = 2;
                            else
                                sitem.Type = 3;
                            #endregion

                            sitem.fromType = 6;
                            sitem.fromOwner = Character.Information.UniqueID;
                            sitem.downType = false;
                            sitem.Owner = 0;
                            sitem.Send(Packet.ObjectSpawn(sitem), true);
                            Helpers.Manager.WorldItem.Add(sitem);
                            //Send visual packet for removing the item from inventory.
                            client.Send(Packet.DespawnFromInventory(sitem.UniqueID));
                            client.Send(Packet.MoveItem(7, slot, 0, 0, 0, "DELETE_ITEM"));
                            //Update database and remove the item
                            DB.query("delete from char_items where itemnumber='item" + slot + "' AND owner='" + Character.Information.CharacterID + "'");
                            //Save player information
                            SavePlayerInfo();
                        }
                        else
                            return;
                    }
                    //If the player is not the owner of the item beeing dropped we ban the player.
                    else
                    {
                        Disconnect("ban");
                        Log.Exception("Autobanned user: "******" Due to hacking");
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
            #endregion
        }
        /////////////////////////////////////////////////////////////////////////////////
        // Drop Gold
        /////////////////////////////////////////////////////////////////////////////////
        void Player_DropGold(ulong Gold)
        {
            #region Drop Gold
            try
            {
                if (Character.Action.nAttack) return;
                if (Character.Action.sAttack) return;
                if (Character.Stall.Stallactive) return;
                if (Character.State.Exchanging) return;
                if (Character.Alchemy.working) return;
                if ((ulong)Character.Information.Gold >= Gold)
                {
                    GetFreeSlot();
                    WorldMgr.Items item = new WorldMgr.Items();
                    item.amount = (int)Gold;
                    item.Model = 1;
                    if (item.amount < 1000) item.Model = 1;
                    else if (item.amount > 1000 && item.amount < 10000) item.Model = 2;
                    else if (item.amount > 10000) item.Model = 3;
                    item.Ids = new GenerateUniqueID(GenerateUniqueID.IDS.World);
                    item.UniqueID = item.Ids.GetUniqueID;
                    item.x = Character.Position.x;
                    item.z = Character.Position.z;
                    item.y = Character.Position.y;
                    item.CalculateNewPosition();
                    item.xSec = Character.Position.xSec;
                    item.ySec = Character.Position.ySec;
                    item.Type = 1;
                    item.fromType = 6;
                    item.Owner = 0;
                    Helpers.Manager.WorldItem.Add(item);
                    item.Send(Packet.ObjectSpawn(item), true);
                    Character.Information.Gold -= (long)Gold;
                    client.Send(Packet.InfoUpdate(1, (int)Character.Information.Gold, 0));
                    client.Send(Packet.MoveItem(0x0A, 0, 0, 0, (long)Gold, "DELETE_GOLD"));
                    SaveGold();
                }
                else
                {
                    client.Send(Packet.Message(OperationCode.SERVER_UPDATEGOLD, Messages.UIIT_MSG_STRGERR_NOT_ENOUGH_GOLD));
                }

            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
            #endregion
        }