* Whole buncha stuff.
parent
35a8c95e1d
commit
6fbc64af5e
|
@ -401,8 +401,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
|
public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
|
||||||
|
|
||||||
|
public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public delegate void ObjectPermissions(
|
public delegate void ObjectPermissions(
|
||||||
|
@ -505,6 +504,9 @@ namespace OpenSim.Framework
|
||||||
event FriendshipTermination OnTerminateFriendship;
|
event FriendshipTermination OnTerminateFriendship;
|
||||||
event PacketStats OnPacketStats;
|
event PacketStats OnPacketStats;
|
||||||
|
|
||||||
|
// Financial packets
|
||||||
|
event MoneyTransferRequest OnMoneyTransferRequest;
|
||||||
|
|
||||||
|
|
||||||
LLVector3 StartPos { get; set; }
|
LLVector3 StartPos { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -578,6 +578,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public event PacketStats OnPacketStats;
|
public event PacketStats OnPacketStats;
|
||||||
|
|
||||||
|
public event MoneyTransferRequest OnMoneyTransferRequest;
|
||||||
|
|
||||||
|
|
||||||
#region Scene/Avatar to Client
|
#region Scene/Avatar to Client
|
||||||
|
|
||||||
|
@ -2044,6 +2046,21 @@ namespace OpenSim.Region.ClientStack
|
||||||
AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect);
|
AddLocalPacketHandler(PacketType.ViewerEffect, HandleViewerEffect);
|
||||||
AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached);
|
AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached);
|
||||||
AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate);
|
AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate);
|
||||||
|
AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack)
|
||||||
|
{
|
||||||
|
MoneyTransferRequestPacket money = (MoneyTransferRequestPacket)Pack;
|
||||||
|
|
||||||
|
if (OnMoneyTransferRequest != null)
|
||||||
|
{
|
||||||
|
OnMoneyTransferRequest(money.MoneyData.SourceID, money.MoneyData.DestID,
|
||||||
|
money.MoneyData.Amount, money.MoneyData.TransactionType,
|
||||||
|
Util.FieldToString(money.MoneyData.Description));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool HandleViewerEffect(IClientAPI sender, Packet Pack)
|
private bool HandleViewerEffect(IClientAPI sender, Packet Pack)
|
||||||
|
|
|
@ -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)
|
public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
EventManager.TriggerObjectGrab(localID, offsetPos, 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 =
|
SceneObjectGroup sceneOb =
|
||||||
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
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
|
// if not phantom, add to physics
|
||||||
sceneOb.ApplyPhysics(m_physicalPrim);
|
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)
|
Tree treeType, bool newTree)
|
||||||
{
|
{
|
||||||
|
LLUUID uuid = this.RegionInfo.MasterAvatarAssignedUUID;
|
||||||
PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
|
PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
|
||||||
treeShape.PathCurve = 16;
|
treeShape.PathCurve = 16;
|
||||||
treeShape.PathEnd = 49900;
|
treeShape.PathEnd = 49900;
|
||||||
treeShape.PCode = newTree ? (byte) PCode.NewTree : (byte) PCode.Tree;
|
treeShape.PCode = newTree ? (byte) PCode.NewTree : (byte) PCode.Tree;
|
||||||
treeShape.Scale = scale;
|
treeShape.Scale = scale;
|
||||||
treeShape.State = (byte) treeType;
|
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)
|
public void RemovePrim(uint localID, LLUUID avatar_deleter)
|
||||||
|
@ -1253,6 +1256,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnUpdateTaskInventory += UpdateTaskInventory;
|
client.OnUpdateTaskInventory += UpdateTaskInventory;
|
||||||
|
|
||||||
client.OnGrabObject += ProcessObjectGrab;
|
client.OnGrabObject += ProcessObjectGrab;
|
||||||
|
client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
|
||||||
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
|
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
|
||||||
client.OnPacketStats += AddPacketStats;
|
client.OnPacketStats += AddPacketStats;
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,31 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public event ScriptChangedEvent OnScriptChangedEvent;
|
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)
|
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
||||||
{
|
{
|
||||||
if (OnScriptChangedEvent != null)
|
if (OnScriptChangedEvent != null)
|
||||||
|
@ -191,16 +216,21 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public void TriggerParcelPrimCountUpdate()
|
public void TriggerParcelPrimCountUpdate()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Removed by Adam to prevent some exceptions, temporary.
|
|
||||||
* */
|
|
||||||
if (OnParcelPrimCountUpdate != null)
|
if (OnParcelPrimCountUpdate != null)
|
||||||
{
|
{
|
||||||
OnParcelPrimCountUpdate();
|
OnParcelPrimCountUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TriggerMoneyTransfer(Object sender, MoneyTransferArgs e)
|
||||||
|
{
|
||||||
|
if (OnMoneyTransfer != null)
|
||||||
|
{
|
||||||
|
OnMoneyTransfer(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
|
public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
|
||||||
{
|
{
|
||||||
if (OnParcelPrimCountAdd != null)
|
if (OnParcelPrimCountAdd != null)
|
||||||
|
|
|
@ -47,6 +47,8 @@ namespace SimpleApp
|
||||||
|
|
||||||
public event Action<IClientAPI> OnLogout;
|
public event Action<IClientAPI> OnLogout;
|
||||||
public event ObjectPermissions OnObjectPermissions;
|
public event ObjectPermissions OnObjectPermissions;
|
||||||
|
|
||||||
|
public event MoneyTransferRequest OnMoneyTransferRequest;
|
||||||
public event Action<IClientAPI> OnConnectionClosed;
|
public event Action<IClientAPI> OnConnectionClosed;
|
||||||
|
|
||||||
public event ImprovedInstantMessage OnInstantMessage;
|
public event ImprovedInstantMessage OnInstantMessage;
|
||||||
|
|
|
@ -3199,6 +3199,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
World.SendGeneralAlert(msg);
|
World.SendGeneralAlert(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetRot(LLUUID target, Quaternion rotation)
|
||||||
|
{
|
||||||
|
if (World.Entities.ContainsKey(target))
|
||||||
|
{
|
||||||
|
World.Entities[target].Rotation = rotation;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LSLError("osSetRot: Invalid target");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
|
public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
|
||||||
int timer)
|
int timer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue