diff options
author | Sean Dague | 2008-05-15 21:14:42 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-15 21:14:42 +0000 |
commit | 129e7e19c5d017e9b00e3792d73a01ad7d6eff51 (patch) | |
tree | 881ebcb9a31f162d0df43ee35c7cc5aef3a6e95b /OpenSim/Data/UserDataBase.cs | |
parent | fix bad default initialization (diff) | |
download | opensim-SC-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.zip opensim-SC-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.gz opensim-SC-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.bz2 opensim-SC-129e7e19c5d017e9b00e3792d73a01ad7d6eff51.tar.xz |
fixed the key issue that caused appearance to go wonky
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/UserDataBase.cs | 15 |
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 | ||
28 | using System.Reflection; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using libsecondlife; | 30 | using libsecondlife; |
31 | using log4net; | ||
30 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
31 | 33 | ||
32 | namespace OpenSim.Data | 34 | namespace 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); |