aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs54
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs4
3 files changed, 29 insertions, 31 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 58c2ac5..0562c7f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3017,42 +3017,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3017 return src.ToLower(); 3017 return src.ToLower();
3018 } 3018 }
3019 3019
3020 public LSL_Integer llGiveMoney(string destination, int amount) 3020 public void llGiveMoney(string destination, int amount)
3021 { 3021 {
3022 m_host.AddScriptLPS(1); 3022 Util.FireAndForget(x =>
3023
3024 if (m_item.PermsGranter == UUID.Zero)
3025 return 0;
3026
3027 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
3028 { 3023 {
3029 LSLError("No permissions to give money"); 3024 m_host.AddScriptLPS(1);
3030 return 0;
3031 }
3032 3025
3033 UUID toID = new UUID(); 3026 if (m_item.PermsGranter == UUID.Zero)
3027 return;
3034 3028
3035 if (!UUID.TryParse(destination, out toID)) 3029 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
3036 { 3030 {
3037 LSLError("Bad key in llGiveMoney"); 3031 LSLError("No permissions to give money");
3038 return 0; 3032 return;
3039 } 3033 }
3040 3034
3041 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); 3035 UUID toID = new UUID();
3042 3036
3043 if (money == null) 3037 if (!UUID.TryParse(destination, out toID))
3044 { 3038 {
3045 NotImplemented("llGiveMoney"); 3039 LSLError("Bad key in llGiveMoney");
3046 return 0; 3040 return;
3047 } 3041 }
3048 3042
3049 bool result = money.ObjectGiveMoney( 3043 IMoneyModule money = World.RequestModuleInterface<IMoneyModule>();
3050 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
3051 3044
3052 if (result) 3045 if (money == null)
3053 return 1; 3046 {
3047 NotImplemented("llGiveMoney");
3048 return;
3049 }
3054 3050
3055 return 0; 3051 money.ObjectGiveMoney(
3052 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
3053 });
3056 } 3054 }
3057 3055
3058 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 3056 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
@@ -12589,7 +12587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12589 } 12587 }
12590 12588
12591 bool result = money.ObjectGiveMoney( 12589 bool result = money.ObjectGiveMoney(
12592 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); 12590 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn);
12593 12591
12594 if (result) 12592 if (result)
12595 { 12593 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 9bf6f9b..8eeb4d2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
208 LSL_Float llGetWallclock(); 208 LSL_Float llGetWallclock();
209 void llGiveInventory(string destination, string inventory); 209 void llGiveInventory(string destination, string inventory);
210 void llGiveInventoryList(string destination, string category, LSL_List inventory); 210 void llGiveInventoryList(string destination, string category, LSL_List inventory);
211 LSL_Integer llGiveMoney(string destination, int amount); 211 void llGiveMoney(string destination, int amount);
212 LSL_String llTransferLindenDollars(string destination, int amount); 212 LSL_String llTransferLindenDollars(string destination, int amount);
213 void llGodLikeRezObject(string inventory, LSL_Vector pos); 213 void llGodLikeRezObject(string inventory, LSL_Vector pos);
214 LSL_Float llGround(LSL_Vector offset); 214 LSL_Float llGround(LSL_Vector offset);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 8ecc4f8..ef71d7b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -876,9 +876,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
876 m_LSL_Functions.llGiveInventoryList(destination, category, inventory); 876 m_LSL_Functions.llGiveInventoryList(destination, category, inventory);
877 } 877 }
878 878
879 public LSL_Integer llGiveMoney(string destination, int amount) 879 public void llGiveMoney(string destination, int amount)
880 { 880 {
881 return m_LSL_Functions.llGiveMoney(destination, amount); 881 m_LSL_Functions.llGiveMoney(destination, amount);
882 } 882 }
883 883
884 public LSL_String llTransferLindenDollars(string destination, int amount) 884 public LSL_String llTransferLindenDollars(string destination, int amount)