aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-14 07:56:34 +0000
committerMelanie Thielker2008-11-14 07:56:34 +0000
commit4e0a424f9f03278504a5daac611659eecdf602b6 (patch)
treef7b1221ed17b34574c59d0ae24957302511c64cf /OpenSim
parentMore groups plumbing (diff)
downloadopensim-SC_OLD-4e0a424f9f03278504a5daac611659eecdf602b6.zip
opensim-SC_OLD-4e0a424f9f03278504a5daac611659eecdf602b6.tar.gz
opensim-SC_OLD-4e0a424f9f03278504a5daac611659eecdf602b6.tar.bz2
opensim-SC_OLD-4e0a424f9f03278504a5daac611659eecdf602b6.tar.xz
Some changes to the money module to allow a more flexible system of
applying charges
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs19
-rw-r--r--OpenSim/Region/Interfaces/IMoneyModule.cs2
2 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index c8050da..a465cf8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -191,6 +191,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
191 { 191 {
192 } 192 }
193 193
194 public void ApplyCharge(UUID agentID, int amount, string text)
195 {
196 }
197
194 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) 198 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
195 { 199 {
196 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 200 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
@@ -1508,20 +1512,21 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1508 } 1512 }
1509 } 1513 }
1510 1514
1511 public bool UploadCovered(IClientAPI client) 1515 public bool AmountCovered(IClientAPI client, int amount)
1512 { 1516 {
1513 if (GetBalance(client) < PriceUpload) 1517 if (GetBalance(client) < amount)
1514 return false; 1518 return false;
1515
1516 return true; 1519 return true;
1517 } 1520 }
1518 1521
1519 public bool GroupCreationCovered(IClientAPI client) 1522 public bool UploadCovered(IClientAPI client)
1520 { 1523 {
1521 if (GetBalance(client) < PriceGroupCreate) 1524 return AmountCovered(client, PriceUpload);
1522 return false; 1525 }
1523 1526
1524 return true; 1527 public bool GroupCreationCovered(IClientAPI client)
1528 {
1529 return AmountCovered(client, PriceGroupCreate);
1525 } 1530 }
1526 1531
1527 #endregion 1532 #endregion
diff --git a/OpenSim/Region/Interfaces/IMoneyModule.cs b/OpenSim/Region/Interfaces/IMoneyModule.cs
index 5797af0..1fa4f13 100644
--- a/OpenSim/Region/Interfaces/IMoneyModule.cs
+++ b/OpenSim/Region/Interfaces/IMoneyModule.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Interfaces
42 bool UploadCovered(IClientAPI client); 42 bool UploadCovered(IClientAPI client);
43 void ApplyGroupCreationCharge(UUID agentID); 43 void ApplyGroupCreationCharge(UUID agentID);
44 bool GroupCreationCovered(IClientAPI client); 44 bool GroupCreationCovered(IClientAPI client);
45 bool AmountCovered(IClientAPI client, int amount);
46 void ApplyCharge(UUID agentID, int amount, string text);
45 47
46 event ObjectPaid OnObjectPaid; 48 event ObjectPaid OnObjectPaid;
47 } 49 }