small bit of refactoring,

ThreadPoolClientBranch
MW 2008-02-08 15:07:29 +00:00
parent 3be2e772ec
commit 5a63047144
2 changed files with 11 additions and 4 deletions

View File

@ -34,5 +34,7 @@ namespace OpenSim.Region.Environment.Interfaces
public interface IAvatarFactory : IRegionModule public interface IAvatarFactory : IRegionModule
{ {
bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance);
void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance);
} }
} }

View File

@ -170,10 +170,7 @@ namespace OpenSim.Region.Environment.Modules
avatAppearance.Wearables[wear.Type].AssetID = assetId; avatAppearance.Wearables[wear.Type].AssetID = assetId;
avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID;
if (m_enablePersist) UpdateDatabase(clientView.AgentId, avatAppearance);
{
m_appearanceMapper.Update(clientView.AgentId.UUID, 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) public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams)
{ {
visualParams = GetDefaultVisualParams(); visualParams = GetDefaultVisualParams();