void Objects_OnNewAvatar(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) { if (enabled) { // Search this avatar for textures for (int i = 0; i < avatar.Textures.FaceTextures.Length; i++) { Primitive.TextureEntryFace face = avatar.Textures.FaceTextures[i]; if (face != null) { if (!alreadyRequested.ContainsKey(face.TextureID)) { alreadyRequested[face.TextureID] = face.TextureID; // Determine if this is a baked outfit texture or a normal texture ImageType type = ImageType.Normal; AppearanceManager.TextureIndex index = (AppearanceManager.TextureIndex)i; switch (index) { case AppearanceManager.TextureIndex.EyesBaked: case AppearanceManager.TextureIndex.HeadBaked: case AppearanceManager.TextureIndex.LowerBaked: case AppearanceManager.TextureIndex.SkirtBaked: case AppearanceManager.TextureIndex.UpperBaked: type = ImageType.Baked; break; } Client.Assets.RequestImage(face.TextureID, type); } } } } }
public OutfitTextures(RadegastInstance instance, Avatar avatar) { InitializeComponent(); this.instance = instance; this.avatar = avatar; }
public AnimDetail(RadegastInstance instance, Avatar av, UUID anim, int n) { InitializeComponent(); Disposed += new EventHandler(AnimDetail_Disposed); this.instance = instance; this.av = av; this.anim = anim; this.n = n; }
public OutfitTextures(RadegastInstance instance, Avatar avatar) { InitializeComponent(); this.instance = instance; this.avatar = avatar; Radegast.GUI.GuiHelpers.ApplyGuiFixes(this); }
public AttachmentTab(RadegastInstance instance, Avatar iav) { this.instance = instance; av = iav; InitializeComponent(); AutoScrollPosition = new Point(0, 0); InitializeComponent(); }
void Avatars_OnAvatarProperties(UUID avatarID, Avatar.AvatarProperties properties) { lock (ReceivedProfileEvent) { Properties = properties; ReceivedProperties = true; if (ReceivedInterests && ReceivedProperties && ReceivedGroups) ReceivedProfileEvent.Set(); } }
void DownloadAVTextures(OpenMetaverse.Avatar a) { foreach (Primitive.TextureEntryFace TEF in a.Textures.FaceTextures) { if (TEF == null) { continue; } m_textures.DownloadTexture(TEF.TextureID); } }
public AnimTab(RadegastInstance instance, Avatar av) { InitializeComponent(); Disposed += new EventHandler(AnimTab_Disposed); this.instance = instance; this.av = av; this.client = instance.Client; // Callbacks client.Avatars.AvatarAnimation += new EventHandler<AvatarAnimationEventArgs>(Avatars_AvatarAnimation); }
public AnimDetail(RadegastInstance instance, Avatar av, UUID anim, int n) { InitializeComponent(); Disposed += new EventHandler(AnimDetail_Disposed); this.instance = instance; this.av = av; this.anim = anim; this.n = n; Radegast.GUI.GuiHelpers.ApplyGuiFixes(this); }
//private Dictionary<uint, AttachmentsListItem> groupItems = new Dictionary<uint, AttachmentsListItem>(); public WornAttachments(METAboltInstance instance, Avatar av) { InitializeComponent(); Disposed += new EventHandler(WornAttachments_Disposed); this.instance = instance; client = this.instance.Client; this.av = av; client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(SIM_OnSimChanged); //client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress); }
public LLEntityAvatar(AssetContextBase acontext, LLRegionContext rcontext, ulong regionHandle, OMV.Avatar av) : base(rcontext, acontext) { // base(acontext, rcontext, regionHandle, av.LocalID, null) { // base for EntityPhysical // let people looking at IEntity's get at my avatarness RegisterInterface <IEntityAvatar>(this); this.Sim = rcontext.Simulator; this.RegionHandle = regionHandle; this.LocalID = av.LocalID; this.Avatar = av; this.Name = AvatarEntityNameFromID(acontext, m_avatar.ID); LogManager.Log.Log(LogLevel.DCOMMDETAIL, "LLEntityAvatar: create id={0}, lid={1}", av.ID.ToString(), this.LocalID); }
void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e) { if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) { return; } OpenMetaverse.Avatar a = e.Simulator.ObjectsAvatars.Find(av => av.ID == e.AvatarID); if (a != null) { DownloadAVTextures(a); avHasTex.Add(a.LocalID); } }
void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { if (e.Avatar.PrimData.PCode == PCode.Avatar) { Debug.Log("Recieve an Avatar!!!"); } Radegast.Rendering.GLAvatar ga = new Radegast.Rendering.GLAvatar(); OpenMetaverse.Avatar av = e.Avatar; Radegast.Rendering.RenderAvatar ra = new Radegast.Rendering.RenderAvatar(); ra.avatar = av; ra.glavatar = ga; newAvatars.Add(av.LocalID, ra); ra.glavatar.morph(av); }
//Receive all the avatars' models void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { //leave other regions out temporarily if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) { return; } Radegast.Rendering.GLAvatar ga = new Radegast.Rendering.GLAvatar(); OpenMetaverse.Avatar av = e.Avatar; Radegast.Rendering.RenderAvatar ra = new Radegast.Rendering.RenderAvatar(); ra.avatar = av; ra.glavatar = ga; newAvatars.Add(av.LocalID, ra); ra.glavatar.morph(av); }
public MasterTab(RadegastInstance instance, Avatar avatar) { InitializeComponent(); Disposed += new EventHandler(MasterTab_Disposed); if (!instance.advancedDebugging) { saveBtn.Visible = false; texturesBtn.Visible = false; } this.instance = instance; this.avatar = avatar; // Callbacks client.Avatars.ViewerEffectPointAt += new EventHandler<ViewerEffectPointAtEventArgs>(Avatars_ViewerEffectPointAt); client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties); }
public AttachmentDetail(RadegastInstance instance, Avatar av, Primitive attachment) { InitializeComponent(); Disposed += new EventHandler(AttachmentDetail_Disposed); this.instance = instance; this.av = av; this.attachment = attachment; if (!instance.advancedDebugging) { btnSave.Visible = false; boxID.Visible = false; lblAttachment.Visible = false; } // Callbacks client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties); }
void CompleteAgentMovementHandler(Packet packet, Agent agent) { CompleteAgentMovementPacket request = (CompleteAgentMovementPacket)packet; // Create a representation for this agent Avatar avatar = new Avatar(); avatar.ID = agent.AgentID; avatar.LocalID = (uint)Interlocked.Increment(ref currentLocalID); avatar.Position = new Vector3(128f, 128f, 25f); avatar.Rotation = Quaternion.Identity; avatar.Scale = new Vector3(1f, 1f, 3f); // Set the avatar name NameValue[] name = new NameValue[2]; name[0] = new NameValue("FirstName", NameValue.ValueType.String, NameValue.ClassType.ReadWrite, NameValue.SendtoType.SimViewer, agent.FirstName); name[1] = new NameValue("LastName", NameValue.ValueType.String, NameValue.ClassType.ReadWrite, NameValue.SendtoType.SimViewer, agent.LastName); avatar.NameValues = name; // Link this avatar up with the corresponding agent agent.Avatar = avatar; // Give testers a provisionary balance of 1000L agent.Balance = 1000; AgentMovementCompletePacket complete = new AgentMovementCompletePacket(); complete.AgentData.AgentID = agent.AgentID; complete.AgentData.SessionID = agent.SessionID; complete.Data.LookAt = Vector3.UnitX; complete.Data.Position = avatar.Position; complete.Data.RegionHandle = server.RegionHandle; complete.Data.Timestamp = Utils.DateTimeToUnixTime(DateTime.Now); complete.SimData.ChannelVersion = Utils.StringToBytes("Simian"); agent.SendPacket(complete); SendLayerData(agent); }
void Avatars_AvatarAppearance(object sender, AvatarAppearanceEventArgs e) { if (Application.platform != RuntimePlatform.WindowsPlayer && Application.platform != RuntimePlatform.WindowsEditor) { return; } if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) { return; } OpenMetaverse.Avatar a = e.Simulator.ObjectsAvatars.Find(av => av.ID == e.AvatarID); if (a != null) { DownloadAVTextures(a); if (!avHasTex.Contains(a.LocalID)) { avHasTex.Add(a.LocalID); } } Debug.Log("AvatarAppearance for " + a.Name + a.LocalID.ToString()); }
/// <summary> /// /// </summary> /// <param name="sim"></param> /// <param name="av"></param> /// <param name="localid"></param> /// <param name="oldSeatID"></param> protected void SetAvatarSittingOn(Simulator sim, Avatar av, uint localid, uint oldSeatID) { if (Client.Network.CurrentSim == sim && av.LocalID == Client.Self.localID) { Client.Self.sittingOn = localid; } av.ParentID = localid; if (m_AvatarSitChanged != null && oldSeatID != localid) { OnAvatarSitChanged(new AvatarSitChangedEventArgs(sim, av, localid, oldSeatID)); } }
private void avatarList1_OnAvatarDoubleClick(Avatar avatar) { MessageBox.Show(avatar.Name + " = " + avatar.ID); }
private void OnNetworkAvatarAdd(VSimulator sim, Avatar avatar, ulong regionHandle, ushort timeDilation) { m_timeDilation = (float)(timeDilation / ushort.MaxValue); SceneGraph.OnNetworkAvatarAdd(sim, avatar, regionHandle, timeDilation); }
public static new Avatar FromOSD(OSD O) { OSDMap tex = (OSDMap)O; Avatar A = new Avatar(); Primitive P = Primitive.FromOSD(O); Type Prim = typeof(Primitive); FieldInfo[] Fields = Prim.GetFields(); for (int x = 0; x < Fields.Length; x++) { Logger.Log("Field Matched in FromOSD: " + Fields[x].Name, Helpers.LogLevel.Debug); Fields[x].SetValue(A, Fields[x].GetValue(P)); } A.Groups = new List <UUID>(); foreach (OSD U in (OSDArray)tex["groups"]) { A.Groups.Add(U.AsUUID()); } A.ProfileStatistics = Statistics.FromOSD(tex["profile_statistics"]); A.ProfileProperties = AvatarProperties.FromOSD(tex["profile_properties"]); A.ProfileInterests = Interests.FromOSD(tex["profile_interest"]); A.ControlFlags = (AgentManager.ControlFlags)tex["control_flags"].AsInteger(); OSDArray vp = (OSDArray)tex["visual_parameters"]; A.VisualParameters = new byte[vp.Count]; for (int i = 0; i < vp.Count; i++) { A.VisualParameters[i] = (byte)vp[i].AsInteger(); } // *********************From Code Above ******************************* /*if (NameValues[i].Name == "FirstName" && NameValues[i].Type == NameValue.ValueType.String) * firstName = (string)NameValues[i].Value; * else if (NameValues[i].Name == "LastName" && NameValues[i].Type == NameValue.ValueType.String) * lastName = (string)NameValues[i].Value;*/ // ******************************************************************** A.NameValues = new NameValue[3]; NameValue First = new NameValue(); First.Name = "FirstName"; First.Type = NameValue.ValueType.String; First.Value = tex["first_name"].AsString(); NameValue Last = new NameValue(); Last.Name = "LastName"; Last.Type = NameValue.ValueType.String; Last.Value = tex["last_name"].AsString(); // ***************From Code Above*************** // if (NameValues[i].Name == "Title" && NameValues[i].Type == NameValue.ValueType.String) // ********************************************* NameValue Group = new NameValue(); Group.Name = "Title"; Group.Type = NameValue.ValueType.String; Group.Value = tex["group_name"].AsString(); A.NameValues[0] = First; A.NameValues[1] = Last; A.NameValues[2] = Group; return(A); }
private void newAvatarCallback(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) { if (OnNewAvatar != null) { //avatar.Velocity OnNewAvatar(simulator,avatar,regionHandle,timeDilation); } }
public AvatarInterestsReplyEventArgs(UUID avatarID, Avatar.Interests interests) { this.m_AvatarID = avatarID; this.m_Interests = interests; }
public AvatarSitChangedEventArgs(Simulator simulator, Avatar avatar, uint sittingOn, uint oldSeat) { this.m_Simulator = simulator; this.m_Avatar = avatar; this.m_SittingOn = sittingOn; this.m_OldSeat = oldSeat; }
public static new Avatar FromOSD(OSD O) { OSDMap tex = (OSDMap)O; Avatar A = new Avatar(); Primitive P = Primitive.FromOSD(O); Type Prim = typeof(Primitive); FieldInfo[] Fields = Prim.GetFields(); for (int x = 0; x < Fields.Length; x++) { Logger.Log("Field Matched in FromOSD: "+Fields[x].Name, Helpers.LogLevel.Debug); Fields[x].SetValue(A, Fields[x].GetValue(P)); } A.Groups = new List<UUID>(); foreach (OSD U in (OSDArray)tex["groups"]) { A.Groups.Add(U.AsUUID()); } A.ProfileStatistics = Statistics.FromOSD(tex["profile_statistics"]); A.ProfileProperties = AvatarProperties.FromOSD(tex["profile_properties"]); A.ProfileInterests = Interests.FromOSD(tex["profile_interest"]); A.ControlFlags = (AgentManager.ControlFlags)tex["control_flags"].AsInteger(); OSDArray vp = (OSDArray)tex["visual_parameters"]; A.VisualParameters = new byte[vp.Count]; for (int i = 0; i < vp.Count; i++) { A.VisualParameters[i] = (byte)vp[i].AsInteger(); } // *********************From Code Above ******************************* /*if (NameValues[i].Name == "FirstName" && NameValues[i].Type == NameValue.ValueType.String) firstName = (string)NameValues[i].Value; else if (NameValues[i].Name == "LastName" && NameValues[i].Type == NameValue.ValueType.String) lastName = (string)NameValues[i].Value;*/ // ******************************************************************** A.NameValues = new NameValue[3]; NameValue First = new NameValue(); First.Name = "FirstName"; First.Type = NameValue.ValueType.String; First.Value = tex["first_name"].AsString(); NameValue Last = new NameValue(); Last.Name = "LastName"; Last.Type = NameValue.ValueType.String; Last.Value = tex["last_name"].AsString(); // ***************From Code Above*************** // if (NameValues[i].Name == "Title" && NameValues[i].Type == NameValue.ValueType.String) // ********************************************* NameValue Group = new NameValue(); Group.Name = "Title"; Group.Type = NameValue.ValueType.String; Group.Value = tex["group_name"].AsString(); A.NameValues[0] = First; A.NameValues[1] = Last; A.NameValues[2] = Group; return A; }
/// <summary> /// Update agent profile /// </summary> /// <param name="profile"><seealso cref="OpenMetaverse.Avatar.AvatarProperties"/> struct containing updated /// profile information</param> public void UpdateProfile(Avatar.AvatarProperties profile) { AvatarPropertiesUpdatePacket apup = new AvatarPropertiesUpdatePacket(); apup.AgentData.AgentID = id; apup.AgentData.SessionID = sessionID; apup.PropertiesData.AboutText = Utils.StringToBytes(profile.AboutText); apup.PropertiesData.AllowPublish = profile.AllowPublish; apup.PropertiesData.FLAboutText = Utils.StringToBytes(profile.FirstLifeText); apup.PropertiesData.FLImageID = profile.FirstLifeImage; apup.PropertiesData.ImageID = profile.ProfileImage; apup.PropertiesData.MaturePublish = profile.MaturePublish; apup.PropertiesData.ProfileURL = Utils.StringToBytes(profile.ProfileURL); Client.Network.SendPacket(apup); }
/// <summary> /// /// </summary> /// <param name="simulator"></param> /// <param name="localID"></param> /// <param name="fullID"></param> /// <returns></returns> protected Avatar GetAvatar(Simulator simulator, uint localID, UUID fullID) { if (Client.Settings.AVATAR_TRACKING) { lock (simulator.ObjectsAvatars.Dictionary) { Avatar avatar; if (simulator.ObjectsAvatars.Dictionary.TryGetValue(localID, out avatar)) { return avatar; } else { avatar = new Avatar(); avatar.LocalID = localID; avatar.ID = fullID; avatar.RegionHandle = simulator.Handle; simulator.ObjectsAvatars.Dictionary[localID] = avatar; return avatar; } } } else { return new Avatar(); } }
/// <summary> /// Construct a new instance of the AvatarUpdateEventArgs class /// </summary> /// <param name="simulator">The simulator the packet originated from</param> /// <param name="avatar">The <see cref="Avatar"/> data</param> /// <param name="timeDilation">The simulator time dilation</param> /// <param name="isNew">The avatar was not in the dictionary before this update</param> public AvatarUpdateEventArgs(Simulator simulator, Avatar avatar, ushort timeDilation, bool isNew) { this.m_Simulator = simulator; this.m_Avatar = avatar; this.m_TimeDilation = timeDilation; this.m_IsNew = isNew; }
private void AddAvatar(uint localID, UUID avatarID, Vector3 coarsePosition, Avatar avatar) { if (!this.IsHandleCreated) return; if (this.InvokeRequired) this.BeginInvoke((MethodInvoker)delegate { AddAvatar(localID, avatarID, coarsePosition, avatar); }); else { TrackedAvatar trackedAvatar = new TrackedAvatar(); trackedAvatar.CoarseLocation = coarsePosition; trackedAvatar.ID = avatarID; trackedAvatar.ListViewItem = this.Items.Add(avatarID.ToString(), trackedAvatar.Name, null); string strDist = avatarID == _Client.Self.AgentID ? "--" : (int)Vector3.Distance(_Client.Self.SimPosition, coarsePosition) + "m"; trackedAvatar.ListViewItem.SubItems.Add(strDist); if (avatar != null) { trackedAvatar.Name = avatar.Name; trackedAvatar.ListViewItem.Text = avatar.Name; lock (_TrackedAvatars) _TrackedAvatars.Add(localID, avatarID, trackedAvatar); } else { lock (_UntrackedAvatars) { _UntrackedAvatars.Add(avatarID, trackedAvatar); trackedAvatar.ListViewItem.ForeColor = Color.FromKnownColor(KnownColor.GrayText); if (avatarID == _Client.Self.AgentID) { trackedAvatar.Name = _Client.Self.Name; trackedAvatar.ListViewItem.Text = _Client.Self.Name; } else Client.Avatars.RequestAvatarName(avatarID); } } } }
public AvatarPropertiesReplyEventArgs(UUID avatarID, Avatar.AvatarProperties properties) { this.m_AvatarID = avatarID; this.m_Properties = properties; }
private void UpdateAvatar(Avatar avatar) { if (!this.IsHandleCreated) return; if (this.InvokeRequired) this.BeginInvoke((MethodInvoker)delegate { UpdateAvatar(avatar); }); else { lock (_TrackedAvatars) { TrackedAvatar trackedAvatar; lock (_UntrackedAvatars) { if (_UntrackedAvatars.TryGetValue(avatar.ID, out trackedAvatar)) { trackedAvatar.Name = avatar.Name; trackedAvatar.ListViewItem.Text = avatar.Name; trackedAvatar.ListViewItem.ForeColor = Color.FromKnownColor(KnownColor.ControlText); _TrackedAvatars.Add(avatar.LocalID, avatar.ID, trackedAvatar); _UntrackedAvatars.Remove(avatar.ID); } } if (_TrackedAvatars.TryGetValue(avatar.ID, out trackedAvatar)) { trackedAvatar.Avatar = avatar; trackedAvatar.Name = avatar.Name; trackedAvatar.ID = avatar.ID; string strDist = avatar.ID == _Client.Self.AgentID ? "--" : (int)Vector3.Distance(_Client.Self.SimPosition, avatar.Position) + "m"; trackedAvatar.ListViewItem.SubItems[1].Text = strDist; } else { AddAvatar(avatar.LocalID, avatar.ID, Vector3.Zero, avatar); } } this.Sort(); } }
private void SetProfileProperties(Avatar.AvatarProperties properties) { txtBornOn.Text = properties.BornOn; anPartner.AgentID = properties.Partner; if (fullName.EndsWith("Linden")) rtbAccountInfo.AppendText("Linden Lab Employee\n"); if (properties.Identified) rtbAccountInfo.AppendText("Identified\n"); if (properties.Transacted) rtbAccountInfo.AppendText("Transacted\n"); rtbAbout.AppendText(properties.AboutText); txtWebURL.Text = properties.ProfileURL; btnWebView.Enabled = btnWebOpen.Enabled = (txtWebURL.TextLength > 0); rtbAboutFL.AppendText(properties.FirstLifeText); }
void Objects_OnNewAvatar(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) { UpdateAvatar(avatar); }
private Packet ObjectUpdatePacketReceived(Packet p, IPEndPoint ep) { ObjectUpdatePacket packet = (ObjectUpdatePacket)p; foreach (var block in packet.ObjectData) { if (block.PCode == (byte)PCode.Avatar) { string name = Utils.BytesToString(block.NameValue); name = name.Replace("STRING RW SV ", ""); string[] tokens = name.Split(' ', '\n'); string firstName = tokens[1]; string lastName = tokens[3]; Invoke(new Action(() => { Avatar avatar = new Avatar(firstName, lastName, block.ID, block.FullID); avatarList.Items.Add(avatar); avatarList.SelectedItem = avatar; avatars[avatar.ID] = avatar; })); } } return packet; }
private void AddAvatarToScene(Avatar av) { lock (Avatars) { if (Avatars.ContainsKey(av.LocalID)) { // flag we got an update?? updateAVtes(Avatars[av.LocalID]); Avatars[av.LocalID].glavatar.morph(av); } else { GLAvatar ga = new GLAvatar(); //ga.morph(av); RenderAvatar ra = new Rendering.RenderAvatar(); ra.avatar = av; ra.glavatar = ga; updateAVtes(ra); Avatars.Add(av.LocalID, ra); ra.glavatar.morph(av); if (av.LocalID == Client.Self.LocalID) { myself = ra; } } } }
/// <summary> /// Update agents profile interests /// </summary> /// <param name="interests">selection of interests from <seealso cref="T:OpenMetaverse.Avatar.Interests"/> struct</param> public void UpdateInterests(Avatar.Interests interests) { AvatarInterestsUpdatePacket aiup = new AvatarInterestsUpdatePacket(); aiup.AgentData.AgentID = id; aiup.AgentData.SessionID = sessionID; aiup.PropertiesData.LanguagesText = Utils.StringToBytes(interests.LanguagesText); aiup.PropertiesData.SkillsMask = interests.SkillsMask; aiup.PropertiesData.SkillsText = Utils.StringToBytes(interests.SkillsText); aiup.PropertiesData.WantToMask = interests.WantToMask; aiup.PropertiesData.WantToText = Utils.StringToBytes(interests.WantToText); Client.Network.SendPacket(aiup); }
private OMVSD.OSD GetHandler(RestHandler handler, Uri uri, String after) { OMVSD.OSDMap ret = new OMVSD.OSDMap(); lock (m_avatars) { foreach (KeyValuePair <string, IEntityAvatar> kvp in m_avatars) { OMVSD.OSDMap oneAV = new OMVSD.OSDMap(); IEntityAvatar iav = kvp.Value; try { oneAV.Add("Name", new OMVSD.OSDString(iav.DisplayName)); oneAV.Add("Region", new OMVSD.OSDString(iav.RegionContext.Name.Name)); oneAV.Add("X", new OMVSD.OSDString(iav.RegionPosition.X.ToString("###0.###"))); oneAV.Add("Y", new OMVSD.OSDString(iav.RegionPosition.Y.ToString("###0.###"))); oneAV.Add("Z", new OMVSD.OSDString(iav.RegionPosition.Z.ToString("###0.###"))); float dist = 0f; if (m_agentAV != null) { dist = OMV.Vector3.Distance(m_agentAV.RegionPosition, iav.RegionPosition); } oneAV.Add("Distance", new OMVSD.OSDString(dist.ToString("###0.###"))); oneAV.Add("Flags", new OMVSD.OSDString(iav.ActivityFlags)); if (iav is LLEntityAvatar) { OMV.Avatar av = ((LLEntityAvatar)iav).Avatar; if (av != null) { OMVSD.OSDMap avTextures = new OMVSD.OSDMap(); OMV.Primitive.TextureEntry texEnt = av.Textures; if (texEnt != null) { OMV.Primitive.TextureEntryFace[] texFaces = texEnt.FaceTextures; if (texFaces != null) { if (texFaces[(int)OMV.AvatarTextureIndex.HeadBaked] != null) { avTextures.Add("head", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.HeadBaked].TextureID.ToString())); } if (texFaces[(int)OMV.AvatarTextureIndex.UpperBaked] != null) { avTextures.Add("upper", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.UpperBaked].TextureID.ToString())); } if (texFaces[(int)OMV.AvatarTextureIndex.LowerBaked] != null) { avTextures.Add("lower", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.LowerBaked].TextureID.ToString())); } if (texFaces[(int)OMV.AvatarTextureIndex.EyesBaked] != null) { avTextures.Add("eyes", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.EyesBaked].TextureID.ToString())); } if (texFaces[(int)OMV.AvatarTextureIndex.HairBaked] != null) { avTextures.Add("hair", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.HairBaked].TextureID.ToString())); } if (texFaces[(int)OMV.AvatarTextureIndex.SkirtBaked] != null) { avTextures.Add("skirt", new OMVSD.OSDString(texFaces[(int)OMV.AvatarTextureIndex.SkirtBaked].TextureID.ToString())); } oneAV.Add("LLtextures", avTextures); } } } } } catch (Exception e) { LogManager.Log.Log(LogLevel.DBADERROR, "AvatarTracker.GetHandler: exception building response: {0}", e); } ret.Add(kvp.Value.Name.Name.Replace('/', '-'), oneAV); } } return(ret); }