From a95f13a646e6c0ff07c765437011a29c3372f1b9 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 7 May 2008 20:31:48 +0000 Subject: * Removes references to libsecondlife.Packets from IClientAPI. BAD PROGRAMMERS. NAUGHTY. * Thanks to Andrew (DeepThink) for working on this one. --- OpenSim/Framework/ClientManager.cs | 19 +++++++-- OpenSim/Framework/IClientAPI.cs | 84 ++++++++++++++++++++++++++++++++++---- 2 files changed, 92 insertions(+), 11 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 35c9319..4f21ab6 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs @@ -171,11 +171,22 @@ namespace OpenSim.Framework return circuits; } - public void ViewerEffectHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock) + public void ViewerEffectHandler(IClientAPI sender, List args) { - ViewerEffectPacket packet = (ViewerEffectPacket) PacketPool.Instance.GetPacket(PacketType.ViewerEffect); + ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); // TODO: don't create new blocks if recycling an old packet - packet.Effect = effectBlock; + List effectBlock = new List(); + for (int i = 0; i < args.Count; i++) + { + ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); + effect.AgentID = args[i].AgentID; + effect.Color = args[i].Color; + effect.Duration = args[i].Duration; + effect.ID = args[i].ID; + effect.Type = args[i].Type; + effectBlock.Add(effect); + } + packet.Effect = effectBlock.ToArray(); // Wasteful, I know IClientAPI[] LocalClients = new IClientAPI[0]; @@ -205,4 +216,4 @@ namespace OpenSim.Framework } } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 8344196..2ade592 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -41,7 +41,8 @@ namespace OpenSim.Framework IClientAPI Sender { get; set; } } - public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); + + public delegate void ViewerEffectEventHandler(IClientAPI sender, List args); public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); @@ -235,6 +236,15 @@ namespace OpenSim.Framework #endregion } + public class ViewerEffectEventHandlerArg : EventArgs + { + public LLUUID AgentID; + public byte[] Color; + public float Duration; + public LLUUID ID; + public byte Type; + } + public class LandUpdateArgs : EventArgs { public LLUUID AuthBuyerID; @@ -301,6 +311,66 @@ namespace OpenSim.Framework public float waterHeight; public string simName; } + + public class UpdateShapeArgs : EventArgs + { + public uint ObjectLocalID; + public ushort PathBegin; + public byte PathCurve; + public ushort PathEnd; + public sbyte PathRadiusOffset; + public byte PathRevolutions; + public byte PathScaleX; + public byte PathScaleY; + public byte PathShearX; + public byte PathShearY; + public sbyte PathSkew; + public sbyte PathTaperX; + public sbyte PathTaperY; + public sbyte PathTwist; + public sbyte PathTwistBegin; + public ushort ProfileBegin; + public byte ProfileCurve; + public ushort ProfileEnd; + public ushort ProfileHollow; + } + + public class RequestAssetArgs : EventArgs + { + public int ChannelType; + public float Priority; + public int SourceType; + public LLUUID TransferID; + } + public class AgentUpdateArgs : EventArgs + { + public LLUUID AgentID; + public LLQuaternion BodyRotation; + public LLVector3 CameraAtAxis; + public LLVector3 CameraCenter; + public LLVector3 CameraLeftAxis; + public LLVector3 CameraUpAxis; + public uint ControlFlags; + public float Far; + public byte Flags; + public LLQuaternion HeadRotation; + public LLUUID SessionID; + public byte State; + } + + public class AvatarPickerReplyAgentDataArgs : EventArgs + { + public LLUUID AgentID; + public LLUUID QueryID; + } + + public class AvatarPickerReplyDataArgs : EventArgs + { + public LLUUID AvatarID; + public byte[] FirstName; + public byte[] LastName; + } + public delegate void TextureRequest(Object sender, TextureRequestArgs e); public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); @@ -325,7 +395,7 @@ namespace OpenSim.Framework float height, float seconds, byte size, byte action, float north, float west, float south, float east, IClientAPI remoteClient); - public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); + public delegate void SetAppearance(byte[] texture, List visualParamList); public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID); @@ -362,7 +432,7 @@ namespace OpenSim.Framework public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message); - public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); + public delegate void UpdateShape(LLUUID agentID, uint localID, UpdateShapeArgs shapeBlock); public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data); @@ -396,7 +466,7 @@ namespace OpenSim.Framework public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); - public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdatePacket agentData); + public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData); public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset); @@ -427,7 +497,7 @@ namespace OpenSim.Framework public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); - public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); + public delegate void EstateOwnerMessageRequest(LLUUID AgentID, LLUUID SessionID, LLUUID TransactionID, LLUUID Invoice, byte[] Method, byte[][] Parameters, IClientAPI remote_client); public delegate void RegionInfoRequest(IClientAPI remote_client); @@ -487,7 +557,7 @@ namespace OpenSim.Framework public delegate void RemoveInventoryFolder( IClientAPI remoteClient, LLUUID folderID); - public delegate void RequestAsset(IClientAPI remoteClient, TransferRequestPacket transferRequest); + public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest); public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); @@ -822,7 +892,7 @@ namespace OpenSim.Framework int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent); - void SendAvatarPickerReply(AvatarPickerReplyPacket Pack); + void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data); void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle); -- cgit v1.1