OpenMetaverse.AgentManager.GiveMoney C# (CSharp) Method

GiveMoney() public method

Give Money to destionation Object or Avatar
public GiveMoney ( UUID target, int amount, string description, MoneyTransactionType type, TransactionFlags flags ) : void
target UUID UUID of the Target Object/Avatar
amount int Amount in L$
description string Reason (Optional normally)
type MoneyTransactionType The type of transaction
flags TransactionFlags Transaction flags, mostly for identifying group /// transactions
return void
        public void GiveMoney(UUID target, int amount, string description, MoneyTransactionType type, TransactionFlags flags)
        {
            MoneyTransferRequestPacket money = new MoneyTransferRequestPacket();
            money.AgentData.AgentID = this.id;
            money.AgentData.SessionID = Client.Self.SessionID;
            money.MoneyData.Description = Utils.StringToBytes(description);
            money.MoneyData.DestID = target;
            money.MoneyData.SourceID = this.id;
            money.MoneyData.TransactionType = (int)type;
            money.MoneyData.AggregatePermInventory = 0; // This is weird, apparently always set to zero though
            money.MoneyData.AggregatePermNextOwner = 0; // This is weird, apparently always set to zero though
            money.MoneyData.Flags = (byte)flags;
            money.MoneyData.Amount = amount;

            Client.Network.SendPacket(money);
        }