diff options
author | Melanie Thielker | 2008-11-14 07:56:34 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-14 07:56:34 +0000 |
commit | 4e0a424f9f03278504a5daac611659eecdf602b6 (patch) | |
tree | f7b1221ed17b34574c59d0ae24957302511c64cf /OpenSim/Region/Environment/Modules/Avatar | |
parent | More groups plumbing (diff) | |
download | opensim-SC-4e0a424f9f03278504a5daac611659eecdf602b6.zip opensim-SC-4e0a424f9f03278504a5daac611659eecdf602b6.tar.gz opensim-SC-4e0a424f9f03278504a5daac611659eecdf602b6.tar.bz2 opensim-SC-4e0a424f9f03278504a5daac611659eecdf602b6.tar.xz |
Some changes to the money module to allow a more flexible system of
applying charges
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | 19 |
1 files changed, 12 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 |