Fix a sale issue
parent
5f1c1e281a
commit
76fd4cf7b5
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue