diff options
author | Quill Littlefeather | 2015-07-25 16:50:07 -0700 |
---|---|---|
committer | Melanie Thielker | 2015-07-26 02:31:31 +0200 |
commit | 4735514a888b7cec7b5b26c719aebb90b555a83f (patch) | |
tree | 124bf99bf387db5bcba8efbd6eb1db7ac12bfb89 | |
parent | Removed unused code related to DNS lookups (diff) | |
download | opensim-SC-4735514a888b7cec7b5b26c719aebb90b555a83f.zip opensim-SC-4735514a888b7cec7b5b26c719aebb90b555a83f.tar.gz opensim-SC-4735514a888b7cec7b5b26c719aebb90b555a83f.tar.bz2 opensim-SC-4735514a888b7cec7b5b26c719aebb90b555a83f.tar.xz |
Fixed not being charged to create classifeids on money enabled regions
Signed-off-by: Melanie Thielker <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 5a648a3..626befd 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -457,12 +457,24 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
457 | uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, | 457 | uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, |
458 | int queryclassifiedPrice, IClientAPI remoteClient) | 458 | int queryclassifiedPrice, IClientAPI remoteClient) |
459 | { | 459 | { |
460 | Scene s = (Scene)remoteClient.Scene; | ||
461 | IMoneyModule money = s.RequestModuleInterface<IMoneyModule>(); | ||
462 | |||
463 | if (money != null) | ||
464 | { | ||
465 | if (!money.AmountCovered(remoteClient.AgentId, queryclassifiedPrice)) | ||
466 | { | ||
467 | remoteClient.SendAgentAlertMessage("You do not have enough money to create requested classified.", false); | ||
468 | return; | ||
469 | } | ||
470 | money.ApplyCharge(remoteClient.AgentId, queryclassifiedPrice, MoneyTransactionType.ClassifiedCharge); | ||
471 | } | ||
472 | |||
460 | UserClassifiedAdd ad = new UserClassifiedAdd(); | 473 | UserClassifiedAdd ad = new UserClassifiedAdd(); |
461 | 474 | ||
462 | Scene s = (Scene) remoteClient.Scene; | ||
463 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; | 475 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; |
464 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); | 476 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); |
465 | ScenePresence p = FindPresence(remoteClient.AgentId); | 477 | |
466 | 478 | ||
467 | string serverURI = string.Empty; | 479 | string serverURI = string.Empty; |
468 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 480 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |