diff options
Diffstat (limited to 'OpenSim')
4 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Framework/IMoneyModule.cs b/OpenSim/Framework/IMoneyModule.cs index 415b7df..55c9613 100644 --- a/OpenSim/Framework/IMoneyModule.cs +++ b/OpenSim/Framework/IMoneyModule.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Framework | |||
33 | public interface IMoneyModule | 33 | public interface IMoneyModule |
34 | { | 34 | { |
35 | bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, | 35 | bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, |
36 | int amount, UUID txn); | 36 | int amount, UUID txn, out string reason); |
37 | 37 | ||
38 | int GetBalance(UUID agentID); | 38 | int GetBalance(UUID agentID); |
39 | bool UploadCovered(UUID agentID, int amount); | 39 | bool UploadCovered(UUID agentID, int amount); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 588da10..aa00145 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -794,6 +794,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
794 | XmlDocument doc = new XmlDocument(); | 794 | XmlDocument doc = new XmlDocument(); |
795 | doc.LoadXml(xmlData); | 795 | doc.LoadXml(xmlData); |
796 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 796 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
797 | Vector3 rez_pos; | ||
797 | if (e == null || attachment) // Single | 798 | if (e == null || attachment) // Single |
798 | { | 799 | { |
799 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 800 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); |
@@ -815,6 +816,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
815 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | 816 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, |
816 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); | 817 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); |
817 | pos.Z += offsetHeight; | 818 | pos.Z += offsetHeight; |
819 | rez_pos = pos; | ||
818 | } | 820 | } |
819 | else | 821 | else |
820 | { | 822 | { |
@@ -829,6 +831,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
829 | BypassRayCast, bRayEndIsIntersection, true, | 831 | BypassRayCast, bRayEndIsIntersection, true, |
830 | bbox, false); | 832 | bbox, false); |
831 | 833 | ||
834 | rez_pos = pos; | ||
835 | |||
832 | pos -= bbox / 2; | 836 | pos -= bbox / 2; |
833 | 837 | ||
834 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | 838 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); |
@@ -865,7 +869,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
865 | primcount += g.PrimCount; | 869 | primcount += g.PrimCount; |
866 | 870 | ||
867 | if (!m_Scene.Permissions.CanRezObject( | 871 | if (!m_Scene.Permissions.CanRezObject( |
868 | primcount, remoteClient.AgentId, pos) | 872 | primcount, remoteClient.AgentId, rez_pos) |
869 | && !attachment) | 873 | && !attachment) |
870 | { | 874 | { |
871 | // The client operates in no fail mode. It will | 875 | // The client operates in no fail mode. It will |
@@ -882,7 +886,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
882 | return null; | 886 | return null; |
883 | } | 887 | } |
884 | 888 | ||
885 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, veclist, attachment)) | 889 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, veclist, attachment)) |
886 | return null; | 890 | return null; |
887 | 891 | ||
888 | for (int i = 0; i < objlist.Count; i++) | 892 | for (int i = 0; i < objlist.Count; i++) |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 25f198b..bcb21d0 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -203,8 +203,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
203 | { | 203 | { |
204 | } | 204 | } |
205 | 205 | ||
206 | public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn) | 206 | public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result) |
207 | { | 207 | { |
208 | result = String.Empty; | ||
208 | 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)); |
209 | 210 | ||
210 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); | 211 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d5f14bf..f05aaa9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3180,8 +3180,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3180 | return; | 3180 | return; |
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | string reason; | ||
3183 | money.ObjectGiveMoney( | 3184 | money.ObjectGiveMoney( |
3184 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | 3185 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero, out reason); |
3185 | }); | 3186 | }); |
3186 | 3187 | ||
3187 | return 0; | 3188 | return 0; |
@@ -12841,8 +12842,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12841 | return; | 12842 | return; |
12842 | } | 12843 | } |
12843 | 12844 | ||
12845 | string reason; | ||
12844 | bool result = money.ObjectGiveMoney( | 12846 | bool result = money.ObjectGiveMoney( |
12845 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn); | 12847 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason); |
12846 | 12848 | ||
12847 | if (result) | 12849 | if (result) |
12848 | { | 12850 | { |
@@ -12850,7 +12852,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12850 | return; | 12852 | return; |
12851 | } | 12853 | } |
12852 | 12854 | ||
12853 | replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS"; | 12855 | replydata = reason; |
12854 | } | 12856 | } |
12855 | finally | 12857 | finally |
12856 | { | 12858 | { |