Merge branch 'avination-current' into careminster

Conflicts:
	OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
avinationmerge
Melanie 2013-06-23 01:48:57 +01:00
commit 24a4367fc2
4 changed files with 14 additions and 7 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

@ -794,6 +794,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlData);
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
Vector3 rez_pos;
if (e == null || attachment) // Single
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
@ -815,6 +816,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false);
pos.Z += offsetHeight;
rez_pos = pos;
}
else
{
@ -829,6 +831,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
BypassRayCast, bRayEndIsIntersection, true,
bbox, false);
rez_pos = pos;
pos -= bbox / 2;
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
@ -865,7 +869,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
primcount += g.PrimCount;
if (!m_Scene.Permissions.CanRezObject(
primcount, remoteClient.AgentId, pos)
primcount, remoteClient.AgentId, rez_pos)
&& !attachment)
{
// The client operates in no fail mode. It will
@ -882,7 +886,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return null;
}
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, veclist, attachment))
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, veclist, attachment))
return null;
for (int i = 0; i < objlist.Count; i++)

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

@ -3180,8 +3180,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;
@ -12841,8 +12842,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)
{
@ -12850,7 +12852,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS";
replydata = reason;
}
finally
{