mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
* Whole buncha stuff.
This commit is contained in:
@@ -138,6 +138,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessMoneyTransferRequest(LLUUID source, LLUUID destination, int amount, int transactiontype, string description)
|
||||
{
|
||||
EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(
|
||||
source, destination, amount, transactiontype, description);
|
||||
|
||||
EventManager.TriggerMoneyTransfer(this, args);
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
|
||||
|
||||
@@ -1078,7 +1078,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
|
||||
public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
|
||||
{
|
||||
SceneObjectGroup sceneOb =
|
||||
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
||||
@@ -1093,18 +1093,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
// if not phantom, add to physics
|
||||
sceneOb.ApplyPhysics(m_physicalPrim);
|
||||
|
||||
return sceneOb;
|
||||
}
|
||||
|
||||
public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
|
||||
public SceneObjectGroup AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position,
|
||||
Tree treeType, bool newTree)
|
||||
{
|
||||
LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
|
||||
PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
|
||||
treeShape.PathCurve = 16;
|
||||
treeShape.PathEnd = 49900;
|
||||
treeShape.PCode = newTree ? (byte) PCode.NewTree : (byte) PCode.Tree;
|
||||
treeShape.Scale = scale;
|
||||
treeShape.State = (byte) treeType;
|
||||
AddNewPrim(LLUUID.Random(), position, rotation, treeShape,(byte)1,LLVector3.Zero,LLUUID.Zero,(byte)1);
|
||||
return AddNewPrim(uuid, position, rotation, treeShape);
|
||||
}
|
||||
|
||||
public void RemovePrim(uint localID, LLUUID avatar_deleter)
|
||||
@@ -1253,6 +1256,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
client.OnUpdateTaskInventory += UpdateTaskInventory;
|
||||
|
||||
client.OnGrabObject += ProcessObjectGrab;
|
||||
client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
|
||||
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
|
||||
client.OnPacketStats += AddPacketStats;
|
||||
|
||||
|
||||
@@ -129,6 +129,31 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public event ScriptChangedEvent OnScriptChangedEvent;
|
||||
|
||||
public class MoneyTransferArgs : System.EventArgs
|
||||
{
|
||||
public LLUUID sender;
|
||||
public LLUUID reciever;
|
||||
|
||||
// Always false. The SL protocol sucks.
|
||||
public bool authenticated = false;
|
||||
|
||||
public int amount;
|
||||
public int transactiontype;
|
||||
public string description;
|
||||
|
||||
public MoneyTransferArgs(LLUUID asender, LLUUID areciever, int aamount, int atransactiontype, string adescription) {
|
||||
sender = asender;
|
||||
reciever = areciever;
|
||||
amount = aamount;
|
||||
transactiontype = atransactiontype;
|
||||
description = adescription;
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e);
|
||||
|
||||
public event MoneyTransferEvent OnMoneyTransfer;
|
||||
|
||||
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
||||
{
|
||||
if (OnScriptChangedEvent != null)
|
||||
@@ -191,16 +216,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void TriggerParcelPrimCountUpdate()
|
||||
{
|
||||
/*
|
||||
* Removed by Adam to prevent some exceptions, temporary.
|
||||
* */
|
||||
if (OnParcelPrimCountUpdate != null)
|
||||
{
|
||||
OnParcelPrimCountUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e)
|
||||
{
|
||||
if (OnMoneyTransfer != null)
|
||||
{
|
||||
OnMoneyTransfer(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
|
||||
{
|
||||
if (OnParcelPrimCountAdd != null)
|
||||
|
||||
Reference in New Issue
Block a user