diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 064eb0a..6d2e2c8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -15678,6 +15678,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15678 | 15678 | ||
15679 | try | 15679 | try |
15680 | { | 15680 | { |
15681 | if (amount <= 0) | ||
15682 | { | ||
15683 | replydata = "INVALID_AMOUNT"; | ||
15684 | return; | ||
15685 | } | ||
15686 | |||
15681 | TaskInventoryItem item = m_item; | 15687 | TaskInventoryItem item = m_item; |
15682 | if (item == null) | 15688 | if (item == null) |
15683 | { | 15689 | { |
@@ -15685,6 +15691,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15685 | return; | 15691 | return; |
15686 | } | 15692 | } |
15687 | 15693 | ||
15694 | if (m_host.OwnerID == m_host.GroupID) | ||
15695 | { | ||
15696 | replydata = "GROUP_OWNED"; | ||
15697 | return; | ||
15698 | } | ||
15699 | |||
15688 | m_host.AddScriptLPS(1); | 15700 | m_host.AddScriptLPS(1); |
15689 | 15701 | ||
15690 | if (item.PermsGranter == UUID.Zero) | 15702 | if (item.PermsGranter == UUID.Zero) |
@@ -15707,6 +15719,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15707 | return; | 15719 | return; |
15708 | } | 15720 | } |
15709 | 15721 | ||
15722 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, toID); | ||
15723 | if (account == null) | ||
15724 | { | ||
15725 | replydata = "LINDENDOLLAR_ENTITYDOESNOTEXIST"; | ||
15726 | return; | ||
15727 | } | ||
15728 | |||
15710 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); | 15729 | IMoneyModule money = World.RequestModuleInterface<IMoneyModule>(); |
15711 | 15730 | ||
15712 | if (money == null) | 15731 | if (money == null) |
@@ -15716,8 +15735,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15716 | } | 15735 | } |
15717 | 15736 | ||
15718 | string reason; | 15737 | string reason; |
15719 | bool result = money.ObjectGiveMoney( | 15738 | bool result = money.ObjectGiveMoney( m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason); |
15720 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason); | ||
15721 | 15739 | ||
15722 | if (result) | 15740 | if (result) |
15723 | { | 15741 | { |