Add a result param to te money module interface
parent
689969e143
commit
62c277ff9f
|
@ -33,7 +33,7 @@ namespace OpenSim.Framework
|
||||||
public interface IMoneyModule
|
public interface IMoneyModule
|
||||||
{
|
{
|
||||||
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
|
bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
|
||||||
int amount, UUID txn);
|
int amount, UUID txn, out string reason);
|
||||||
|
|
||||||
int GetBalance(UUID agentID);
|
int GetBalance(UUID agentID);
|
||||||
bool UploadCovered(UUID agentID, int amount);
|
bool UploadCovered(UUID agentID, int amount);
|
||||||
|
|
|
@ -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));
|
string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
|
||||||
|
|
||||||
bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
|
bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
|
||||||
|
|
|
@ -3109,8 +3109,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string reason;
|
||||||
money.ObjectGiveMoney(
|
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;
|
return 0;
|
||||||
|
@ -12784,8 +12785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string reason;
|
||||||
bool result = money.ObjectGiveMoney(
|
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)
|
if (result)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue