Some changes to the money module to allow a more flexible system of
applying charges0.6.1-post-fixes
parent
4f91da2488
commit
4e0a424f9f
OpenSim/Region
Environment/Modules/Avatar/Currency/SampleMoney
Interfaces
|
@ -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)
|
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
|
||||||
{
|
{
|
||||||
string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
|
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)
|
public bool UploadCovered(IClientAPI client)
|
||||||
{
|
{
|
||||||
if (GetBalance(client) < PriceUpload)
|
return AmountCovered(client, PriceUpload);
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GroupCreationCovered(IClientAPI client)
|
public bool GroupCreationCovered(IClientAPI client)
|
||||||
{
|
{
|
||||||
if (GetBalance(client) < PriceGroupCreate)
|
return AmountCovered(client, PriceGroupCreate);
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -42,6 +42,8 @@ namespace OpenSim.Region.Interfaces
|
||||||
bool UploadCovered(IClientAPI client);
|
bool UploadCovered(IClientAPI client);
|
||||||
void ApplyGroupCreationCharge(UUID agentID);
|
void ApplyGroupCreationCharge(UUID agentID);
|
||||||
bool GroupCreationCovered(IClientAPI client);
|
bool GroupCreationCovered(IClientAPI client);
|
||||||
|
bool AmountCovered(IClientAPI client, int amount);
|
||||||
|
void ApplyCharge(UUID agentID, int amount, string text);
|
||||||
|
|
||||||
event ObjectPaid OnObjectPaid;
|
event ObjectPaid OnObjectPaid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue