Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
1e3914236d
|
@ -462,9 +462,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
{
|
||||
IMoneyModule mm = m_Scene.RequestModuleInterface<IMoneyModule>();
|
||||
|
||||
int baseCost = 0;
|
||||
if (mm != null)
|
||||
{
|
||||
// XPTO: The cost should be calculated about here
|
||||
baseCost = mm.UploadCharge;
|
||||
|
||||
if (llsdRequest.asset_type == "mesh")
|
||||
{
|
||||
|
@ -472,10 +472,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
int modelcost;
|
||||
ModelCost mc = new ModelCost();
|
||||
|
||||
if (!mc.MeshModelCost(llsdRequest.asset_resources, mm.UploadCharge, out modelcost,
|
||||
if (!mc.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost,
|
||||
meshcostdata, out error))
|
||||
{
|
||||
|
||||
client.SendAgentAlertMessage(error, false);
|
||||
|
||||
LLSDAssetUploadResponse errorResponse = new LLSDAssetUploadResponse();
|
||||
|
@ -483,14 +482,15 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
errorResponse.state = "error";
|
||||
return errorResponse;
|
||||
}
|
||||
|
||||
cost = (uint)modelcost;
|
||||
}
|
||||
else
|
||||
{
|
||||
cost = (uint)mm.UploadCharge;
|
||||
cost = (uint)baseCost;
|
||||
}
|
||||
|
||||
if (mm != null)
|
||||
{
|
||||
if (!mm.UploadCovered(client.AgentId, (int)cost))
|
||||
{
|
||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||
|
|
Loading…
Reference in New Issue