diff options
author | Diva Canto | 2010-01-10 19:42:36 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-10 19:42:36 -0800 |
commit | 0c2946031bccf75c28968b6adcde5cce5bc45c13 (patch) | |
tree | a57253af1e81c82ce52dbc44babe60d2defe27fb | |
parent | Moved GridInfo service from where it was to Handlers/Grid (diff) | |
download | opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.zip opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.gz opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.bz2 opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.xz |
CommunicationsManager is practically empty. Only NetworkServersInfo is there.
13 files changed, 34 insertions, 102 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 4dff71f..bc04009 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -45,26 +45,6 @@ namespace OpenSim.Framework.Communications | |||
45 | { | 45 | { |
46 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | protected Dictionary<UUID, string[]> m_nameRequestCache = new Dictionary<UUID, string[]>(); | ||
49 | |||
50 | public IUserService UserService | ||
51 | { | ||
52 | get { return m_userService; } | ||
53 | } | ||
54 | protected IUserService m_userService; | ||
55 | |||
56 | public IAvatarService AvatarService | ||
57 | { | ||
58 | get { return m_avatarService; } | ||
59 | } | ||
60 | protected IAvatarService m_avatarService; | ||
61 | |||
62 | public IInterServiceInventoryServices InterServiceInventoryService | ||
63 | { | ||
64 | get { return m_interServiceInventoryService; } | ||
65 | } | ||
66 | protected IInterServiceInventoryServices m_interServiceInventoryService; | ||
67 | |||
68 | public NetworkServersInfo NetworkServersInfo | 48 | public NetworkServersInfo NetworkServersInfo |
69 | { | 49 | { |
70 | get { return m_networkServersInfo; } | 50 | get { return m_networkServersInfo; } |
@@ -72,15 +52,6 @@ namespace OpenSim.Framework.Communications | |||
72 | protected NetworkServersInfo m_networkServersInfo; | 52 | protected NetworkServersInfo m_networkServersInfo; |
73 | 53 | ||
74 | /// <summary> | 54 | /// <summary> |
75 | /// Interface to user service for administrating users. | ||
76 | /// </summary> | ||
77 | public IUserAdminService UserAdminService | ||
78 | { | ||
79 | get { return m_userAdminService; } | ||
80 | } | ||
81 | protected IUserAdminService m_userAdminService; | ||
82 | |||
83 | /// <summary> | ||
84 | /// Constructor | 55 | /// Constructor |
85 | /// </summary> | 56 | /// </summary> |
86 | /// <param name="serversInfo"></param> | 57 | /// <param name="serversInfo"></param> |
@@ -90,20 +61,5 @@ namespace OpenSim.Framework.Communications | |||
90 | m_networkServersInfo = serversInfo; | 61 | m_networkServersInfo = serversInfo; |
91 | } | 62 | } |
92 | 63 | ||
93 | #region Packet Handlers | ||
94 | |||
95 | public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile) | ||
96 | { | ||
97 | m_userService.UpdateUserProfile(UserProfile); | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) | ||
102 | { | ||
103 | List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query); | ||
104 | return pickerlist; | ||
105 | } | ||
106 | |||
107 | #endregion | ||
108 | } | 64 | } |
109 | } | 65 | } |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 4f0af06..caa9c1c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -686,25 +686,6 @@ namespace OpenSim.Framework.Communications | |||
686 | } | 686 | } |
687 | else | 687 | else |
688 | { | 688 | { |
689 | // | ||
690 | // WARNING: This is a horrible hack | ||
691 | // The purpose here is to avoid touching the user server at this point. | ||
692 | // There are dragons there that I can't deal with right now. | ||
693 | // diva 06/09/09 | ||
694 | // | ||
695 | if (m_InventoryService != null) | ||
696 | { | ||
697 | // local service (standalone) | ||
698 | m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory"); | ||
699 | m_InventoryService.CreateUserInventory(userProf.ID); | ||
700 | } | ||
701 | else if (m_commsManager.InterServiceInventoryService != null) | ||
702 | { | ||
703 | // used by the user server | ||
704 | m_log.Debug("[USERSTORAGE]: using m_commsManager.InterServiceInventoryService to create user's inventory"); | ||
705 | m_commsManager.InterServiceInventoryService.CreateNewUserInventory(userProf.ID); | ||
706 | } | ||
707 | |||
708 | return userProf.ID; | 689 | return userProf.ID; |
709 | } | 690 | } |
710 | } | 691 | } |
diff --git a/OpenSim/Grid/UserServer/UserServerCommsManager.cs b/OpenSim/Grid/UserServer/UserServerCommsManager.cs index 8ef693b..7dc514c 100644 --- a/OpenSim/Grid/UserServer/UserServerCommsManager.cs +++ b/OpenSim/Grid/UserServer/UserServerCommsManager.cs | |||
@@ -34,7 +34,6 @@ namespace OpenSim.Grid.UserServer | |||
34 | public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService) | 34 | public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService) |
35 | : base(null, null) | 35 | : base(null, null) |
36 | { | 36 | { |
37 | m_interServiceInventoryService = interServiceInventoryService; | ||
38 | } | 37 | } |
39 | } | 38 | } |
40 | } | 39 | } |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 3486c8b..2106477 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -52,8 +52,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
52 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 52 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
53 | userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); | 53 | userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); |
54 | 54 | ||
55 | m_userService = userServices; | ||
56 | m_avatarService = userServices; | ||
57 | } | 55 | } |
58 | } | 56 | } |
59 | } | 57 | } |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index d979a01..f75edca 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -58,9 +58,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
58 | hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); | 58 | hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); |
59 | hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService)); | 59 | hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService)); |
60 | 60 | ||
61 | m_userService = hgUserService; | ||
62 | m_userAdminService = hgUserService; | ||
63 | m_avatarService = hgUserService; | ||
64 | } | 61 | } |
65 | } | 62 | } |
66 | } | 63 | } |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 4f83fdb..8e7717e 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -48,9 +48,6 @@ namespace OpenSim.Region.Communications.Local | |||
48 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); | 48 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); |
49 | lus.AddPlugin(new TemporaryUserProfilePlugin()); | 49 | lus.AddPlugin(new TemporaryUserProfilePlugin()); |
50 | lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); | 50 | lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); |
51 | m_userService = lus; | ||
52 | m_userAdminService = lus; | ||
53 | m_avatarService = lus; | ||
54 | 51 | ||
55 | //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); | 52 | //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); |
56 | } | 53 | } |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 111b7c0..ede5fda 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -45,8 +45,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
45 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 45 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
46 | userServices.AddPlugin(new OGS1UserDataPlugin(this)); | 46 | userServices.AddPlugin(new OGS1UserDataPlugin(this)); |
47 | 47 | ||
48 | m_userService = userServices; | ||
49 | m_avatarService = (IAvatarService)m_userService; | ||
50 | } | 48 | } |
51 | 49 | ||
52 | } | 50 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 884e6a6..2b3d56d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -154,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) | 154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) |
155 | { | 155 | { |
156 | IClientAPI clientView = (IClientAPI)sender; | 156 | IClientAPI clientView = (IClientAPI)sender; |
157 | ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); | 157 | ScenePresence sp = m_scene.GetScenePresence(clientView.AgentId); |
158 | 158 | ||
159 | if (avatar == null) | 159 | if (sp == null) |
160 | { | 160 | { |
161 | m_log.Error("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); | 161 | m_log.Error("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); |
162 | return; | 162 | return; |
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
166 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) | 166 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) |
167 | { | 167 | { |
168 | m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); | 168 | m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); |
169 | avatAppearance = avatar.Appearance; | 169 | avatAppearance = sp.Appearance; |
170 | } | 170 | } |
171 | 171 | ||
172 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); | 172 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); |
@@ -179,10 +179,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | SetAppearanceAssets(avatar.UUID, ref avatAppearance); | 182 | SetAppearanceAssets(sp.UUID, ref avatAppearance); |
183 | AvatarData adata = new AvatarData(avatAppearance); | ||
184 | m_scene.AvatarService.SetAvatar(clientView.AgentId, adata); | ||
183 | 185 | ||
184 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); | 186 | sp.Appearance = avatAppearance; |
185 | avatar.Appearance = avatAppearance; | ||
186 | } | 187 | } |
187 | 188 | ||
188 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) | 189 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) |
@@ -193,7 +194,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
193 | 194 | ||
194 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) | 195 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) |
195 | { | 196 | { |
196 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(user, appearance); | 197 | AvatarData adata = new AvatarData(appearance); |
198 | m_scene.AvatarService.SetAvatar(user, adata); | ||
199 | |||
197 | } | 200 | } |
198 | 201 | ||
199 | private static byte[] GetDefaultVisualParams() | 202 | private static byte[] GetDefaultVisualParams() |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index fbb7660..bbb1938 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -332,14 +332,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
332 | { | 332 | { |
333 | //EventManager.TriggerAvatarPickerRequest(); | 333 | //EventManager.TriggerAvatarPickerRequest(); |
334 | 334 | ||
335 | List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); | 335 | List<UserAccount> accounts = UserAccountService.GetUserAccounts(RegionInfo.ScopeID, query); |
336 | AvatarResponses = m_sceneGridService.GenerateAgentPickerRequestResponse(RequestID, query); | 336 | |
337 | if (accounts == null) | ||
338 | return; | ||
337 | 339 | ||
338 | AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); | 340 | AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); |
339 | // TODO: don't create new blocks if recycling an old packet | 341 | // TODO: don't create new blocks if recycling an old packet |
340 | 342 | ||
341 | AvatarPickerReplyPacket.DataBlock[] searchData = | 343 | AvatarPickerReplyPacket.DataBlock[] searchData = |
342 | new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count]; | 344 | new AvatarPickerReplyPacket.DataBlock[accounts.Count]; |
343 | AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); | 345 | AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); |
344 | 346 | ||
345 | agentData.AgentID = avatarID; | 347 | agentData.AgentID = avatarID; |
@@ -348,16 +350,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
348 | //byte[] bytes = new byte[AvatarResponses.Count*32]; | 350 | //byte[] bytes = new byte[AvatarResponses.Count*32]; |
349 | 351 | ||
350 | int i = 0; | 352 | int i = 0; |
351 | foreach (AvatarPickerAvatar item in AvatarResponses) | 353 | foreach (UserAccount item in accounts) |
352 | { | 354 | { |
353 | UUID translatedIDtem = item.AvatarID; | 355 | UUID translatedIDtem = item.PrincipalID; |
354 | searchData[i] = new AvatarPickerReplyPacket.DataBlock(); | 356 | searchData[i] = new AvatarPickerReplyPacket.DataBlock(); |
355 | searchData[i].AvatarID = translatedIDtem; | 357 | searchData[i].AvatarID = translatedIDtem; |
356 | searchData[i].FirstName = Utils.StringToBytes((string) item.firstName); | 358 | searchData[i].FirstName = Utils.StringToBytes((string) item.FirstName); |
357 | searchData[i].LastName = Utils.StringToBytes((string) item.lastName); | 359 | searchData[i].LastName = Utils.StringToBytes((string) item.LastName); |
358 | i++; | 360 | i++; |
359 | } | 361 | } |
360 | if (AvatarResponses.Count == 0) | 362 | if (accounts.Count == 0) |
361 | { | 363 | { |
362 | searchData = new AvatarPickerReplyPacket.DataBlock[0]; | 364 | searchData = new AvatarPickerReplyPacket.DataBlock[0]; |
363 | } | 365 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 04ecb5f..2e82748 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1443,12 +1443,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1443 | 1443 | ||
1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); | 1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) | ||
1448 | { | ||
1449 | return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); | ||
1450 | } | ||
1451 | |||
1452 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) | 1447 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) |
1453 | { | 1448 | { |
1454 | return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber); | 1449 | return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 97415f4..09b53d2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2573,7 +2573,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2573 | m_appearance.SetAppearance(textureEntry, visualParams); | 2573 | m_appearance.SetAppearance(textureEntry, visualParams); |
2574 | if (m_appearance.AvatarHeight > 0) | 2574 | if (m_appearance.AvatarHeight > 0) |
2575 | SetHeight(m_appearance.AvatarHeight); | 2575 | SetHeight(m_appearance.AvatarHeight); |
2576 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 2576 | AvatarData adata = new AvatarData(m_appearance); |
2577 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); | ||
2577 | 2578 | ||
2578 | SendAppearanceToAllOtherAgents(); | 2579 | SendAppearanceToAllOtherAgents(); |
2579 | if (!m_startAnimationSet) | 2580 | if (!m_startAnimationSet) |
@@ -2593,7 +2594,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2593 | public void SetWearable(int wearableId, AvatarWearable wearable) | 2594 | public void SetWearable(int wearableId, AvatarWearable wearable) |
2594 | { | 2595 | { |
2595 | m_appearance.SetWearable(wearableId, wearable); | 2596 | m_appearance.SetWearable(wearableId, wearable); |
2596 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 2597 | AvatarData adata = new AvatarData(m_appearance); |
2598 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); | ||
2597 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 2599 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
2598 | } | 2600 | } |
2599 | 2601 | ||
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..a6d4a93 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.CoreModules.Avatar.NPC; | 34 | using OpenSim.Region.CoreModules.Avatar.NPC; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using Timer=System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
37 | using OpenSim.Services.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 39 | namespace OpenSim.Region.OptionalModules.World.NPC |
39 | { | 40 | { |
@@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
63 | if (m_appearanceCache.ContainsKey(target)) | 64 | if (m_appearanceCache.ContainsKey(target)) |
64 | return m_appearanceCache[target]; | 65 | return m_appearanceCache[target]; |
65 | 66 | ||
66 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | ||
69 | { | ||
70 | AvatarAppearance x = adata.ToAvatarAppearance(); | ||
67 | 71 | ||
68 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
69 | 73 | ||
70 | return x; | 74 | return x; |
75 | } | ||
76 | return new AvatarAppearance(); | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 79 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs index 013462e..fccc282 100644 --- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs +++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | |||
@@ -62,8 +62,6 @@ namespace OpenSim.Tests.Common.Mock | |||
62 | lus.AddPlugin(new TemporaryUserProfilePlugin()); | 62 | lus.AddPlugin(new TemporaryUserProfilePlugin()); |
63 | m_userDataPlugin = new TestUserDataPlugin(); | 63 | m_userDataPlugin = new TestUserDataPlugin(); |
64 | lus.AddPlugin(m_userDataPlugin); | 64 | lus.AddPlugin(m_userDataPlugin); |
65 | m_userService = lus; | ||
66 | m_userAdminService = lus; | ||
67 | 65 | ||
68 | } | 66 | } |
69 | } | 67 | } |