aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-29 14:12:21 +0000
committerTeravus Ovares2008-04-29 14:12:21 +0000
commit97db1e8af00e3ea13826a4eb28151329c45ef7f7 (patch)
tree218817bccb881fbf855df55a9f98e4a1d487d6f3
parent* Little more spring cleaning. (diff)
downloadopensim-SC_OLD-97db1e8af00e3ea13826a4eb28151329c45ef7f7.zip
opensim-SC_OLD-97db1e8af00e3ea13826a4eb28151329c45ef7f7.tar.gz
opensim-SC_OLD-97db1e8af00e3ea13826a4eb28151329c45ef7f7.tar.bz2
opensim-SC_OLD-97db1e8af00e3ea13826a4eb28151329c45ef7f7.tar.xz
Committing Dee100's balance update patch with a few bug fixes and a twist. Thanks Dee100!
-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>