From 4735514a888b7cec7b5b26c719aebb90b555a83f Mon Sep 17 00:00:00 2001 From: Quill Littlefeather Date: Sat, 25 Jul 2015 16:50:07 -0700 Subject: [PATCH] Fixed not being charged to create classifeids on money enabled regions Signed-off-by: Melanie Thielker --- .../Avatar/UserProfiles/UserProfileModule.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 5a648a3d3b..626befde45 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 uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, int queryclassifiedPrice, IClientAPI remoteClient) { + Scene s = (Scene)remoteClient.Scene; + IMoneyModule money = s.RequestModuleInterface(); + + if (money != null) + { + if (!money.AmountCovered(remoteClient.AgentId, queryclassifiedPrice)) + { + remoteClient.SendAgentAlertMessage("You do not have enough money to create requested classified.", false); + return; + } + money.ApplyCharge(remoteClient.AgentId, queryclassifiedPrice, MoneyTransactionType.ClassifiedCharge); + } + UserClassifiedAdd ad = new UserClassifiedAdd(); - Scene s = (Scene) remoteClient.Scene; Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); - ScenePresence p = FindPresence(remoteClient.AgentId); + string serverURI = string.Empty; GetUserProfileServerURI(remoteClient.AgentId, out serverURI);