diff options
author | Sean Dague | 2007-08-28 15:11:56 +0000 |
---|---|---|
committer | Sean Dague | 2007-08-28 15:11:56 +0000 |
commit | 6bd4c6fee6b59c5b986df83c8471880b4b2e4f52 (patch) | |
tree | b44b71cf1723904dcf571a8d30b9ddfa7fc7c6aa /OpenSim/Framework | |
parent | Moved XferModule to OpenSim.Region.Environment.Modules namespace/directory. (diff) | |
download | opensim-SC-6bd4c6fee6b59c5b986df83c8471880b4b2e4f52.zip opensim-SC-6bd4c6fee6b59c5b986df83c8471880b4b2e4f52.tar.gz opensim-SC-6bd4c6fee6b59c5b986df83c8471880b4b2e4f52.tar.bz2 opensim-SC-6bd4c6fee6b59c5b986df83c8471880b4b2e4f52.tar.xz |
some changes which get us closer to Sqlite storage for users
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/Data/UserProfileData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/UserManager/UserManagerBase.cs | 3 |
3 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index bba5791..48dac87 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -300,7 +300,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
300 | createCol(users, "passwordHash", typeof(System.String)); | 300 | createCol(users, "passwordHash", typeof(System.String)); |
301 | createCol(users, "passwordSalt", typeof(System.String)); | 301 | createCol(users, "passwordSalt", typeof(System.String)); |
302 | 302 | ||
303 | createCol(users, "homeRegion", typeof(System.Int64)); | 303 | createCol(users, "homeRegionX", typeof(System.Int32)); |
304 | createCol(users, "homeRegionY", typeof(System.Int32)); | ||
304 | createCol(users, "homeLocationX", typeof(System.Double)); | 305 | createCol(users, "homeLocationX", typeof(System.Double)); |
305 | createCol(users, "homeLocationY", typeof(System.Double)); | 306 | createCol(users, "homeLocationY", typeof(System.Double)); |
306 | createCol(users, "homeLocationZ", typeof(System.Double)); | 307 | createCol(users, "homeLocationZ", typeof(System.Double)); |
@@ -368,7 +369,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
368 | user.passwordHash = (String)row["passwordHash"]; | 369 | user.passwordHash = (String)row["passwordHash"]; |
369 | user.passwordSalt = (String)row["passwordSalt"]; | 370 | user.passwordSalt = (String)row["passwordSalt"]; |
370 | 371 | ||
371 | // user.homeRegion = Convert.ToUInt64(row["homeRegion"]); | 372 | user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]); |
373 | user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]); | ||
372 | user.homeLocation = new LLVector3( | 374 | user.homeLocation = new LLVector3( |
373 | Convert.ToSingle(row["homeLocationX"]), | 375 | Convert.ToSingle(row["homeLocationX"]), |
374 | Convert.ToSingle(row["homeLocationY"]), | 376 | Convert.ToSingle(row["homeLocationY"]), |
@@ -402,7 +404,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
402 | row["passwordSalt"] = user.passwordSalt; | 404 | row["passwordSalt"] = user.passwordSalt; |
403 | 405 | ||
404 | 406 | ||
405 | row["homeRegion"] = user.homeRegion; | 407 | row["homeRegionX"] = user.homeRegionX; |
408 | row["homeRegionY"] = user.homeRegionY; | ||
406 | row["homeLocationX"] = user.homeLocation.X; | 409 | row["homeLocationX"] = user.homeLocation.X; |
407 | row["homeLocationY"] = user.homeLocation.Y; | 410 | row["homeLocationY"] = user.homeLocation.Y; |
408 | row["homeLocationZ"] = user.homeLocation.Z; | 411 | row["homeLocationZ"] = user.homeLocation.Z; |
diff --git a/OpenSim/Framework/Data/UserProfileData.cs b/OpenSim/Framework/Data/UserProfileData.cs index 3c1f1c7..9c72a5d 100644 --- a/OpenSim/Framework/Data/UserProfileData.cs +++ b/OpenSim/Framework/Data/UserProfileData.cs | |||
@@ -62,8 +62,14 @@ namespace OpenSim.Framework.Data | |||
62 | /// <summary> | 62 | /// <summary> |
63 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into | 63 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into |
64 | /// </summary> | 64 | /// </summary> |
65 | public ulong homeRegion; | 65 | public ulong homeRegion |
66 | 66 | { | |
67 | get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); } | ||
68 | set { | ||
69 | System.Console.WriteLine("Don't know how to set homeRegion"); | ||
70 | Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); | ||
71 | } | ||
72 | } | ||
67 | public uint homeRegionX; | 73 | public uint homeRegionX; |
68 | public uint homeRegionY; | 74 | public uint homeRegionY; |
69 | /// <summary> | 75 | /// <summary> |
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs index 39681d5..94157fb 100644 --- a/OpenSim/Framework/UserManager/UserManagerBase.cs +++ b/OpenSim/Framework/UserManager/UserManagerBase.cs | |||
@@ -353,7 +353,8 @@ namespace OpenSim.Framework.UserManagement | |||
353 | user.passwordSalt = ""; | 353 | user.passwordSalt = ""; |
354 | user.created = Util.UnixTimeSinceEpoch(); | 354 | user.created = Util.UnixTimeSinceEpoch(); |
355 | user.homeLookAt = new LLVector3(100, 100, 100); | 355 | user.homeLookAt = new LLVector3(100, 100, 100); |
356 | user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256)); | 356 | user.homeRegionX = regX; |
357 | user.homeRegionY = regY; | ||
357 | 358 | ||
358 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 359 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
359 | { | 360 | { |