diff options
author | Melanie | 2013-01-24 21:32:25 +0100 |
---|---|---|
committer | Melanie | 2013-01-24 21:32:25 +0100 |
commit | 789e9901ddadf8c10a6296225a3fa50197ea43f0 (patch) | |
tree | 0710d530094ec72d8fc99d627d35d5a29389cc3c /OpenSim/Region | |
parent | Reintroduce the return value of llGiveMoney. The grid will crash and burn wit... (diff) | |
download | opensim-SC_OLD-789e9901ddadf8c10a6296225a3fa50197ea43f0.zip opensim-SC_OLD-789e9901ddadf8c10a6296225a3fa50197ea43f0.tar.gz opensim-SC_OLD-789e9901ddadf8c10a6296225a3fa50197ea43f0.tar.bz2 opensim-SC_OLD-789e9901ddadf8c10a6296225a3fa50197ea43f0.tar.xz |
Make llGiveMoney async again. The return value is now the constant 1 to make
scripts work properly. Scripts will no longer receive a failure indication through
this return value;
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4709c0b..53c6e5c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3019,17 +3019,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3019 | 3019 | ||
3020 | public LSL_Integer llGiveMoney(string destination, int amount) | 3020 | public LSL_Integer llGiveMoney(string destination, int amount) |
3021 | { | 3021 | { |
3022 | // Util.FireAndForget(x => | 3022 | Util.FireAndForget(x => |
3023 | // { | 3023 | { |
3024 | m_host.AddScriptLPS(1); | 3024 | m_host.AddScriptLPS(1); |
3025 | 3025 | ||
3026 | if (m_item.PermsGranter == UUID.Zero) | 3026 | if (m_item.PermsGranter == UUID.Zero) |
3027 | return 0; | 3027 | return; |
3028 | 3028 | ||
3029 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) | 3029 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) |
3030 | { | 3030 | { |
3031 | LSLError("No permissions to give money"); | 3031 | LSLError("No permissions to give money"); |
3032 | return 0; | 3032 | return; |
3033 | } | 3033 | } |
3034 | 3034 | ||
3035 | UUID toID = new UUID(); | 3035 | UUID toID = new UUID(); |
@@ -3037,7 +3037,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3037 | if (!UUID.TryParse(destination, out toID)) | 3037 | if (!UUID.TryParse(destination, out toID)) |
3038 | { | 3038 | { |
3039 | LSLError("Bad key in llGiveMoney"); | 3039 | LSLError("Bad key in llGiveMoney"); |
3040 | return 0; | 3040 | return; |
3041 | } | 3041 | } |
3042 | 3042 | ||
3043 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); | 3043 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); |
@@ -3045,12 +3045,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3045 | if (money == null) | 3045 | if (money == null) |
3046 | { | 3046 | { |
3047 | NotImplemented("llGiveMoney"); | 3047 | NotImplemented("llGiveMoney"); |
3048 | return 0; | 3048 | return; |
3049 | } | 3049 | } |
3050 | 3050 | ||
3051 | return money.ObjectGiveMoney( | 3051 | money.ObjectGiveMoney( |
3052 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | 3052 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); |
3053 | // }); | 3053 | }); |
3054 | |||
3055 | return 0; | ||
3054 | } | 3056 | } |
3055 | 3057 | ||
3056 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3058 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |