From a9347b6ceb194a352ad2a5796e7ed7e8fc598c26 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 28 Jun 2008 17:43:20 +0000 Subject: [PATCH] Extracted the Avatar appearance functions out of the IUserService interface and moved them into a IAvatarService Although "out of the box", there is no actual functional change to behavior --- .../Framework/Communications/CommunicationsManager.cs | 7 +++++++ OpenSim/Framework/Communications/IUserService.cs | 10 +++++----- .../Region/Communications/Local/CommunicationsLocal.cs | 1 + .../Region/Communications/OGS1/CommunicationsOGS1.cs | 1 + OpenSim/Region/Environment/Scenes/ScenePresence.cs | 4 ++-- .../Modules/AvatarFactory/AvatarFactoryModule.cs | 6 +++--- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 0410f0ea4a..45f692b14f 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -77,6 +77,13 @@ namespace OpenSim.Framework.Communications // get { return m_transactionsManager; } // } + protected IAvatarService m_avatarService; + + public IAvatarService AvatarService + { + get { return m_avatarService; } + } + protected AssetCache m_assetCache; public AssetCache AssetCache diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs index f8ef358416..4bd2ad11af 100644 --- a/OpenSim/Framework/Communications/IUserService.cs +++ b/OpenSim/Framework/Communications/IUserService.cs @@ -120,14 +120,14 @@ namespace OpenSim.Framework.Communications /// /// Get's the User Appearance - AvatarAppearance GetUserAppearance(LLUUID user); + // AvatarAppearance GetUserAppearance(LLUUID user); - void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); + // void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); - void AddAttachment(LLUUID user, LLUUID attach); + // void AddAttachment(LLUUID user, LLUUID attach); - void RemoveAttachment(LLUUID user, LLUUID attach); + // void RemoveAttachment(LLUUID user, LLUUID attach); - List GetAttachments(LLUUID user); + // List GetAttachments(LLUUID user); } } \ No newline at end of file diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 2065006b93..5fd552465b 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -47,6 +47,7 @@ namespace OpenSim.Region.Communications.Local AddInventoryService( inventoryService); m_defaultInventoryHost = inventoryService.Host; m_userService = userService; + m_avatarService = (IAvatarService)userService; m_gridService = gridService; m_interRegion = interRegionService; } diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index b85654dc85..f2e76f26d5 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -46,6 +46,7 @@ namespace OpenSim.Region.Communications.OGS1 m_defaultInventoryHost = invService.Host; m_userService = new OGS1UserServices(this); + m_avatarService = (IAvatarService)m_userService; } public override void AddInventoryService(string hostUrl) diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 7ba096be37..3a966f4168 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1661,7 +1661,7 @@ namespace OpenSim.Region.Environment.Scenes m_log.Info("[APPEARANCE] Setting Appearance"); m_appearance.SetAppearance(texture, visualParam); SetHeight(m_appearance.AvatarHeight); - m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); + m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); SendAppearanceToAllOtherAgents(); SendOwnAppearance(); @@ -1671,7 +1671,7 @@ namespace OpenSim.Region.Environment.Scenes { m_log.Info("[APPEARANCE] Setting Wearable"); m_appearance.SetWearable(wearableId, wearable); - m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); + m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); } diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index 43b492aa66..671b8549c7 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.Modules.AvatarFactory //if ((profile != null) && (profile.RootFolder != null)) if (profile != null) { - appearance = m_scene.CommsManager.UserService.GetUserAppearance(avatarId); + appearance = m_scene.CommsManager.AvatarService.GetUserAppearance(avatarId); if (appearance != null) { //SetAppearanceAssets(profile, ref appearance); @@ -185,7 +185,7 @@ namespace OpenSim.Region.Modules.AvatarFactory } SetAppearanceAssets(profile, ref avatAppearance); - m_scene.CommsManager.UserService.UpdateUserAppearance(clientView.AgentId, avatAppearance); + m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); avatar.Appearance = avatAppearance; } else @@ -203,7 +203,7 @@ namespace OpenSim.Region.Modules.AvatarFactory public void UpdateDatabase(LLUUID user, AvatarAppearance appearance) { - m_scene.CommsManager.UserService.UpdateUserAppearance(user, appearance); + m_scene.CommsManager.AvatarService.UpdateUserAppearance(user, appearance); } private static byte[] GetDefaultVisualParams()