aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs
index 34f8238..3a8906e 100644
--- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs
@@ -1045,7 +1045,33 @@ namespace OpenSim.Region.Environment.Modules
1045 public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) 1045 public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount)
1046 { 1046 {
1047 string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 1047 string description=String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
1048 return doMoneyTransfer(fromID, toID, amount, 2, description); 1048
1049 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
1050
1051 if (m_MoneyAddress.Length == 0)
1052 BalanceUpdate(fromID, toID, give_result, description);
1053
1054 return give_result;
1055
1056
1057 }
1058 private void BalanceUpdate(LLUUID senderID, LLUUID receiverID, bool transactionresult, string description)
1059 {
1060 IClientAPI sender = LocateClientObject(senderID);
1061 IClientAPI receiver = LocateClientObject(receiverID);
1062
1063 if (senderID != receiverID)
1064 {
1065 if (sender != null)
1066 {
1067 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(senderID));
1068 }
1069
1070 if (receiver != null)
1071 {
1072 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(receiverID));
1073 }
1074 }
1049 } 1075 }
1050 1076
1051 /// <summary> 1077 /// <summary>