aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data.MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL')
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLManager.cs81
1 files changed, 81 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
index e4622a8..a476e97 100644
--- a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -118,6 +118,87 @@ namespace OpenGrid.Framework.Data.MySQL
118 retval.regionUserURI = (string)reader["regionUserURI"]; 118 retval.regionUserURI = (string)reader["regionUserURI"];
119 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 119 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
120 retval.regionUserSendKey = (string)reader["regionUserSendKey"]; 120 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
121
122 // World Map Addition
123 retval.regionMapTextureID = new libsecondlife.LLUUID((string)reader["regionMapTexture"]);
124 }
125 else
126 {
127 return null;
128 }
129 return retval;
130 }
131
132 public UserAgentData getAgentRow(IDataReader reader)
133 {
134 UserAgentData retval = new UserAgentData();
135
136 if (reader.Read())
137 {
138 // Agent IDs
139 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
140 retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]);
141 retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]);
142
143 // Agent Who?
144 retval.agentIP = (string)reader["agentIP"];
145 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
146 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
147
148 // Login/Logout times (UNIX Epoch)
149 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
150 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
151
152 // Current position
153 retval.currentRegion = (string)reader["currentRegion"];
154 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
155 libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
156 }
157 else
158 {
159 return null;
160 }
161 return retval;
162 }
163
164 public UserProfileData getUserRow(IDataReader reader)
165 {
166 UserProfileData retval = new UserProfileData();
167
168 if (reader.Read())
169 {
170 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
171 retval.username = (string)reader["username"];
172 retval.surname = (string)reader["lastname"];
173
174 retval.passwordHash = (string)reader["passwordHash"];
175 retval.passwordSalt = (string)reader["passwordSalt"];
176
177 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
178 retval.homeLocation = new libsecondlife.LLVector3(
179 Convert.ToSingle(reader["homeLocationX"].ToString()),
180 Convert.ToSingle(reader["homeLocationY"].ToString()),
181 Convert.ToSingle(reader["homeLocationZ"].ToString()));
182 retval.homeLookAt = new libsecondlife.LLVector3(
183 Convert.ToSingle(reader["homeLookAtX"].ToString()),
184 Convert.ToSingle(reader["homeLookAtY"].ToString()),
185 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
186
187 retval.created = Convert.ToInt32(reader["created"].ToString());
188 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
189
190 retval.userInventoryURI = (string)reader["userInventoryURI"];
191 retval.userAssetURI = (string)reader["userAssetURI"];
192
193 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
194 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
195
196 retval.profileAboutText = (string)reader["profileAboutText"];
197 retval.profileFirstText = (string)reader["profileFirstText"];
198
199 retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]);
200 retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]);
201
121 } 202 }
122 else 203 else
123 { 204 {