Fixed not being charged to create classifeids on money enabled regions

Signed-off-by: Melanie Thielker <melanie@t-data.com>
0.8.2-post-fixes
Quill Littlefeather 2015-07-25 16:50:07 -07:00 committed by Melanie Thielker
parent 83da582261
commit 4735514a88
1 changed files with 14 additions and 2 deletions

View File

@ -457,12 +457,24 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags, uint queryParentEstate, UUID querySnapshotID, Vector3 queryGlobalPos, byte queryclassifiedFlags,
int queryclassifiedPrice, IClientAPI remoteClient) int queryclassifiedPrice, IClientAPI remoteClient)
{ {
Scene s = (Scene)remoteClient.Scene;
IMoneyModule money = s.RequestModuleInterface<IMoneyModule>();
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(); UserClassifiedAdd ad = new UserClassifiedAdd();
Scene s = (Scene) remoteClient.Scene;
Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; Vector3 pos = remoteClient.SceneAgent.AbsolutePosition;
ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y);
ScenePresence p = FindPresence(remoteClient.AgentId);
string serverURI = string.Empty; string serverURI = string.Empty;
GetUserProfileServerURI(remoteClient.AgentId, out serverURI); GetUserProfileServerURI(remoteClient.AgentId, out serverURI);