aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-05-15 21:14:42 +0000
committerSean Dague2008-05-15 21:14:42 +0000
commit129e7e19c5d017e9b00e3792d73a01ad7d6eff51 (patch)
tree881ebcb9a31f162d0df43ee35c7cc5aef3a6e95b
parentfix bad default initialization (diff)
downloadopensim-SC_OLD-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.zip
opensim-SC_OLD-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.gz
opensim-SC_OLD-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.bz2
opensim-SC_OLD-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.xz
fixed the key issue that caused appearance to go wonky
-rw-r--r--OpenSim/Data/UserDataBase.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index a4e2941..7066f58 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -25,14 +25,18 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Reflection;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using libsecondlife; 30using libsecondlife;
31using log4net;
30using OpenSim.Framework; 32using OpenSim.Framework;
31 33
32namespace OpenSim.Data 34namespace OpenSim.Data
33{ 35{
34 public abstract class UserDataBase : IUserData 36 public abstract class UserDataBase : IUserData
35 { 37 {
38 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
39
36 private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); 40 private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>();
37 41
38 public abstract UserProfileData GetUserByUUID(LLUUID user); 42 public abstract UserProfileData GetUserByUUID(LLUUID user);
@@ -56,14 +60,21 @@ namespace OpenSim.Data
56 public abstract void Initialise(string connect); 60 public abstract void Initialise(string connect);
57 public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); 61 public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
58 public AvatarAppearance GetUserAppearance(LLUUID user) { 62 public AvatarAppearance GetUserAppearance(LLUUID user) {
59 if (aplist[user] != null) { 63 AvatarAppearance aa;
64 try {
65 m_log.Info("[APPEARANCE] Found appearance for " + user.ToString());
66 aa = aplist[user];
67 } catch (System.Collections.Generic.KeyNotFoundException e) {
68 m_log.Info("[APPEARANCE] Setting up default appearance for " + user.ToString());
60 aplist[user] = new AvatarAppearance(); 69 aplist[user] = new AvatarAppearance();
61 aplist[user].Owner = user; 70 aplist[user].Owner = user;
71 aa = aplist[user];
62 } 72 }
63 return aplist[user]; 73 return aa;
64 } 74 }
65 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { 75 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) {
66 aplist[user] = appearance; 76 aplist[user] = appearance;
77 m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString());
67 } 78 }
68 public abstract void AddAttachment(LLUUID user, LLUUID item); 79 public abstract void AddAttachment(LLUUID user, LLUUID item);
69 public abstract void RemoveAttachment(LLUUID user, LLUUID item); 80 public abstract void RemoveAttachment(LLUUID user, LLUUID item);