Remove IClientAPI from the money module. It was only used to pass in the

agent id anyway
iar_mods
Melanie 2012-01-28 00:18:12 +00:00
parent 7837c611fb
commit 7352aea9ac
6 changed files with 10 additions and 10 deletions

View File

@ -36,8 +36,8 @@ namespace OpenSim.Framework
int amount);
int GetBalance(UUID agentID);
bool UploadCovered(IClientAPI client, int amount);
bool AmountCovered(IClientAPI client, int amount);
bool UploadCovered(UUID agentID, int amount);
bool AmountCovered(UUID agentID, int amount);
void ApplyCharge(UUID agentID, int amount, string text);
void ApplyUploadCharge(UUID agentID, int amount, string text);

View File

@ -366,7 +366,7 @@ namespace OpenSim.Region.ClientStack.Linden
if (mm != null)
{
if (!mm.UploadCovered(client, mm.UploadCharge))
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
{
if (client != null)
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
@ -1018,4 +1018,4 @@ namespace OpenSim.Region.ClientStack.Linden
fs.Close();
}
}
}
}

View File

@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
if (m_scene.TryGetClient(agentID, out client))
{
if (!mm.UploadCovered(client, mm.UploadCharge))
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
{
if (client != null)
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
@ -268,4 +268,4 @@ namespace OpenSim.Region.ClientStack.Linden
}
}
}
}

View File

@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
if (mm != null)
{
if (!mm.UploadCovered(remoteClient, mm.UploadCharge))
if (!mm.UploadCovered(remoteClient.AgentId, mm.UploadCharge))
{
remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
return;

View File

@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if (money != null)
{
// do the transaction, that is if the agent has got sufficient funds
if (!money.AmountCovered(remoteClient, money.GroupCreationCharge)) {
if (!money.AmountCovered(remoteClient.AgentId, money.GroupCreationCharge)) {
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
return UUID.Zero;
}

View File

@ -775,11 +775,11 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
// Please do not refactor these to be just one method
// Existing implementations need the distinction
//
public bool UploadCovered(IClientAPI client, int amount)
public bool UploadCovered(UUID agentID, int amount)
{
return true;
}
public bool AmountCovered(IClientAPI client, int amount)
public bool AmountCovered(UUID agentID, int amount)
{
return true;
}