mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Some changes to the money module to allow a more flexible system of
applying charges
This commit is contained in:
@@ -191,6 +191,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||
{
|
||||
}
|
||||
|
||||
public void ApplyCharge(UUID agentID, int amount, string text)
|
||||
{
|
||||
}
|
||||
|
||||
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
|
||||
{
|
||||
string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
|
||||
@@ -1508,20 +1512,21 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||
}
|
||||
}
|
||||
|
||||
public bool AmountCovered(IClientAPI client, int amount)
|
||||
{
|
||||
if (GetBalance(client) < amount)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool UploadCovered(IClientAPI client)
|
||||
{
|
||||
if (GetBalance(client) < PriceUpload)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return AmountCovered(client, PriceUpload);
|
||||
}
|
||||
|
||||
public bool GroupCreationCovered(IClientAPI client)
|
||||
{
|
||||
if (GetBalance(client) < PriceGroupCreate)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return AmountCovered(client, PriceGroupCreate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user