Merge branch 'avination-current' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.csavinationmerge
commit
24a4367fc2
|
@ -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);
|
||||||
|
|
|
@ -794,6 +794,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.LoadXml(xmlData);
|
doc.LoadXml(xmlData);
|
||||||
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
|
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
|
||||||
|
Vector3 rez_pos;
|
||||||
if (e == null || attachment) // Single
|
if (e == null || attachment) // Single
|
||||||
{
|
{
|
||||||
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
|
||||||
|
@ -815,6 +816,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
|
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
|
||||||
BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false);
|
BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false);
|
||||||
pos.Z += offsetHeight;
|
pos.Z += offsetHeight;
|
||||||
|
rez_pos = pos;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -829,6 +831,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
BypassRayCast, bRayEndIsIntersection, true,
|
BypassRayCast, bRayEndIsIntersection, true,
|
||||||
bbox, false);
|
bbox, false);
|
||||||
|
|
||||||
|
rez_pos = pos;
|
||||||
|
|
||||||
pos -= bbox / 2;
|
pos -= bbox / 2;
|
||||||
|
|
||||||
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
|
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
|
||||||
|
@ -865,7 +869,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
primcount += g.PrimCount;
|
primcount += g.PrimCount;
|
||||||
|
|
||||||
if (!m_Scene.Permissions.CanRezObject(
|
if (!m_Scene.Permissions.CanRezObject(
|
||||||
primcount, remoteClient.AgentId, pos)
|
primcount, remoteClient.AgentId, rez_pos)
|
||||||
&& !attachment)
|
&& !attachment)
|
||||||
{
|
{
|
||||||
// The client operates in no fail mode. It will
|
// The client operates in no fail mode. It will
|
||||||
|
@ -882,7 +886,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
return null;
|
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;
|
return null;
|
||||||
|
|
||||||
for (int i = 0; i < objlist.Count; i++)
|
for (int i = 0; i < objlist.Count; i++)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -3180,8 +3180,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;
|
||||||
|
@ -12841,8 +12842,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)
|
||||||
{
|
{
|
||||||
|
@ -12850,7 +12852,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS";
|
replydata = reason;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue