diff options
small bit of refactoring,
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/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 fb83150..1ed3418 100644 --- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs | |||
@@ -34,5 +34,7 @@ namespace OpenSim.Region.Environment.Interfaces | |||
34 | public interface IAvatarFactory : IRegionModule | 34 | public interface IAvatarFactory : IRegionModule |
35 | { | 35 | { |
36 | bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); | 36 | bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); |
37 | void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); | ||
38 | |||
37 | } | 39 | } |
38 | } \ No newline at end of file | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs index 19ebdb8..0dafdc3 100644 --- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs | |||
@@ -170,10 +170,7 @@ namespace OpenSim.Region.Environment.Modules | |||
170 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | 170 | avatAppearance.Wearables[wear.Type].AssetID = assetId; |
171 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; | 171 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; |
172 | 172 | ||
173 | if (m_enablePersist) | 173 | UpdateDatabase(clientView.AgentId, avatAppearance); |
174 | { | ||
175 | m_appearanceMapper.Update(clientView.AgentId.UUID, avatAppearance); | ||
176 | } | ||
177 | } | 174 | } |
178 | } | 175 | } |
179 | } | 176 | } |
@@ -182,6 +179,14 @@ namespace OpenSim.Region.Environment.Modules | |||
182 | } | 179 | } |
183 | } | 180 | } |
184 | 181 | ||
182 | public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) | ||
183 | { | ||
184 | if (m_enablePersist) | ||
185 | { | ||
186 | m_appearanceMapper.Update(userID.UUID, avatAppearance); | ||
187 | } | ||
188 | } | ||
189 | |||
185 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) | 190 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) |
186 | { | 191 | { |
187 | visualParams = GetDefaultVisualParams(); | 192 | visualParams = GetDefaultVisualParams(); |