Fix a sale issue

0.6.9-post-fixes
Melanie 2010-09-30 15:43:56 +01:00
parent 5f1c1e281a
commit 76fd4cf7b5
2 changed files with 15 additions and 2 deletions

View File

@ -4616,7 +4616,7 @@ namespace OpenSim.Region.Framework.Scenes
}
public bool PerformObjectBuy(IClientAPI remoteClient, UUID categoryID,
uint localID, byte saleType)
uint localID, byte saleType, int salePrice)
{
SceneObjectPart part = GetSceneObjectPart(localID);
@ -4625,6 +4625,19 @@ namespace OpenSim.Region.Framework.Scenes
if (part.ParentGroup == null)
return false;
if (part.ObjectSaleType != saleType)
{
m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the type of sale specified");
return false;
}
if (part.SalePrice != salePrice)
{
m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the price specified");
return false;
}
SceneObjectGroup group = part.ParentGroup;

View File

@ -850,7 +850,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false);
return;
}
s.PerformObjectBuy(remoteClient, categoryID, localID, saleType);
s.PerformObjectBuy(remoteClient, categoryID, localID, saleType, salePrice);
}
}