aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AvatarService/AvatarService.cs
diff options
context:
space:
mode:
authorMelanie2010-01-04 02:07:31 +0000
committerMelanie2010-01-04 02:07:31 +0000
commit791c6188fd3b0347299c2bb0e88df90cc0747008 (patch)
tree326ca3a9c3480ae3834416a97b459d5a388b28e1 /OpenSim/Services/AvatarService/AvatarService.cs
parentAvatar appearance skeleton (diff)
downloadopensim-SC_OLD-791c6188fd3b0347299c2bb0e88df90cc0747008.zip
opensim-SC_OLD-791c6188fd3b0347299c2bb0e88df90cc0747008.tar.gz
opensim-SC_OLD-791c6188fd3b0347299c2bb0e88df90cc0747008.tar.bz2
opensim-SC_OLD-791c6188fd3b0347299c2bb0e88df90cc0747008.tar.xz
Some work on avatar service. Retrieval and storage done
Diffstat (limited to 'OpenSim/Services/AvatarService/AvatarService.cs')
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs32
1 files changed, 25 insertions, 7 deletions
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs
index 1f5b257..ffcdcc5 100644
--- a/OpenSim/Services/AvatarService/AvatarService.cs
+++ b/OpenSim/Services/AvatarService/AvatarService.cs
@@ -51,27 +51,45 @@ namespace OpenSim.Services.AvatarService
51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service"); 51 m_log.Debug("[AVATAR SERVICE]: Starting avatar service");
52 } 52 }
53 53
54 public AvatarData GetAvatar(UUID userID) 54 public AvatarData GetAvatar(UUID principalID)
55 { 55 {
56 return null; 56
57 AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString());
58 if (av.Length == 0)
59 return null;
60
61 AvatarData ret = new AvatarData();
62 ret.AvatarType = Convert.ToInt32(av[0].Data["AvatarType"]);
63
64 av[0].Data.Remove("AvatarType");
65
66 ret.Data = av[0].Data;
67
68 return ret;
57 } 69 }
58 70
59 public bool SetAvatar(UUID userID, AvatarData avatar) 71 public bool SetAvatar(UUID principalID, AvatarData avatar)
60 { 72 {
61 return false; 73 AvatarBaseData av = new AvatarBaseData();
74
75 av.PrincipalID = principalID;
76 av.Data = avatar.Data;
77 av.Data["AvatarType"] = avatar.AvatarType.ToString();
78
79 return m_Database.Store(av);
62 } 80 }
63 81
64 public bool ResetAvatar(UUID userID) 82 public bool ResetAvatar(UUID principalID)
65 { 83 {
66 return false; 84 return false;
67 } 85 }
68 86
69 public bool SetItems(UUID userID, string[] names, string[] values) 87 public bool SetItems(UUID principalID, string[] names, string[] values)
70 { 88 {
71 return false; 89 return false;
72 } 90 }
73 91
74 public bool RemoveItems(UUID userID, string[] names) 92 public bool RemoveItems(UUID principalID, string[] names)
75 { 93 {
76 return false; 94 return false;
77 } 95 }