DarkEmu_GameServer.Systems.Player_DropGold C# (CSharp) Метод

Player_DropGold() публичный Метод

public Player_DropGold ( ulong Gold ) : void
Gold ulong
Результат void
        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();
                    world_item item = new world_item();
                    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 Global.ID(Global.ID.IDS.World);
                    item.UniqueID = item.Ids.GetUniqueID;
                    item.x = Character.Position.x;
                    item.z = Character.Position.z;
                    item.y = Character.Position.y;
                    Systems.aRound(ref item.x, ref item.y, 1);
                    item.xSec = Character.Position.xSec;
                    item.ySec = Character.Position.ySec;
                    item.Type = 1;
                    item.fromType = 6;
                    item.Owner = 0;
                    Systems.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.IngameMessages(SERVER_UPDATEGOLD, IngameMessages.UIIT_MSG_STRGERR_NOT_ENOUGH_GOLD));
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine("Player_DropGold error: {0}", ex);
                Systems.Debugger.Write(ex);
            }
            #endregion
        }
Systems