aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs30
1 files changed, 22 insertions, 8 deletions
diff --git a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
index 043c110..cd68541 100644
--- a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
64 private bool gridmode = false; 64 private bool gridmode = false;
65 // private ObjectPaid handerOnObjectPaid; 65 // private ObjectPaid handerOnObjectPaid;
66 private bool m_enabled = true; 66 private bool m_enabled = true;
67 private bool m_sellEnabled = false;
67 68
68 private IConfigSource m_gConfig; 69 private IConfigSource m_gConfig;
69 70
@@ -244,13 +245,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
244 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); 245 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
245 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); 246 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
246 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); 247 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
247 // string EBA = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString()); 248 m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false);
248 // Helpers.TryParse(EBA, out EconomyBaseAccount);
249
250 // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1);
251 m_stipend = startupConfig.GetInt("UserStipend", 1000);
252
253 // m_LandAddress = startupConfig.GetString("LandServer", String.Empty);
254 } 249 }
255 250
256 // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter. 251 // Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
@@ -819,7 +814,26 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
819 UUID sessionID, UUID groupID, UUID categoryID, 814 UUID sessionID, UUID groupID, UUID categoryID,
820 uint localID, byte saleType, int salePrice) 815 uint localID, byte saleType, int salePrice)
821 { 816 {
822 remoteClient.SendBlueBoxMessage(UUID.Zero, "", "Buying is not implemented in this version"); 817 if (!m_sellEnabled)
818 {
819 remoteClient.SendBlueBoxMessage(UUID.Zero, "", "Buying is not implemented in this version");
820 return;
821 }
822
823 if (salePrice != 0)
824 {
825 remoteClient.SendBlueBoxMessage(UUID.Zero, "", "Buying anything for a price other than zero is not implemented");
826 return;
827 }
828
829 Scene s = LocateSceneClientIn(remoteClient.AgentId);
830 SceneObjectPart part = s.GetSceneObjectPart(localID);
831 if (part == null)
832 {
833 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false);
834 return;
835 }
836 s.PerformObjectBuy(remoteClient, categoryID, localID, saleType);
823 } 837 }
824 } 838 }
825 839