aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs37
1 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 7bbf500..5d10e93 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -191,15 +191,21 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
191 // Please do not refactor these to be just one method 191 // Please do not refactor these to be just one method
192 // Existing implementations need the distinction 192 // Existing implementations need the distinction
193 // 193 //
194 public void ApplyCharge(UUID agentID, int amount, string text) 194 public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData)
195 { 195 {
196 } 196 }
197
198 public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type)
199 {
200 }
201
197 public void ApplyUploadCharge(UUID agentID, int amount, string text) 202 public void ApplyUploadCharge(UUID agentID, int amount, string text)
198 { 203 {
199 } 204 }
200 205
201 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) 206 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result)
202 { 207 {
208 result = String.Empty;
203 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 209 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
204 210
205 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); 211 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
@@ -322,7 +328,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
322 client.SendAlertMessage(e.Message + " "); 328 client.SendAlertMessage(e.Message + " ");
323 } 329 }
324 330
325 client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds); 331 client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds, 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
326 } 332 }
327 else 333 else
328 { 334 {
@@ -385,12 +391,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
385 { 391 {
386 if (sender != null) 392 if (sender != null)
387 { 393 {
388 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID)); 394 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
389 } 395 }
390 396
391 if (receiver != null) 397 if (receiver != null)
392 { 398 {
393 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID)); 399 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
394 } 400 }
395 } 401 }
396 } 402 }
@@ -688,19 +694,14 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
688 /// Event called Economy Data Request handler. 694 /// Event called Economy Data Request handler.
689 /// </summary> 695 /// </summary>
690 /// <param name="agentId"></param> 696 /// <param name="agentId"></param>
691 public void EconomyDataRequestHandler(UUID agentId) 697 public void EconomyDataRequestHandler(IClientAPI user)
692 { 698 {
693 IClientAPI user = LocateClientObject(agentId); 699 Scene s = LocateSceneClientIn(user.AgentId);
694
695 if (user != null)
696 {
697 Scene s = LocateSceneClientIn(user.AgentId);
698 700
699 user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate, 701 user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate,
700 PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor, 702 PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor,
701 PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload, 703 PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload,
702 TeleportMinPrice, TeleportPriceExponent); 704 TeleportMinPrice, TeleportPriceExponent);
703 }
704 } 705 }
705 706
706 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e) 707 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e)
@@ -840,6 +841,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
840 if (module != null) 841 if (module != null)
841 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); 842 module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice);
842 } 843 }
844
845 public void MoveMoney(UUID fromAgentID, UUID toAgentID, int amount, string text)
846 {
847 }
843 } 848 }
844 849
845 public enum TransactionType : int 850 public enum TransactionType : int