private void EventManager_OnNewPresence(IScenePresence presence) { AvatarApperanceModule m = new AvatarApperanceModule(presence); presence.RegisterModuleInterface<IAvatarAppearanceModule>(m); }
protected void EventManager_OnNewPresence(IScenePresence presence) { presence.RegisterModuleInterface(new PerClientSelectionParticles(presence, this)); }
public void RezAttachments (IScenePresence presence) { IAvatarAppearanceModule appearance = presence.RequestModuleInterface<IAvatarAppearanceModule> (); if(null == appearance || null == appearance.Appearance) { m_log.WarnFormat("[ATTACHMENT]: Appearance has not been initialized for agent {0}", presence.UUID); return; } //Create the avatar attachments plugin for the av AvatarAttachments attachmentsPlugin = new AvatarAttachments(presence); presence.RegisterModuleInterface <AvatarAttachments>(attachmentsPlugin); List<AvatarAttachment> attachments = appearance.Appearance.GetAttachments (); foreach (AvatarAttachment attach in attachments) { int p = attach.AttachPoint; UUID itemID = attach.ItemID; try { RezSingleAttachmentFromInventory(presence.ControllingClient, itemID, p); } catch (Exception e) { m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace); } } foreach(IScenePresence sp in presence.Scene.GetScenePresences()) sp.SceneViewer.QueuePresenceForFullUpdate(presence, true); }
public void ResumeAvatar(IScenePresence presence) { Util.FireAndForget(delegate { IAvatarAppearanceModule appearance = presence.RequestModuleInterface<IAvatarAppearanceModule>(); if (null == appearance || null == appearance.Appearance) { MainConsole.Instance.WarnFormat("[ATTACHMENT]: Appearance has not been initialized for agent {0}", presence.UUID); return; } //Create the avatar attachments plugin for the av AvatarAttachments attachmentsPlugin = new AvatarAttachments(presence); presence.RegisterModuleInterface(attachmentsPlugin); List<AvatarAttachment> attachments = appearance.Appearance.GetAttachments(); foreach (AvatarAttachment attach in attachments) { try { RezSingleAttachmentFromInventory(presence.ControllingClient, attach.ItemID, 0); } catch (Exception e) { MainConsole.Instance.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e); } } }); }
public void ResumeAvatar(IScenePresence presence) { Util.FireAndForget(delegate { IAvatarAppearanceModule appearance = presence.RequestModuleInterface<IAvatarAppearanceModule>(); if (null == appearance || null == appearance.Appearance) { MainConsole.Instance.WarnFormat( "[ATTACHMENT]: Appearance has not been initialized for agent {0}", presence.UUID); return; } //Create the avatar attachments plugin for the av AvatarAttachments attachmentsPlugin = new AvatarAttachments(presence); presence.RegisterModuleInterface(attachmentsPlugin); List<AvatarAttachment> attachments = appearance.Appearance.GetAttachments(); MainConsole.Instance.InfoFormat( "[ATTACHMENTS MODULE]: Found {0} attachments to attach to avatar {1}", attachments.Count, presence.Name); foreach (AvatarAttachment attach in attachments) { try { RezSingleAttachmentFromInventory(presence.ControllingClient, attach.ItemID, attach.AssetID, 0, false); } catch (Exception e) { MainConsole.Instance.ErrorFormat( "[ATTACHMENT]: Unable to rez attachment: {0}", e); } } presence.AttachmentsLoaded = true; lock (_usersToSendAttachmentsToWhenLoaded) { if (_usersToSendAttachmentsToWhenLoaded.ContainsKey(presence.UUID)) { foreach (var id in _usersToSendAttachmentsToWhenLoaded[presence.UUID]) { SendAttachmentsToPresence(id, presence); } _usersToSendAttachmentsToWhenLoaded.Remove(presence.UUID); } } }); }
private void EventManager_OnNewPresence(IScenePresence presence) { ScriptControllerPresenceModule m = new ScriptControllerPresenceModule(presence); presence.RegisterModuleInterface<IScriptControllerModule>(m); }
private void NewPresence(IScenePresence presence) { presence.RegisterModuleInterface<ICombatPresence>(new CombatPresence(this, presence, m_config)); }
void EventManager_OnNewPresence(IScenePresence presence) { AvatarApperanceModule m = new AvatarApperanceModule(presence); presence.RegisterModuleInterface <IAvatarAppearanceModule> (m); }
private void EventManager_OnNewPresence(IScenePresence presence) { ScriptControllerPresenceModule m = new ScriptControllerPresenceModule(presence); presence.RegisterModuleInterface <IScriptControllerModule>(m); }