aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land
diff options
context:
space:
mode:
authorUbitUmarov2017-07-26 19:00:49 +0100
committerUbitUmarov2017-07-26 19:01:11 +0100
commit0bbe7bab7bb60c39b0defeff173287fc66430c26 (patch)
treea62addfa06dad2071c9a097b87620f30528fd646 /OpenSim/Region/CoreModules/World/Land
parentadd comments to make that more clear (diff)
downloadopensim-SC_OLD-0bbe7bab7bb60c39b0defeff173287fc66430c26.zip
opensim-SC_OLD-0bbe7bab7bb60c39b0defeff173287fc66430c26.tar.gz
opensim-SC_OLD-0bbe7bab7bb60c39b0defeff173287fc66430c26.tar.bz2
opensim-SC_OLD-0bbe7bab7bb60c39b0defeff173287fc66430c26.tar.xz
add new funtion bool MoveMoney(UUID fromUser, UUID toUser, int amount, MoneyTransactionType type, string text). this should be called async allowing time for money module to process it. If returns true, the transation did sucess, so if its use was to pay something, the payed item/service must be provided without fail, otherwise another method is needed so a refund is possible
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index e0152a3..1fc4609 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -617,12 +617,15 @@ namespace OpenSim.Region.CoreModules.World.Land
617 return; 617 return;
618 } 618 }
619 619
620 mm.MoveMoney(remote_client.AgentId, ldata.OwnerID, cost, String.Format("Parcel '{0}' pass sell",ldata.Name)); 620 string regionName = m_scene.RegionInfo.RegionName;
621 // lets try older method 621 string payDescription = String.Format("Parcel '{0}' at region '{1} {2:0.###} hours access pass", ldata.Name, regionName, ldata.PassHours);
622// EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(remote_client.AgentId, ldata.OwnerID, 622
623// cost,(int)MoneyTransactionType.LandPassSale , String.Format("Parcel '{0}' pass sell",ldata.Name)); 623 if(!mm.MoveMoney(remote_client.AgentId, ldata.OwnerID, cost,MoneyTransactionType.LandPassSale, payDescription))
624 {
625 remote_client.SendAgentAlertMessage("Sorry pass payment processing failed, please try again later", true);
626 return;
627 }
624 628
625// m_scene.EventManager.TriggerMoneyTransfer(this, args);
626 if (idx != -1) 629 if (idx != -1)
627 ldata.ParcelAccessList.RemoveAt(idx); 630 ldata.ParcelAccessList.RemoveAt(idx);
628 ldata.ParcelAccessList.Add(entry); 631 ldata.ParcelAccessList.Add(entry);