Add a result param to te money module interface

avinationmerge
Melanie 2013-06-13 02:52:11 +02:00
parent 689969e143
commit 62c277ff9f
3 changed files with 7 additions and 4 deletions

View File

@ -33,7 +33,7 @@ namespace OpenSim.Framework
public interface IMoneyModule
{
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
int amount, UUID txn);
int amount, UUID txn, out string reason);
int GetBalance(UUID agentID);
bool UploadCovered(UUID agentID, int amount);

View File

@ -203,8 +203,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
{
}
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn)
public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result)
{
result = String.Empty;
string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);

View File

@ -3109,8 +3109,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
string reason;
money.ObjectGiveMoney(
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero, out reason);
});
return 0;
@ -12784,8 +12785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
string reason;
bool result = money.ObjectGiveMoney(
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn);
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason);
if (result)
{