From 5a630471445f3ed2791980af100de83a620d9e7d Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 8 Feb 2008 15:07:29 +0000 Subject: [PATCH] small bit of refactoring, --- .../Region/Environment/Interfaces/IAvatarFactory.cs | 2 ++ .../Environment/Modules/AvatarFactoryModule.cs | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs index fb83150cff..1ed3418bef 100644 --- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs @@ -34,5 +34,7 @@ namespace OpenSim.Region.Environment.Interfaces public interface IAvatarFactory : IRegionModule { bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); + void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); + } } \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs index 19ebdb8d0b..0dafdc373a 100644 --- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs @@ -170,10 +170,7 @@ namespace OpenSim.Region.Environment.Modules avatAppearance.Wearables[wear.Type].AssetID = assetId; avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; - if (m_enablePersist) - { - m_appearanceMapper.Update(clientView.AgentId.UUID, avatAppearance); - } + UpdateDatabase(clientView.AgentId, avatAppearance); } } } @@ -182,6 +179,14 @@ namespace OpenSim.Region.Environment.Modules } } + public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) + { + if (m_enablePersist) + { + m_appearanceMapper.Update(userID.UUID, avatAppearance); + } + } + public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) { visualParams = GetDefaultVisualParams();