diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 52 |
2 files changed, 17 insertions, 39 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 56c0d98..3f15b69 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -722,11 +722,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
722 | if (money != null) | 722 | if (money != null) |
723 | { | 723 | { |
724 | // do the transaction, that is if the agent has got sufficient funds | 724 | // do the transaction, that is if the agent has got sufficient funds |
725 | if (!money.GroupCreationCovered(remoteClient)) { | 725 | if (!money.AmountCovered(remoteClient, money.GroupCreationCharge)) { |
726 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group."); | 726 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group."); |
727 | return UUID.Zero; | 727 | return UUID.Zero; |
728 | } | 728 | } |
729 | money.ApplyGroupCreationCharge(GetRequestingAgentID(remoteClient)); | 729 | money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation"); |
730 | } | 730 | } |
731 | UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); | 731 | UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); |
732 | 732 | ||
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index b9a75cc..6f5ef9e 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -108,6 +108,16 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
108 | 108 | ||
109 | public event ObjectPaid OnObjectPaid; | 109 | public event ObjectPaid OnObjectPaid; |
110 | 110 | ||
111 | public int UploadCharge | ||
112 | { | ||
113 | get { return 0; } | ||
114 | } | ||
115 | |||
116 | public int GroupCreationCharge | ||
117 | { | ||
118 | get { return 0; } | ||
119 | } | ||
120 | |||
111 | /// <summary> | 121 | /// <summary> |
112 | /// Startup | 122 | /// Startup |
113 | /// </summary> | 123 | /// </summary> |
@@ -188,15 +198,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
188 | // Please do not refactor these to be just one method | 198 | // Please do not refactor these to be just one method |
189 | // Existing implementations need the distinction | 199 | // Existing implementations need the distinction |
190 | // | 200 | // |
191 | public void ApplyUploadCharge(UUID agentID) | 201 | public void ApplyCharge(UUID agentID, int amount, string text) |
192 | { | ||
193 | } | ||
194 | |||
195 | public void ApplyGroupCreationCharge(UUID agentID) | ||
196 | { | 202 | { |
197 | } | 203 | } |
198 | 204 | public void ApplyUploadCharge(UUID agentID, int amount, string text) | |
199 | public void ApplyCharge(UUID agentID, int amount, string text) | ||
200 | { | 205 | { |
201 | } | 206 | } |
202 | 207 | ||
@@ -268,27 +273,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
268 | 273 | ||
269 | } | 274 | } |
270 | 275 | ||
271 | public EconomyData GetEconomyData() | ||
272 | { | ||
273 | EconomyData edata = new EconomyData(); | ||
274 | edata.ObjectCapacity = ObjectCapacity; | ||
275 | edata.ObjectCount = ObjectCount; | ||
276 | edata.PriceEnergyUnit = PriceEnergyUnit; | ||
277 | edata.PriceGroupCreate = PriceGroupCreate; | ||
278 | edata.PriceObjectClaim = PriceObjectClaim; | ||
279 | edata.PriceObjectRent = PriceObjectRent; | ||
280 | edata.PriceObjectScaleFactor = PriceObjectScaleFactor; | ||
281 | edata.PriceParcelClaim = PriceParcelClaim; | ||
282 | edata.PriceParcelClaimFactor = PriceParcelClaimFactor; | ||
283 | edata.PriceParcelRent = PriceParcelRent; | ||
284 | edata.PricePublicObjectDecay = PricePublicObjectDecay; | ||
285 | edata.PricePublicObjectDelete = PricePublicObjectDelete; | ||
286 | edata.PriceRentLight = PriceRentLight; | ||
287 | edata.PriceUpload = PriceUpload; | ||
288 | edata.TeleportMinPrice = TeleportMinPrice; | ||
289 | return edata; | ||
290 | } | ||
291 | |||
292 | private void GetClientFunds(IClientAPI client) | 276 | private void GetClientFunds(IClientAPI client) |
293 | { | 277 | { |
294 | CheckExistAndRefreshFunds(client.AgentId); | 278 | CheckExistAndRefreshFunds(client.AgentId); |
@@ -790,7 +774,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
790 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); | 774 | //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); |
791 | } | 775 | } |
792 | 776 | ||
793 | public int GetBalance(IClientAPI client) | 777 | public int GetBalance(UUID agentID) |
794 | { | 778 | { |
795 | return 0; | 779 | return 0; |
796 | } | 780 | } |
@@ -798,16 +782,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
798 | // Please do not refactor these to be just one method | 782 | // Please do not refactor these to be just one method |
799 | // Existing implementations need the distinction | 783 | // Existing implementations need the distinction |
800 | // | 784 | // |
801 | public bool UploadCovered(IClientAPI client) | 785 | public bool UploadCovered(IClientAPI client, int amount) |
802 | { | 786 | { |
803 | return AmountCovered(client, PriceUpload); | 787 | return true; |
804 | } | ||
805 | |||
806 | public bool GroupCreationCovered(IClientAPI client) | ||
807 | { | ||
808 | return AmountCovered(client, PriceGroupCreate); | ||
809 | } | 788 | } |
810 | |||
811 | public bool AmountCovered(IClientAPI client, int amount) | 789 | public bool AmountCovered(IClientAPI client, int amount) |
812 | { | 790 | { |
813 | return true; | 791 | return true; |