aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/IAvatarData.cs2
-rw-r--r--OpenSim/Services/AvatarService/AvatarService.cs32
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs4
3 files changed, 30 insertions, 8 deletions
diff --git a/OpenSim/Data/IAvatarData.cs b/OpenSim/Data/IAvatarData.cs
index 00decdf..59213da 100644
--- a/OpenSim/Data/IAvatarData.cs
+++ b/OpenSim/Data/IAvatarData.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Data
35 // This MUST be a ref type! 35 // This MUST be a ref type!
36 public class AvatarBaseData 36 public class AvatarBaseData
37 { 37 {
38 public string PrincipalID; 38 public UUID PrincipalID;
39 public Dictionary<string, string> Data; 39 public Dictionary<string, string> Data;
40 } 40 }
41 41
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 }
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index 39368f1..ea08ea5 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -92,6 +92,10 @@ namespace OpenSim.Services.Interfaces
92 public int AvatarType; 92 public int AvatarType;
93 public Dictionary<string,string> Data; 93 public Dictionary<string,string> Data;
94 94
95 public AvatarData()
96 {
97 }
98
95 public AvatarData(Dictionary<string, object> kvp) 99 public AvatarData(Dictionary<string, object> kvp)
96 { 100 {
97 Data = new Dictionary<string, string>(); 101 Data = new Dictionary<string, string>();