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 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/ClientManager.cs') 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 +} -- cgit v1.1