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, public bool PerformObjectBuy(IClientAPI remoteClient, UUID categoryID,
uint localID, byte saleType) uint localID, byte saleType, int salePrice)
{ {
SceneObjectPart part = GetSceneObjectPart(localID); SceneObjectPart part = GetSceneObjectPart(localID);
@ -4626,6 +4626,19 @@ namespace OpenSim.Region.Framework.Scenes
if (part.ParentGroup == null) if (part.ParentGroup == null)
return false; 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; SceneObjectGroup group = part.ParentGroup;
switch (saleType) switch (saleType)

View File

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