private void Avatars_ViewerEffect(object sender, ViewerEffectEventArgs e) { if (ShowEffects) WriteLine( "ViewerEffect [{0}]: SourceID: {1} TargetID: {2} TargetPos: {3} Duration: {4} ID: {5}", e.Type, e.SourceID.ToString(), e.TargetID.ToString(), e.TargetPosition, e.Duration, e.EffectID.ToString()); }
void Avatars_ViewerEffect(object sender, ViewerEffectEventArgs e) { lock (m_AgentList) { if (m_AgentList.ContainsKey(e.SourceID)) m_AgentList[e.SourceID] = true; else m_AgentList.Add(e.SourceID, true); } }
///<summary>Raises the ViewerEffect Event</summary> /// <param name="e">A ViewerEffectEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnViewerEffect(ViewerEffectEventArgs e) { EventHandler<ViewerEffectEventArgs> handler = m_ViewerEffect; if (handler != null) handler(this, e); }
/* On-Effect type: "Sphere" sourceID: "00000000-0000-0000-0000-000000000000" targetID: "00000000-0000-0000-0000-000000000000" targetPos: '(Vector3d 256126.750573638 256129.791631699 25.2663780227304) duration: 0.25 id: "a31efee6-a426-65a6-5ef2-d1345be49233" On-Effect type: "Beam" sourceID: '(avatar "Kuffher Hauptmann") targetID: "00000000-0000-0000-0000-000000000000" targetPos: '(Vector3d 234680.541992188 277992.395370483 350.615783691406) duration: 0.7 id: "6f777a51-56a2-4c2e-2266-3ea6b9bc4945" On-Effect type: "Beam" sourceID: "ec8777dc-62cd-46df-8d36-98373459c23a" targetID: "00000000-0000-0000-0000-000000000000" targetPos: '(Vector3d 234556.786750793 277914.178848267 1049.44689941406) duration: 0.7 id: "0c743618-6c68-171e-d515-dbda81f58258" On-Effect type: "Beam" sourceID: '(avatar "Kuffher Hauptmann") targetID: "00000000-0000-0000-0000-000000000000" targetPos: '(Vector3d 234680.526870728 277992.386642456 351.192932128906) duration: 0.7 id: "eb064996-7879-fbab-972c-acb272ea3a91" On-Effect type: "Beam" sourceID: "109bacd0-650d-46f4-84cf-0e8c154123c4" targetID: "00000000-0000-0000-0000-000000000000" targetPos: '(Vector3d 234559.817420959 277769.408673286 1002.50750732422) duration: 0.7 id: "bd25925f-7688-5d81-8834-e7631942c5c5" */ public override void Avatars_OnEffect(object sender, ViewerEffectEventArgs e) { // we have our own packet handler //client.Avatars.ViewerEffect -= Avatars_OnEffect; var sourceID = e.SourceID; var targetID = e.TargetID; var targetPos = e.TargetPosition; var type = e.Type; var duration = e.Duration; var id = e.EffectID; SendEffect(client.Network.CurrentSim, sourceID, targetID, targetPos, "EffectType-" + type.ToString(), duration, id, PCode.None); //SimRegion.TaintArea(targetPos); }
public virtual void Avatars_OnEffect(object sender, ViewerEffectEventArgs e) { OnEvent("On-Effect", paramNamesOnEffect, paramTypesOnEffect, e); }