Reintroduce the return value of llGiveMoney. The grid will crash and burn without it.

avinationmerge
Melanie 2013-01-24 18:23:39 +01:00
parent 9d2e832b85
commit e785242c49
3 changed files with 12 additions and 12 deletions

View File

@ -3017,19 +3017,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return src.ToLower();
}
public void llGiveMoney(string destination, int amount)
public LSL_Integer llGiveMoney(string destination, int amount)
{
Util.FireAndForget(x =>
{
// Util.FireAndForget(x =>
// {
m_host.AddScriptLPS(1);
if (m_item.PermsGranter == UUID.Zero)
return;
return 0;
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
{
LSLError("No permissions to give money");
return;
return 0;
}
UUID toID = new UUID();
@ -3037,7 +3037,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (!UUID.TryParse(destination, out toID))
{
LSLError("Bad key in llGiveMoney");
return;
return 0;
}
IMoneyModule money = World.RequestModuleInterface<IMoneyModule>();
@ -3045,12 +3045,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (money == null)
{
NotImplemented("llGiveMoney");
return;
return 0;
}
money.ObjectGiveMoney(
return money.ObjectGiveMoney(
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero);
});
// });
}
public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)

View File

@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Float llGetWallclock();
void llGiveInventory(string destination, string inventory);
void llGiveInventoryList(string destination, string category, LSL_List inventory);
void llGiveMoney(string destination, int amount);
LSL_Integer llGiveMoney(string destination, int amount);
LSL_String llTransferLindenDollars(string destination, int amount);
void llGodLikeRezObject(string inventory, LSL_Vector pos);
LSL_Float llGround(LSL_Vector offset);

View File

@ -876,9 +876,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_LSL_Functions.llGiveInventoryList(destination, category, inventory);
}
public void llGiveMoney(string destination, int amount)
public LSL_Integer llGiveMoney(string destination, int amount)
{
m_LSL_Functions.llGiveMoney(destination, amount);
return m_LSL_Functions.llGiveMoney(destination, amount);
}
public LSL_String llTransferLindenDollars(string destination, int amount)