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
0.6.0-stable
MW 2008-06-28 17:43:20 +00:00
parent 7a255d4404
commit a9347b6ceb
6 changed files with 19 additions and 10 deletions

View File

@ -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

View File

@ -120,14 +120,14 @@ namespace OpenSim.Framework.Communications
/// <summary>
/// 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<LLUUID> GetAttachments(LLUUID user);
// List<LLUUID> GetAttachments(LLUUID user);
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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++);
}

View File

@ -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()