aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index 0b95aee..c31a79b 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -27,11 +27,12 @@
27*/ 27*/
28 28
29using System; 29using System;
30using libsecondlife;
31using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Framework.Console;
35using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
37 38
@@ -59,9 +60,9 @@ namespace OpenSim.Region.Environment.Modules
59 { 60 {
60 m_avatarsAppearance[avatarId] = appearance; 61 m_avatarsAppearance[avatarId] = appearance;
61 } 62 }
62 catch (System.NullReferenceException) 63 catch (NullReferenceException)
63 { 64 {
64 OpenSim.Framework.Console.MainLog.Instance.Error("AVATAR", "Unable to load appearance for uninitialized avatar"); 65 MainLog.Instance.Error("AVATAR", "Unable to load appearance for uninitialized avatar");
65 } 66 }
66 return true; 67 return true;
67 } 68 }
@@ -98,17 +99,17 @@ namespace OpenSim.Region.Environment.Modules
98 99
99 public void NewClient(IClientAPI client) 100 public void NewClient(IClientAPI client)
100 { 101 {
101 client.OnAvatarNowWearing += AvatarIsWearing; 102 client.OnAvatarNowWearing += AvatarIsWearing;
102 } 103 }
103 104
104 public void RemoveClient(IClientAPI client) 105 public void RemoveClient(IClientAPI client)
105 { 106 {
106 // client.OnAvatarNowWearing -= AvatarIsWearing; 107 // client.OnAvatarNowWearing -= AvatarIsWearing;
107 } 108 }
108 109
109 public void AvatarIsWearing(Object sender, AvatarWearingArgs e) 110 public void AvatarIsWearing(Object sender, AvatarWearingArgs e)
110 { 111 {
111 IClientAPI clientView = (IClientAPI)sender; 112 IClientAPI clientView = (IClientAPI) sender;
112 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); 113 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
113 if (profile != null) 114 if (profile != null)
114 { 115 {
@@ -127,7 +128,7 @@ namespace OpenSim.Region.Environment.Modules
127 { 128 {
128 assetId = baseItem.assetID; 129 assetId = baseItem.assetID;
129 //temporary dictionary storage. This should be storing to a database 130 //temporary dictionary storage. This should be storing to a database
130 131
131 if (m_avatarsAppearance.ContainsKey(clientView.AgentId)) 132 if (m_avatarsAppearance.ContainsKey(clientView.AgentId))
132 { 133 {
133 AvatarAppearance avatAppearance = m_avatarsAppearance[clientView.AgentId]; 134 AvatarAppearance avatAppearance = m_avatarsAppearance[clientView.AgentId];
@@ -158,4 +159,4 @@ namespace OpenSim.Region.Environment.Modules
158 return visualParams; 159 return visualParams;
159 } 160 }
160 } 161 }
161} 162} \ No newline at end of file