aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs28
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs768
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs10
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs10
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs8
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs4
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs6
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs26
-rw-r--r--OpenSim/Region/Communications/Local/LocalInventoryService.cs8
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs12
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs4
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs74
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs34
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs18
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs32
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs82
-rw-r--r--OpenSim/Region/DataSnapshot/DataRequestHandler.cs4
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs6
-rw-r--r--OpenSim/Region/DataSnapshot/EstateSnapshot.cs6
-rw-r--r--OpenSim/Region/DataSnapshot/LandSnapshot.cs20
-rw-r--r--OpenSim/Region/DataSnapshot/ObjectSnapshot.cs32
-rw-r--r--OpenSim/Region/DataSnapshot/SnapshotStore.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs8
-rw-r--r--OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs6
-rw-r--r--OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs16
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEmailModule.cs6
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEstateModule.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IHttpRequests.cs10
-rw-r--r--OpenSim/Region/Environment/Interfaces/IInventoryModule.cs6
-rw-r--r--OpenSim/Region/Environment/Interfaces/ILandChannel.cs6
-rw-r--r--OpenSim/Region/Environment/Interfaces/ILandObject.cs18
-rw-r--r--OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs20
-rw-r--r--OpenSim/Region/Environment/Interfaces/IScriptModule.cs4
-rw-r--r--OpenSim/Region/Environment/Interfaces/IWorldComm.cs16
-rw-r--r--OpenSim/Region/Environment/Interfaces/IXMLRPC.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs34
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs138
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs106
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs104
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs38
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs28
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs86
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs13
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs100
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs15
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs32
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs52
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs71
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs46
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs204
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs132
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs15
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs37
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs79
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs5
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs33
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs49
-rw-r--r--OpenSim/Region/Environment/Scenes/Animation.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/AnimationSet.cs18
-rw-r--r--OpenSim/Region/Environment/Scenes/AvatarAnimations.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs61
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityList.cs21
-rw-r--r--OpenSim/Region/Environment/Scenes/EventManager.cs88
-rw-r--r--OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs117
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs202
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs38
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs303
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs70
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs160
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs319
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs48
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs698
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs398
-rw-r--r--OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs19
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/UndoState.cs10
-rw-r--r--OpenSim/Region/Environment/Types/UpdateQueue.cs12
-rw-r--r--OpenSim/Region/Examples/SimpleModule/ComplexObject.cs54
-rw-r--r--OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs6
-rw-r--r--OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs6
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs198
-rw-r--r--OpenSim/Region/Examples/SimpleModule/RegionModule.cs20
-rw-r--r--OpenSim/Region/Interfaces/IMoneyModule.cs8
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs14
-rw-r--r--OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs4
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs2
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs58
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs2
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs88
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs2
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsVector.cs2
-rw-r--r--OpenSim/Region/Physics/Meshing/Extruder.cs13
-rw-r--r--OpenSim/Region/Physics/Meshing/HelperTypes.cs110
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs3
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs11
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs7
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs3
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs96
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODETestClass.cs4
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs51
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSCharacter.cs2
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs1
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPrim.cs2
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSScene.cs17
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs586
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs29
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs64
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs48
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs58
-rw-r--r--OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs70
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs559
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs30
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs35
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs86
193 files changed, 4375 insertions, 4555 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 6829bef..edb29db 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -32,7 +32,7 @@ using System.IO;
32using System.Net; 32using System.Net;
33using System.Reflection; 33using System.Reflection;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -776,7 +776,7 @@ namespace OpenSim
776 { 776 {
777 m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason."); 777 m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason.");
778 778
779 LLVector3 loadOffset = new LLVector3(0, 0, 0); 779 Vector3 loadOffset = new Vector3(0, 0, 0);
780 if (cmdparams.Length > 0) 780 if (cmdparams.Length > 0)
781 { 781 {
782 bool generateNewIDS = false; 782 bool generateNewIDS = false;
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 4003001..86db865 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -32,7 +32,7 @@ using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Text; 33using System.Text;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -64,7 +64,7 @@ namespace OpenSim
64 /// <summary> 64 /// <summary>
65 /// The file used to load and save prim backup xml if no filename has been specified 65 /// The file used to load and save prim backup xml if no filename has been specified
66 /// </summary> 66 /// </summary>
67 protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; 67 protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.Xml";
68 68
69 /// <summary> 69 /// <summary>
70 /// The file used to load and save an opensim archive if no filename has been specified 70 /// The file used to load and save an opensim archive if no filename has been specified
@@ -178,17 +178,17 @@ namespace OpenSim
178 } 178 }
179 else 179 else
180 { 180 {
181 if (File.Exists("OpenSim.xml")) 181 if (File.Exists("OpenSim.Xml"))
182 { 182 {
183 //check for a xml config file 183 //check for a xml config file
184 Application.iniFilePath = "OpenSim.xml"; 184 Application.iniFilePath = "OpenSim.Xml";
185 m_config.Source = new XmlConfigSource(); 185 m_config.Source = new XmlConfigSource();
186 m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath)); 186 m_config.Source.Merge(new XmlConfigSource(Application.iniFilePath));
187 m_config.Source.Merge(configSource); 187 m_config.Source.Merge(configSource);
188 } 188 }
189 else 189 else
190 { 190 {
191 //Application.iniFilePath = "OpenSim.xml"; 191 //Application.iniFilePath = "OpenSim.Xml";
192 // m_config.ConfigSource = new XmlConfigSource(); 192 // m_config.ConfigSource = new XmlConfigSource();
193 // no default config files, so set default values, and save it 193 // no default config files, so set default values, and save it
194 m_config.Source.Merge(DefaultConfig()); 194 m_config.Source.Merge(DefaultConfig());
@@ -437,7 +437,7 @@ namespace OpenSim
437 m_sceneManager.OnRestartSim += handleRestartRegion; 437 m_sceneManager.OnRestartSim += handleRestartRegion;
438 } 438 }
439 439
440 public LLUUID CreateUser(string tempfirstname, string templastname, string tempPasswd, uint regX, uint regY) 440 public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, uint regX, uint regY)
441 { 441 {
442 return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, regX, regY); 442 return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, regX, regY);
443 } 443 }
@@ -532,18 +532,18 @@ namespace OpenSim
532 // and has to happen before the region is registered with the grid. 532 // and has to happen before the region is registered with the grid.
533 scene.CreateTerrainTexture(false); 533 scene.CreateTerrainTexture(false);
534 534
535 try 535 //try
536 { 536 //{
537 scene.RegisterRegionWithGrid(); 537 scene.RegisterRegionWithGrid();
538 } 538 //}
539 catch (Exception e) 539 //catch (Exception e)
540 { 540 //{
541 m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); 541 // m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e);
542 542
543 // Carrying on now causes a lot of confusion down the 543 // Carrying on now causes a lot of confusion down the
544 // line - we need to get the user's attention 544 // line - we need to get the user's attention
545 System.Environment.Exit(1); 545 // System.Environment.Exit(1);
546 } 546 //}
547 547
548 // We need to do this after we've initialized the 548 // We need to do this after we've initialized the
549 // scripting engines. 549 // scripting engines.
diff --git a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs
index d7d9128..8197ec7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife.Packets; 31using OpenMetaverse.Packets;
32 32
33namespace OpenSim.Region.ClientStack.LindenUDP 33namespace OpenSim.Region.ClientStack.LindenUDP
34{ 34{
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 2a0190b..5e22e2d 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -33,9 +33,8 @@ using System.Reflection;
33using System.Text; 33using System.Text;
34using System.Threading; 34using System.Threading;
35using System.Timers; 35using System.Timers;
36using Axiom.Math; 36using OpenMetaverse;
37using libsecondlife; 37using OpenMetaverse.Packets;
38using libsecondlife.Packets;
39using log4net; 38using log4net;
40using OpenSim.Framework; 39using OpenSim.Framework;
41using OpenSim.Framework.Communications.Cache; 40using OpenSim.Framework.Communications.Cache;
@@ -62,12 +61,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
62 // } 61 // }
63 62
64 /* static variables */ 63 /* static variables */
65 public static TerrainManager TerrainManager = new TerrainManager(new SecondLife());
66
67 public static SynchronizeClientHandler SynchronizeClient = null; 64 public static SynchronizeClientHandler SynchronizeClient = null;
68 /* private variables */ 65 /* private variables */
69 private readonly LLUUID m_sessionId; 66 private readonly UUID m_sessionId;
70 private LLUUID m_secureSessionId = LLUUID.Zero; 67 private UUID m_secureSessionId = UUID.Zero;
71 //private AgentAssetUpload UploadAssets; 68 //private AgentAssetUpload UploadAssets;
72 private int m_debug = 0; 69 private int m_debug = 0;
73 private readonly AssetCache m_assetCache; 70 private readonly AssetCache m_assetCache;
@@ -81,16 +78,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
81 //private int m_lastPacketsReceived = 0; 78 //private int m_lastPacketsReceived = 0;
82 //private byte[] ZeroOutBuffer = new byte[4096]; 79 //private byte[] ZeroOutBuffer = new byte[4096];
83 80
84 private readonly LLUUID m_agentId; 81 private readonly UUID m_agentId;
85 private readonly uint m_circuitCode; 82 private readonly uint m_circuitCode;
86 private int m_moneyBalance; 83 private int m_moneyBalance;
87 private IPacketHandler m_PacketHandler; 84 private IPacketHandler m_PacketHandler;
88 85
89 private int m_animationSequenceNumber = 1; 86 private int m_animationSequenceNumber = 1;
90 87
91 private byte[] m_channelVersion = Helpers.StringToField("OpenSimulator 0.5"); // Dummy value needed by libSL 88 private byte[] m_channelVersion = Utils.StringToBytes("OpenSimulator 0.5"); // Dummy value needed by libSL
92 89
93 private Dictionary<string, LLUUID> m_defaultAnimations = new Dictionary<string, LLUUID>(); 90 private Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>();
94 91
95 private bool m_SendLogoutPacketWhenClosing = true; 92 private bool m_SendLogoutPacketWhenClosing = true;
96 93
@@ -112,13 +109,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
112 protected string m_firstName; 109 protected string m_firstName;
113 protected string m_lastName; 110 protected string m_lastName;
114 protected Thread m_clientThread; 111 protected Thread m_clientThread;
115 protected LLVector3 m_startpos; 112 protected Vector3 m_startpos;
116 protected EndPoint m_userEndPoint; 113 protected EndPoint m_userEndPoint;
117 protected EndPoint m_proxyEndPoint; 114 protected EndPoint m_proxyEndPoint;
118 protected LLUUID m_activeGroupID = LLUUID.Zero; 115 protected UUID m_activeGroupID = UUID.Zero;
119 protected string m_activeGroupName = String.Empty; 116 protected string m_activeGroupName = String.Empty;
120 protected ulong m_activeGroupPowers = 0; 117 protected ulong m_activeGroupPowers = 0;
121 protected Dictionary<LLUUID,ulong> m_groupPowers = new Dictionary<LLUUID, ulong>(); 118 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
122 119
123 /* Instantiated Designated Event Delegates */ 120 /* Instantiated Designated Event Delegates */
124 //- used so we don't create new objects for each incoming packet and then toss it out later */ 121 //- used so we don't create new objects for each incoming packet and then toss it out later */
@@ -264,7 +261,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
264 261
265 /* Properties */ 262 /* Properties */
266 263
267 public LLUUID SecureSessionId 264 public UUID SecureSessionId
268 { 265 {
269 get { return m_secureSessionId; } 266 get { return m_secureSessionId; }
270 } 267 }
@@ -274,23 +271,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
274 get { return m_scene; } 271 get { return m_scene; }
275 } 272 }
276 273
277 public LLUUID SessionId 274 public UUID SessionId
278 { 275 {
279 get { return m_sessionId; } 276 get { return m_sessionId; }
280 } 277 }
281 278
282 public LLVector3 StartPos 279 public Vector3 StartPos
283 { 280 {
284 get { return m_startpos; } 281 get { return m_startpos; }
285 set { m_startpos = value; } 282 set { m_startpos = value; }
286 } 283 }
287 284
288 public LLUUID AgentId 285 public UUID AgentId
289 { 286 {
290 get { return m_agentId; } 287 get { return m_agentId; }
291 } 288 }
292 289
293 public LLUUID ActiveGroupId 290 public UUID ActiveGroupId
294 { 291 {
295 get { return m_activeGroupID; } 292 get { return m_activeGroupID; }
296 } 293 }
@@ -305,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
305 get { return m_activeGroupPowers; } 302 get { return m_activeGroupPowers; }
306 } 303 }
307 304
308 public ulong GetGroupPowers(LLUUID groupID) 305 public ulong GetGroupPowers(UUID groupID)
309 { 306 {
310 if (m_groupPowers.ContainsKey(groupID)) 307 if (m_groupPowers.ContainsKey(groupID))
311 return m_groupPowers[groupID]; 308 return m_groupPowers[groupID];
@@ -380,11 +377,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
380 /* METHODS */ 377 /* METHODS */
381 378
382 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, 379 public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
383 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) 380 AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP)
384 { 381 {
385 m_moneyBalance = 1000; 382 m_moneyBalance = 1000;
386 383
387 m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion()); 384 m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion());
388 385
389 InitDefaultAnimations(); 386 InitDefaultAnimations();
390 387
@@ -509,7 +506,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
509 kupack.UserInfo.SessionID = SessionId; 506 kupack.UserInfo.SessionID = SessionId;
510 kupack.TargetBlock.TargetIP = (uint)0; 507 kupack.TargetBlock.TargetIP = (uint)0;
511 kupack.TargetBlock.TargetPort = (ushort)0; 508 kupack.TargetBlock.TargetPort = (ushort)0;
512 kupack.UserInfo.Reason = Helpers.StringToField(message); 509 kupack.UserInfo.Reason = Utils.StringToBytes(message);
513 OutPacket(kupack, ThrottleOutPacketType.Task); 510 OutPacket(kupack, ThrottleOutPacketType.Task);
514 // You must sleep here or users get no message! 511 // You must sleep here or users get no message!
515 Thread.Sleep(500); 512 Thread.Sleep(500);
@@ -760,7 +757,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
760 m_firstName = sessionInfo.LoginInfo.First; 757 m_firstName = sessionInfo.LoginInfo.First;
761 m_lastName = sessionInfo.LoginInfo.Last; 758 m_lastName = sessionInfo.LoginInfo.Last;
762 759
763 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero) 760 if (sessionInfo.LoginInfo.SecureSession != UUID.Zero)
764 { 761 {
765 m_secureSessionId = sessionInfo.LoginInfo.SecureSession; 762 m_secureSessionId = sessionInfo.LoginInfo.SecureSession;
766 } 763 }
@@ -868,7 +865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
868 public event UpdateVector OnUpdatePrimGroupScale; 865 public event UpdateVector OnUpdatePrimGroupScale;
869 public event StatusChange OnChildAgentStatus; 866 public event StatusChange OnChildAgentStatus;
870 public event GenericCall2 OnStopMovement; 867 public event GenericCall2 OnStopMovement;
871 public event Action<LLUUID> OnRemoveAvatar; 868 public event Action<UUID> OnRemoveAvatar;
872 public event RequestMapBlocks OnRequestMapBlocks; 869 public event RequestMapBlocks OnRequestMapBlocks;
873 public event RequestMapName OnMapNameRequest; 870 public event RequestMapName OnMapNameRequest;
874 public event TeleportLocationRequest OnTeleportLocationRequest; 871 public event TeleportLocationRequest OnTeleportLocationRequest;
@@ -964,10 +961,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
964 961
965 962
966 // voire si c'est necessaire 963 // voire si c'est necessaire
967 public void ActivateGesture(LLUUID assetId, LLUUID gestureId) 964 public void ActivateGesture(UUID assetId, UUID gestureId)
968 { 965 {
969 } 966 }
970 public void DeactivateGesture(LLUUID assetId, LLUUID gestureId) 967 public void DeactivateGesture(UUID assetId, UUID gestureId)
971 { 968 {
972 } 969 }
973 #region Scene/Avatar to Client 970 #region Scene/Avatar to Client
@@ -994,7 +991,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
994 handshake.RegionInfo.WaterHeight = args.waterHeight; 991 handshake.RegionInfo.WaterHeight = args.waterHeight;
995 992
996 handshake.RegionInfo.RegionFlags = args.regionFlags; 993 handshake.RegionInfo.RegionFlags = args.regionFlags;
997 handshake.RegionInfo.SimName = Helpers.StringToField(args.regionName); 994 handshake.RegionInfo.SimName = Utils.StringToBytes(args.regionName);
998 handshake.RegionInfo.SimOwner = args.SimOwner; 995 handshake.RegionInfo.SimOwner = args.SimOwner;
999 handshake.RegionInfo.TerrainBase0 = args.terrainBase0; 996 handshake.RegionInfo.TerrainBase0 = args.terrainBase0;
1000 handshake.RegionInfo.TerrainBase1 = args.terrainBase1; 997 handshake.RegionInfo.TerrainBase1 = args.terrainBase1;
@@ -1004,7 +1001,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1004 handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1; 1001 handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1;
1005 handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; 1002 handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2;
1006 handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; 1003 handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3;
1007 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? 1004 handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting?
1008 1005
1009 OutPacket(handshake, ThrottleOutPacketType.Task); 1006 OutPacket(handshake, ThrottleOutPacketType.Task);
1010 } 1007 }
@@ -1013,7 +1010,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1013 /// 1010 ///
1014 /// </summary> 1011 /// </summary>
1015 /// <param name="regInfo"></param> 1012 /// <param name="regInfo"></param>
1016 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 1013 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
1017 { 1014 {
1018 AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); 1015 AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete);
1019 mov.SimData.ChannelVersion = m_channelVersion; 1016 mov.SimData.ChannelVersion = m_channelVersion;
@@ -1044,14 +1041,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1044 /// <param name="fromPos"></param> 1041 /// <param name="fromPos"></param>
1045 /// <param name="fromName"></param> 1042 /// <param name="fromName"></param>
1046 /// <param name="fromAgentID"></param> 1043 /// <param name="fromAgentID"></param>
1047 public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, 1044 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
1048 LLUUID fromAgentID, byte source, byte audible) 1045 UUID fromAgentID, byte source, byte audible)
1049 { 1046 {
1050 SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible); 1047 SendChatMessage(Utils.StringToBytes(message), type, fromPos, fromName, fromAgentID, source, audible);
1051 } 1048 }
1052 1049
1053 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, 1050 public void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
1054 LLUUID fromAgentID, byte source, byte audible) 1051 UUID fromAgentID, byte source, byte audible)
1055 { 1052 {
1056 ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); 1053 ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator);
1057 reply.ChatData.Audible = audible; 1054 reply.ChatData.Audible = audible;
@@ -1059,7 +1056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1059 reply.ChatData.ChatType = type; 1056 reply.ChatData.ChatType = type;
1060 reply.ChatData.SourceType = source; 1057 reply.ChatData.SourceType = source;
1061 reply.ChatData.Position = fromPos; 1058 reply.ChatData.Position = fromPos;
1062 reply.ChatData.FromName = Helpers.StringToField(fromName); 1059 reply.ChatData.FromName = Utils.StringToBytes(fromName);
1063 reply.ChatData.OwnerID = fromAgentID; 1060 reply.ChatData.OwnerID = fromAgentID;
1064 reply.ChatData.SourceID = fromAgentID; 1061 reply.ChatData.SourceID = fromAgentID;
1065 1062
@@ -1071,8 +1068,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1071 /// </summary> 1068 /// </summary>
1072 /// <param name="message"></param> 1069 /// <param name="message"></param>
1073 /// <param name="target"></param> 1070 /// <param name="target"></param>
1074 public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 1071 public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
1075 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 1072 UUID imSessionID, string fromName, byte dialog, uint timeStamp)
1076 { 1073 {
1077 SendInstantMessage( 1074 SendInstantMessage(
1078 fromAgent, fromAgentSession, message, toAgent, 1075 fromAgent, fromAgentSession, message, toAgent,
@@ -1084,8 +1081,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1084 /// </summary> 1081 /// </summary>
1085 /// <param name="message"></param> 1082 /// <param name="message"></param>
1086 /// <param name="target"></param> 1083 /// <param name="target"></param>
1087 public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 1084 public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
1088 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 1085 UUID imSessionID, string fromName, byte dialog, uint timeStamp,
1089 byte[] binaryBucket) 1086 byte[] binaryBucket)
1090 { 1087 {
1091 if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) 1088 if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
@@ -1095,17 +1092,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1095 1092
1096 msg.AgentData.AgentID = fromAgent; 1093 msg.AgentData.AgentID = fromAgent;
1097 msg.AgentData.SessionID = fromAgentSession; 1094 msg.AgentData.SessionID = fromAgentSession;
1098 msg.MessageBlock.FromAgentName = Helpers.StringToField(fromName); 1095 msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName);
1099 msg.MessageBlock.Dialog = dialog; 1096 msg.MessageBlock.Dialog = dialog;
1100 msg.MessageBlock.FromGroup = false; 1097 msg.MessageBlock.FromGroup = false;
1101 msg.MessageBlock.ID = imSessionID; 1098 msg.MessageBlock.ID = imSessionID;
1102 msg.MessageBlock.Offline = 0; 1099 msg.MessageBlock.Offline = 0;
1103 msg.MessageBlock.ParentEstateID = 0; 1100 msg.MessageBlock.ParentEstateID = 0;
1104 msg.MessageBlock.Position = new LLVector3(); 1101 msg.MessageBlock.Position = new Vector3();
1105 msg.MessageBlock.RegionID = LLUUID.Random(); 1102 msg.MessageBlock.RegionID = UUID.Random();
1106 msg.MessageBlock.Timestamp = timeStamp; 1103 msg.MessageBlock.Timestamp = timeStamp;
1107 msg.MessageBlock.ToAgentID = toAgent; 1104 msg.MessageBlock.ToAgentID = toAgent;
1108 msg.MessageBlock.Message = Helpers.StringToField(message); 1105 msg.MessageBlock.Message = Utils.StringToBytes(message);
1109 msg.MessageBlock.BinaryBucket = binaryBucket; 1106 msg.MessageBlock.BinaryBucket = binaryBucket;
1110 1107
1111 OutPacket(msg, ThrottleOutPacketType.Task); 1108 OutPacket(msg, ThrottleOutPacketType.Task);
@@ -1188,7 +1185,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1188 1185
1189 patches[0] = patchx + 0 + patchy * 16; 1186 patches[0] = patchx + 0 + patchy * 16;
1190 1187
1191 LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches); 1188 LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(map, patches);
1192 layerpack.Header.Zerocoded = true; 1189 layerpack.Header.Zerocoded = true;
1193 1190
1194 OutPacket(layerpack, ThrottleOutPacketType.Land); 1191 OutPacket(layerpack, ThrottleOutPacketType.Land);
@@ -1242,10 +1239,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1242 return agentData; 1239 return agentData;
1243 } 1240 }
1244 1241
1245 public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint, 1242 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint externalIPEndPoint,
1246 string capsURL) 1243 string capsURL)
1247 { 1244 {
1248 LLVector3 look = new LLVector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10); 1245 Vector3 look = new Vector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10);
1249 1246
1250 //CrossedRegionPacket newSimPack = (CrossedRegionPacket)PacketPool.Instance.GetPacket(PacketType.CrossedRegion); 1247 //CrossedRegionPacket newSimPack = (CrossedRegionPacket)PacketPool.Instance.GetPacket(PacketType.CrossedRegion);
1251 CrossedRegionPacket newSimPack = new CrossedRegionPacket(); 1248 CrossedRegionPacket newSimPack = new CrossedRegionPacket();
@@ -1264,7 +1261,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1264 newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; 1261 newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8;
1265 newSimPack.RegionData.SimIP += (uint)byteIP[0]; 1262 newSimPack.RegionData.SimIP += (uint)byteIP[0];
1266 newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; 1263 newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port;
1267 newSimPack.RegionData.SeedCapability = Helpers.StringToField(capsURL); 1264 newSimPack.RegionData.SeedCapability = Utils.StringToBytes(capsURL);
1268 1265
1269 // Hack to get this out immediately and skip throttles 1266 // Hack to get this out immediately and skip throttles
1270 OutPacket(newSimPack, ThrottleOutPacketType.Unknown); 1267 OutPacket(newSimPack, ThrottleOutPacketType.Unknown);
@@ -1289,7 +1286,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1289 mapReply.Data[i].X = mapBlocks2[i].X; 1286 mapReply.Data[i].X = mapBlocks2[i].X;
1290 mapReply.Data[i].Y = mapBlocks2[i].Y; 1287 mapReply.Data[i].Y = mapBlocks2[i].Y;
1291 mapReply.Data[i].WaterHeight = mapBlocks2[i].WaterHeight; 1288 mapReply.Data[i].WaterHeight = mapBlocks2[i].WaterHeight;
1292 mapReply.Data[i].Name = Helpers.StringToField(mapBlocks2[i].Name); 1289 mapReply.Data[i].Name = Utils.StringToBytes(mapBlocks2[i].Name);
1293 mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags; 1290 mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags;
1294 mapReply.Data[i].Access = mapBlocks2[i].Access; 1291 mapReply.Data[i].Access = mapBlocks2[i].Access;
1295 mapReply.Data[i].Agents = mapBlocks2[i].Agents; 1292 mapReply.Data[i].Agents = mapBlocks2[i].Agents;
@@ -1319,7 +1316,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1319 } 1316 }
1320 } 1317 }
1321 1318
1322 public void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) 1319 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
1323 { 1320 {
1324 TeleportLocalPacket tpLocal = (TeleportLocalPacket)PacketPool.Instance.GetPacket(PacketType.TeleportLocal); 1321 TeleportLocalPacket tpLocal = (TeleportLocalPacket)PacketPool.Instance.GetPacket(PacketType.TeleportLocal);
1325 tpLocal.Info.AgentID = AgentId; 1322 tpLocal.Info.AgentID = AgentId;
@@ -1342,7 +1339,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1342 teleport.Info.RegionHandle = regionHandle; 1339 teleport.Info.RegionHandle = regionHandle;
1343 teleport.Info.SimAccess = simAccess; 1340 teleport.Info.SimAccess = simAccess;
1344 1341
1345 teleport.Info.SeedCapability = Helpers.StringToField(capsURL); 1342 teleport.Info.SeedCapability = Utils.StringToBytes(capsURL);
1346 1343
1347 IPAddress oIP = newRegionEndPoint.Address; 1344 IPAddress oIP = newRegionEndPoint.Address;
1348 byte[] byteIP = oIP.GetAddressBytes(); 1345 byte[] byteIP = oIP.GetAddressBytes();
@@ -1367,7 +1364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1367 { 1364 {
1368 TeleportFailedPacket tpFailed = (TeleportFailedPacket)PacketPool.Instance.GetPacket(PacketType.TeleportFailed); 1365 TeleportFailedPacket tpFailed = (TeleportFailedPacket)PacketPool.Instance.GetPacket(PacketType.TeleportFailed);
1369 tpFailed.Info.AgentID = AgentId; 1366 tpFailed.Info.AgentID = AgentId;
1370 tpFailed.Info.Reason = Helpers.StringToField(reason); 1367 tpFailed.Info.Reason = Utils.StringToBytes(reason);
1371 1368
1372 // Hack to get this out immediately and skip throttles 1369 // Hack to get this out immediately and skip throttles
1373 OutPacket(tpFailed, ThrottleOutPacketType.Unknown); 1370 OutPacket(tpFailed, ThrottleOutPacketType.Unknown);
@@ -1386,7 +1383,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1386 OutPacket(tpStart, ThrottleOutPacketType.Unknown); 1383 OutPacket(tpStart, ThrottleOutPacketType.Unknown);
1387 } 1384 }
1388 1385
1389 public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) 1386 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
1390 { 1387 {
1391 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); 1388 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply);
1392 money.MoneyData.AgentID = AgentId; 1389 money.MoneyData.AgentID = AgentId;
@@ -1397,7 +1394,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1397 OutPacket(money, ThrottleOutPacketType.Task); 1394 OutPacket(money, ThrottleOutPacketType.Task);
1398 } 1395 }
1399 1396
1400 public void SendPayPrice(LLUUID objectID, int[] payPrice) 1397 public void SendPayPrice(UUID objectID, int[] payPrice)
1401 { 1398 {
1402 if (payPrice[0] == 0 && 1399 if (payPrice[0] == 0 &&
1403 payPrice[1] == 0 && 1400 payPrice[1] == 0 &&
@@ -1431,7 +1428,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1431 OutPacket(pc, ThrottleOutPacketType.Unknown); 1428 OutPacket(pc, ThrottleOutPacketType.Unknown);
1432 } 1429 }
1433 1430
1434 public void SendKillObject(ulong regionHandle, uint localID) 1431 public void SendKiPrimitive(ulong regionHandle, uint localID)
1435 { 1432 {
1436 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); 1433 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
1437 // TODO: don't create new blocks if recycling an old packet 1434 // TODO: don't create new blocks if recycling an old packet
@@ -1453,7 +1450,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1453 /// <param name="items">The items contained in the folder identified by folderID</param> 1450 /// <param name="items">The items contained in the folder identified by folderID</param>
1454 /// <param name="fetchFolders">Do we need to send folder information?</param> 1451 /// <param name="fetchFolders">Do we need to send folder information?</param>
1455 /// <param name="fetchItems">Do we need to send item information?</param> 1452 /// <param name="fetchItems">Do we need to send item information?</param>
1456 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, 1453 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
1457 List<InventoryFolderBase> folders, 1454 List<InventoryFolderBase> folders,
1458 bool fetchFolders, bool fetchItems) 1455 bool fetchFolders, bool fetchItems)
1459 { 1456 {
@@ -1501,17 +1498,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1501 descend.ItemData[i].AssetID = item.AssetID; 1498 descend.ItemData[i].AssetID = item.AssetID;
1502 descend.ItemData[i].CreatorID = item.Creator; 1499 descend.ItemData[i].CreatorID = item.Creator;
1503 descend.ItemData[i].BaseMask = item.BasePermissions; 1500 descend.ItemData[i].BaseMask = item.BasePermissions;
1504 descend.ItemData[i].Description = Helpers.StringToField(item.Description); 1501 descend.ItemData[i].Description = Utils.StringToBytes(item.Description);
1505 descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; 1502 descend.ItemData[i].EveryoneMask = item.EveryOnePermissions;
1506 descend.ItemData[i].OwnerMask = item.CurrentPermissions; 1503 descend.ItemData[i].OwnerMask = item.CurrentPermissions;
1507 descend.ItemData[i].FolderID = item.Folder; 1504 descend.ItemData[i].FolderID = item.Folder;
1508 descend.ItemData[i].InvType = (sbyte)item.InvType; 1505 descend.ItemData[i].InvType = (sbyte)item.InvType;
1509 descend.ItemData[i].Name = Helpers.StringToField(item.Name); 1506 descend.ItemData[i].Name = Utils.StringToBytes(item.Name);
1510 descend.ItemData[i].NextOwnerMask = item.NextPermissions; 1507 descend.ItemData[i].NextOwnerMask = item.NextPermissions;
1511 descend.ItemData[i].OwnerID = item.Owner; 1508 descend.ItemData[i].OwnerID = item.Owner;
1512 descend.ItemData[i].Type = (sbyte)item.AssetType; 1509 descend.ItemData[i].Type = (sbyte)item.AssetType;
1513 1510
1514 //descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 1511 //descend.ItemData[i].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1515 descend.ItemData[i].GroupID = item.GroupID; 1512 descend.ItemData[i].GroupID = item.GroupID;
1516 descend.ItemData[i].GroupOwned = item.GroupOwned; 1513 descend.ItemData[i].GroupOwned = item.GroupOwned;
1517 descend.ItemData[i].GroupMask = 0; 1514 descend.ItemData[i].GroupMask = 0;
@@ -1585,7 +1582,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1585 { 1582 {
1586 descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock(); 1583 descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock();
1587 descend.FolderData[i].FolderID = folder.ID; 1584 descend.FolderData[i].FolderID = folder.ID;
1588 descend.FolderData[i].Name = Helpers.StringToField(folder.Name); 1585 descend.FolderData[i].Name = Utils.StringToBytes(folder.Name);
1589 descend.FolderData[i].ParentID = folder.ParentID; 1586 descend.FolderData[i].ParentID = folder.ParentID;
1590 descend.FolderData[i].Type = (sbyte)folder.Type; 1587 descend.FolderData[i].Type = (sbyte)folder.Type;
1591 1588
@@ -1621,7 +1618,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1621 } 1618 }
1622 } 1619 }
1623 1620
1624 private InventoryDescendentsPacket CreateInventoryDescendentsPacket(LLUUID ownerID, LLUUID folderID) 1621 private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID)
1625 { 1622 {
1626 InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); 1623 InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents);
1627 descend.Header.Zerocoded = true; 1624 descend.Header.Zerocoded = true;
@@ -1633,7 +1630,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1633 return descend; 1630 return descend;
1634 } 1631 }
1635 1632
1636 public void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) 1633 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1637 { 1634 {
1638 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1635 uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
1639 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply); 1636 FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply);
@@ -1647,17 +1644,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1647 inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; 1644 inventoryReply.InventoryData[0].BaseMask = item.BasePermissions;
1648 inventoryReply.InventoryData[0].CreationDate = 1645 inventoryReply.InventoryData[0].CreationDate =
1649 (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 1646 (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
1650 inventoryReply.InventoryData[0].Description = Helpers.StringToField(item.Description); 1647 inventoryReply.InventoryData[0].Description = Utils.StringToBytes(item.Description);
1651 inventoryReply.InventoryData[0].EveryoneMask = item.EveryOnePermissions; 1648 inventoryReply.InventoryData[0].EveryoneMask = item.EveryOnePermissions;
1652 inventoryReply.InventoryData[0].FolderID = item.Folder; 1649 inventoryReply.InventoryData[0].FolderID = item.Folder;
1653 inventoryReply.InventoryData[0].InvType = (sbyte)item.InvType; 1650 inventoryReply.InventoryData[0].InvType = (sbyte)item.InvType;
1654 inventoryReply.InventoryData[0].Name = Helpers.StringToField(item.Name); 1651 inventoryReply.InventoryData[0].Name = Utils.StringToBytes(item.Name);
1655 inventoryReply.InventoryData[0].NextOwnerMask = item.NextPermissions; 1652 inventoryReply.InventoryData[0].NextOwnerMask = item.NextPermissions;
1656 inventoryReply.InventoryData[0].OwnerID = item.Owner; 1653 inventoryReply.InventoryData[0].OwnerID = item.Owner;
1657 inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions; 1654 inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions;
1658 inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType; 1655 inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType;
1659 1656
1660 //inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 1657 //inventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1661 inventoryReply.InventoryData[0].GroupID = item.GroupID; 1658 inventoryReply.InventoryData[0].GroupID = item.GroupID;
1662 inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned; 1659 inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned;
1663 inventoryReply.InventoryData[0].GroupMask = 0; 1660 inventoryReply.InventoryData[0].GroupMask = 0;
@@ -1686,12 +1683,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1686 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); 1683 = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory);
1687 1684
1688 bulkUpdate.AgentData.AgentID = AgentId; 1685 bulkUpdate.AgentData.AgentID = AgentId;
1689 bulkUpdate.AgentData.TransactionID = LLUUID.Random(); 1686 bulkUpdate.AgentData.TransactionID = UUID.Random();
1690 1687
1691 bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; 1688 bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1];
1692 bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); 1689 bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock();
1693 bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; 1690 bulkUpdate.FolderData[0].FolderID = UUID.Zero;
1694 bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; 1691 bulkUpdate.FolderData[0].ParentID = UUID.Zero;
1695 bulkUpdate.FolderData[0].Type = -1; 1692 bulkUpdate.FolderData[0].Type = -1;
1696 bulkUpdate.FolderData[0].Name = new byte[0]; 1693 bulkUpdate.FolderData[0].Name = new byte[0];
1697 1694
@@ -1702,17 +1699,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1702 bulkUpdate.ItemData[0].CreatorID = item.Creator; 1699 bulkUpdate.ItemData[0].CreatorID = item.Creator;
1703 bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; 1700 bulkUpdate.ItemData[0].BaseMask = item.BasePermissions;
1704 bulkUpdate.ItemData[0].CreationDate = 1000; 1701 bulkUpdate.ItemData[0].CreationDate = 1000;
1705 bulkUpdate.ItemData[0].Description = Helpers.StringToField(item.Description); 1702 bulkUpdate.ItemData[0].Description = Utils.StringToBytes(item.Description);
1706 bulkUpdate.ItemData[0].EveryoneMask = item.EveryOnePermissions; 1703 bulkUpdate.ItemData[0].EveryoneMask = item.EveryOnePermissions;
1707 bulkUpdate.ItemData[0].FolderID = item.Folder; 1704 bulkUpdate.ItemData[0].FolderID = item.Folder;
1708 bulkUpdate.ItemData[0].InvType = (sbyte)item.InvType; 1705 bulkUpdate.ItemData[0].InvType = (sbyte)item.InvType;
1709 bulkUpdate.ItemData[0].Name = Helpers.StringToField(item.Name); 1706 bulkUpdate.ItemData[0].Name = Utils.StringToBytes(item.Name);
1710 bulkUpdate.ItemData[0].NextOwnerMask = item.NextPermissions; 1707 bulkUpdate.ItemData[0].NextOwnerMask = item.NextPermissions;
1711 bulkUpdate.ItemData[0].OwnerID = item.Owner; 1708 bulkUpdate.ItemData[0].OwnerID = item.Owner;
1712 bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions; 1709 bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions;
1713 bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType; 1710 bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType;
1714 1711
1715 //bulkUpdate.ItemData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 1712 //bulkUpdate.ItemData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1716 bulkUpdate.ItemData[0].GroupID = item.GroupID; 1713 bulkUpdate.ItemData[0].GroupID = item.GroupID;
1717 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned; 1714 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
1718 bulkUpdate.ItemData[0].GroupMask = 0; 1715 bulkUpdate.ItemData[0].GroupMask = 0;
@@ -1750,17 +1747,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1750 InventoryReply.InventoryData[0].AssetID = Item.AssetID; 1747 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
1751 InventoryReply.InventoryData[0].CreatorID = Item.Creator; 1748 InventoryReply.InventoryData[0].CreatorID = Item.Creator;
1752 InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; 1749 InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions;
1753 InventoryReply.InventoryData[0].Description = Helpers.StringToField(Item.Description); 1750 InventoryReply.InventoryData[0].Description = Utils.StringToBytes(Item.Description);
1754 InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; 1751 InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions;
1755 InventoryReply.InventoryData[0].FolderID = Item.Folder; 1752 InventoryReply.InventoryData[0].FolderID = Item.Folder;
1756 InventoryReply.InventoryData[0].InvType = (sbyte)Item.InvType; 1753 InventoryReply.InventoryData[0].InvType = (sbyte)Item.InvType;
1757 InventoryReply.InventoryData[0].Name = Helpers.StringToField(Item.Name); 1754 InventoryReply.InventoryData[0].Name = Utils.StringToBytes(Item.Name);
1758 InventoryReply.InventoryData[0].NextOwnerMask = Item.NextPermissions; 1755 InventoryReply.InventoryData[0].NextOwnerMask = Item.NextPermissions;
1759 InventoryReply.InventoryData[0].OwnerID = Item.Owner; 1756 InventoryReply.InventoryData[0].OwnerID = Item.Owner;
1760 InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions; 1757 InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions;
1761 InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType; 1758 InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType;
1762 1759
1763 //InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 1760 //InventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1764 InventoryReply.InventoryData[0].GroupID = Item.GroupID; 1761 InventoryReply.InventoryData[0].GroupID = Item.GroupID;
1765 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned; 1762 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
1766 InventoryReply.InventoryData[0].GroupMask = 0; 1763 InventoryReply.InventoryData[0].GroupMask = 0;
@@ -1781,7 +1778,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1781 OutPacket(InventoryReply, ThrottleOutPacketType.Asset); 1778 OutPacket(InventoryReply, ThrottleOutPacketType.Asset);
1782 } 1779 }
1783 1780
1784 public void SendRemoveInventoryItem(LLUUID itemID) 1781 public void SendRemoveInventoryItem(UUID itemID)
1785 { 1782 {
1786 RemoveInventoryItemPacket remove = (RemoveInventoryItemPacket)PacketPool.Instance.GetPacket(PacketType.RemoveInventoryItem); 1783 RemoveInventoryItemPacket remove = (RemoveInventoryItemPacket)PacketPool.Instance.GetPacket(PacketType.RemoveInventoryItem);
1787 // TODO: don't create new blocks if recycling an old packet 1784 // TODO: don't create new blocks if recycling an old packet
@@ -1807,7 +1804,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1807 OutPacket(scriptcontrol, ThrottleOutPacketType.Task); 1804 OutPacket(scriptcontrol, ThrottleOutPacketType.Task);
1808 } 1805 }
1809 1806
1810 public void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) 1807 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
1811 { 1808 {
1812 ReplyTaskInventoryPacket replytask = (ReplyTaskInventoryPacket)PacketPool.Instance.GetPacket(PacketType.ReplyTaskInventory); 1809 ReplyTaskInventoryPacket replytask = (ReplyTaskInventoryPacket)PacketPool.Instance.GetPacket(PacketType.ReplyTaskInventory);
1813 replytask.InventoryData.TaskID = taskID; 1810 replytask.InventoryData.TaskID = taskID;
@@ -1872,7 +1869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1872 OutPacket(replyPacket, ThrottleOutPacketType.Task); 1869 OutPacket(replyPacket, ThrottleOutPacketType.Task);
1873 } 1870 }
1874 1871
1875 public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 1872 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1876 { 1873 {
1877 1874
1878 m_activeGroupID = activegroupid; 1875 m_activeGroupID = activegroupid;
@@ -1882,11 +1879,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1882 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); 1879 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate);
1883 sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; 1880 sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid;
1884 sendAgentDataUpdate.AgentData.AgentID = agentid; 1881 sendAgentDataUpdate.AgentData.AgentID = agentid;
1885 sendAgentDataUpdate.AgentData.FirstName = Helpers.StringToField(firstname); 1882 sendAgentDataUpdate.AgentData.FirstName = Utils.StringToBytes(firstname);
1886 sendAgentDataUpdate.AgentData.GroupName = Helpers.StringToField(groupname); 1883 sendAgentDataUpdate.AgentData.GroupName = Utils.StringToBytes(groupname);
1887 sendAgentDataUpdate.AgentData.GroupPowers = grouppowers; 1884 sendAgentDataUpdate.AgentData.GroupPowers = grouppowers;
1888 sendAgentDataUpdate.AgentData.GroupTitle = Helpers.StringToField(grouptitle); 1885 sendAgentDataUpdate.AgentData.GroupTitle = Utils.StringToBytes(grouptitle);
1889 sendAgentDataUpdate.AgentData.LastName = Helpers.StringToField(lastname); 1886 sendAgentDataUpdate.AgentData.LastName = Utils.StringToBytes(lastname);
1890 OutPacket(sendAgentDataUpdate, ThrottleOutPacketType.Task); 1887 OutPacket(sendAgentDataUpdate, ThrottleOutPacketType.Task);
1891 } 1888 }
1892 1889
@@ -1898,7 +1895,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1898 public void SendAlertMessage(string message) 1895 public void SendAlertMessage(string message)
1899 { 1896 {
1900 AlertMessagePacket alertPack = (AlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AlertMessage); 1897 AlertMessagePacket alertPack = (AlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AlertMessage);
1901 alertPack.AlertData.Message = Helpers.StringToField(message); 1898 alertPack.AlertData.Message = Utils.StringToBytes(message);
1902 OutPacket(alertPack, ThrottleOutPacketType.Task); 1899 OutPacket(alertPack, ThrottleOutPacketType.Task);
1903 } 1900 }
1904 1901
@@ -1924,46 +1921,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1924 { 1921 {
1925 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); 1922 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage);
1926 alertPack.AgentData.AgentID = AgentId; 1923 alertPack.AgentData.AgentID = AgentId;
1927 alertPack.AlertData.Message = Helpers.StringToField(message); 1924 alertPack.AlertData.Message = Utils.StringToBytes(message);
1928 alertPack.AlertData.Modal = modal; 1925 alertPack.AlertData.Modal = modal;
1929 1926
1930 return alertPack; 1927 return alertPack;
1931 } 1928 }
1932 1929
1933 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, 1930 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
1934 string url) 1931 string url)
1935 { 1932 {
1936 LoadURLPacket loadURL = (LoadURLPacket)PacketPool.Instance.GetPacket(PacketType.LoadURL); 1933 LoadURLPacket loadURL = (LoadURLPacket)PacketPool.Instance.GetPacket(PacketType.LoadURL);
1937 loadURL.Data.ObjectName = Helpers.StringToField(objectname); 1934 loadURL.Data.ObjectName = Utils.StringToBytes(objectname);
1938 loadURL.Data.ObjectID = objectID; 1935 loadURL.Data.ObjectID = objectID;
1939 loadURL.Data.OwnerID = ownerID; 1936 loadURL.Data.OwnerID = ownerID;
1940 loadURL.Data.OwnerIsGroup = groupOwned; 1937 loadURL.Data.OwnerIsGroup = groupOwned;
1941 loadURL.Data.Message = Helpers.StringToField(message); 1938 loadURL.Data.Message = Utils.StringToBytes(message);
1942 loadURL.Data.URL = Helpers.StringToField(url); 1939 loadURL.Data.URL = Utils.StringToBytes(url);
1943 OutPacket(loadURL, ThrottleOutPacketType.Task); 1940 OutPacket(loadURL, ThrottleOutPacketType.Task);
1944 } 1941 }
1945 1942
1946 public void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) 1943 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
1947 { 1944 {
1948 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); 1945 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
1949 dialog.Data.ObjectID = objectID; 1946 dialog.Data.ObjectID = objectID;
1950 dialog.Data.ObjectName = Helpers.StringToField(objectname); 1947 dialog.Data.ObjectName = Utils.StringToBytes(objectname);
1951 dialog.Data.FirstName = Helpers.StringToField(this.FirstName); 1948 dialog.Data.FirstName = Utils.StringToBytes(this.FirstName);
1952 dialog.Data.LastName = Helpers.StringToField(this.LastName); 1949 dialog.Data.LastName = Utils.StringToBytes(this.LastName);
1953 dialog.Data.Message = Helpers.StringToField(msg); 1950 dialog.Data.Message = Utils.StringToBytes(msg);
1954 dialog.Data.ImageID = textureID; 1951 dialog.Data.ImageID = textureID;
1955 dialog.Data.ChatChannel = ch; 1952 dialog.Data.ChatChannel = ch;
1956 ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[buttonlabels.Length]; 1953 ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[buttonlabels.Length];
1957 for (int i = 0; i < buttonlabels.Length; i++) 1954 for (int i = 0; i < buttonlabels.Length; i++)
1958 { 1955 {
1959 buttons[i] = new ScriptDialogPacket.ButtonsBlock(); 1956 buttons[i] = new ScriptDialogPacket.ButtonsBlock();
1960 buttons[i].ButtonLabel = Helpers.StringToField(buttonlabels[i]); 1957 buttons[i].ButtonLabel = Utils.StringToBytes(buttonlabels[i]);
1961 } 1958 }
1962 dialog.Buttons = buttons; 1959 dialog.Buttons = buttons;
1963 OutPacket(dialog, ThrottleOutPacketType.Task); 1960 OutPacket(dialog, ThrottleOutPacketType.Task);
1964 } 1961 }
1965 1962
1966 public void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) 1963 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
1967 { 1964 {
1968 PreloadSoundPacket preSound = (PreloadSoundPacket)PacketPool.Instance.GetPacket(PacketType.PreloadSound); 1965 PreloadSoundPacket preSound = (PreloadSoundPacket)PacketPool.Instance.GetPacket(PacketType.PreloadSound);
1969 // TODO: don't create new blocks if recycling an old packet 1966 // TODO: don't create new blocks if recycling an old packet
@@ -1976,7 +1973,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1976 OutPacket(preSound, ThrottleOutPacketType.Task); 1973 OutPacket(preSound, ThrottleOutPacketType.Task);
1977 } 1974 }
1978 1975
1979 public void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags) 1976 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
1980 { 1977 {
1981 AttachedSoundPacket sound = (AttachedSoundPacket)PacketPool.Instance.GetPacket(PacketType.AttachedSound); 1978 AttachedSoundPacket sound = (AttachedSoundPacket)PacketPool.Instance.GetPacket(PacketType.AttachedSound);
1982 sound.DataBlock.SoundID = soundID; 1979 sound.DataBlock.SoundID = soundID;
@@ -1988,7 +1985,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1988 OutPacket(sound, ThrottleOutPacketType.Task); 1985 OutPacket(sound, ThrottleOutPacketType.Task);
1989 } 1986 }
1990 1987
1991 public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) 1988 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
1992 { 1989 {
1993 SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger); 1990 SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger);
1994 sound.SoundData.SoundID = soundID; 1991 sound.SoundData.SoundID = soundID;
@@ -2002,7 +1999,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2002 OutPacket(sound, ThrottleOutPacketType.Task); 1999 OutPacket(sound, ThrottleOutPacketType.Task);
2003 } 2000 }
2004 2001
2005 public void SendAttachedSoundGainChange(LLUUID objectID, float gain) 2002 public void SendAttachedSoundGainChange(UUID objectID, float gain)
2006 { 2003 {
2007 AttachedSoundGainChangePacket sound = (AttachedSoundGainChangePacket)PacketPool.Instance.GetPacket(PacketType.AttachedSoundGainChange); 2004 AttachedSoundGainChangePacket sound = (AttachedSoundGainChangePacket)PacketPool.Instance.GetPacket(PacketType.AttachedSoundGainChange);
2008 sound.DataBlock.ObjectID = objectID; 2005 sound.DataBlock.ObjectID = objectID;
@@ -2011,7 +2008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2011 OutPacket(sound, ThrottleOutPacketType.Task); 2008 OutPacket(sound, ThrottleOutPacketType.Task);
2012 } 2009 }
2013 2010
2014 public void SendSunPos(LLVector3 Position, LLVector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 2011 public void SendSunPos(Vector3 Position, Vector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
2015 { 2012 {
2016 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); 2013 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage);
2017 viewertime.TimeInfo.SunDirection = Position; 2014 viewertime.TimeInfo.SunDirection = Position;
@@ -2039,7 +2036,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2039 int sunPhase = (phase + 2) / 2; 2036 int sunPhase = (phase + 2) / 2;
2040 if ((sunPhase < 6) || (sunPhase > 36)) 2037 if ((sunPhase < 6) || (sunPhase > 36))
2041 { 2038 {
2042 viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f); 2039 viewertime.TimeInfo.SunDirection = new Vector3(0f, 0.8f, -0.8f);
2043 Console.WriteLine("sending night"); 2040 Console.WriteLine("sending night");
2044 } 2041 }
2045 else 2042 else
@@ -2067,37 +2064,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2067 { 2064 {
2068 yValue *= -1; 2065 yValue *= -1;
2069 } 2066 }
2070 viewertime.TimeInfo.SunDirection = new LLVector3(0f, yValue, 0.3f); 2067 viewertime.TimeInfo.SunDirection = new Vector3(0f, yValue, 0.3f);
2071 Console.WriteLine("sending sun update " + yValue); 2068 Console.WriteLine("sending sun update " + yValue);
2072 } 2069 }
2073 viewertime.TimeInfo.SunAngVelocity = new LLVector3(0, 0.0f, 10.0f); 2070 viewertime.TimeInfo.SunAngVelocity = new Vector3(0, 0.0f, 10.0f);
2074 viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); 2071 viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch();
2075 viewertime.Header.Reliable = false; 2072 viewertime.Header.Reliable = false;
2076 OutPacket(viewertime, ThrottleOutPacketType.Task); 2073 OutPacket(viewertime, ThrottleOutPacketType.Task);
2077 */ 2074 */
2078 } 2075 }
2079 2076
2080 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 2077 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
2081 string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, 2078 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
2082 LLUUID partnerID) 2079 UUID partnerID)
2083 { 2080 {
2084 AvatarPropertiesReplyPacket avatarReply = (AvatarPropertiesReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarPropertiesReply); 2081 AvatarPropertiesReplyPacket avatarReply = (AvatarPropertiesReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarPropertiesReply);
2085 avatarReply.AgentData.AgentID = AgentId; 2082 avatarReply.AgentData.AgentID = AgentId;
2086 avatarReply.AgentData.AvatarID = avatarID; 2083 avatarReply.AgentData.AvatarID = avatarID;
2087 if (aboutText != null) 2084 if (aboutText != null)
2088 avatarReply.PropertiesData.AboutText = Helpers.StringToField(aboutText); 2085 avatarReply.PropertiesData.AboutText = Utils.StringToBytes(aboutText);
2089 else 2086 else
2090 avatarReply.PropertiesData.AboutText = Helpers.StringToField(""); 2087 avatarReply.PropertiesData.AboutText = Utils.StringToBytes("");
2091 avatarReply.PropertiesData.BornOn = Helpers.StringToField(bornOn); 2088 avatarReply.PropertiesData.BornOn = Utils.StringToBytes(bornOn);
2092 avatarReply.PropertiesData.CharterMember = charterMember; 2089 avatarReply.PropertiesData.CharterMember = charterMember;
2093 if (flAbout != null) 2090 if (flAbout != null)
2094 avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(flAbout); 2091 avatarReply.PropertiesData.FLAboutText = Utils.StringToBytes(flAbout);
2095 else 2092 else
2096 avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(""); 2093 avatarReply.PropertiesData.FLAboutText = Utils.StringToBytes("");
2097 avatarReply.PropertiesData.Flags = flags; 2094 avatarReply.PropertiesData.Flags = flags;
2098 avatarReply.PropertiesData.FLImageID = flImageID; 2095 avatarReply.PropertiesData.FLImageID = flImageID;
2099 avatarReply.PropertiesData.ImageID = imageID; 2096 avatarReply.PropertiesData.ImageID = imageID;
2100 avatarReply.PropertiesData.ProfileURL = Helpers.StringToField(profileURL); 2097 avatarReply.PropertiesData.ProfileURL = Utils.StringToBytes(profileURL);
2101 avatarReply.PropertiesData.PartnerID = partnerID; 2098 avatarReply.PropertiesData.PartnerID = partnerID;
2102 OutPacket(avatarReply, ThrottleOutPacketType.Task); 2099 OutPacket(avatarReply, ThrottleOutPacketType.Task);
2103 } 2100 }
@@ -2140,7 +2137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2140 /// <param name="agentID"></param> 2137 /// <param name="agentID"></param>
2141 /// <param name="visualParams"></param> 2138 /// <param name="visualParams"></param>
2142 /// <param name="textureEntry"></param> 2139 /// <param name="textureEntry"></param>
2143 public void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) 2140 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
2144 { 2141 {
2145 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); 2142 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance);
2146 // TODO: don't create new blocks if recycling an old packet 2143 // TODO: don't create new blocks if recycling an old packet
@@ -2160,7 +2157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2160 OutPacket(avp, ThrottleOutPacketType.Task); 2157 OutPacket(avp, ThrottleOutPacketType.Task);
2161 } 2158 }
2162 2159
2163 public void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) 2160 public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
2164 { 2161 {
2165 AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); 2162 AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation);
2166 // TODO: don't create new blocks if recycling an old packet 2163 // TODO: don't create new blocks if recycling an old packet
@@ -2194,8 +2191,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2194 /// <param name="avatarID"></param> 2191 /// <param name="avatarID"></param>
2195 /// <param name="avatarLocalID"></param> 2192 /// <param name="avatarLocalID"></param>
2196 /// <param name="Pos"></param> 2193 /// <param name="Pos"></param>
2197 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, 2194 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
2198 uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) 2195 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
2199 { 2196 {
2200 ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); 2197 ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
2201 // TODO: don't create new blocks if recycling an old packet 2198 // TODO: don't create new blocks if recycling an old packet
@@ -2209,9 +2206,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2209 objupdate.ObjectData[0].FullID = avatarID; 2206 objupdate.ObjectData[0].FullID = avatarID;
2210 objupdate.ObjectData[0].ParentID = parentID; 2207 objupdate.ObjectData[0].ParentID = parentID;
2211 objupdate.ObjectData[0].NameValue = 2208 objupdate.ObjectData[0].NameValue =
2212 Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName); 2209 Utils.StringToBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName);
2213 2210
2214 LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); 2211 Vector3 pos2 = new Vector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
2215 byte[] pb = pos2.GetBytes(); 2212 byte[] pb = pos2.GetBytes();
2216 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); 2213 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
2217 2214
@@ -2230,11 +2227,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2230 /// <param name="localID"></param> 2227 /// <param name="localID"></param>
2231 /// <param name="position"></param> 2228 /// <param name="position"></param>
2232 /// <param name="velocity"></param> 2229 /// <param name="velocity"></param>
2233 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 2230 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
2234 LLVector3 velocity, LLQuaternion rotation) 2231 Vector3 velocity, Quaternion rotation)
2235 { 2232 {
2236 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2233 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2237 rotation = LLQuaternion.Identity; 2234 rotation = Quaternion.Identity;
2238 2235
2239 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = 2236 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
2240 CreateAvatarImprovedBlock(localID, position, velocity, rotation); 2237 CreateAvatarImprovedBlock(localID, position, velocity, rotation);
@@ -2251,7 +2248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2251 OutPacket(terse, ThrottleOutPacketType.Task); 2248 OutPacket(terse, ThrottleOutPacketType.Task);
2252 } 2249 }
2253 2250
2254 public void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) 2251 public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
2255 { 2252 {
2256 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); 2253 CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate);
2257 // TODO: don't create new blocks if recycling an old packet 2254 // TODO: don't create new blocks if recycling an old packet
@@ -2286,7 +2283,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2286 /// <param name="localID"></param> 2283 /// <param name="localID"></param>
2287 /// <param name="rotation"></param> 2284 /// <param name="rotation"></param>
2288 /// <param name="attachPoint"></param> 2285 /// <param name="attachPoint"></param>
2289 public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 2286 public void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
2290 { 2287 {
2291 2288
2292 ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); 2289 ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach);
@@ -2305,8 +2302,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2305 2302
2306 public void SendPrimitiveToClient( 2303 public void SendPrimitiveToClient(
2307 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 2304 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
2308 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 2305 Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
2309 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 2306 uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
2310 uint parentID, byte[] particleSystem, byte clickAction) 2307 uint parentID, byte[] particleSystem, byte clickAction)
2311 { 2308 {
2312 byte[] textureanim = new byte[0]; 2309 byte[] textureanim = new byte[0];
@@ -2314,19 +2311,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2314 SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel, 2311 SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel,
2315 acc, rotation, rvel, flags, 2312 acc, rotation, rvel, flags,
2316 objectID, ownerID, text, color, parentID, particleSystem, 2313 objectID, ownerID, text, color, parentID, particleSystem,
2317 clickAction, textureanim, false, (uint)0, LLUUID.Zero, LLUUID.Zero, 0, 0, 0); 2314 clickAction, textureanim, false, (uint)0, UUID.Zero, UUID.Zero, 0, 0, 0);
2318 } 2315 }
2319 2316
2320 public void SendPrimitiveToClient( 2317 public void SendPrimitiveToClient(
2321 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 2318 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
2322 LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, 2319 Vector3 pos, Vector3 velocity, Vector3 acceleration, Quaternion rotation, Vector3 rotational_velocity,
2323 uint flags, 2320 uint flags,
2324 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, 2321 UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
2325 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId, LLUUID SoundId, double SoundGain, byte SoundFlags, double SoundRadius) 2322 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundGain, byte SoundFlags, double SoundRadius)
2326 { 2323 {
2327 2324
2328 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2325 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2329 rotation = LLQuaternion.Identity; 2326 rotation = Quaternion.Identity;
2330 2327
2331 ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); 2328 ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
2332 2329
@@ -2344,13 +2341,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2344 outPacket.ObjectData[0].OwnerID = ownerID; 2341 outPacket.ObjectData[0].OwnerID = ownerID;
2345 2342
2346 // Anything more than 254 will cause libsecondlife to barf 2343 // Anything more than 254 will cause libsecondlife to barf
2347 // (libsl 1550) adds an \0 on the Helpers.StringToField conversion if it isn't present 2344 // (libsl 1550) adds an \0 on the Utils.StringToBytes conversion if it isn't present
2348 if (text.Length > 254) 2345 if (text.Length > 254)
2349 { 2346 {
2350 text = text.Remove(254); 2347 text = text.Remove(254);
2351 } 2348 }
2352 2349
2353 outPacket.ObjectData[0].Text = Helpers.StringToField(text); 2350 outPacket.ObjectData[0].Text = Utils.StringToBytes(text);
2354 2351
2355 outPacket.ObjectData[0].TextColor[0] = color[0]; 2352 outPacket.ObjectData[0].TextColor[0] = color[0];
2356 outPacket.ObjectData[0].TextColor[1] = color[1]; 2353 outPacket.ObjectData[0].TextColor[1] = color[1];
@@ -2364,21 +2361,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2364 if (attachment) 2361 if (attachment)
2365 { 2362 {
2366 // Necessary??? 2363 // Necessary???
2367 outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); 2364 outPacket.ObjectData[0].JointAxisOrAnchor = new Vector3(0, 0, 2);
2368 outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); 2365 outPacket.ObjectData[0].JointPivot = new Vector3(0, 0, 0);
2369 2366
2370 // Item from inventory??? 2367 // Item from inventory???
2371 outPacket.ObjectData[0].NameValue = 2368 outPacket.ObjectData[0].NameValue =
2372 Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); 2369 Utils.StringToBytes("AttachItemID STRING RW SV " + AssetId.Guid);
2373 outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16)); 2370 outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16));
2374 } 2371 }
2375 2372
2376 // Xantor 20080528: Send sound info as well 2373 // Xantor 20080528: Send sound info as well
2377 // Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again 2374 // Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again
2378 outPacket.ObjectData[0].Sound = SoundId; 2375 outPacket.ObjectData[0].Sound = SoundId;
2379 if (SoundId == LLUUID.Zero) 2376 if (SoundId == UUID.Zero)
2380 { 2377 {
2381 outPacket.ObjectData[0].OwnerID = LLUUID.Zero; 2378 outPacket.ObjectData[0].OwnerID = UUID.Zero;
2382 outPacket.ObjectData[0].Gain = 0.0f; 2379 outPacket.ObjectData[0].Gain = 0.0f;
2383 outPacket.ObjectData[0].Radius = 0.0f; 2380 outPacket.ObjectData[0].Radius = 0.0f;
2384 outPacket.ObjectData[0].Flags = 0; 2381 outPacket.ObjectData[0].Flags = 0;
@@ -2420,11 +2417,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2420 /// <param name="localID"></param> 2417 /// <param name="localID"></param>
2421 /// <param name="position"></param> 2418 /// <param name="position"></param>
2422 /// <param name="rotation"></param> 2419 /// <param name="rotation"></param>
2423 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 2420 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
2424 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId) 2421 Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId)
2425 { 2422 {
2426 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2423 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2427 rotation = LLQuaternion.Identity; 2424 rotation = Quaternion.Identity;
2428 ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); 2425 ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
2429 // TODO: don't create new blocks if recycling an old packet 2426 // TODO: don't create new blocks if recycling an old packet
2430 terse.RegionData.RegionHandle = regionHandle; 2427 terse.RegionData.RegionHandle = regionHandle;
@@ -2436,11 +2433,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2436 OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); 2433 OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
2437 } 2434 }
2438 2435
2439 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 2436 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
2440 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity) 2437 Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity)
2441 { 2438 {
2442 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2439 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2443 rotation = LLQuaternion.Identity; 2440 rotation = Quaternion.Identity;
2444 ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); 2441 ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
2445 // TODO: don't create new blocks if recycling an old packet 2442 // TODO: don't create new blocks if recycling an old packet
2446 terse.RegionData.RegionHandle = regionHandle; 2443 terse.RegionData.RegionHandle = regionHandle;
@@ -2452,7 +2449,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2452 OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); 2449 OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority);
2453 } 2450 }
2454 2451
2455 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) 2452 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
2456 { 2453 {
2457 AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); 2454 AssetUploadCompletePacket newPack = new AssetUploadCompletePacket();
2458 newPack.AssetBlock.Type = AssetType; 2455 newPack.AssetBlock.Type = AssetType;
@@ -2462,7 +2459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2462 OutPacket(newPack, ThrottleOutPacketType.Asset); 2459 OutPacket(newPack, ThrottleOutPacketType.Asset);
2463 } 2460 }
2464 2461
2465 public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) 2462 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
2466 { 2463 {
2467 RequestXferPacket newPack = new RequestXferPacket(); 2464 RequestXferPacket newPack = new RequestXferPacket();
2468 newPack.XferID.ID = XferID; 2465 newPack.XferID.ID = XferID;
@@ -2483,7 +2480,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2483 OutPacket(newPack, ThrottleOutPacketType.Asset); 2480 OutPacket(newPack, ThrottleOutPacketType.Asset);
2484 } 2481 }
2485 2482
2486 public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 2483 public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
2487 { 2484 {
2488 ImageDataPacket im = new ImageDataPacket(); 2485 ImageDataPacket im = new ImageDataPacket();
2489 im.Header.Reliable = false; 2486 im.Header.Reliable = false;
@@ -2510,10 +2507,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2510 OutPacket(pack, ThrottleOutPacketType.Task); 2507 OutPacket(pack, ThrottleOutPacketType.Task);
2511 } 2508 }
2512 2509
2513 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 2510 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
2514 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 2511 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
2515 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, 2512 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
2516 LLUUID LastOwnerID, string ObjectName, string Description) 2513 UUID LastOwnerID, string ObjectName, string Description)
2517 { 2514 {
2518 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); 2515 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
2519 // TODO: don't create new blocks if recycling an old packet 2516 // TODO: don't create new blocks if recycling an old packet
@@ -2535,16 +2532,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2535 objPropDB.SalePrice = SalePrice; 2532 objPropDB.SalePrice = SalePrice;
2536 objPropDB.Category = Category; 2533 objPropDB.Category = Category;
2537 objPropDB.LastOwnerID = LastOwnerID; 2534 objPropDB.LastOwnerID = LastOwnerID;
2538 objPropDB.Name = Helpers.StringToField(ObjectName); 2535 objPropDB.Name = Utils.StringToBytes(ObjectName);
2539 objPropDB.Description = Helpers.StringToField(Description); 2536 objPropDB.Description = Utils.StringToBytes(Description);
2540 objPropFamilyPack.ObjectData = objPropDB; 2537 objPropFamilyPack.ObjectData = objPropDB;
2541 objPropFamilyPack.Header.Zerocoded = true; 2538 objPropFamilyPack.Header.Zerocoded = true;
2542 OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); 2539 OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task);
2543 } 2540 }
2544 2541
2545 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 2542 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
2546 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 2543 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
2547 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 2544 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
2548 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 2545 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
2549 uint BaseMask, byte saleType, int salePrice) 2546 uint BaseMask, byte saleType, int salePrice)
2550 { 2547 {
@@ -2562,15 +2559,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2562 proper.ObjectData[0].InventorySerial = InventorySerial; 2559 proper.ObjectData[0].InventorySerial = InventorySerial;
2563 2560
2564 proper.ObjectData[0].LastOwnerID = LastOwnerUUID; 2561 proper.ObjectData[0].LastOwnerID = LastOwnerUUID;
2565 // proper.ObjectData[0].LastOwnerID = LLUUID.Zero; 2562 // proper.ObjectData[0].LastOwnerID = UUID.Zero;
2566 2563
2567 proper.ObjectData[0].ObjectID = ObjectUUID; 2564 proper.ObjectData[0].ObjectID = ObjectUUID;
2568 proper.ObjectData[0].OwnerID = OwnerUUID; 2565 proper.ObjectData[0].OwnerID = OwnerUUID;
2569 proper.ObjectData[0].TouchName = Helpers.StringToField(TouchTitle); 2566 proper.ObjectData[0].TouchName = Utils.StringToBytes(TouchTitle);
2570 proper.ObjectData[0].TextureID = TextureID; 2567 proper.ObjectData[0].TextureID = TextureID;
2571 proper.ObjectData[0].SitName = Helpers.StringToField(SitTitle); 2568 proper.ObjectData[0].SitName = Utils.StringToBytes(SitTitle);
2572 proper.ObjectData[0].Name = Helpers.StringToField(ItemName); 2569 proper.ObjectData[0].Name = Utils.StringToBytes(ItemName);
2573 proper.ObjectData[0].Description = Helpers.StringToField(ItemDescription); 2570 proper.ObjectData[0].Description = Utils.StringToBytes(ItemDescription);
2574 proper.ObjectData[0].OwnerMask = OwnerMask; 2571 proper.ObjectData[0].OwnerMask = OwnerMask;
2575 proper.ObjectData[0].NextOwnerMask = NextOwnerMask; 2572 proper.ObjectData[0].NextOwnerMask = NextOwnerMask;
2576 proper.ObjectData[0].GroupMask = GroupMask; 2573 proper.ObjectData[0].GroupMask = GroupMask;
@@ -2591,7 +2588,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2591 2588
2592 private bool convertParamStringToBool(byte[] field) 2589 private bool convertParamStringToBool(byte[] field)
2593 { 2590 {
2594 string s = Helpers.FieldToUTF8String(field); 2591 string s = Utils.BytesToString(field);
2595 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") 2592 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
2596 { 2593 {
2597 return true; 2594 return true;
@@ -2599,14 +2596,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2599 return false; 2596 return false;
2600 } 2597 }
2601 2598
2602 public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) 2599 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
2603 { 2600 {
2604 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2601 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2605 packet.AgentData.TransactionID = LLUUID.Random(); 2602 packet.AgentData.TransactionID = UUID.Random();
2606 packet.AgentData.AgentID = this.AgentId; 2603 packet.AgentData.AgentID = this.AgentId;
2607 packet.AgentData.SessionID = this.SessionId; 2604 packet.AgentData.SessionID = this.SessionId;
2608 packet.MethodData.Invoice = invoice; 2605 packet.MethodData.Invoice = invoice;
2609 packet.MethodData.Method = Helpers.StringToField("setaccess"); 2606 packet.MethodData.Method = Utils.StringToBytes("setaccess");
2610 2607
2611 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; 2608 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length];
2612 2609
@@ -2616,12 +2613,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2616 } 2613 }
2617 int j = 0; 2614 int j = 0;
2618 2615
2619 returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; 2616 returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++;
2620 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; 2617 returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++;
2621 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2618 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2622 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2619 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2623 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2620 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2624 returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++; 2621 returnblock[j].Parameter = Utils.StringToBytes(EstateManagers.Length.ToString()); j++;
2625 for (int i = 0; i < EstateManagers.Length; i++) 2622 for (int i = 0; i < EstateManagers.Length; i++)
2626 { 2623 {
2627 returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; 2624 returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++;
@@ -2631,25 +2628,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2631 this.OutPacket(packet, ThrottleOutPacketType.Task); 2628 this.OutPacket(packet, ThrottleOutPacketType.Task);
2632 } 2629 }
2633 2630
2634 public void SendBannedUserList(LLUUID invoice, EstateBan[] bl, uint estateID) 2631 public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
2635 { 2632 {
2636 List<LLUUID>BannedUsers = new List<LLUUID>(); 2633 List<UUID>BannedUsers = new List<UUID>();
2637 2634
2638 for (int i = 0; i < bl.Length; i++) 2635 for (int i = 0; i < bl.Length; i++)
2639 { 2636 {
2640 if (bl[i] == null) 2637 if (bl[i] == null)
2641 continue; 2638 continue;
2642 if (bl[i].bannedUUID == LLUUID.Zero) 2639 if (bl[i].bannedUUID == UUID.Zero)
2643 continue; 2640 continue;
2644 BannedUsers.Add(bl[i].bannedUUID); 2641 BannedUsers.Add(bl[i].bannedUUID);
2645 } 2642 }
2646 2643
2647 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2644 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2648 packet.AgentData.TransactionID = LLUUID.Random(); 2645 packet.AgentData.TransactionID = UUID.Random();
2649 packet.AgentData.AgentID = this.AgentId; 2646 packet.AgentData.AgentID = this.AgentId;
2650 packet.AgentData.SessionID = this.SessionId; 2647 packet.AgentData.SessionID = this.SessionId;
2651 packet.MethodData.Invoice = invoice; 2648 packet.MethodData.Invoice = invoice;
2652 packet.MethodData.Method = Helpers.StringToField("setaccess"); 2649 packet.MethodData.Method = Utils.StringToBytes("setaccess");
2653 2650
2654 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; 2651 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count];
2655 2652
@@ -2659,14 +2656,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2659 } 2656 }
2660 int j = 0; 2657 int j = 0;
2661 2658
2662 returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; 2659 returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++;
2663 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; 2660 returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++;
2664 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2661 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2665 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2662 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2666 returnblock[j].Parameter = Helpers.StringToField(BannedUsers.Count.ToString()); j++; 2663 returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++;
2667 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2664 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
2668 2665
2669 foreach (LLUUID banned in BannedUsers) 2666 foreach (UUID banned in BannedUsers)
2670 { 2667 {
2671 returnblock[j].Parameter = banned.GetBytes(); j++; 2668 returnblock[j].Parameter = banned.GetBytes(); j++;
2672 } 2669 }
@@ -2696,34 +2693,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2696 rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit; 2693 rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit;
2697 rinfoblk.UseEstateSun = args.useEstateSun; 2694 rinfoblk.UseEstateSun = args.useEstateSun;
2698 rinfoblk.WaterHeight = args.waterHeight; 2695 rinfoblk.WaterHeight = args.waterHeight;
2699 rinfoblk.SimName = Helpers.StringToField(args.simName); 2696 rinfoblk.SimName = Utils.StringToBytes(args.simName);
2700 2697
2701 rinfopack.RegionInfo = rinfoblk; 2698 rinfopack.RegionInfo = rinfoblk;
2702 2699
2703 this.OutPacket(rinfopack, ThrottleOutPacketType.Task); 2700 this.OutPacket(rinfopack, ThrottleOutPacketType.Task);
2704 } 2701 }
2705 2702
2706 public void SendEstateCovenantInformation(LLUUID covenant) 2703 public void SendEstateCovenantInformation(UUID covenant)
2707 { 2704 {
2708 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 2705 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
2709 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 2706 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
2710 edata.CovenantID = covenant; 2707 edata.CovenantID = covenant;
2711 edata.CovenantTimestamp = 0; 2708 edata.CovenantTimestamp = 0;
2712 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 2709 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
2713 edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 2710 edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
2714 else 2711 else
2715 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 2712 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
2716 edata.EstateName = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.EstateName); 2713 edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName);
2717 einfopack.Data = edata; 2714 einfopack.Data = edata;
2718 this.OutPacket(einfopack, ThrottleOutPacketType.Task); 2715 this.OutPacket(einfopack, ThrottleOutPacketType.Task);
2719 } 2716 }
2720 2717
2721 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) 2718 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail)
2722 { 2719 {
2723 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2720 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2724 packet.MethodData.Invoice = invoice; 2721 packet.MethodData.Invoice = invoice;
2725 packet.AgentData.TransactionID = LLUUID.Random(); 2722 packet.AgentData.TransactionID = UUID.Random();
2726 packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); 2723 packet.MethodData.Method = Utils.StringToBytes("estateupdateinfo");
2727 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[10]; 2724 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[10];
2728 2725
2729 for (int i = 0; i < 10; i++) 2726 for (int i = 0; i < 10; i++)
@@ -2732,22 +2729,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2732 } 2729 }
2733 2730
2734 //Sending Estate Settings 2731 //Sending Estate Settings
2735 returnblock[0].Parameter = Helpers.StringToField(estateName); 2732 returnblock[0].Parameter = Utils.StringToBytes(estateName);
2736 // TODO: remove this cruft once MasterAvatar is fully deprecated 2733 // TODO: remove this cruft once MasterAvatar is fully deprecated
2737 // 2734 //
2738 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 2735 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
2739 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.EstateOwner.ToString()); 2736 returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateOwner.ToString());
2740 else 2737 else
2741 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); 2738 returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString());
2742 returnblock[2].Parameter = Helpers.StringToField(estateID.ToString()); 2739 returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString());
2743 2740
2744 returnblock[3].Parameter = Helpers.StringToField(estateFlags.ToString()); 2741 returnblock[3].Parameter = Utils.StringToBytes(estateFlags.ToString());
2745 returnblock[4].Parameter = Helpers.StringToField(sunPosition.ToString()); 2742 returnblock[4].Parameter = Utils.StringToBytes(sunPosition.ToString());
2746 returnblock[5].Parameter = Helpers.StringToField(parentEstate.ToString()); 2743 returnblock[5].Parameter = Utils.StringToBytes(parentEstate.ToString());
2747 returnblock[6].Parameter = Helpers.StringToField(covenant.ToString()); 2744 returnblock[6].Parameter = Utils.StringToBytes(covenant.ToString());
2748 returnblock[7].Parameter = Helpers.StringToField("1160895077"); // what is this? 2745 returnblock[7].Parameter = Utils.StringToBytes("1160895077"); // what is this?
2749 returnblock[8].Parameter = Helpers.StringToField("1"); // what is this? 2746 returnblock[8].Parameter = Utils.StringToBytes("1"); // what is this?
2750 returnblock[9].Parameter = Helpers.StringToField(abuseEmail); 2747 returnblock[9].Parameter = Utils.StringToBytes(abuseEmail);
2751 2748
2752 packet.ParamList = returnblock; 2749 packet.ParamList = returnblock;
2753 packet.Header.Reliable = false; 2750 packet.Header.Reliable = false;
@@ -2783,7 +2780,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2783 2780
2784 updatePacket.ParcelData.Bitmap = landData.Bitmap; 2781 updatePacket.ParcelData.Bitmap = landData.Bitmap;
2785 2782
2786 updatePacket.ParcelData.Desc = Helpers.StringToField(landData.Description); 2783 updatePacket.ParcelData.Desc = Utils.StringToBytes(landData.Description);
2787 updatePacket.ParcelData.Category = (byte)landData.Category; 2784 updatePacket.ParcelData.Category = (byte)landData.Category;
2788 updatePacket.ParcelData.ClaimDate = landData.ClaimDate; 2785 updatePacket.ParcelData.ClaimDate = landData.ClaimDate;
2789 updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; 2786 updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice;
@@ -2802,9 +2799,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2802 } 2799 }
2803 updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; 2800 updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale;
2804 updatePacket.ParcelData.MediaID = landData.MediaID; 2801 updatePacket.ParcelData.MediaID = landData.MediaID;
2805 updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.MediaURL); 2802 updatePacket.ParcelData.MediaURL = Utils.StringToBytes(landData.MediaURL);
2806 updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.MusicURL); 2803 updatePacket.ParcelData.MusicURL = Utils.StringToBytes(landData.MusicURL);
2807 updatePacket.ParcelData.Name = Helpers.StringToField(landData.Name); 2804 updatePacket.ParcelData.Name = Utils.StringToBytes(landData.Name);
2808 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented 2805 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
2809 updatePacket.ParcelData.OtherCount = 0; //unemplemented 2806 updatePacket.ParcelData.OtherCount = 0; //unemplemented
2810 updatePacket.ParcelData.OtherPrims = landData.OtherPrims; 2807 updatePacket.ParcelData.OtherPrims = landData.OtherPrims;
@@ -2851,7 +2848,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2851 remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task); 2848 remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task);
2852 } 2849 }
2853 2850
2854 public void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 2851 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
2855 { 2852 {
2856 ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); 2853 ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply);
2857 replyPacket.Data.AgentID = this.AgentId; 2854 replyPacket.Data.AgentID = this.AgentId;
@@ -2860,7 +2857,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2860 replyPacket.Data.SequenceID = 0; 2857 replyPacket.Data.SequenceID = 0;
2861 2858
2862 List<ParcelAccessListReplyPacket.ListBlock> list = new List<ParcelAccessListReplyPacket.ListBlock>(); 2859 List<ParcelAccessListReplyPacket.ListBlock> list = new List<ParcelAccessListReplyPacket.ListBlock>();
2863 foreach (LLUUID avatar in avatars) 2860 foreach (UUID avatar in avatars)
2864 { 2861 {
2865 ParcelAccessListReplyPacket.ListBlock block = new ParcelAccessListReplyPacket.ListBlock(); 2862 ParcelAccessListReplyPacket.ListBlock block = new ParcelAccessListReplyPacket.ListBlock();
2866 block.Flags = accessFlag; 2863 block.Flags = accessFlag;
@@ -2913,7 +2910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2913 } 2910 }
2914 } 2911 }
2915 2912
2916 public void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) 2913 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
2917 { 2914 {
2918 int notifyCount = ownersAndCount.Count; 2915 int notifyCount = ownersAndCount.Count;
2919 ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); 2916 ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply);
@@ -2933,7 +2930,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2933 = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; 2930 = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount];
2934 2931
2935 int num = 0; 2932 int num = 0;
2936 foreach (LLUUID owner in ownersAndCount.Keys) 2933 foreach (UUID owner in ownersAndCount.Keys)
2937 { 2934 {
2938 dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); 2935 dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock();
2939 dataBlock[num].Count = ownersAndCount[owner]; 2936 dataBlock[num].Count = ownersAndCount[owner];
@@ -2959,9 +2956,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2959 2956
2960 #region Helper Methods 2957 #region Helper Methods
2961 2958
2962 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, 2959 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, Vector3 pos,
2963 LLVector3 velocity, 2960 Vector3 velocity,
2964 LLQuaternion rotation) 2961 Quaternion rotation)
2965 { 2962 {
2966 byte[] bytes = new byte[60]; 2963 byte[] bytes = new byte[60];
2967 int i = 0; 2964 int i = 0;
@@ -2992,13 +2989,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2992 internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); 2989 internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z);
2993 2990
2994 internDirec = internDirec / 128.0f; 2991 internDirec = internDirec / 128.0f;
2995 internDirec.x += 1; 2992 internDirec.X += 1;
2996 internDirec.y += 1; 2993 internDirec.Y += 1;
2997 internDirec.z += 1; 2994 internDirec.Z += 1;
2998 2995
2999 InternVelocityX = (ushort)(32768 * internDirec.x); 2996 InternVelocityX = (ushort)(32768 * internDirec.X);
3000 InternVelocityY = (ushort)(32768 * internDirec.y); 2997 InternVelocityY = (ushort)(32768 * internDirec.Y);
3001 InternVelocityZ = (ushort)(32768 * internDirec.z); 2998 InternVelocityZ = (ushort)(32768 * internDirec.Z);
3002 2999
3003 ushort ac = 32767; 3000 ushort ac = 32767;
3004 bytes[i++] = (byte)(InternVelocityX % 256); 3001 bytes[i++] = (byte)(InternVelocityX % 256);
@@ -3054,10 +3051,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3054 /// <param name="rotation"></param> 3051 /// <param name="rotation"></param>
3055 /// <returns></returns> 3052 /// <returns></returns>
3056 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, 3053 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID,
3057 LLVector3 position, 3054 Vector3 position,
3058 LLQuaternion rotation, 3055 Quaternion rotation,
3059 LLVector3 velocity, 3056 Vector3 velocity,
3060 LLVector3 rotationalvelocity, 3057 Vector3 rotationalvelocity,
3061 byte state) 3058 byte state)
3062 { 3059 {
3063 uint ID = localID; 3060 uint ID = localID;
@@ -3082,13 +3079,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3082 Vector3 vel = new Vector3(velocity.X, velocity.Y, velocity.Z); 3079 Vector3 vel = new Vector3(velocity.X, velocity.Y, velocity.Z);
3083 3080
3084 vel = vel / 128.0f; 3081 vel = vel / 128.0f;
3085 vel.x += 1; 3082 vel.X += 1;
3086 vel.y += 1; 3083 vel.Y += 1;
3087 vel.z += 1; 3084 vel.Z += 1;
3088 //vel 3085 //vel
3089 velx = (ushort)(32768 * (vel.x)); 3086 velx = (ushort)(32768 * (vel.X));
3090 vely = (ushort)(32768 * (vel.y)); 3087 vely = (ushort)(32768 * (vel.Y));
3091 velz = (ushort)(32768 * (vel.z)); 3088 velz = (ushort)(32768 * (vel.Z));
3092 3089
3093 bytes[i++] = (byte)(velx % 256); 3090 bytes[i++] = (byte)(velx % 256);
3094 bytes[i++] = (byte)((velx >> 8) % 256); 3091 bytes[i++] = (byte)((velx >> 8) % 256);
@@ -3126,13 +3123,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3126 Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z); 3123 Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z);
3127 3124
3128 rvel = rvel / 128.0f; 3125 rvel = rvel / 128.0f;
3129 rvel.x += 1; 3126 rvel.X += 1;
3130 rvel.y += 1; 3127 rvel.Y += 1;
3131 rvel.z += 1; 3128 rvel.Z += 1;
3132 //vel 3129 //vel
3133 rvelx = (ushort)(32768 * (rvel.x)); 3130 rvelx = (ushort)(32768 * (rvel.X));
3134 rvely = (ushort)(32768 * (rvel.y)); 3131 rvely = (ushort)(32768 * (rvel.Y));
3135 rvelz = (ushort)(32768 * (rvel.z)); 3132 rvelz = (ushort)(32768 * (rvel.Z));
3136 3133
3137 bytes[i++] = (byte)(rvelx % 256); 3134 bytes[i++] = (byte)(rvelx % 256);
3138 bytes[i++] = (byte)((rvelx >> 8) % 256); 3135 bytes[i++] = (byte)((rvelx >> 8) % 256);
@@ -3204,11 +3201,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3204 objdata.NameValue = new byte[0]; 3201 objdata.NameValue = new byte[0];
3205 objdata.Text = new byte[0]; 3202 objdata.Text = new byte[0];
3206 objdata.TextColor = new byte[4]; 3203 objdata.TextColor = new byte[4];
3207 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); 3204 objdata.JointAxisOrAnchor = new Vector3(0, 0, 0);
3208 objdata.JointPivot = new LLVector3(0, 0, 0); 3205 objdata.JointPivot = new Vector3(0, 0, 0);
3209 objdata.Material = 3; 3206 objdata.Material = 3;
3210 objdata.TextureAnim = new byte[0]; 3207 objdata.TextureAnim = new byte[0];
3211 objdata.Sound = LLUUID.Zero; 3208 objdata.Sound = UUID.Zero;
3212 objdata.State = 0; 3209 objdata.State = 0;
3213 objdata.Data = new byte[0]; 3210 objdata.Data = new byte[0];
3214 3211
@@ -3224,7 +3221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3224 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) 3221 public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
3225 { 3222 {
3226 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); 3223 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock();
3227 // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); 3224 // new OpenMetaverse.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
3228 3225
3229 SetDefaultAvatarPacketValues(ref objdata); 3226 SetDefaultAvatarPacketValues(ref objdata);
3230 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); 3227 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
@@ -3233,18 +3230,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3233 objdata.PathScaleX = 100; 3230 objdata.PathScaleX = 100;
3234 objdata.PathScaleY = 100; 3231 objdata.PathScaleY = 100;
3235 objdata.ParentID = 0; 3232 objdata.ParentID = 0;
3236 objdata.OwnerID = LLUUID.Zero; 3233 objdata.OwnerID = UUID.Zero;
3237 objdata.Scale = new LLVector3(1, 1, 1); 3234 objdata.Scale = new Vector3(1, 1, 1);
3238 objdata.PCode = (byte)PCode.Avatar; 3235 objdata.PCode = (byte)PCode.Avatar;
3239 if (textureEntry != null) 3236 if (textureEntry != null)
3240 { 3237 {
3241 objdata.TextureEntry = textureEntry; 3238 objdata.TextureEntry = textureEntry;
3242 } 3239 }
3243 LLVector3 pos = new LLVector3(objdata.ObjectData, 16); 3240 Vector3 pos = new Vector3(objdata.ObjectData, 16);
3244 pos.X = 100f; 3241 pos.X = 100f;
3245 objdata.ID = 8880000; 3242 objdata.ID = 8880000;
3246 objdata.NameValue = Helpers.StringToField("FirstName STRING RW SV Test \nLastName STRING RW SV User "); 3243 objdata.NameValue = Utils.StringToBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User ");
3247 //LLVector3 pos2 = new LLVector3(100f, 100f, 23f); 3244 //Vector3 pos2 = new Vector3(100f, 100f, 23f);
3248 //objdata.FullID=user.AgentId; 3245 //objdata.FullID=user.AgentId;
3249 byte[] pb = pos.GetBytes(); 3246 byte[] pb = pos.GetBytes();
3250 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); 3247 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);
@@ -3264,12 +3261,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3264 objdata.NameValue = new byte[0]; 3261 objdata.NameValue = new byte[0];
3265 objdata.Text = new byte[0]; 3262 objdata.Text = new byte[0];
3266 objdata.TextColor = new byte[4]; 3263 objdata.TextColor = new byte[4];
3267 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); 3264 objdata.JointAxisOrAnchor = new Vector3(0, 0, 0);
3268 objdata.JointPivot = new LLVector3(0, 0, 0); 3265 objdata.JointPivot = new Vector3(0, 0, 0);
3269 objdata.Material = 4; 3266 objdata.Material = 4;
3270 objdata.TextureAnim = new byte[0]; 3267 objdata.TextureAnim = new byte[0];
3271 objdata.Sound = LLUUID.Zero; 3268 objdata.Sound = UUID.Zero;
3272 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); 3269 Primitive.TextureEntry ntex = new Primitive.TextureEntry(new UUID("00000000-0000-0000-5005-000000000005"));
3273 objdata.TextureEntry = ntex.ToBytes(); 3270 objdata.TextureEntry = ntex.ToBytes();
3274 3271
3275 objdata.State = 0; 3272 objdata.State = 0;
@@ -3285,15 +3282,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3285 objdata.ObjectData[64] = 189; 3282 objdata.ObjectData[64] = 189;
3286 } 3283 }
3287 3284
3288 public void SendNameReply(LLUUID profileId, string firstname, string lastname) 3285 public void SendNameReply(UUID profileId, string firstname, string lastname)
3289 { 3286 {
3290 UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply); 3287 UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply);
3291 // TODO: don't create new blocks if recycling an old packet 3288 // TODO: don't create new blocks if recycling an old packet
3292 packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1]; 3289 packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1];
3293 packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock(); 3290 packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock();
3294 packet.UUIDNameBlock[0].ID = profileId; 3291 packet.UUIDNameBlock[0].ID = profileId;
3295 packet.UUIDNameBlock[0].FirstName = Helpers.StringToField(firstname); 3292 packet.UUIDNameBlock[0].FirstName = Utils.StringToBytes(firstname);
3296 packet.UUIDNameBlock[0].LastName = Helpers.StringToField(lastname); 3293 packet.UUIDNameBlock[0].LastName = Utils.StringToBytes(lastname);
3297 3294
3298 OutPacket(packet, ThrottleOutPacketType.Task); 3295 OutPacket(packet, ThrottleOutPacketType.Task);
3299 } 3296 }
@@ -3382,7 +3379,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3382 { 3379 {
3383 for (int i = 0; i < ogpack.ObjectData.Length; i++) 3380 for (int i = 0; i < ogpack.ObjectData.Length; i++)
3384 { 3381 {
3385 handlerObjectGroupRequest(this, ogpack.AgentData.GroupID, ogpack.ObjectData[i].ObjectLocalID, LLUUID.Zero); 3382 handlerObjectGroupRequest(this, ogpack.AgentData.GroupID, ogpack.ObjectData[i].ObjectLocalID, UUID.Zero);
3386 } 3383 }
3387 } 3384 }
3388 return true; 3385 return true;
@@ -3415,7 +3412,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3415 return true; 3412 return true;
3416 } 3413 }
3417 3414
3418 public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) 3415 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
3419 { 3416 {
3420 ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); 3417 ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion);
3421 scriptQuestion.Data = new ScriptQuestionPacket.DataBlock(); 3418 scriptQuestion.Data = new ScriptQuestionPacket.DataBlock();
@@ -3423,8 +3420,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3423 scriptQuestion.Data.TaskID = taskID; 3420 scriptQuestion.Data.TaskID = taskID;
3424 scriptQuestion.Data.ItemID = itemID; 3421 scriptQuestion.Data.ItemID = itemID;
3425 scriptQuestion.Data.Questions = question; 3422 scriptQuestion.Data.Questions = question;
3426 scriptQuestion.Data.ObjectName = Helpers.StringToField(taskName); 3423 scriptQuestion.Data.ObjectName = Utils.StringToBytes(taskName);
3427 scriptQuestion.Data.ObjectOwner = Helpers.StringToField(ownerName); 3424 scriptQuestion.Data.ObjectOwner = Utils.StringToBytes(ownerName);
3428 3425
3429 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 3426 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
3430 } 3427 }
@@ -3433,11 +3430,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3433 { 3430 {
3434 } 3431 }
3435 3432
3436 public LLUUID GetDefaultAnimation(string name) 3433 public UUID GetDefaultAnimation(string name)
3437 { 3434 {
3438 if (m_defaultAnimations.ContainsKey(name)) 3435 if (m_defaultAnimations.ContainsKey(name))
3439 return m_defaultAnimations[name]; 3436 return m_defaultAnimations[name];
3440 return LLUUID.Zero; 3437 return UUID.Zero;
3441 } 3438 }
3442 3439
3443 /// <summary> 3440 /// <summary>
@@ -3496,7 +3493,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3496 { 3493 {
3497 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 3494 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
3498 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; 3495 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
3499 cachedresp.WearableData[i].TextureID = LLUUID.Zero; 3496 cachedresp.WearableData[i].TextureID = UUID.Zero;
3500 cachedresp.WearableData[i].HostName = new byte[0]; 3497 cachedresp.WearableData[i].HostName = new byte[0];
3501 } 3498 }
3502 3499
@@ -3526,19 +3523,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3526 if (part == null) 3523 if (part == null)
3527 { 3524 {
3528 // It's a ghost! tell the client to delete it from view. 3525 // It's a ghost! tell the client to delete it from view.
3529 simClient.SendKillObject(Scene.RegionInfo.RegionHandle, 3526 simClient.SendKiPrimitive(Scene.RegionInfo.RegionHandle,
3530 localId); 3527 localId);
3531 } 3528 }
3532 else 3529 else
3533 { 3530 {
3534 // LLUUID partId = part.UUID; 3531 // UUID partId = part.UUID;
3535 UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; 3532 UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
3536 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; 3533 UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
3537 3534
3538 switch (block.Type) 3535 switch (block.Type)
3539 { 3536 {
3540 case 1: 3537 case 1:
3541 LLVector3 pos1 = new LLVector3(block.Data, 0); 3538 Vector3 pos1 = new Vector3(block.Data, 0);
3542 3539
3543 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; 3540 handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
3544 if (handlerUpdatePrimSinglePosition != null) 3541 if (handlerUpdatePrimSinglePosition != null)
@@ -3548,7 +3545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3548 } 3545 }
3549 break; 3546 break;
3550 case 2: 3547 case 2:
3551 LLQuaternion rot1 = new LLQuaternion(block.Data, 0, true); 3548 Quaternion rot1 = new Quaternion(block.Data, 0, true);
3552 3549
3553 handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; 3550 handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
3554 if (handlerUpdatePrimSingleRotation != null) 3551 if (handlerUpdatePrimSingleRotation != null)
@@ -3559,7 +3556,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3559 break; 3556 break;
3560 case 3: 3557 case 3:
3561 3558
3562 LLQuaternion rot2 = new LLQuaternion(block.Data, 12, true); 3559 Quaternion rot2 = new Quaternion(block.Data, 12, true);
3563 handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; 3560 handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
3564 if (handlerUpdatePrimSingleRotation != null) 3561 if (handlerUpdatePrimSingleRotation != null)
3565 { 3562 {
@@ -3569,8 +3566,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3569 break; 3566 break;
3570 case 5: 3567 case 5:
3571 3568
3572 LLVector3 scale1 = new LLVector3(block.Data, 12); 3569 Vector3 scale1 = new Vector3(block.Data, 12);
3573 LLVector3 pos11 = new LLVector3(block.Data, 0); 3570 Vector3 pos11 = new Vector3(block.Data, 0);
3574 3571
3575 handlerUpdatePrimScale = OnUpdatePrimScale; 3572 handlerUpdatePrimScale = OnUpdatePrimScale;
3576 if (handlerUpdatePrimScale != null) 3573 if (handlerUpdatePrimScale != null)
@@ -3586,7 +3583,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3586 } 3583 }
3587 break; 3584 break;
3588 case 9: 3585 case 9:
3589 LLVector3 pos2 = new LLVector3(block.Data, 0); 3586 Vector3 pos2 = new Vector3(block.Data, 0);
3590 3587
3591 handlerUpdateVector = OnUpdatePrimGroupPosition; 3588 handlerUpdateVector = OnUpdatePrimGroupPosition;
3592 3589
@@ -3597,7 +3594,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3597 } 3594 }
3598 break; 3595 break;
3599 case 10: 3596 case 10:
3600 LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); 3597 Quaternion rot3 = new Quaternion(block.Data, 0, true);
3601 3598
3602 handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; 3599 handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
3603 if (handlerUpdatePrimRotation != null) 3600 if (handlerUpdatePrimRotation != null)
@@ -3607,8 +3604,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3607 } 3604 }
3608 break; 3605 break;
3609 case 11: 3606 case 11:
3610 LLVector3 pos3 = new LLVector3(block.Data, 0); 3607 Vector3 pos3 = new Vector3(block.Data, 0);
3611 LLQuaternion rot4 = new LLQuaternion(block.Data, 12, true); 3608 Quaternion rot4 = new Quaternion(block.Data, 12, true);
3612 3609
3613 handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; 3610 handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
3614 if (handlerUpdatePrimGroupRotation != null) 3611 if (handlerUpdatePrimGroupRotation != null)
@@ -3619,8 +3616,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3619 } 3616 }
3620 break; 3617 break;
3621 case 13: 3618 case 13:
3622 LLVector3 scale2 = new LLVector3(block.Data, 12); 3619 Vector3 scale2 = new Vector3(block.Data, 12);
3623 LLVector3 pos4 = new LLVector3(block.Data, 0); 3620 Vector3 pos4 = new Vector3(block.Data, 0);
3624 3621
3625 handlerUpdatePrimScale = OnUpdatePrimScale; 3622 handlerUpdatePrimScale = OnUpdatePrimScale;
3626 if (handlerUpdatePrimScale != null) 3623 if (handlerUpdatePrimScale != null)
@@ -3638,8 +3635,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3638 } 3635 }
3639 break; 3636 break;
3640 case 29: 3637 case 29:
3641 LLVector3 scale5 = new LLVector3(block.Data, 12); 3638 Vector3 scale5 = new Vector3(block.Data, 12);
3642 LLVector3 pos5 = new LLVector3(block.Data, 0); 3639 Vector3 pos5 = new Vector3(block.Data, 0);
3643 3640
3644 handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; 3641 handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
3645 if (handlerUpdatePrimGroupScale != null) 3642 if (handlerUpdatePrimGroupScale != null)
@@ -3655,8 +3652,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3655 } 3652 }
3656 break; 3653 break;
3657 case 21: 3654 case 21:
3658 LLVector3 scale6 = new LLVector3(block.Data, 12); 3655 Vector3 scale6 = new Vector3(block.Data, 12);
3659 LLVector3 pos6 = new LLVector3(block.Data, 0); 3656 Vector3 pos6 = new Vector3(block.Data, 0);
3660 3657
3661 handlerUpdatePrimScale = OnUpdatePrimScale; 3658 handlerUpdatePrimScale = OnUpdatePrimScale;
3662 if (handlerUpdatePrimScale != null) 3659 if (handlerUpdatePrimScale != null)
@@ -3691,7 +3688,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3691 mapReply.LayerData[0].Left = 0; 3688 mapReply.LayerData[0].Left = 0;
3692 mapReply.LayerData[0].Top = 30000; 3689 mapReply.LayerData[0].Top = 30000;
3693 mapReply.LayerData[0].Right = 30000; 3690 mapReply.LayerData[0].Right = 30000;
3694 mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); 3691 mapReply.LayerData[0].ImageID = new UUID("00000000-0000-1111-9999-000000000006");
3695 mapReply.Header.Zerocoded = true; 3692 mapReply.Header.Zerocoded = true;
3696 OutPacket(mapReply, ThrottleOutPacketType.Land); 3693 OutPacket(mapReply, ThrottleOutPacketType.Land);
3697 } 3694 }
@@ -3717,7 +3714,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3717 mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); 3714 mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]);
3718 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); 3715 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]);
3719 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); 3716 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]);
3720 mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); 3717 mbReply.Data[iii].MapImageID = new UUID((string)mp["map-image-id"]);
3721 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); 3718 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
3722 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); 3719 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]);
3723 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); 3720 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]);
@@ -3776,7 +3773,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3776 if (m_moneyBalance + debit >= 0) 3773 if (m_moneyBalance + debit >= 0)
3777 { 3774 {
3778 m_moneyBalance += debit; 3775 m_moneyBalance += debit;
3779 SendMoneyBalance(LLUUID.Zero, true, Helpers.StringToField("Poof Poof!"), m_moneyBalance); 3776 SendMoneyBalance(UUID.Zero, true, Utils.StringToBytes("Poof Poof!"), m_moneyBalance);
3780 return true; 3777 return true;
3781 } 3778 }
3782 else 3779 else
@@ -3791,7 +3788,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3791 /// <param name="gmMethod"></param> 3788 /// <param name="gmMethod"></param>
3792 /// <param name="gmInvoice"></param> 3789 /// <param name="gmInvoice"></param>
3793 /// <param name="gmParams"></param> 3790 /// <param name="gmParams"></param>
3794 public void DecipherGenericMessage(string gmMethod, LLUUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams) 3791 public void DecipherGenericMessage(string gmMethod, UUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams)
3795 { 3792 {
3796 switch (gmMethod) 3793 switch (gmMethod)
3797 { 3794 {
@@ -3804,9 +3801,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3804 try 3801 try
3805 { 3802 {
3806 Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); 3803 Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
3807 locx = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[0].Parameter)) - (float)regionX; 3804 locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - (float)regionX;
3808 locy = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[1].Parameter)) - (float)regionY; 3805 locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - (float)regionY;
3809 locz = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[2].Parameter)); 3806 locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
3810 } 3807 }
3811 catch (InvalidCastException) 3808 catch (InvalidCastException)
3812 { 3809 {
@@ -3817,7 +3814,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3817 handlerAutoPilotGo = OnAutoPilotGo; 3814 handlerAutoPilotGo = OnAutoPilotGo;
3818 if (handlerAutoPilotGo != null) 3815 if (handlerAutoPilotGo != null)
3819 { 3816 {
3820 handlerAutoPilotGo(0, new LLVector3(locx, locy, locz), this); 3817 handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this);
3821 } 3818 }
3822 m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz); 3819 m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz);
3823 3820
@@ -3839,7 +3836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3839 /// Entryway from the client to the simulator 3836 /// Entryway from the client to the simulator
3840 /// all UDP packets from the client will end up here 3837 /// all UDP packets from the client will end up here
3841 /// </summary> 3838 /// </summary>
3842 /// <param name="Pack">libsecondlife.packet</param> 3839 /// <param name="Pack">OpenMetaverse.packet</param>
3843 public void ProcessInPacket(Packet Pack) 3840 public void ProcessInPacket(Packet Pack)
3844 { 3841 {
3845 // check if we've got a local packet handler for this packet.type. See RegisterLocalPacketHandlers() 3842 // check if we've got a local packet handler for this packet.type. See RegisterLocalPacketHandlers()
@@ -3858,7 +3855,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3858 case PacketType.GenericMessage: 3855 case PacketType.GenericMessage:
3859 GenericMessagePacket gmpack = (GenericMessagePacket)Pack; 3856 GenericMessagePacket gmpack = (GenericMessagePacket)Pack;
3860 3857
3861 DecipherGenericMessage(Helpers.FieldToUTF8String(gmpack.MethodData.Method), gmpack.MethodData.Invoice, gmpack.ParamList); 3858 DecipherGenericMessage(Utils.BytesToString(gmpack.MethodData.Method), gmpack.MethodData.Invoice, gmpack.ParamList);
3862 3859
3863 break; 3860 break;
3864 case PacketType.AvatarPropertiesRequest: 3861 case PacketType.AvatarPropertiesRequest:
@@ -3877,8 +3874,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3877 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname; 3874 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname;
3878 byte[] message = inchatpack.ChatData.Message; 3875 byte[] message = inchatpack.ChatData.Message;
3879 byte type = inchatpack.ChatData.Type; 3876 byte type = inchatpack.ChatData.Type;
3880 LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; 3877 Vector3 fromPos = new Vector3(); // ClientAvatar.Pos;
3881 // LLUUID fromAgentID = AgentId; 3878 // UUID fromAgentID = AgentId;
3882 3879
3883 int channel = inchatpack.ChatData.Channel; 3880 int channel = inchatpack.ChatData.Channel;
3884 3881
@@ -3887,7 +3884,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3887 OSChatMessage args = new OSChatMessage(); 3884 OSChatMessage args = new OSChatMessage();
3888 args.Channel = channel; 3885 args.Channel = channel;
3889 args.From = fromName; 3886 args.From = fromName;
3890 args.Message = Helpers.FieldToUTF8String(message); 3887 args.Message = Utils.BytesToString(message);
3891 args.Type = (ChatTypeEnum)type; 3888 args.Type = (ChatTypeEnum)type;
3892 args.Position = fromPos; 3889 args.Position = fromPos;
3893 3890
@@ -3908,8 +3905,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3908 AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; 3905 AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData;
3909 UserProfileData UserProfile = new UserProfileData(); 3906 UserProfileData UserProfile = new UserProfileData();
3910 UserProfile.ID = AgentId; 3907 UserProfile.ID = AgentId;
3911 UserProfile.AboutText = Helpers.FieldToUTF8String(Properties.AboutText); 3908 UserProfile.AboutText = Utils.BytesToString(Properties.AboutText);
3912 UserProfile.FirstLifeAboutText = Helpers.FieldToUTF8String(Properties.FLAboutText); 3909 UserProfile.FirstLifeAboutText = Utils.BytesToString(Properties.FLAboutText);
3913 UserProfile.FirstLifeImage = Properties.FLImageID; 3910 UserProfile.FirstLifeImage = Properties.FLImageID;
3914 UserProfile.Image = Properties.ImageID; 3911 UserProfile.Image = Properties.ImageID;
3915 3912
@@ -3926,9 +3923,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3926 OSChatMessage args = new OSChatMessage(); 3923 OSChatMessage args = new OSChatMessage();
3927 args.Channel = ch; 3924 args.Channel = ch;
3928 args.From = String.Empty; 3925 args.From = String.Empty;
3929 args.Message = Helpers.FieldToUTF8String(msg); 3926 args.Message = Utils.BytesToString(msg);
3930 args.Type = ChatTypeEnum.Shout; 3927 args.Type = ChatTypeEnum.Shout;
3931 args.Position = new LLVector3(); 3928 args.Position = new Vector3();
3932 args.Scene = Scene; 3929 args.Scene = Scene;
3933 args.Sender = this; 3930 args.Sender = this;
3934 handlerChatFromViewer2 = OnChatFromViewer; 3931 handlerChatFromViewer2 = OnChatFromViewer;
@@ -3940,7 +3937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3940 case PacketType.ImprovedInstantMessage: 3937 case PacketType.ImprovedInstantMessage:
3941 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; 3938 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
3942 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 3939 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
3943 string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); 3940 string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message);
3944 handlerInstantMessage = OnInstantMessage; 3941 handlerInstantMessage = OnInstantMessage;
3945 3942
3946 if (handlerInstantMessage != null) 3943 if (handlerInstantMessage != null)
@@ -3959,10 +3956,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3959 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack; 3956 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack;
3960 3957
3961 // My guess is this is the folder to stick the calling card into 3958 // My guess is this is the folder to stick the calling card into
3962 List<LLUUID> callingCardFolders = new List<LLUUID>(); 3959 List<UUID> callingCardFolders = new List<UUID>();
3963 3960
3964 LLUUID agentID = afriendpack.AgentData.AgentID; 3961 UUID agentID = afriendpack.AgentData.AgentID;
3965 LLUUID transactionID = afriendpack.TransactionBlock.TransactionID; 3962 UUID transactionID = afriendpack.TransactionBlock.TransactionID;
3966 3963
3967 for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) 3964 for (int fi = 0; fi < afriendpack.FolderData.Length; fi++)
3968 { 3965 {
@@ -3977,8 +3974,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3977 break; 3974 break;
3978 case PacketType.TerminateFriendship: 3975 case PacketType.TerminateFriendship:
3979 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; 3976 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
3980 LLUUID listOwnerAgentID = tfriendpack.AgentData.AgentID; 3977 UUID listOwnerAgentID = tfriendpack.AgentData.AgentID;
3981 LLUUID exFriendID = tfriendpack.ExBlock.OtherID; 3978 UUID exFriendID = tfriendpack.ExBlock.OtherID;
3982 3979
3983 handlerTerminateFriendship = OnTerminateFriendship; 3980 handlerTerminateFriendship = OnTerminateFriendship;
3984 if (handlerTerminateFriendship != null) 3981 if (handlerTerminateFriendship != null)
@@ -4130,8 +4127,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4130 { 4127 {
4131 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; 4128 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack;
4132 4129
4133 LLUUID itemID = detachtoInv.ObjectData.ItemID; 4130 UUID itemID = detachtoInv.ObjectData.ItemID;
4134 // LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; 4131 // UUID ATTACH_agentID = detachtoInv.ObjectData.AgentID;
4135 4132
4136 handlerDetachAttachmentIntoInv(itemID, this); 4133 handlerDetachAttachmentIntoInv(itemID, this);
4137 } 4134 }
@@ -4266,13 +4263,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4266 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 4263 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
4267 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; 4264 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
4268 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; 4265 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data;
4269 //Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); 4266 //Console.WriteLine("Agent Sends:" + Utils.BytesToString(querydata.Name));
4270 4267
4271 handlerAvatarPickerRequest = OnAvatarPickerRequest; 4268 handlerAvatarPickerRequest = OnAvatarPickerRequest;
4272 if (handlerAvatarPickerRequest != null) 4269 if (handlerAvatarPickerRequest != null)
4273 { 4270 {
4274 handlerAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, 4271 handlerAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID,
4275 Helpers.FieldToUTF8String(querydata.Name)); 4272 Utils.BytesToString(querydata.Name));
4276 } 4273 }
4277 break; 4274 break;
4278 case PacketType.AgentDataUpdateRequest: 4275 case PacketType.AgentDataUpdateRequest:
@@ -4613,8 +4610,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4613 { 4610 {
4614 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; 4611 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack;
4615 4612
4616 LLUUID AgentID = newobjPerms.AgentData.AgentID; 4613 UUID AgentID = newobjPerms.AgentData.AgentID;
4617 LLUUID SessionID = newobjPerms.AgentData.SessionID; 4614 UUID SessionID = newobjPerms.AgentData.SessionID;
4618 4615
4619 handlerObjectPermissions = null; 4616 handlerObjectPermissions = null;
4620 4617
@@ -4654,7 +4651,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4654 { 4651 {
4655 for (int i = 0; i < undoitem.ObjectData.Length; i++) 4652 for (int i = 0; i < undoitem.ObjectData.Length; i++)
4656 { 4653 {
4657 LLUUID objiD = undoitem.ObjectData[i].ObjectID; 4654 UUID objiD = undoitem.ObjectData[i].ObjectID;
4658 handlerOnUndo = OnUndo; 4655 handlerOnUndo = OnUndo;
4659 if (handlerOnUndo != null) 4656 if (handlerOnUndo != null)
4660 { 4657 {
@@ -4762,15 +4759,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4762 // 4759 //
4763 if (transfer.TransferInfo.SourceType == 3) 4760 if (transfer.TransferInfo.SourceType == 3)
4764 { 4761 {
4765 LLUUID taskID = null; 4762 UUID taskID = null;
4766 LLUUID itemID = null; 4763 UUID itemID = null;
4767 LLUUID requestID = null; 4764 UUID requestID = null;
4768 taskID = new LLUUID(transfer.TransferInfo.Params, 48); 4765 taskID = new UUID(transfer.TransferInfo.Params, 48);
4769 itemID = new LLUUID(transfer.TransferInfo.Params, 64); 4766 itemID = new UUID(transfer.TransferInfo.Params, 64);
4770 requestID = new LLUUID(transfer.TransferInfo.Params, 80); 4767 requestID = new UUID(transfer.TransferInfo.Params, 80);
4771 if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) 4768 if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions()))
4772 { 4769 {
4773 if (taskID != LLUUID.Zero) // Prim 4770 if (taskID != UUID.Zero) // Prim
4774 { 4771 {
4775 SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); 4772 SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID);
4776 if (part == null) 4773 if (part == null)
@@ -4831,7 +4828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4831 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 4828 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
4832 // Console.WriteLine("upload request " + Pack.ToString()); 4829 // Console.WriteLine("upload request " + Pack.ToString());
4833 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); 4830 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
4834 LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); 4831 UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
4835 4832
4836 handlerAssetUploadRequest = OnAssetUploadRequest; 4833 handlerAssetUploadRequest = OnAssetUploadRequest;
4837 4834
@@ -5019,7 +5016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5019 //Console.WriteLine(Pack.ToString()); 5016 //Console.WriteLine(Pack.ToString());
5020 /*for (int i = 0; i < update.InventoryData.Length; i++) 5017 /*for (int i = 0; i < update.InventoryData.Length; i++)
5021 { 5018 {
5022 if (update.InventoryData[i].TransactionID != LLUUID.Zero) 5019 if (update.InventoryData[i].TransactionID != UUID.Zero)
5023 { 5020 {
5024 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); 5021 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId));
5025 if (asset != null) 5022 if (asset != null)
@@ -5244,9 +5241,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5244 break; 5241 break;
5245 case PacketType.TeleportLandmarkRequest: 5242 case PacketType.TeleportLandmarkRequest:
5246 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 5243 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
5247 LLUUID lmid = tpReq.Info.LandmarkID; 5244 UUID lmid = tpReq.Info.LandmarkID;
5248 AssetLandmark lm; 5245 AssetLandmark lm;
5249 if (lmid != LLUUID.Zero) 5246 if (lmid != UUID.Zero)
5250 { 5247 {
5251 AssetBase lma = m_assetCache.GetAsset(lmid, false); 5248 AssetBase lma = m_assetCache.GetAsset(lmid, false);
5252 5249
@@ -5441,14 +5438,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5441 5438
5442 args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; 5439 args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID;
5443 args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category; 5440 args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category;
5444 args.Desc = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.Desc); 5441 args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc);
5445 args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; 5442 args.GroupID = parcelPropertiesPacket.ParcelData.GroupID;
5446 args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; 5443 args.LandingType = parcelPropertiesPacket.ParcelData.LandingType;
5447 args.MediaAutoScale = parcelPropertiesPacket.ParcelData.MediaAutoScale; 5444 args.MediaAutoScale = parcelPropertiesPacket.ParcelData.MediaAutoScale;
5448 args.MediaID = parcelPropertiesPacket.ParcelData.MediaID; 5445 args.MediaID = parcelPropertiesPacket.ParcelData.MediaID;
5449 args.MediaURL = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.MediaURL); 5446 args.MediaURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MediaURL);
5450 args.MusicURL = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.MusicURL); 5447 args.MusicURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MusicURL);
5451 args.Name = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.Name); 5448 args.Name = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Name);
5452 args.ParcelFlags = parcelPropertiesPacket.ParcelData.ParcelFlags; 5449 args.ParcelFlags = parcelPropertiesPacket.ParcelData.ParcelFlags;
5453 args.PassHours = parcelPropertiesPacket.ParcelData.PassHours; 5450 args.PassHours = parcelPropertiesPacket.ParcelData.PassHours;
5454 args.PassPrice = parcelPropertiesPacket.ParcelData.PassPrice; 5451 args.PassPrice = parcelPropertiesPacket.ParcelData.PassPrice;
@@ -5504,11 +5501,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5504 5501
5505 ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack; 5502 ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack;
5506 5503
5507 LLUUID[] puserselectedOwnerIDs = new LLUUID[parcelReturnObjects.OwnerIDs.Length]; 5504 UUID[] puserselectedOwnerIDs = new UUID[parcelReturnObjects.OwnerIDs.Length];
5508 for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++) 5505 for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++)
5509 puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID; 5506 puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID;
5510 5507
5511 LLUUID[] puserselectedTaskIDs = new LLUUID[parcelReturnObjects.TaskIDs.Length]; 5508 UUID[] puserselectedTaskIDs = new UUID[parcelReturnObjects.TaskIDs.Length];
5512 5509
5513 for (int parceliterator = 0; parceliterator < parcelReturnObjects.TaskIDs.Length; parceliterator++) 5510 for (int parceliterator = 0; parceliterator < parcelReturnObjects.TaskIDs.Length; parceliterator++)
5514 puserselectedTaskIDs[parceliterator] = parcelReturnObjects.TaskIDs[parceliterator].TaskID; 5511 puserselectedTaskIDs[parceliterator] = parcelReturnObjects.TaskIDs[parceliterator].TaskID;
@@ -5528,7 +5525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5528 case PacketType.EstateOwnerMessage: 5525 case PacketType.EstateOwnerMessage:
5529 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; 5526 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
5530 5527
5531 switch (Helpers.FieldToUTF8String(messagePacket.MethodData.Method)) 5528 switch (Utils.BytesToString(messagePacket.MethodData.Method))
5532 { 5529 {
5533 case "getinfo": 5530 case "getinfo":
5534 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5531 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
@@ -5541,9 +5538,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5541 { 5538 {
5542 OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), 5539 OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
5543 convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), 5540 convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
5544 Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter))), 5541 Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))),
5545 (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)), 5542 (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)),
5546 Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[6].Parameter)), 5543 Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
5547 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); 5544 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
5548 5545
5549 } 5546 }
@@ -5554,11 +5551,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5554// { 5551// {
5555// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 5552// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
5556// { 5553// {
5557// string s = Helpers.FieldToUTF8String(block.Parameter); 5554// string s = Utils.BytesToString(block.Parameter);
5558// string[] splitField = s.Split(' '); 5555// string[] splitField = s.Split(' ');
5559// if (splitField.Length == 2) 5556// if (splitField.Length == 2)
5560// { 5557// {
5561// LLUUID tempUUID = new LLUUID(splitField[1]); 5558// UUID tempUUID = new UUID(splitField[1]);
5562// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID); 5559// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
5563// } 5560// }
5564// } 5561// }
@@ -5569,12 +5566,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5569 { 5566 {
5570 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 5567 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
5571 { 5568 {
5572 string s = Helpers.FieldToUTF8String(block.Parameter); 5569 string s = Utils.BytesToString(block.Parameter);
5573 string[] splitField = s.Split(' '); 5570 string[] splitField = s.Split(' ');
5574 if (splitField.Length == 2) 5571 if (splitField.Length == 2)
5575 { 5572 {
5576 Int16 corner = Convert.ToInt16(splitField[0]); 5573 Int16 corner = Convert.ToInt16(splitField[0]);
5577 LLUUID textureUUID = new LLUUID(splitField[1]); 5574 UUID textureUUID = new UUID(splitField[1]);
5578 5575
5579 OnSetEstateTerrainDetailTexture(this, corner, textureUUID); 5576 OnSetEstateTerrainDetailTexture(this, corner, textureUUID);
5580 } 5577 }
@@ -5587,7 +5584,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5587 { 5584 {
5588 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 5585 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
5589 { 5586 {
5590 string s = Helpers.FieldToUTF8String(block.Parameter); 5587 string s = Utils.BytesToString(block.Parameter);
5591 string[] splitField = s.Split(' '); 5588 string[] splitField = s.Split(' ');
5592 if (splitField.Length == 3) 5589 if (splitField.Length == 3)
5593 { 5590 {
@@ -5615,21 +5612,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5615 try 5612 try
5616 { 5613 {
5617 string tmp; 5614 string tmp;
5618 tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[0].Parameter); 5615 tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
5619 if (!tmp.Contains(".")) tmp += ".00"; 5616 if (!tmp.Contains(".")) tmp += ".00";
5620 float WaterHeight = (float)Convert.ToDecimal(tmp); 5617 float WaterHeight = (float)Convert.ToDecimal(tmp);
5621 tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter); 5618 tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
5622 if (!tmp.Contains(".")) tmp += ".00"; 5619 if (!tmp.Contains(".")) tmp += ".00";
5623 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); 5620 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
5624 tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter); 5621 tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
5625 if (!tmp.Contains(".")) tmp += ".00"; 5622 if (!tmp.Contains(".")) tmp += ".00";
5626 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); 5623 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
5627 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); 5624 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
5628 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); 5625 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
5629 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); 5626 float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter));
5630 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); 5627 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
5631 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); 5628 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
5632 float EstateSunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[8].Parameter)); 5629 float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter));
5633 5630
5634 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); 5631 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
5635 5632
@@ -5649,7 +5646,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5649 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 5646 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
5650 { 5647 {
5651 float timeSeconds = 0; 5648 float timeSeconds = 0;
5652 Helpers.TryParse(Helpers.FieldToUTF8String(block.Parameter), out timeSeconds); 5649 Utils.TryParseSingle(Utils.BytesToString(block.Parameter), out timeSeconds);
5653 timeSeconds = (int)timeSeconds; 5650 timeSeconds = (int)timeSeconds;
5654 OnEstateRestartSimRequest(this, (int)timeSeconds); 5651 OnEstateRestartSimRequest(this, (int)timeSeconds);
5655 5652
@@ -5661,7 +5658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5661 { 5658 {
5662 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 5659 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
5663 { 5660 {
5664 LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter)); 5661 UUID newCovenantID = new UUID(Utils.BytesToString(block.Parameter));
5665 OnEstateChangeCovenantRequest(this, newCovenantID); 5662 OnEstateChangeCovenantRequest(this, newCovenantID);
5666 } 5663 }
5667 } 5664 }
@@ -5669,19 +5666,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5669 case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. 5666 case "estateaccessdelta": // Estate access delta manages the banlist and allow list too.
5670 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5667 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
5671 { 5668 {
5672 int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); 5669 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
5673 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter))); 5670 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
5674 5671
5675 } 5672 }
5676 break; 5673 break;
5677 case "simulatormessage": 5674 case "simulatormessage":
5678 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5675 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
5679 { 5676 {
5680 LLUUID invoice = messagePacket.MethodData.Invoice; 5677 UUID invoice = messagePacket.MethodData.Invoice;
5681 LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); 5678 UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
5682 string SenderName = Helpers.FieldToUTF8String(messagePacket.ParamList[3].Parameter); 5679 string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
5683 string Message = Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter); 5680 string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
5684 LLUUID sessionID = messagePacket.AgentData.SessionID; 5681 UUID sessionID = messagePacket.AgentData.SessionID;
5685 OnSimulatorBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); 5682 OnSimulatorBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message);
5686 } 5683 }
5687 break; 5684 break;
@@ -5690,19 +5687,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5690 { 5687 {
5691 if (messagePacket.ParamList.Length < 5) 5688 if (messagePacket.ParamList.Length < 5)
5692 break; 5689 break;
5693 LLUUID invoice = messagePacket.MethodData.Invoice; 5690 UUID invoice = messagePacket.MethodData.Invoice;
5694 LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); 5691 UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
5695 string SenderName = Helpers.FieldToUTF8String(messagePacket.ParamList[3].Parameter); 5692 string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
5696 string Message = Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter); 5693 string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
5697 LLUUID sessionID = messagePacket.AgentData.SessionID; 5694 UUID sessionID = messagePacket.AgentData.SessionID;
5698 OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); 5695 OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message);
5699 } 5696 }
5700 break; 5697 break;
5701 case "setregiondebug": 5698 case "setregiondebug":
5702 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5699 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
5703 { 5700 {
5704 LLUUID invoice = messagePacket.MethodData.Invoice; 5701 UUID invoice = messagePacket.MethodData.Invoice;
5705 LLUUID SenderID = messagePacket.AgentData.AgentID; 5702 UUID SenderID = messagePacket.AgentData.AgentID;
5706 bool scripted = convertParamStringToBool(messagePacket.ParamList[0].Parameter); 5703 bool scripted = convertParamStringToBool(messagePacket.ParamList[0].Parameter);
5707 bool collisionEvents = convertParamStringToBool(messagePacket.ParamList[1].Parameter); 5704 bool collisionEvents = convertParamStringToBool(messagePacket.ParamList[1].Parameter);
5708 bool physics = convertParamStringToBool(messagePacket.ParamList[2].Parameter); 5705 bool physics = convertParamStringToBool(messagePacket.ParamList[2].Parameter);
@@ -5713,11 +5710,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5713 case "teleporthomeuser": 5710 case "teleporthomeuser":
5714 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5711 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
5715 { 5712 {
5716 LLUUID invoice = messagePacket.MethodData.Invoice; 5713 UUID invoice = messagePacket.MethodData.Invoice;
5717 LLUUID SenderID = messagePacket.AgentData.AgentID; 5714 UUID SenderID = messagePacket.AgentData.AgentID;
5718 LLUUID Prey = LLUUID.Zero; 5715 UUID Prey = UUID.Zero;
5719 5716
5720 Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); 5717 UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey);
5721 5718
5722 OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); 5719 OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey);
5723 } 5720 }
@@ -5750,10 +5747,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5750 case "estatechangeinfo": 5747 case "estatechangeinfo":
5751 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) 5748 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
5752 { 5749 {
5753 LLUUID invoice = messagePacket.MethodData.Invoice; 5750 UUID invoice = messagePacket.MethodData.Invoice;
5754 LLUUID SenderID = messagePacket.AgentData.AgentID; 5751 UUID SenderID = messagePacket.AgentData.AgentID;
5755 UInt32 param1 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); 5752 UInt32 param1 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
5756 UInt32 param2 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); 5753 UInt32 param2 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
5757 5754
5758 handlerEstateChangeInfo = OnEstateChangeInfo; 5755 handlerEstateChangeInfo = OnEstateChangeInfo;
5759 if (handlerEstateChangeInfo != null) 5756 if (handlerEstateChangeInfo != null)
@@ -5774,7 +5771,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5774 handlerLandStatRequest = OnLandStatRequest; 5771 handlerLandStatRequest = OnLandStatRequest;
5775 if (handlerLandStatRequest != null) 5772 if (handlerLandStatRequest != null)
5776 { 5773 {
5777 handlerLandStatRequest(lsrp.RequestData.ParcelLocalID, lsrp.RequestData.ReportType, lsrp.RequestData.RequestFlags, Helpers.FieldToUTF8String(lsrp.RequestData.Filter), this); 5774 handlerLandStatRequest(lsrp.RequestData.ParcelLocalID, lsrp.RequestData.ReportType, lsrp.RequestData.RequestFlags, Utils.BytesToString(lsrp.RequestData.Filter), this);
5778 } 5775 }
5779 //int parcelID, uint reportType, uint requestflags, string filter 5776 //int parcelID, uint reportType, uint requestflags, string filter
5780 5777
@@ -5813,7 +5810,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5813 case PacketType.RequestGodlikePowers: 5810 case PacketType.RequestGodlikePowers:
5814 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; 5811 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
5815 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 5812 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
5816 LLUUID token = rblock.Token; 5813 UUID token = rblock.Token;
5817 5814
5818 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; 5815 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData;
5819 5816
@@ -6086,7 +6083,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6086 shape.PathTaperY = addPacket.ObjectData.PathTaperY; 6083 shape.PathTaperY = addPacket.ObjectData.PathTaperY;
6087 shape.PathTwist = addPacket.ObjectData.PathTwist; 6084 shape.PathTwist = addPacket.ObjectData.PathTwist;
6088 shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; 6085 shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
6089 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f")); 6086 Primitive.TextureEntry ntex = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f"));
6090 shape.TextureEntry = ntex.ToBytes(); 6087 shape.TextureEntry = ntex.ToBytes();
6091 //shape.Textures = ntex; 6088 //shape.Textures = ntex;
6092 return shape; 6089 return shape;
@@ -6099,7 +6096,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6099 /// <param name="fromSessionID"></param> 6096 /// <param name="fromSessionID"></param>
6100 /// <param name="FromAvatarName"></param> 6097 /// <param name="FromAvatarName"></param>
6101 /// <param name="Message"></param> 6098 /// <param name="Message"></param>
6102 public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 6099 public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
6103 { 6100 {
6104 if (!ChildAgentStatus()) 6101 if (!ChildAgentStatus())
6105 SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)1, (uint)Util.UnixTimeSinceEpoch()); 6102 SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)1, (uint)Util.UnixTimeSinceEpoch());
@@ -6122,7 +6119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6122 logReply.AgentData.SessionID = SessionId; 6119 logReply.AgentData.SessionID = SessionId;
6123 logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; 6120 logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1];
6124 logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); 6121 logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock();
6125 logReply.InventoryData[0].ItemID = LLUUID.Zero; 6122 logReply.InventoryData[0].ItemID = UUID.Zero;
6126 6123
6127 OutPacket(logReply, ThrottleOutPacketType.Task); 6124 OutPacket(logReply, ThrottleOutPacketType.Task);
6128 } 6125 }
@@ -6135,7 +6132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6135 OutPacket(healthpacket, ThrottleOutPacketType.Task); 6132 OutPacket(healthpacket, ThrottleOutPacketType.Task);
6136 } 6133 }
6137 6134
6138 public void SendAgentOnline(LLUUID[] agentIDs) 6135 public void SendAgentOnline(UUID[] agentIDs)
6139 { 6136 {
6140 OnlineNotificationPacket onp = new OnlineNotificationPacket(); 6137 OnlineNotificationPacket onp = new OnlineNotificationPacket();
6141 OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length]; 6138 OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length];
@@ -6150,7 +6147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6150 OutPacket(onp, ThrottleOutPacketType.Task); 6147 OutPacket(onp, ThrottleOutPacketType.Task);
6151 } 6148 }
6152 6149
6153 public void SendAgentOffline(LLUUID[] agentIDs) 6150 public void SendAgentOffline(UUID[] agentIDs)
6154 { 6151 {
6155 OfflineNotificationPacket offp = new OfflineNotificationPacket(); 6152 OfflineNotificationPacket offp = new OfflineNotificationPacket();
6156 OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length]; 6153 OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length];
@@ -6165,12 +6162,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6165 OutPacket(offp, ThrottleOutPacketType.Task); 6162 OutPacket(offp, ThrottleOutPacketType.Task);
6166 } 6163 }
6167 6164
6168 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 6165 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
6169 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) 6166 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
6170 { 6167 {
6171 AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); 6168 AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket();
6172 avatarSitResponse.SitObject.ID = TargetID; 6169 avatarSitResponse.SitObject.ID = TargetID;
6173 if (CameraAtOffset != LLVector3.Zero) 6170 if (CameraAtOffset != Vector3.Zero)
6174 { 6171 {
6175 avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; 6172 avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset;
6176 avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; 6173 avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset;
@@ -6183,7 +6180,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6183 OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); 6180 OutPacket(avatarSitResponse, ThrottleOutPacketType.Task);
6184 } 6181 }
6185 6182
6186 public void SendAdminResponse(LLUUID Token, uint AdminLevel) 6183 public void SendAdminResponse(UUID Token, uint AdminLevel)
6187 { 6184 {
6188 GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); 6185 GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket();
6189 GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); 6186 GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock();
@@ -6210,7 +6207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6210 Group.Contribution = GroupMembership[i].contribution; 6207 Group.Contribution = GroupMembership[i].contribution;
6211 Group.GroupID = GroupMembership[i].GroupID; 6208 Group.GroupID = GroupMembership[i].GroupID;
6212 Group.GroupInsigniaID = GroupMembership[i].GroupPicture; 6209 Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
6213 Group.GroupName = Helpers.StringToField(GroupMembership[i].groupName); 6210 Group.GroupName = Utils.StringToBytes(GroupMembership[i].groupName);
6214 Group.GroupPowers = GroupMembership[i].groupPowers; 6211 Group.GroupPowers = GroupMembership[i].groupPowers;
6215 Groups[i] = Group; 6212 Groups[i] = Group;
6216 Groupupdate.GroupData = Groups; 6213 Groupupdate.GroupData = Groups;
@@ -6220,13 +6217,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6220 OutPacket(Groupupdate, ThrottleOutPacketType.Task); 6217 OutPacket(Groupupdate, ThrottleOutPacketType.Task);
6221 6218
6222 } 6219 }
6223 public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) 6220 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
6224 { 6221 {
6225 UUIDGroupNameReplyPacket pack = new UUIDGroupNameReplyPacket(); 6222 UUIDGroupNameReplyPacket pack = new UUIDGroupNameReplyPacket();
6226 UUIDGroupNameReplyPacket.UUIDNameBlockBlock[] uidnameblock = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock[1]; 6223 UUIDGroupNameReplyPacket.UUIDNameBlockBlock[] uidnameblock = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock[1];
6227 UUIDGroupNameReplyPacket.UUIDNameBlockBlock uidnamebloc = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock(); 6224 UUIDGroupNameReplyPacket.UUIDNameBlockBlock uidnamebloc = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock();
6228 uidnamebloc.ID = groupLLUID; 6225 uidnamebloc.ID = groupLLUID;
6229 uidnamebloc.GroupName = Helpers.StringToField(GroupName); 6226 uidnamebloc.GroupName = Utils.StringToBytes(GroupName);
6230 uidnameblock[0] = uidnamebloc; 6227 uidnameblock[0] = uidnamebloc;
6231 pack.UUIDNameBlock = uidnameblock; 6228 pack.UUIDNameBlock = uidnameblock;
6232 OutPacket(pack, ThrottleOutPacketType.Task); 6229 OutPacket(pack, ThrottleOutPacketType.Task);
@@ -6251,15 +6248,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6251 lsrepdb.Score = lsrpia[i].Score; 6248 lsrepdb.Score = lsrpia[i].Score;
6252 lsrepdb.TaskID = lsrpia[i].TaskID; 6249 lsrepdb.TaskID = lsrpia[i].TaskID;
6253 lsrepdb.TaskLocalID = lsrpia[i].TaskLocalID; 6250 lsrepdb.TaskLocalID = lsrpia[i].TaskLocalID;
6254 lsrepdb.TaskName = Helpers.StringToField(lsrpia[i].TaskName); 6251 lsrepdb.TaskName = Utils.StringToBytes(lsrpia[i].TaskName);
6255 lsrepdb.OwnerName = Helpers.StringToField(lsrpia[i].OwnerName); 6252 lsrepdb.OwnerName = Utils.StringToBytes(lsrpia[i].OwnerName);
6256 lsrepdba[i] = lsrepdb; 6253 lsrepdba[i] = lsrepdb;
6257 } 6254 }
6258 lsrp.ReportData = lsrepdba; 6255 lsrp.ReportData = lsrepdba;
6259 OutPacket(lsrp, ThrottleOutPacketType.Task); 6256 OutPacket(lsrp, ThrottleOutPacketType.Task);
6260 } 6257 }
6261 6258
6262 public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) 6259 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
6263 { 6260 {
6264 ScriptRunningReplyPacket scriptRunningReply = new ScriptRunningReplyPacket(); 6261 ScriptRunningReplyPacket scriptRunningReply = new ScriptRunningReplyPacket();
6265 scriptRunningReply.Script.ObjectID = objectID; 6262 scriptRunningReply.Script.ObjectID = objectID;
@@ -6310,8 +6307,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6310 else 6307 else
6311 { 6308 {
6312 int processedLength = 0; 6309 int processedLength = 0;
6313 // libsecondlife hardcodes 1500 as the maximum data chunk size 6310 int maxChunkSize = Settings.MAX_PACKET_SIZE - 100;
6314 int maxChunkSize = 1250;
6315 int packetNumber = 0; 6311 int packetNumber = 0;
6316 6312
6317 while (processedLength < req.AssetInf.Data.Length) 6313 while (processedLength < req.AssetInf.Data.Length)
@@ -6378,17 +6374,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6378 OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown); 6374 OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
6379 } 6375 }
6380 6376
6381 public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, 6377 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
6382 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, 6378 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
6383 byte mediaLoop) 6379 byte mediaLoop)
6384 { 6380 {
6385 ParcelMediaUpdatePacket updatePacket = new ParcelMediaUpdatePacket(); 6381 ParcelMediaUpdatePacket updatePacket = new ParcelMediaUpdatePacket();
6386 updatePacket.DataBlock.MediaURL = Helpers.StringToField(mediaUrl); 6382 updatePacket.DataBlock.MediaURL = Utils.StringToBytes(mediaUrl);
6387 updatePacket.DataBlock.MediaID = mediaTextureID; 6383 updatePacket.DataBlock.MediaID = mediaTextureID;
6388 updatePacket.DataBlock.MediaAutoScale = autoScale; 6384 updatePacket.DataBlock.MediaAutoScale = autoScale;
6389 6385
6390 updatePacket.DataBlockExtended.MediaType = Helpers.StringToField(mediaType); 6386 updatePacket.DataBlockExtended.MediaType = Utils.StringToBytes(mediaType);
6391 updatePacket.DataBlockExtended.MediaDesc = Helpers.StringToField(mediaDesc); 6387 updatePacket.DataBlockExtended.MediaDesc = Utils.StringToBytes(mediaDesc);
6392 updatePacket.DataBlockExtended.MediaWidth = mediaWidth; 6388 updatePacket.DataBlockExtended.MediaWidth = mediaWidth;
6393 updatePacket.DataBlockExtended.MediaWidth = mediaHeight; 6389 updatePacket.DataBlockExtended.MediaWidth = mediaHeight;
6394 updatePacket.DataBlockExtended.MediaLoop = mediaLoop; 6390 updatePacket.DataBlockExtended.MediaLoop = mediaLoop;
@@ -6401,7 +6397,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6401 6397
6402 #region Camera 6398 #region Camera
6403 6399
6404 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) 6400 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
6405 { 6401 {
6406 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); 6402 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
6407 packet.ObjectData.ObjectID = objectID; 6403 packet.ObjectData.ObjectID = objectID;
@@ -6419,7 +6415,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6419 OutPacket(packet, ThrottleOutPacketType.Task); 6415 OutPacket(packet, ThrottleOutPacketType.Task);
6420 } 6416 }
6421 6417
6422 public void SendClearFollowCamProperties (LLUUID objectID) 6418 public void SendClearFollowCamProperties (UUID objectID)
6423 { 6419 {
6424 ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties); 6420 ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
6425 packet.ObjectData.ObjectID = objectID; 6421 packet.ObjectData.ObjectID = objectID;
@@ -6428,21 +6424,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6428 6424
6429 #endregion 6425 #endregion
6430 6426
6431 public void SendRegionHandle(LLUUID regionID, ulong handle) { 6427 public void SendRegionHandle(UUID regionID, ulong handle) {
6432 RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply); 6428 RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply);
6433 reply.ReplyBlock.RegionID = regionID; 6429 reply.ReplyBlock.RegionID = regionID;
6434 reply.ReplyBlock.RegionHandle = handle; 6430 reply.ReplyBlock.RegionHandle = handle;
6435 OutPacket(reply, ThrottleOutPacketType.Land); 6431 OutPacket(reply, ThrottleOutPacketType.Land);
6436 } 6432 }
6437 6433
6438 public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) 6434 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
6439 { 6435 {
6440 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); 6436 ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply);
6441 reply.AgentData.AgentID = m_agentId; 6437 reply.AgentData.AgentID = m_agentId;
6442 reply.Data.ParcelID = parcelID; 6438 reply.Data.ParcelID = parcelID;
6443 reply.Data.OwnerID = land.OwnerID; 6439 reply.Data.OwnerID = land.OwnerID;
6444 reply.Data.Name = Helpers.StringToField(land.Name != null ? land.Name : ""); 6440 reply.Data.Name = Utils.StringToBytes(land.Name);
6445 reply.Data.Desc = Helpers.StringToField(land.Description != null ? land.Description : ""); 6441 reply.Data.Desc = Utils.StringToBytes(land.Description);
6446 reply.Data.ActualArea = land.Area; 6442 reply.Data.ActualArea = land.Area;
6447 reply.Data.BillableArea = land.Area; // TODO: what is this? 6443 reply.Data.BillableArea = land.Area; // TODO: what is this?
6448 6444
@@ -6451,15 +6447,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6451 ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + 6447 ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) +
6452 ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); 6448 ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0));
6453 6449
6454 LLVector3 pos = land.UserLocation; 6450 Vector3 pos = land.UserLocation;
6455 if (pos.Equals(LLVector3.Zero)) 6451 if (pos.Equals(Vector3.Zero))
6456 { 6452 {
6457 pos = (land.AABBMax + land.AABBMin) * 0.5f; 6453 pos = (land.AABBMax + land.AABBMin) * 0.5f;
6458 } 6454 }
6459 reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; 6455 reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x;
6460 reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; 6456 reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y;
6461 reply.Data.GlobalZ = pos.Z; 6457 reply.Data.GlobalZ = pos.Z;
6462 reply.Data.SimName = Helpers.StringToField(info.RegionName != null ? info.RegionName : ""); 6458 reply.Data.SimName = Utils.StringToBytes(info.RegionName);
6463 reply.Data.SnapshotID = land.SnapshotID; 6459 reply.Data.SnapshotID = land.SnapshotID;
6464 reply.Data.Dwell = 0; // TODO: not implemented yet 6460 reply.Data.Dwell = 0; // TODO: not implemented yet
6465 reply.Data.SalePrice = land.SalePrice; 6461 reply.Data.SalePrice = land.SalePrice;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 551e7ab..eddee10 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -33,8 +33,8 @@ using System.Net.Sockets;
33using System.Threading; 33using System.Threading;
34using System.Timers; 34using System.Timers;
35using System.Reflection; 35using System.Reflection;
36using libsecondlife; 36using OpenMetaverse;
37using libsecondlife.Packets; 37using OpenMetaverse.Packets;
38using Timer = System.Timers.Timer; 38using Timer = System.Timers.Timer;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.ClientStack.LindenUDP; 40using OpenSim.Region.ClientStack.LindenUDP;
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
44{ 44{
45 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); 45 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
46 public delegate void PacketDrop(Packet pack, Object id); 46 public delegate void PacketDrop(Packet pack, Object id);
47 public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); 47 public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, UUID agentID, ThrottleOutPacketType throttlePacketType);
48 48
49 public interface IPacketHandler 49 public interface IPacketHandler
50 { 50 {
@@ -259,9 +259,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
259 // acks being appended to the payload, just don't send 259 // acks being appended to the payload, just don't send
260 // any with them until libsl is fixed. 260 // any with them until libsl is fixed.
261 // 261 //
262 if (packet is libsecondlife.Packets.ViewerEffectPacket) 262 if (packet is OpenMetaverse.Packets.ViewerEffectPacket)
263 return; 263 return;
264 if (packet is libsecondlife.Packets.SimStatsPacket) 264 if (packet is OpenMetaverse.Packets.SimStatsPacket)
265 return; 265 return;
266 266
267 // Add acks to outgoing packets 267 // Add acks to outgoing packets
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 94f7214..1e369ec 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -29,8 +29,8 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Threading; 30using System.Threading;
31using System.Timers; 31using System.Timers;
32using libsecondlife; 32using OpenMetaverse;
33using libsecondlife.Packets; 33using OpenMetaverse.Packets;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Statistics; 35using OpenSim.Framework.Statistics;
36using OpenSim.Framework.Statistics.Interfaces; 36using OpenSim.Framework.Statistics.Interfaces;
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
82 // private long ThrottleInterval; 82 // private long ThrottleInterval;
83 private Timer throttleTimer; 83 private Timer throttleTimer;
84 84
85 private LLUUID m_agentId; 85 private UUID m_agentId;
86 86
87 public LLPacketQueue(LLUUID agentId) 87 public LLPacketQueue(UUID agentId)
88 { 88 {
89 // While working on this, the BlockingQueue had me fooled for a bit. 89 // While working on this, the BlockingQueue had me fooled for a bit.
90 // The Blocking queue causes the thread to stop until there's something 90 // The Blocking queue causes the thread to stop until there's something
@@ -479,7 +479,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
479 for (int i = 0; i < 7; i++) 479 for (int i = 0; i < 7; i++)
480 Array.Reverse(throttle, j + i*singlefloat, singlefloat); 480 Array.Reverse(throttle, j + i*singlefloat, singlefloat);
481 481
482 // values gotten from libsecondlife.org/wiki/Throttle. Thanks MW_ 482 // values gotten from OpenMetaverse.org/wiki/Throttle. Thanks MW_
483 // bytes 483 // bytes
484 // Convert to integer, since.. the full fp space isn't used. 484 // Convert to integer, since.. the full fp space isn't used.
485 tResend = (int) BitConverter.ToSingle(throttle, j); 485 tResend = (int) BitConverter.ToSingle(throttle, j);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
index 2a3f2e1..07d3c45 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs
@@ -27,8 +27,8 @@
27 27
28using System.Net; 28using System.Net;
29using System.Net.Sockets; 29using System.Net.Sockets;
30using libsecondlife; 30using OpenMetaverse;
31using libsecondlife.Packets; 31using OpenMetaverse.Packets;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
34using OpenSim.Region.ClientStack.LindenUDP; 34using OpenSim.Region.ClientStack.LindenUDP;
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
73 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, 73 protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack,
74 ClientManager clientManager, IScene scene, AssetCache assetCache, 74 ClientManager clientManager, IScene scene, AssetCache assetCache,
75 LLPacketServer packServer, AgentCircuitManager authenSessions, 75 LLPacketServer packServer, AgentCircuitManager authenSessions,
76 LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) 76 UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP)
77 { 77 {
78 return 78 return
79 new LLClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode, proxyEP); 79 new LLClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode, proxyEP);
@@ -147,4 +147,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
147 client.Close(false); 147 client.Close(false);
148 } 148 }
149 } 149 }
150} \ No newline at end of file 150}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs b/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs
index e836dd7..3bb0b7a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife.Packets; 29using OpenMetaverse.Packets;
30using OpenSim.Framework; 30using OpenSim.Framework;
31 31
32namespace OpenSim.Region.ClientStack.LindenUDP 32namespace OpenSim.Region.ClientStack.LindenUDP
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 8dec185..2d57d7f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Net.Sockets; 32using System.Net.Sockets;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife.Packets; 34using OpenMetaverse.Packets;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
@@ -136,7 +136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
136 136
137 // Return new port 137 // Return new port
138 // This because in Grid mode it is not really important what port the region listens to as long as it is correctly registered. 138 // This because in Grid mode it is not really important what port the region listens to as long as it is correctly registered.
139 // So the option allow_alternate_ports="true" was added to default.xml 139 // So the option allow_alternate_ports="true" was added to default.Xml
140 port = (uint)(listenPort - proxyPortOffset); 140 port = (uint)(listenPort - proxyPortOffset);
141 } 141 }
142 142
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 91f7472..d1572fd 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -28,7 +28,7 @@
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Net; 29using System.Net;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack
138 // TODO: Remove this cruft once MasterAvatar is fully deprecated 138 // TODO: Remove this cruft once MasterAvatar is fully deprecated
139 //Master Avatar Setup 139 //Master Avatar Setup
140 UserProfileData masterAvatar; 140 UserProfileData masterAvatar;
141 if (scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 141 if (scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
142 { 142 {
143 masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); 143 masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
144 scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; 144 scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
@@ -160,7 +160,7 @@ namespace OpenSim.Region.ClientStack
160 else 160 else
161 { 161 {
162 m_log.Info("[PARCEL]: No master avatar found, using null."); 162 m_log.Info("[PARCEL]: No master avatar found, using null.");
163 scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; 163 scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero;
164 } 164 }
165 165
166 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 166 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index a2c3c2c..aabddc6 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Communications.Local
177 return null; 177 return null;
178 } 178 }
179 179
180 public RegionInfo RequestNeighbourInfo(LLUUID regionID) 180 public RegionInfo RequestNeighbourInfo(UUID regionID)
181 { 181 {
182 // TODO add a dictionary for faster lookup 182 // TODO add a dictionary for faster lookup
183 foreach (RegionInfo info in m_regions.Values) 183 foreach (RegionInfo info in m_regions.Values)
@@ -229,7 +229,7 @@ namespace OpenSim.Region.Communications.Local
229 return mapBlocks; 229 return mapBlocks;
230 } 230 }
231 231
232 public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 232 public bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
233 { 233 {
234 if (m_regionListeners.ContainsKey(regionHandle)) 234 if (m_regionListeners.ContainsKey(regionHandle))
235 { 235 {
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Communications.Local
306 return false; 306 return false;
307 } 307 }
308 308
309 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 309 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
310 { 310 {
311 if (m_regionListeners.ContainsKey(regionHandle)) 311 if (m_regionListeners.ContainsKey(regionHandle))
312 { 312 {
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Communications.Local
338 return false; 338 return false;
339 } 339 }
340 340
341 public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 341 public bool InformRegionOfPrimCrossing(ulong regionHandle, UUID primID, string objData, int XMLMethod)
342 { 342 {
343 if (m_regionListeners.ContainsKey(regionHandle)) 343 if (m_regionListeners.ContainsKey(regionHandle))
344 { 344 {
@@ -355,7 +355,7 @@ namespace OpenSim.Region.Communications.Local
355 /// <param name="agentID"></param> 355 /// <param name="agentID"></param>
356 /// <param name="position"></param> 356 /// <param name="position"></param>
357 /// <returns></returns> 357 /// <returns></returns>
358 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 358 public bool ExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
359 { 359 {
360 if (m_regionListeners.ContainsKey(regionHandle)) 360 if (m_regionListeners.ContainsKey(regionHandle))
361 { 361 {
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Communications.Local
366 return false; 366 return false;
367 } 367 }
368 368
369 public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) 369 public bool ExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
370 { 370 {
371 if (m_regionListeners.ContainsKey(regionHandle)) 371 if (m_regionListeners.ContainsKey(regionHandle))
372 { 372 {
@@ -376,7 +376,7 @@ namespace OpenSim.Region.Communications.Local
376 return false; 376 return false;
377 } 377 }
378 378
379 public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) 379 public bool AcknowledgeAgentCrossed(ulong regionHandle, UUID agentId)
380 { 380 {
381 if (m_regionListeners.ContainsKey(regionHandle)) 381 if (m_regionListeners.ContainsKey(regionHandle))
382 { 382 {
@@ -385,7 +385,7 @@ namespace OpenSim.Region.Communications.Local
385 return false; 385 return false;
386 } 386 }
387 387
388 public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID) 388 public bool AcknowledgePrimCrossed(ulong regionHandle, UUID primID)
389 { 389 {
390 if (m_regionListeners.ContainsKey(regionHandle)) 390 if (m_regionListeners.ContainsKey(regionHandle))
391 { 391 {
@@ -430,7 +430,7 @@ namespace OpenSim.Region.Communications.Local
430 } 430 }
431 } 431 }
432 432
433 public void TriggerLogOffUser(ulong regionHandle, LLUUID agentID, LLUUID RegionSecret, string message) 433 public void TriggerLogOffUser(ulong regionHandle, UUID agentID, UUID RegionSecret, string message)
434 { 434 {
435 if (m_regionListeners.ContainsKey(regionHandle)) 435 if (m_regionListeners.ContainsKey(regionHandle))
436 { 436 {
@@ -440,7 +440,7 @@ namespace OpenSim.Region.Communications.Local
440 } 440 }
441 } 441 }
442 442
443 public void TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 443 public void TriggerExpectPrim(ulong regionHandle, UUID primID, string objData, int XMLMethod)
444 { 444 {
445 if (m_regionListeners.ContainsKey(regionHandle)) 445 if (m_regionListeners.ContainsKey(regionHandle))
446 { 446 {
@@ -461,7 +461,7 @@ namespace OpenSim.Region.Communications.Local
461 } 461 }
462 } 462 }
463 463
464 public bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 464 public bool TriggerExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
465 { 465 {
466 if (m_regionListeners.ContainsKey(regionHandle)) 466 if (m_regionListeners.ContainsKey(regionHandle))
467 { 467 {
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Communications.Local
472 return false; 472 return false;
473 } 473 }
474 474
475 public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) 475 public bool TriggerExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
476 { 476 {
477 if (m_regionListeners.ContainsKey(regionHandle)) 477 if (m_regionListeners.ContainsKey(regionHandle))
478 { 478 {
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
index 1d8ea53..5cb33cc 100644
--- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs
+++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications; 33using OpenSim.Framework.Communications;
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Communications.Local
44 private static readonly ILog m_log 44 private static readonly ILog m_log
45 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) 47 public override void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback)
48 { 48 {
49 m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID); 49 m_log.InfoFormat("[LOCAL INVENTORY SERVICE]: Requesting inventory for user {0}", userID);
50 50
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Communications.Local
60 // Need to retrieve the root folder on the first pass 60 // Need to retrieve the root folder on the first pass
61 foreach (InventoryFolderBase folder in skeletonFolders) 61 foreach (InventoryFolderBase folder in skeletonFolders)
62 { 62 {
63 if (folder.ParentID == LLUUID.Zero) 63 if (folder.ParentID == UUID.Zero)
64 { 64 {
65 rootFolder = new InventoryFolderImpl(folder); 65 rootFolder = new InventoryFolderImpl(folder);
66 folders.Add(rootFolder); 66 folders.Add(rootFolder);
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Communications.Local
88 callback(folders, items); 88 callback(folders, items);
89 } 89 }
90 90
91 public override bool HasInventoryForUser(LLUUID userID) 91 public override bool HasInventoryForUser(UUID userID)
92 { 92 {
93 InventoryFolderBase root = RequestRootFolder(userID); 93 InventoryFolderBase root = RequestRootFolder(userID);
94 if (root == null) 94 if (root == null)
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index aeb9ae0..518ba09 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -30,7 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
@@ -246,9 +246,9 @@ namespace OpenSim.Region.Communications.Local
246 _login.SecureSession = response.SecureSessionID; 246 _login.SecureSession = response.SecureSessionID;
247 _login.CircuitCode = (uint) response.CircuitCode; 247 _login.CircuitCode = (uint) response.CircuitCode;
248 if (specificStartLocation) 248 if (specificStartLocation)
249 _login.StartPos = new LLVector3(locX, locY, locZ); 249 _login.StartPos = new Vector3(locX, locY, locZ);
250 else 250 else
251 _login.StartPos = new LLVector3(128, 128, 128); 251 _login.StartPos = new Vector3(128, 128, 128);
252 _login.CapsPath = capsPath; 252 _login.CapsPath = capsPath;
253 253
254 m_log.InfoFormat( 254 m_log.InfoFormat(
@@ -282,7 +282,7 @@ namespace OpenSim.Region.Communications.Local
282 } 282 }
283 283
284 // See LoginService 284 // See LoginService
285 protected override InventoryData GetInventorySkeleton(LLUUID userID) 285 protected override InventoryData GetInventorySkeleton(UUID userID)
286 { 286 {
287 List<InventoryFolderBase> folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID); 287 List<InventoryFolderBase> folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID);
288 288
@@ -293,12 +293,12 @@ namespace OpenSim.Region.Communications.Local
293 folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID); 293 folders = m_Parent.InterServiceInventoryService.GetInventorySkeleton(userID);
294 } 294 }
295 295
296 LLUUID rootID = LLUUID.Zero; 296 UUID rootID = UUID.Zero;
297 ArrayList AgentInventoryArray = new ArrayList(); 297 ArrayList AgentInventoryArray = new ArrayList();
298 Hashtable TempHash; 298 Hashtable TempHash;
299 foreach (InventoryFolderBase InvFolder in folders) 299 foreach (InventoryFolderBase InvFolder in folders)
300 { 300 {
301 if (InvFolder.ParentID == LLUUID.Zero) 301 if (InvFolder.ParentID == UUID.Zero)
302 { 302 {
303 rootID = InvFolder.ID; 303 rootID = InvFolder.ID;
304 } 304 }
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 2ee7981..c0887df 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
32 32
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Communications.Local
88 return profile; 88 return profile;
89 } 89 }
90 90
91 public override UserProfileData SetupMasterUser(LLUUID uuid) 91 public override UserProfileData SetupMasterUser(UUID uuid)
92 { 92 {
93 UserProfileData data = GetUserProfile(uuid); 93 UserProfileData data = GetUserProfile(uuid);
94 if (data == null) 94 if (data == null)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index da2e4a2..1dd4219 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -37,7 +37,7 @@ using System.Runtime.Remoting.Channels;
37using System.Runtime.Remoting.Channels.Tcp; 37using System.Runtime.Remoting.Channels.Tcp;
38using System.Security.Authentication; 38using System.Security.Authentication;
39using System.Threading; 39using System.Threading;
40using libsecondlife; 40using OpenMetaverse;
41using log4net; 41using log4net;
42using Nwc.XmlRpc; 42using Nwc.XmlRpc;
43using OpenSim.Framework; 43using OpenSim.Framework;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Communications.OGS1
125 GridParams["server_uri"] = regionInfo.ServerURI; 125 GridParams["server_uri"] = regionInfo.ServerURI;
126 GridParams["region_secret"] = regionInfo.regionSecret; 126 GridParams["region_secret"] = regionInfo.regionSecret;
127 127
128 if (regionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 128 if (regionInfo.MasterAvatarAssignedUUID != UUID.Zero)
129 GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString(); 129 GridParams["master_avatar_uuid"] = regionInfo.MasterAvatarAssignedUUID.ToString();
130 else 130 else
131 GridParams["master_avatar_uuid"] = regionInfo.EstateSettings.EstateOwner.ToString(); 131 GridParams["master_avatar_uuid"] = regionInfo.EstateSettings.EstateOwner.ToString();
@@ -275,7 +275,7 @@ namespace OpenSim.Region.Communications.OGS1
275 sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]); 275 sri.HttpPort = Convert.ToUInt32(neighbourData["http_port"]);
276 } 276 }
277 277
278 sri.RegionID = new LLUUID((string) neighbourData["uuid"]); 278 sri.RegionID = new UUID((string) neighbourData["uuid"]);
279 279
280 neighbours.Add(sri); 280 neighbours.Add(sri);
281 } 281 }
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Communications.OGS1
294 /// FIXME: Might be nicer to return a proper exception here since we could inform the client more about the 294 /// FIXME: Might be nicer to return a proper exception here since we could inform the client more about the
295 /// nature of the faiulre. 295 /// nature of the faiulre.
296 /// </returns> 296 /// </returns>
297 public RegionInfo RequestNeighbourInfo(LLUUID Region_UUID) 297 public RegionInfo RequestNeighbourInfo(UUID Region_UUID)
298 { 298 {
299 RegionInfo regionInfo; 299 RegionInfo regionInfo;
300 Hashtable requestData = new Hashtable(); 300 Hashtable requestData = new Hashtable();
@@ -344,7 +344,7 @@ namespace OpenSim.Region.Communications.OGS1
344 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); 344 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
345 } 345 }
346 346
347 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 347 regionInfo.RegionID = new UUID((string) responseData["region_UUID"]);
348 regionInfo.RegionName = (string) responseData["region_name"]; 348 regionInfo.RegionName = (string) responseData["region_name"];
349 349
350 if (requestData.ContainsKey("regionHandle")) 350 if (requestData.ContainsKey("regionHandle"))
@@ -407,7 +407,7 @@ namespace OpenSim.Region.Communications.OGS1
407 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); 407 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
408 } 408 }
409 409
410 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 410 regionInfo.RegionID = new UUID((string) responseData["region_UUID"]);
411 regionInfo.RegionName = (string) responseData["region_name"]; 411 regionInfo.RegionName = (string) responseData["region_name"];
412 412
413 lock (m_remoteRegionInfoCache) 413 lock (m_remoteRegionInfoCache)
@@ -475,7 +475,7 @@ namespace OpenSim.Region.Communications.OGS1
475 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]); 475 regionInfo.HttpPort = Convert.ToUInt32((string) responseData["http_port"]);
476 } 476 }
477 477
478 regionInfo.RegionID = new LLUUID((string) responseData["region_UUID"]); 478 regionInfo.RegionID = new UUID((string) responseData["region_UUID"]);
479 regionInfo.RegionName = (string) responseData["region_name"]; 479 regionInfo.RegionName = (string) responseData["region_name"];
480 480
481 if (!m_remoteRegionInfoCache.ContainsKey(regionInfo.RegionHandle)) 481 if (!m_remoteRegionInfoCache.ContainsKey(regionInfo.RegionHandle))
@@ -533,7 +533,7 @@ namespace OpenSim.Region.Communications.OGS1
533 neighbour.Access = Convert.ToByte(n["access"]); 533 neighbour.Access = Convert.ToByte(n["access"]);
534 neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]); 534 neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]);
535 neighbour.WaterHeight = Convert.ToByte(n["water-height"]); 535 neighbour.WaterHeight = Convert.ToByte(n["water-height"]);
536 neighbour.MapImageId = new LLUUID((string) n["map-image-id"]); 536 neighbour.MapImageId = new UUID((string) n["map-image-id"]);
537 537
538 neighbours.Add(neighbour); 538 neighbours.Add(neighbour);
539 } 539 }
@@ -606,11 +606,11 @@ namespace OpenSim.Region.Communications.OGS1
606 m_log.Debug("[CONNECTION DEBUGGING]: Expect User called, starting agent setup ... "); 606 m_log.Debug("[CONNECTION DEBUGGING]: Expect User called, starting agent setup ... ");
607 Hashtable requestData = (Hashtable) request.Params[0]; 607 Hashtable requestData = (Hashtable) request.Params[0];
608 AgentCircuitData agentData = new AgentCircuitData(); 608 AgentCircuitData agentData = new AgentCircuitData();
609 agentData.SessionID = new LLUUID((string) requestData["session_id"]); 609 agentData.SessionID = new UUID((string) requestData["session_id"]);
610 agentData.SecureSessionID = new LLUUID((string) requestData["secure_session_id"]); 610 agentData.SecureSessionID = new UUID((string) requestData["secure_session_id"]);
611 agentData.firstname = (string) requestData["firstname"]; 611 agentData.firstname = (string) requestData["firstname"];
612 agentData.lastname = (string) requestData["lastname"]; 612 agentData.lastname = (string) requestData["lastname"];
613 agentData.AgentID = new LLUUID((string) requestData["agent_id"]); 613 agentData.AgentID = new UUID((string) requestData["agent_id"]);
614 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); 614 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
615 agentData.CapsPath = (string) requestData["caps_path"]; 615 agentData.CapsPath = (string) requestData["caps_path"];
616 616
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Communications.OGS1
623 { 623 {
624 m_log.Debug("[CONNECTION DEBUGGING]: Main agent detected"); 624 m_log.Debug("[CONNECTION DEBUGGING]: Main agent detected");
625 agentData.startpos = 625 agentData.startpos =
626 new LLVector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), 626 new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]),
627 (float)Convert.ToDecimal((string)requestData["startpos_y"]), 627 (float)Convert.ToDecimal((string)requestData["startpos_y"]),
628 (float)Convert.ToDecimal((string)requestData["startpos_z"])); 628 (float)Convert.ToDecimal((string)requestData["startpos_z"]));
629 agentData.child = false; 629 agentData.child = false;
@@ -684,10 +684,10 @@ namespace OpenSim.Region.Communications.OGS1
684 m_log.Debug("[CONNECTION DEBUGGING]: LogOff User Called "); 684 m_log.Debug("[CONNECTION DEBUGGING]: LogOff User Called ");
685 Hashtable requestData = (Hashtable)request.Params[0]; 685 Hashtable requestData = (Hashtable)request.Params[0];
686 string message = (string)requestData["message"]; 686 string message = (string)requestData["message"];
687 LLUUID agentID = LLUUID.Zero; 687 UUID agentID = UUID.Zero;
688 LLUUID RegionSecret = LLUUID.Zero; 688 UUID RegionSecret = UUID.Zero;
689 Helpers.TryParse((string)requestData["agent_id"], out agentID); 689 UUID.TryParse((string)requestData["agent_id"], out agentID);
690 Helpers.TryParse((string)requestData["region_secret"], out RegionSecret); 690 UUID.TryParse((string)requestData["region_secret"], out RegionSecret);
691 691
692 ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]); 692 ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
693 693
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.Communications.OGS1
1072 /// <param name="regionHandle"></param> 1072 /// <param name="regionHandle"></param>
1073 /// <param name="agentData"></param> 1073 /// <param name="agentData"></param>
1074 /// <returns></returns> 1074 /// <returns></returns>
1075 public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 1075 public bool InformRegionOfPrimCrossing(ulong regionHandle, UUID primID, string objData, int XMLMethod)
1076 { 1076 {
1077 int failures = 0; 1077 int failures = 0;
1078 lock (m_deadRegionCache) 1078 lock (m_deadRegionCache)
@@ -1106,7 +1106,7 @@ namespace OpenSim.Region.Communications.OGS1
1106 1106
1107 if (remObject != null) 1107 if (remObject != null)
1108 { 1108 {
1109 retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData, XMLMethod); 1109 retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.Guid, objData, XMLMethod);
1110 } 1110 }
1111 else 1111 else
1112 { 1112 {
@@ -1168,7 +1168,7 @@ namespace OpenSim.Region.Communications.OGS1
1168 /// <param name="agentID"></param> 1168 /// <param name="agentID"></param>
1169 /// <param name="position"></param> 1169 /// <param name="position"></param>
1170 /// <returns></returns> 1170 /// <returns></returns>
1171 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 1171 public bool ExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
1172 { 1172 {
1173 RegionInfo[] regions = m_regionsOnInstance.ToArray(); 1173 RegionInfo[] regions = m_regionsOnInstance.ToArray();
1174 bool banned = false; 1174 bool banned = false;
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Communications.OGS1
1212 if (remObject != null) 1212 if (remObject != null)
1213 { 1213 {
1214 retValue = 1214 retValue =
1215 remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), 1215 remObject.ExpectAvatarCrossing(regionHandle, agentID.Guid, position,
1216 isFlying); 1216 isFlying);
1217 } 1217 }
1218 else 1218 else
@@ -1246,7 +1246,7 @@ namespace OpenSim.Region.Communications.OGS1
1246 } 1246 }
1247 } 1247 }
1248 1248
1249 public bool ExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) 1249 public bool ExpectPrimCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isPhysical)
1250 { 1250 {
1251 RegionInfo regInfo = null; 1251 RegionInfo regInfo = null;
1252 try 1252 try
@@ -1269,7 +1269,7 @@ namespace OpenSim.Region.Communications.OGS1
1269 if (remObject != null) 1269 if (remObject != null)
1270 { 1270 {
1271 retValue = 1271 retValue =
1272 remObject.ExpectAvatarCrossing(regionHandle, agentID.UUID, new sLLVector3(position), 1272 remObject.ExpectAvatarCrossing(regionHandle, agentID.Guid, position,
1273 isPhysical); 1273 isPhysical);
1274 } 1274 }
1275 else 1275 else
@@ -1322,7 +1322,7 @@ namespace OpenSim.Region.Communications.OGS1
1322 } 1322 }
1323 } 1323 }
1324 1324
1325 public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 1325 public bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
1326 { 1326 {
1327 RegionInfo regInfo = null; 1327 RegionInfo regInfo = null;
1328 try 1328 try
@@ -1345,7 +1345,7 @@ namespace OpenSim.Region.Communications.OGS1
1345 if (remObject != null) 1345 if (remObject != null)
1346 { 1346 {
1347 // retValue = 1347 // retValue =
1348 remObject.TellRegionToCloseChildConnection(regionHandle, agentID.UUID); 1348 remObject.TellRegionToCloseChildConnection(regionHandle, agentID.Guid);
1349 } 1349 }
1350 else 1350 else
1351 { 1351 {
@@ -1421,12 +1421,12 @@ namespace OpenSim.Region.Communications.OGS1
1421 } 1421 }
1422 } 1422 }
1423 1423
1424 public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId) 1424 public bool AcknowledgeAgentCrossed(ulong regionHandle, UUID agentId)
1425 { 1425 {
1426 return m_localBackend.AcknowledgeAgentCrossed(regionHandle, agentId); 1426 return m_localBackend.AcknowledgeAgentCrossed(regionHandle, agentId);
1427 } 1427 }
1428 1428
1429 public bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primId) 1429 public bool AcknowledgePrimCrossed(ulong regionHandle, UUID primId)
1430 { 1430 {
1431 return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId); 1431 return m_localBackend.AcknowledgePrimCrossed(regionHandle, primId);
1432 } 1432 }
@@ -1509,7 +1509,7 @@ namespace OpenSim.Region.Communications.OGS1
1509 /// <param name="regionHandle"></param> 1509 /// <param name="regionHandle"></param>
1510 /// <param name="agentData"></param> 1510 /// <param name="agentData"></param>
1511 /// <returns></returns> 1511 /// <returns></returns>
1512 public bool IncomingPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 1512 public bool IncomingPrim(ulong regionHandle, UUID primID, string objData, int XMLMethod)
1513 { 1513 {
1514 // Is this necessary? 1514 // Is this necessary?
1515 try 1515 try
@@ -1532,7 +1532,7 @@ namespace OpenSim.Region.Communications.OGS1
1532 /// <param name="agentID"></param> 1532 /// <param name="agentID"></param>
1533 /// <param name="position"></param> 1533 /// <param name="position"></param>
1534 /// <returns></returns> 1534 /// <returns></returns>
1535 public bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 1535 public bool TriggerExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
1536 { 1536 {
1537 try 1537 try
1538 { 1538 {
@@ -1545,7 +1545,7 @@ namespace OpenSim.Region.Communications.OGS1
1545 } 1545 }
1546 } 1546 }
1547 1547
1548 public bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isPhysical) 1548 public bool TriggerExpectPrimCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isPhysical)
1549 { 1549 {
1550 try 1550 try
1551 { 1551 {
@@ -1558,7 +1558,7 @@ namespace OpenSim.Region.Communications.OGS1
1558 } 1558 }
1559 } 1559 }
1560 1560
1561 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 1561 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
1562 { 1562 {
1563 try 1563 try
1564 { 1564 {
@@ -1692,18 +1692,18 @@ namespace OpenSim.Region.Communications.OGS1
1692 hash = (Hashtable)response.Value; 1692 hash = (Hashtable)response.Value;
1693 try { 1693 try {
1694 landData = new LandData(); 1694 landData = new LandData();
1695 landData.AABBMax = LLVector3.Parse((string)hash["AABBMax"]); 1695 landData.AABBMax = Vector3.Parse((string)hash["AABBMax"]);
1696 landData.AABBMin = LLVector3.Parse((string)hash["AABBMin"]); 1696 landData.AABBMin = Vector3.Parse((string)hash["AABBMin"]);
1697 landData.Area = Convert.ToInt32(hash["Area"]); 1697 landData.Area = Convert.ToInt32(hash["Area"]);
1698 landData.AuctionID = Convert.ToUInt32(hash["AuctionID"]); 1698 landData.AuctionID = Convert.ToUInt32(hash["AuctionID"]);
1699 landData.Description = (string)hash["Description"]; 1699 landData.Description = (string)hash["Description"];
1700 landData.Flags = Convert.ToUInt32(hash["Flags"]); 1700 landData.Flags = Convert.ToUInt32(hash["Flags"]);
1701 landData.GlobalID = new LLUUID((string)hash["GlobalID"]); 1701 landData.GlobalID = new UUID((string)hash["GlobalID"]);
1702 landData.Name = (string)hash["Name"]; 1702 landData.Name = (string)hash["Name"];
1703 landData.OwnerID = new LLUUID((string)hash["OwnerID"]); 1703 landData.OwnerID = new UUID((string)hash["OwnerID"]);
1704 landData.SalePrice = Convert.ToInt32(hash["SalePrice"]); 1704 landData.SalePrice = Convert.ToInt32(hash["SalePrice"]);
1705 landData.SnapshotID = new LLUUID((string)hash["SnapshotID"]); 1705 landData.SnapshotID = new UUID((string)hash["SnapshotID"]);
1706 landData.UserLocation = LLVector3.Parse((string)hash["UserLocation"]); 1706 landData.UserLocation = Vector3.Parse((string)hash["UserLocation"]);
1707 m_log.DebugFormat("[OGS1 GRID SERVICES] Got land data for parcel {0}", landData.Name); 1707 m_log.DebugFormat("[OGS1 GRID SERVICES] Got land data for parcel {0}", landData.Name);
1708 } 1708 }
1709 catch (Exception e) 1709 catch (Exception e)
@@ -1739,7 +1739,7 @@ namespace OpenSim.Region.Communications.OGS1
1739 if (landData != null) 1739 if (landData != null)
1740 { 1740 {
1741 // for now, only push out the data we need for answering a ParcelInfoReqeust 1741 // for now, only push out the data we need for answering a ParcelInfoReqeust
1742 // FIXME: these Replace calls are necessary as LLVector3.Parse can't parse vectors with spaces in them. Can be removed as soon as we switch to a newer version 1742 // FIXME: these Replace calls are necessary as Vector3.Parse can't parse vectors with spaces in them. Can be removed as soon as we switch to a newer version
1743 hash["AABBMax"] = landData.AABBMax.ToString().Replace(" ", ""); 1743 hash["AABBMax"] = landData.AABBMax.ToString().Replace(" ", "");
1744 hash["AABBMin"] = landData.AABBMin.ToString().Replace(" ", ""); 1744 hash["AABBMin"] = landData.AABBMin.ToString().Replace(" ", "");
1745 hash["Area"] = landData.Area.ToString(); 1745 hash["Area"] = landData.Area.ToString();
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
index 8285fb1..1f0c067 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Runtime.Remoting; 30using System.Runtime.Remoting;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34 34
@@ -36,17 +36,17 @@ namespace OpenSim.Region.Communications.OGS1
36{ 36{
37 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); 37 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
38 38
39 public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); 39 public delegate bool ExpectArrival(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying);
40 40
41 public delegate bool InformRegionPrimGroup(ulong regionHandle, LLUUID primID, LLVector3 Positon, bool isPhysical); 41 public delegate bool InformRegionPrimGroup(ulong regionHandle, UUID primID, Vector3 Positon, bool isPhysical);
42 42
43 public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData, int XMLMethod); 43 public delegate bool PrimGroupArrival(ulong regionHandle, UUID primID, string objData, int XMLMethod);
44 44
45 public delegate bool RegionUp(RegionUpData region, ulong regionhandle); 45 public delegate bool RegionUp(RegionUpData region, ulong regionhandle);
46 46
47 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate); 47 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate);
48 48
49 public delegate bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID); 49 public delegate bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID);
50 50
51 public sealed class InterRegionSingleton 51 public sealed class InterRegionSingleton
52 { 52 {
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Communications.OGS1
112 return false; 112 return false;
113 } 113 }
114 114
115 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 115 public bool ExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
116 { 116 {
117 handlerArrival = OnArrival; 117 handlerArrival = OnArrival;
118 if (handlerArrival != null) 118 if (handlerArrival != null)
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Communications.OGS1
122 return false; 122 return false;
123 } 123 }
124 124
125 public bool InformRegionPrim(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) 125 public bool InformRegionPrim(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
126 { 126 {
127 handlerPrimGroupNear = OnPrimGroupNear; 127 handlerPrimGroupNear = OnPrimGroupNear;
128 if (handlerPrimGroupNear != null) 128 if (handlerPrimGroupNear != null)
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Communications.OGS1
132 return false; 132 return false;
133 } 133 }
134 134
135 public bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 135 public bool ExpectPrimCrossing(ulong regionHandle, UUID primID, string objData, int XMLMethod)
136 { 136 {
137 handlerPrimGroupArrival = OnPrimGroupArrival; 137 handlerPrimGroupArrival = OnPrimGroupArrival;
138 if (handlerPrimGroupArrival != null) 138 if (handlerPrimGroupArrival != null)
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Communications.OGS1
142 return false; 142 return false;
143 } 143 }
144 144
145 public bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 145 public bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
146 { 146 {
147 handlerTellRegionToCloseChildConnection = OnTellRegionToCloseChildConnection; 147 handlerTellRegionToCloseChildConnection = OnTellRegionToCloseChildConnection;
148 if (handlerTellRegionToCloseChildConnection != null) 148 if (handlerTellRegionToCloseChildConnection != null)
@@ -202,13 +202,13 @@ namespace OpenSim.Region.Communications.OGS1
202 } 202 }
203 203
204 204
205 public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying) 205 public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, Vector3 position, bool isFlying)
206 { 206 {
207 try 207 try
208 { 208 {
209 return 209 return
210 InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new LLUUID(agentID), 210 InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, new UUID(agentID),
211 new LLVector3(position.x, position.y, position.z), 211 position,
212 isFlying); 212 isFlying);
213 } 213 }
214 catch (RemotingException e) 214 catch (RemotingException e)
@@ -218,13 +218,13 @@ namespace OpenSim.Region.Communications.OGS1
218 } 218 }
219 } 219 }
220 220
221 public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, sLLVector3 position, bool isPhysical) 221 public bool InformRegionPrim(ulong regionHandle, Guid SceneObjectGroupID, Vector3 position, bool isPhysical)
222 { 222 {
223 try 223 try
224 { 224 {
225 return 225 return
226 InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new LLUUID(SceneObjectGroupID), 226 InterRegionSingleton.Instance.InformRegionPrim(regionHandle, new UUID(SceneObjectGroupID),
227 new LLVector3(position.x, position.y, position.z), 227 position,
228 isPhysical); 228 isPhysical);
229 } 229 }
230 catch (RemotingException e) 230 catch (RemotingException e)
@@ -238,7 +238,7 @@ namespace OpenSim.Region.Communications.OGS1
238 { 238 {
239 try 239 try
240 { 240 {
241 return InterRegionSingleton.Instance.ExpectPrimCrossing(regionHandle, new LLUUID(primID), objData, XMLMethod); 241 return InterRegionSingleton.Instance.ExpectPrimCrossing(regionHandle, new UUID(primID), objData, XMLMethod);
242 } 242 }
243 catch (RemotingException e) 243 catch (RemotingException e)
244 { 244 {
@@ -251,7 +251,7 @@ namespace OpenSim.Region.Communications.OGS1
251 { 251 {
252 try 252 try
253 { 253 {
254 return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID)); 254 return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new UUID(agentID));
255 } 255 }
256 catch (RemotingException) 256 catch (RemotingException)
257 { 257 {
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index 2828928..b9e8394 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
@@ -46,8 +46,8 @@ namespace OpenSim.Region.Communications.OGS1
46 46
47 private string _inventoryServerUrl; 47 private string _inventoryServerUrl;
48 private Uri m_Uri; 48 private Uri m_Uri;
49 private Dictionary<LLUUID, InventoryReceiptCallback> m_RequestingInventory 49 private Dictionary<UUID, InventoryReceiptCallback> m_RequestingInventory
50 = new Dictionary<LLUUID, InventoryReceiptCallback>(); 50 = new Dictionary<UUID, InventoryReceiptCallback>();
51 51
52 public OGS1InventoryService(string inventoryServerUrl) 52 public OGS1InventoryService(string inventoryServerUrl)
53 { 53 {
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Communications.OGS1
67 /// </summary> 67 /// </summary>
68 /// <param name="userID"></param> 68 /// <param name="userID"></param>
69 /// <param name="callback"></param> 69 /// <param name="callback"></param>
70 public void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) 70 public void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback)
71 { 71 {
72 if (!m_RequestingInventory.ContainsKey(userID)) 72 if (!m_RequestingInventory.ContainsKey(userID))
73 { 73 {
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Communications.OGS1
83 = new RestObjectPosterResponse<InventoryCollection>(); 83 = new RestObjectPosterResponse<InventoryCollection>();
84 requester.ResponseCallback = InventoryResponse; 84 requester.ResponseCallback = InventoryResponse;
85 85
86 requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.UUID); 86 requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.Guid);
87 } 87 }
88 catch (WebException e) 88 catch (WebException e)
89 { 89 {
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1
106 /// <param name="userID"></param> 106 /// <param name="userID"></param>
107 private void InventoryResponse(InventoryCollection response) 107 private void InventoryResponse(InventoryCollection response)
108 { 108 {
109 LLUUID userID = response.UserID; 109 UUID userID = response.UserID;
110 if (m_RequestingInventory.ContainsKey(userID)) 110 if (m_RequestingInventory.ContainsKey(userID))
111 { 111 {
112 m_log.InfoFormat("[OGS1 INVENTORY SERVICE]: " + 112 m_log.InfoFormat("[OGS1 INVENTORY SERVICE]: " +
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Communications.OGS1
121 121
122 foreach (InventoryFolderBase folder in response.Folders) 122 foreach (InventoryFolderBase folder in response.Folders)
123 { 123 {
124 if (folder.ParentID == LLUUID.Zero) 124 if (folder.ParentID == UUID.Zero)
125 { 125 {
126 rootFolder = new InventoryFolderImpl(folder); 126 rootFolder = new InventoryFolderImpl(folder);
127 folders.Add(rootFolder); 127 folders.Add(rootFolder);
@@ -296,12 +296,12 @@ namespace OpenSim.Region.Communications.OGS1
296 return false; 296 return false;
297 } 297 }
298 298
299 public bool HasInventoryForUser(LLUUID userID) 299 public bool HasInventoryForUser(UUID userID)
300 { 300 {
301 return false; 301 return false;
302 } 302 }
303 303
304 public InventoryFolderBase RequestRootFolder(LLUUID userID) 304 public InventoryFolderBase RequestRootFolder(UUID userID)
305 { 305 {
306 return null; 306 return null;
307 } 307 }
diff --git a/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
index 26521ab..c690def 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
@@ -46,8 +46,8 @@ namespace OpenSim.Region.Communications.OGS1
46 46
47 private string _inventoryServerUrl; 47 private string _inventoryServerUrl;
48 private Uri m_Uri; 48 private Uri m_Uri;
49 private Dictionary<LLUUID, InventoryReceiptCallback> m_RequestingInventory 49 private Dictionary<UUID, InventoryReceiptCallback> m_RequestingInventory
50 = new Dictionary<LLUUID, InventoryReceiptCallback>(); 50 = new Dictionary<UUID, InventoryReceiptCallback>();
51 51
52 public OGS1SecureInventoryService(string inventoryServerUrl) 52 public OGS1SecureInventoryService(string inventoryServerUrl)
53 { 53 {
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Communications.OGS1
67 /// </summary> 67 /// </summary>
68 /// <param name="userID"></param> 68 /// <param name="userID"></param>
69 /// <param name="callback"></param> 69 /// <param name="callback"></param>
70 public void RequestInventoryForUser(LLUUID userID, LLUUID session_id, InventoryReceiptCallback callback) 70 public void RequestInventoryForUser(UUID userID, UUID session_id, InventoryReceiptCallback callback)
71 { 71 {
72 if (!m_RequestingInventory.ContainsKey(userID)) 72 if (!m_RequestingInventory.ContainsKey(userID))
73 { 73 {
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Communications.OGS1
83 = new RestSessionObjectPosterResponse<Guid, InventoryCollection>(); 83 = new RestSessionObjectPosterResponse<Guid, InventoryCollection>();
84 requester.ResponseCallback = InventoryResponse; 84 requester.ResponseCallback = InventoryResponse;
85 85
86 requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID, session_id.ToString(), userID.ToString()); 86 requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.Guid, session_id.ToString(), userID.ToString());
87 } 87 }
88 catch (WebException e) 88 catch (WebException e)
89 { 89 {
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1
106 /// <param name="userID"></param> 106 /// <param name="userID"></param>
107 private void InventoryResponse(InventoryCollection response) 107 private void InventoryResponse(InventoryCollection response)
108 { 108 {
109 LLUUID userID = response.UserID; 109 UUID userID = response.UserID;
110 if (m_RequestingInventory.ContainsKey(userID)) 110 if (m_RequestingInventory.ContainsKey(userID))
111 { 111 {
112 m_log.InfoFormat("[OGS1 INVENTORY SERVICE]: " + 112 m_log.InfoFormat("[OGS1 INVENTORY SERVICE]: " +
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Communications.OGS1
121 121
122 foreach (InventoryFolderBase folder in response.Folders) 122 foreach (InventoryFolderBase folder in response.Folders)
123 { 123 {
124 if (folder.ParentID == LLUUID.Zero) 124 if (folder.ParentID == UUID.Zero)
125 { 125 {
126 rootFolder = new InventoryFolderImpl(folder); 126 rootFolder = new InventoryFolderImpl(folder);
127 folders.Add(rootFolder); 127 folders.Add(rootFolder);
@@ -166,7 +166,7 @@ namespace OpenSim.Region.Communications.OGS1
166 /// <summary> 166 /// <summary>
167 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 167 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
168 /// </summary> 168 /// </summary>
169 public bool AddFolder(InventoryFolderBase folder, LLUUID session_id) 169 public bool AddFolder(InventoryFolderBase folder, UUID session_id)
170 { 170 {
171 try 171 try
172 { 172 {
@@ -186,7 +186,7 @@ namespace OpenSim.Region.Communications.OGS1
186 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 186 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
187 /// </summary> 187 /// </summary>
188 /// <param name="folder"></param> 188 /// <param name="folder"></param>
189 public bool UpdateFolder(InventoryFolderBase folder, LLUUID session_id) 189 public bool UpdateFolder(InventoryFolderBase folder, UUID session_id)
190 { 190 {
191 try 191 try
192 { 192 {
@@ -206,7 +206,7 @@ namespace OpenSim.Region.Communications.OGS1
206 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 206 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
207 /// </summary> 207 /// </summary>
208 /// <param name="folder"></param> 208 /// <param name="folder"></param>
209 public bool MoveFolder(InventoryFolderBase folder, LLUUID session_id) 209 public bool MoveFolder(InventoryFolderBase folder, UUID session_id)
210 { 210 {
211 try 211 try
212 { 212 {
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Communications.OGS1
225 /// <summary> 225 /// <summary>
226 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 226 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
227 /// </summary> 227 /// </summary>
228 public bool PurgeFolder(InventoryFolderBase folder, LLUUID session_id) 228 public bool PurgeFolder(InventoryFolderBase folder, UUID session_id)
229 { 229 {
230 try 230 try
231 { 231 {
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Communications.OGS1
244 /// <summary> 244 /// <summary>
245 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 245 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
246 /// </summary> 246 /// </summary>
247 public bool AddItem(InventoryItemBase item, LLUUID session_id) 247 public bool AddItem(InventoryItemBase item, UUID session_id)
248 { 248 {
249 try 249 try
250 { 250 {
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Communications.OGS1
261 } 261 }
262 262
263 // TODO: this is a temporary workaround, the UpdateInventoryItem method need to be implemented 263 // TODO: this is a temporary workaround, the UpdateInventoryItem method need to be implemented
264 public bool UpdateItem(InventoryItemBase item, LLUUID session_id) 264 public bool UpdateItem(InventoryItemBase item, UUID session_id)
265 { 265 {
266 try 266 try
267 { 267 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Communications.OGS1
280 /// <summary> 280 /// <summary>
281 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> 281 /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see>
282 /// </summary> 282 /// </summary>
283 public bool DeleteItem(InventoryItemBase item, LLUUID session_id) 283 public bool DeleteItem(InventoryItemBase item, UUID session_id)
284 { 284 {
285 try 285 try
286 { 286 {
@@ -296,12 +296,12 @@ namespace OpenSim.Region.Communications.OGS1
296 return false; 296 return false;
297 } 297 }
298 298
299 public bool HasInventoryForUser(LLUUID userID) 299 public bool HasInventoryForUser(UUID userID)
300 { 300 {
301 return false; 301 return false;
302 } 302 }
303 303
304 public InventoryFolderBase RequestRootFolder(LLUUID userID) 304 public InventoryFolderBase RequestRootFolder(UUID userID)
305 { 305 {
306 return null; 306 return null;
307 } 307 }
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 2223aeb..317be13 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -64,27 +64,27 @@ namespace OpenSim.Region.Communications.OGS1
64 UserProfileData userData = new UserProfileData(); 64 UserProfileData userData = new UserProfileData();
65 userData.FirstName = (string) data["firstname"]; 65 userData.FirstName = (string) data["firstname"];
66 userData.SurName = (string) data["lastname"]; 66 userData.SurName = (string) data["lastname"];
67 userData.ID = new LLUUID((string) data["uuid"]); 67 userData.ID = new UUID((string) data["uuid"]);
68 userData.UserInventoryURI = (string) data["server_inventory"]; 68 userData.UserInventoryURI = (string) data["server_inventory"];
69 userData.UserAssetURI = (string) data["server_asset"]; 69 userData.UserAssetURI = (string) data["server_asset"];
70 userData.FirstLifeAboutText = (string) data["profile_firstlife_about"]; 70 userData.FirstLifeAboutText = (string) data["profile_firstlife_about"];
71 userData.FirstLifeImage = new LLUUID((string) data["profile_firstlife_image"]); 71 userData.FirstLifeImage = new UUID((string) data["profile_firstlife_image"]);
72 userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); 72 userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]);
73 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]); 73 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]);
74 userData.AboutText = (string)data["profile_about"]; 74 userData.AboutText = (string)data["profile_about"];
75 userData.Image = new LLUUID((string) data["profile_image"]); 75 userData.Image = new UUID((string) data["profile_image"]);
76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); 76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]);
77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]); 77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]);
78 if (data.Contains("home_region_id")) 78 if (data.Contains("home_region_id"))
79 userData.HomeRegionID = new LLUUID((string)data["home_region_id"]); 79 userData.HomeRegionID = new UUID((string)data["home_region_id"]);
80 else 80 else
81 userData.HomeRegionID = LLUUID.Zero; 81 userData.HomeRegionID = UUID.Zero;
82 userData.HomeLocation = 82 userData.HomeLocation =
83 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]), 83 new Vector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]),
84 (float) Convert.ToDecimal((string) data["home_coordinates_y"]), 84 (float) Convert.ToDecimal((string) data["home_coordinates_y"]),
85 (float) Convert.ToDecimal((string) data["home_coordinates_z"])); 85 (float) Convert.ToDecimal((string) data["home_coordinates_z"]));
86 userData.HomeLookAt = 86 userData.HomeLookAt =
87 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]), 87 new Vector3((float) Convert.ToDecimal((string) data["home_look_x"]),
88 (float) Convert.ToDecimal((string) data["home_look_y"]), 88 (float) Convert.ToDecimal((string) data["home_look_y"]),
89 (float) Convert.ToDecimal((string) data["home_look_z"])); 89 (float) Convert.ToDecimal((string) data["home_look_z"]));
90 if (data.Contains("user_flags")) 90 if (data.Contains("user_flags"))
@@ -100,9 +100,9 @@ namespace OpenSim.Region.Communications.OGS1
100 userData.CustomType = ""; 100 userData.CustomType = "";
101 101
102 if (data.Contains("partner")) 102 if (data.Contains("partner"))
103 userData.Partner = new LLUUID((string) data["partner"]); 103 userData.Partner = new UUID((string) data["partner"]);
104 else 104 else
105 userData.Partner = LLUUID.Zero; 105 userData.Partner = UUID.Zero;
106 106
107 return userData; 107 return userData;
108 } 108 }
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Communications.OGS1
112 /// </summary> 112 /// </summary>
113 /// <param name="avatarID"></param> 113 /// <param name="avatarID"></param>
114 /// <returns>null if the request fails</returns> 114 /// <returns>null if the request fails</returns>
115 public UserAgentData GetAgentByUUID(LLUUID userId) 115 public UserAgentData GetAgentByUUID(UUID userId)
116 { 116 {
117 try 117 try
118 { 118 {
@@ -131,11 +131,11 @@ namespace OpenSim.Region.Communications.OGS1
131 "): " + (string)respData["error_desc"]); 131 "): " + (string)respData["error_desc"]);
132 return null; 132 return null;
133 } 133 }
134 LLUUID sessionid = LLUUID.Zero; 134 UUID sessionid = UUID.Zero;
135 135
136 UserAgentData userAgent = new UserAgentData(); 136 UserAgentData userAgent = new UserAgentData();
137 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]); 137 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]);
138 Helpers.TryParse((string)respData["sessionid"], out sessionid); 138 UUID.TryParse((string)respData["sessionid"], out sessionid);
139 userAgent.SessionID = sessionid; 139 userAgent.SessionID = sessionid;
140 140
141 if ((string)respData["agent_online"] == "TRUE") 141 if ((string)respData["agent_online"] == "TRUE")
@@ -183,17 +183,17 @@ namespace OpenSim.Region.Communications.OGS1
183 } 183 }
184 } 184 }
185 185
186 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) 186 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data)
187 { 187 {
188 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 188 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
189 int pickercount = Convert.ToInt32((string) data["avcount"]); 189 int pickercount = Convert.ToInt32((string) data["avcount"]);
190 LLUUID respqueryID = new LLUUID((string) data["queryid"]); 190 UUID respqueryID = new UUID((string) data["queryid"]);
191 if (queryID == respqueryID) 191 if (queryID == respqueryID)
192 { 192 {
193 for (int i = 0; i < pickercount; i++) 193 for (int i = 0; i < pickercount; i++)
194 { 194 {
195 AvatarPickerAvatar apicker = new AvatarPickerAvatar(); 195 AvatarPickerAvatar apicker = new AvatarPickerAvatar();
196 LLUUID avatarID = new LLUUID((string) data["avatarid" + i.ToString()]); 196 UUID avatarID = new UUID((string) data["avatarid" + i.ToString()]);
197 string firstname = (string) data["firstname" + i.ToString()]; 197 string firstname = (string) data["firstname" + i.ToString()];
198 string lastname = (string) data["lastname" + i.ToString()]; 198 string lastname = (string) data["lastname" + i.ToString()];
199 apicker.AvatarID = avatarID; 199 apicker.AvatarID = avatarID;
@@ -219,8 +219,8 @@ namespace OpenSim.Region.Communications.OGS1
219 { 219 {
220 FriendListItem buddylistitem = new FriendListItem(); 220 FriendListItem buddylistitem = new FriendListItem();
221 221
222 buddylistitem.FriendListOwner = new LLUUID((string)data["ownerID" + i.ToString()]); 222 buddylistitem.FriendListOwner = new UUID((string)data["ownerID" + i.ToString()]);
223 buddylistitem.Friend = new LLUUID((string)data["friendID" + i.ToString()]); 223 buddylistitem.Friend = new UUID((string)data["friendID" + i.ToString()]);
224 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]); 224 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]);
225 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]); 225 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]);
226 226
@@ -239,11 +239,11 @@ namespace OpenSim.Region.Communications.OGS1
239 /// <param name="posx">final position x</param> 239 /// <param name="posx">final position x</param>
240 /// <param name="posy">final position y</param> 240 /// <param name="posy">final position y</param>
241 /// <param name="posz">final position z</param> 241 /// <param name="posz">final position z</param>
242 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 242 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
243 { 243 {
244 Hashtable param = new Hashtable(); 244 Hashtable param = new Hashtable();
245 param["avatar_uuid"] = userid.UUID.ToString(); 245 param["avatar_uuid"] = userid.ToString();
246 param["region_uuid"] = regionid.UUID.ToString(); 246 param["region_uuid"] = regionid.ToString();
247 param["region_handle"] = regionhandle.ToString(); 247 param["region_handle"] = regionhandle.ToString();
248 param["region_pos_x"] = posx.ToString(); 248 param["region_pos_x"] = posx.ToString();
249 param["region_pos_y"] = posy.ToString(); 249 param["region_pos_y"] = posy.ToString();
@@ -268,7 +268,7 @@ namespace OpenSim.Region.Communications.OGS1
268 return GetUserProfile(firstName + " " + lastName); 268 return GetUserProfile(firstName + " " + lastName);
269 } 269 }
270 270
271 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 271 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
272 { 272 {
273 Hashtable param = new Hashtable(); 273 Hashtable param = new Hashtable();
274 param.Add("avatar_id", avatarid.ToString()); 274 param.Add("avatar_id", avatarid.ToString());
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Communications.OGS1
320 } 320 }
321 } 321 }
322 322
323 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 323 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
324 { 324 {
325 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 325 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
326 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]"); 326 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]");
@@ -379,7 +379,7 @@ namespace OpenSim.Region.Communications.OGS1
379 /// </summary> 379 /// </summary>
380 /// <param name="avatarID"></param> 380 /// <param name="avatarID"></param>
381 /// <returns>null if the request fails</returns> 381 /// <returns>null if the request fails</returns>
382 public UserProfileData GetUserProfile(LLUUID avatarID) 382 public UserProfileData GetUserProfile(UUID avatarID)
383 { 383 {
384 try 384 try
385 { 385 {
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Communications.OGS1
404 } 404 }
405 405
406 406
407 public void ClearUserAgent(LLUUID avatarID) 407 public void ClearUserAgent(UUID avatarID)
408 { 408 {
409 // TODO: implement 409 // TODO: implement
410 } 410 }
@@ -435,7 +435,7 @@ namespace OpenSim.Region.Communications.OGS1
435 /// </summary> 435 /// </summary>
436 /// <param name="uuid"></param> 436 /// <param name="uuid"></param>
437 /// <returns></returns> 437 /// <returns></returns>
438 public UserProfileData SetupMasterUser(LLUUID uuid) 438 public UserProfileData SetupMasterUser(UUID uuid)
439 { 439 {
440 UserProfileData data = GetUserProfile(uuid); 440 UserProfileData data = GetUserProfile(uuid);
441 441
@@ -448,7 +448,7 @@ namespace OpenSim.Region.Communications.OGS1
448 return data; 448 return data;
449 } 449 }
450 450
451 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 451 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
452 { 452 {
453 throw new Exception("The method or operation is not implemented."); 453 throw new Exception("The method or operation is not implemented.");
454 } 454 }
@@ -523,13 +523,13 @@ namespace OpenSim.Region.Communications.OGS1
523 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 523 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
524 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 524 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
525 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> 525 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
526 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 526 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
527 { 527 {
528 try 528 try
529 { 529 {
530 Hashtable param = new Hashtable(); 530 Hashtable param = new Hashtable();
531 param["ownerID"] = friendlistowner.UUID.ToString(); 531 param["ownerID"] = friendlistowner.ToString();
532 param["friendID"] = friend.UUID.ToString(); 532 param["friendID"] = friend.ToString();
533 param["friendPerms"] = perms.ToString(); 533 param["friendPerms"] = perms.ToString();
534 IList parameters = new ArrayList(); 534 IList parameters = new ArrayList();
535 parameters.Add(param); 535 parameters.Add(param);
@@ -575,13 +575,13 @@ namespace OpenSim.Region.Communications.OGS1
575 /// </summary> 575 /// </summary>
576 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 576 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
577 /// <param name="friend">The Ex-friend agent</param> 577 /// <param name="friend">The Ex-friend agent</param>
578 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 578 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
579 { 579 {
580 try 580 try
581 { 581 {
582 Hashtable param = new Hashtable(); 582 Hashtable param = new Hashtable();
583 param["ownerID"] = friendlistowner.UUID.ToString(); 583 param["ownerID"] = friendlistowner.ToString();
584 param["friendID"] = friend.UUID.ToString(); 584 param["friendID"] = friend.ToString();
585 585
586 IList parameters = new ArrayList(); 586 IList parameters = new ArrayList();
587 parameters.Add(param); 587 parameters.Add(param);
@@ -627,13 +627,13 @@ namespace OpenSim.Region.Communications.OGS1
627 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 627 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
628 /// <param name="friend">The agent that is getting or loosing permissions</param> 628 /// <param name="friend">The agent that is getting or loosing permissions</param>
629 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> 629 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
630 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 630 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
631 { 631 {
632 try 632 try
633 { 633 {
634 Hashtable param = new Hashtable(); 634 Hashtable param = new Hashtable();
635 param["ownerID"] = friendlistowner.UUID.ToString(); 635 param["ownerID"] = friendlistowner.ToString();
636 param["friendID"] = friend.UUID.ToString(); 636 param["friendID"] = friend.ToString();
637 param["friendPerms"] = perms.ToString(); 637 param["friendPerms"] = perms.ToString();
638 IList parameters = new ArrayList(); 638 IList parameters = new ArrayList();
639 parameters.Add(param); 639 parameters.Add(param);
@@ -672,17 +672,17 @@ namespace OpenSim.Region.Communications.OGS1
672 } 672 }
673 } 673 }
674 /// <summary> 674 /// <summary>
675 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 675 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
676 /// </summary> 676 /// </summary>
677 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 677 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
678 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 678 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
679 { 679 {
680 List<FriendListItem> buddylist = new List<FriendListItem>(); 680 List<FriendListItem> buddylist = new List<FriendListItem>();
681 681
682 try 682 try
683 { 683 {
684 Hashtable param = new Hashtable(); 684 Hashtable param = new Hashtable();
685 param["ownerID"] = friendlistowner.UUID.ToString(); 685 param["ownerID"] = friendlistowner.ToString();
686 686
687 IList parameters = new ArrayList(); 687 IList parameters = new ArrayList();
688 parameters.Add(param); 688 parameters.Add(param);
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Communications.OGS1
708 #endregion 708 #endregion
709 709
710 /// Appearance 710 /// Appearance
711 public AvatarAppearance GetUserAppearance(LLUUID user) 711 public AvatarAppearance GetUserAppearance(UUID user)
712 { 712 {
713 AvatarAppearance appearance = null; 713 AvatarAppearance appearance = null;
714 714
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Communications.OGS1
733 return appearance; 733 return appearance;
734 } 734 }
735 735
736 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 736 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
737 { 737 {
738 try 738 try
739 { 739 {
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index 7ddd072..8030b59 100644
--- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
@@ -34,7 +34,7 @@ using log4net;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35using OpenSim.Framework.Communications.Capabilities; 35using OpenSim.Framework.Communications.Capabilities;
36using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 36using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
37using libsecondlife; 37using OpenMetaverse;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39 39
40namespace OpenSim.Region.DataSnapshot 40namespace OpenSim.Region.DataSnapshot
@@ -64,7 +64,7 @@ namespace OpenSim.Region.DataSnapshot
64 //harbl 64 //harbl
65 } 65 }
66 66
67 public void OnRegisterCaps(LLUUID agentID, Caps caps) 67 public void OnRegisterCaps(UUID agentID, Caps caps)
68 { 68 {
69 m_log.Info("[DATASNAPSHOT]: Registering service discovery capability for " + agentID); 69 m_log.Info("[DATASNAPSHOT]: Registering service discovery capability for " + agentID);
70 string capsBase = "/CAPS/" + caps.CapsObjectPath; 70 string capsBase = "/CAPS/" + caps.CapsObjectPath;
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index da72b61..46c9b3c 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -34,7 +34,7 @@ using System.Reflection;
34using System.Text; 34using System.Text;
35using System.Timers; 35using System.Timers;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using OpenSim.Framework; 40using OpenSim.Framework;
@@ -42,7 +42,7 @@ using OpenSim.Framework.Communications;
42using OpenSim.Region.DataSnapshot.Interfaces; 42using OpenSim.Region.DataSnapshot.Interfaces;
43using OpenSim.Region.Environment.Interfaces; 43using OpenSim.Region.Environment.Interfaces;
44using OpenSim.Region.Environment.Scenes; 44using OpenSim.Region.Environment.Scenes;
45using libsecondlife.Packets; 45using OpenMetaverse.Packets;
46 46
47namespace OpenSim.Region.DataSnapshot 47namespace OpenSim.Region.DataSnapshot
48{ 48{
@@ -219,7 +219,7 @@ namespace OpenSim.Region.DataSnapshot
219 return null; 219 return null;
220 } 220 }
221 221
222 public Scene SceneForUUID(LLUUID id) 222 public Scene SceneForUUID(UUID id)
223 { 223 {
224 foreach (Scene scene in m_scenes) 224 foreach (Scene scene in m_scenes)
225 if (scene.RegionInfo.RegionID == id) 225 if (scene.RegionInfo.RegionID == id)
diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs
index eccdcf1..f25aad4 100644
--- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Xml; 29using System.Xml;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.DataSnapshot.Interfaces; 32using OpenSim.Region.DataSnapshot.Interfaces;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
@@ -54,8 +54,8 @@ namespace OpenSim.Region.DataSnapshot.Providers
54 //Now in DataSnapshotProvider module form! 54 //Now in DataSnapshotProvider module form!
55 XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); 55 XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", "");
56 56
57 LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 57 UUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
58 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 58 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
59 ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner; 59 ownerid = m_scene.RegionInfo.EstateSettings.EstateOwner;
60 60
61 // Can't fail because if it weren't in cache, we wouldn't be here 61 // Can't fail because if it weren't in cache, we wouldn't be here
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
index 930ea8f..b0ba29d 100644
--- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
@@ -29,14 +29,14 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Xml; 31using System.Xml;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Region.DataSnapshot.Interfaces; 35using OpenSim.Region.DataSnapshot.Interfaces;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.Environment.Modules.World.Land; 37using OpenSim.Region.Environment.Modules.World.Land;
38using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
39using libsecondlife.Packets; 39using OpenMetaverse.Packets;
40 40
41namespace OpenSim.Region.DataSnapshot.Providers 41namespace OpenSim.Region.DataSnapshot.Providers
42{ 42{
@@ -179,16 +179,16 @@ namespace OpenSim.Region.DataSnapshot.Providers
179 179
180 //default location 180 //default location
181 XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); 181 XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", "");
182 LLVector3 loc = parcel.UserLocation; 182 Vector3 loc = parcel.UserLocation;
183 if (loc.Equals(LLVector3.Zero)) // This test is mute at this point: the location is wrong by default 183 if (loc.Equals(Vector3.Zero)) // This test is mute at this point: the location is wrong by default
184 loc = new LLVector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2); 184 loc = new Vector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2);
185 tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString(); 185 tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString();
186 xmlparcel.AppendChild(tpLocation); 186 xmlparcel.AppendChild(tpLocation);
187 187
188 //TODO: figure how to figure out teleport system landData.landingType 188 //TODO: figure how to figure out teleport system landData.landingType
189 189
190 //land texture snapshot uuid 190 //land texture snapshot uuid
191 if (parcel.SnapshotID != LLUUID.Zero) 191 if (parcel.SnapshotID != UUID.Zero)
192 { 192 {
193 XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", ""); 193 XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", "");
194 textureuuid.InnerText = parcel.SnapshotID.ToString(); 194 textureuuid.InnerText = parcel.SnapshotID.ToString();
@@ -196,7 +196,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
196 } 196 }
197 197
198 //attached user and group 198 //attached user and group
199 if (parcel.GroupID != LLUUID.Zero) 199 if (parcel.GroupID != UUID.Zero)
200 { 200 {
201 XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", ""); 201 XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", "");
202 XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); 202 XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
@@ -213,7 +213,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
213 { 213 {
214 XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", ""); 214 XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", "");
215 215
216 LLUUID userOwnerUUID = parcel.OwnerID; 216 UUID userOwnerUUID = parcel.OwnerID;
217 217
218 XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); 218 XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
219 useruuid.InnerText = userOwnerUUID.ToString(); 219 useruuid.InnerText = userOwnerUUID.ToString();
@@ -298,7 +298,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
298 IClientAPI remote_client) { this.Stale = true; }; 298 IClientAPI remote_client) { this.Stale = true; };
299 client.OnParcelPropertiesUpdateRequest += delegate(LandUpdateArgs args, int local_id, 299 client.OnParcelPropertiesUpdateRequest += delegate(LandUpdateArgs args, int local_id,
300 IClientAPI remote_client) { this.Stale = true; }; 300 IClientAPI remote_client) { this.Stale = true; };
301 client.OnParcelBuy += delegate (LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, 301 client.OnParcelBuy += delegate (UUID agentId, UUID groupId, bool final, bool groupOwned,
302 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) 302 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
303 { this.Stale = true; }; 303 { this.Stale = true; };
304 } 304 }
@@ -315,4 +315,4 @@ namespace OpenSim.Region.DataSnapshot.Providers
315 315
316 #endregion 316 #endregion
317 } 317 }
318} \ No newline at end of file 318}
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
index d2a5051..c23c697 100644
--- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs
@@ -33,7 +33,7 @@ using log4net;
33using OpenSim.Region.DataSnapshot.Interfaces; 33using OpenSim.Region.DataSnapshot.Interfaces;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using libsecondlife; 36using OpenMetaverse;
37 37
38namespace OpenSim.Region.DataSnapshot.Providers 38namespace OpenSim.Region.DataSnapshot.Providers
39{ 39{
@@ -59,29 +59,29 @@ namespace OpenSim.Region.DataSnapshot.Providers
59 //Detect object data changes by hooking into the IClientAPI. 59 //Detect object data changes by hooking into the IClientAPI.
60 //Very dirty, and breaks whenever someone changes the client API. 60 //Very dirty, and breaks whenever someone changes the client API.
61 61
62 client.OnAddPrim += delegate (LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, 62 client.OnAddPrim += delegate (UUID ownerID, Vector3 RayEnd, Quaternion rot,
63 PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 63 PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
64 byte RayEndIsIntersection) { this.Stale = true; }; 64 byte RayEndIsIntersection) { this.Stale = true; };
65 client.OnLinkObjects += delegate (IClientAPI remoteClient, uint parent, List<uint> children) 65 client.OnLinkObjects += delegate (IClientAPI remoteClient, uint parent, List<uint> children)
66 { this.Stale = true; }; 66 { this.Stale = true; };
67 client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; }; 67 client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; };
68 client.OnGrabUpdate += delegate(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, 68 client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos,
69 IClientAPI remoteClient) { this.Stale = true; }; 69 IClientAPI remoteClient) { this.Stale = true; };
70 client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, 70 client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt,
71 LLQuaternion rot) { this.Stale = true; }; 71 Quaternion rot) { this.Stale = true; };
72 client.OnObjectDuplicate += delegate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, 72 client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID,
73 LLUUID GroupID) { this.Stale = true; }; 73 UUID GroupID) { this.Stale = true; };
74 client.OnObjectDuplicateOnRay += delegate(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 74 client.OnObjectDuplicateOnRay += delegate(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
75 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, bool BypassRaycast, 75 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart, bool BypassRaycast,
76 bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) { this.Stale = true; }; 76 bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) { this.Stale = true; };
77 client.OnObjectIncludeInSearch += delegate(IClientAPI remoteClient, bool IncludeInSearch, uint localID) 77 client.OnObjectIncludeInSearch += delegate(IClientAPI remoteClient, bool IncludeInSearch, uint localID)
78 { this.Stale = true; }; 78 { this.Stale = true; };
79 client.OnObjectPermissions += delegate(IClientAPI controller, LLUUID agentID, LLUUID sessionID, 79 client.OnObjectPermissions += delegate(IClientAPI controller, UUID agentID, UUID sessionID,
80 byte field, uint localId, uint mask, byte set) { this.Stale = true; }; 80 byte field, uint localId, uint mask, byte set) { this.Stale = true; };
81 client.OnRezObject += delegate(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, 81 client.OnRezObject += delegate(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd,
82 LLVector3 RayStart, LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 82 Vector3 RayStart, UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
83 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, bool RezSelected, 83 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, bool RezSelected,
84 bool RemoveItem, LLUUID fromTaskID) { this.Stale = true; }; 84 bool RemoveItem, UUID fromTaskID) { this.Stale = true; };
85 } 85 }
86 86
87 public Scene GetParentScene 87 public Scene GetParentScene
@@ -105,11 +105,11 @@ namespace OpenSim.Region.DataSnapshot.Providers
105 105
106 m_log.Debug("[DATASNAPSHOT]: Found object " + obj.Name + " in scene"); 106 m_log.Debug("[DATASNAPSHOT]: Found object " + obj.Name + " in scene");
107 107
108 if ((obj.RootPart.Flags & LLObject.ObjectFlags.JointWheel) == LLObject.ObjectFlags.JointWheel) { 108 if ((obj.RootPart.Flags & PrimFlags.JointWheel) == PrimFlags.JointWheel) {
109 XmlNode xmlobject = nodeFactory.CreateNode(XmlNodeType.Element, "object", ""); 109 XmlNode xmlobject = nodeFactory.CreateNode(XmlNodeType.Element, "object", "");
110 110
111 node = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); 111 node = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", "");
112 node.InnerText = obj.UUID.ToString(); 112 node.InnerText = obj.ToString();
113 xmlobject.AppendChild(node); 113 xmlobject.AppendChild(node);
114 114
115 SceneObjectPart m_rootPart = null; 115 SceneObjectPart m_rootPart = null;
@@ -170,4 +170,4 @@ namespace OpenSim.Region.DataSnapshot.Providers
170 170
171 public event ProviderStale OnStale; 171 public event ProviderStale OnStale;
172 } 172 }
173} \ No newline at end of file 173}
diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
index e1a6651..d913cc5 100644
--- a/OpenSim/Region/DataSnapshot/SnapshotStore.cs
+++ b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
@@ -32,7 +32,7 @@ using System.Xml;
32using System.IO; 32using System.IO;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34using OpenSim.Region.DataSnapshot.Interfaces; 34using OpenSim.Region.DataSnapshot.Interfaces;
35using libsecondlife; 35using OpenMetaverse;
36 36
37namespace OpenSim.Region.DataSnapshot 37namespace OpenSim.Region.DataSnapshot
38{ 38{
@@ -211,7 +211,7 @@ namespace OpenSim.Region.DataSnapshot
211 private string DataFileNameScene(Scene scene) 211 private string DataFileNameScene(Scene scene)
212 { 212 {
213 return Path.Combine(m_directory, Path.ChangeExtension(scene.RegionInfo.RegionName, "xml")); 213 return Path.Combine(m_directory, Path.ChangeExtension(scene.RegionInfo.RegionName, "xml"));
214 //return (m_snapsDir + Path.DirectorySeparatorChar + scene.RegionInfo.RegionName + ".xml"); 214 //return (m_snapsDir + Path.DirectorySeparatorChar + scene.RegionInfo.RegionName + ".Xml");
215 } 215 }
216 216
217 private XmlNode MakeRegionNode(Scene scene, XmlDocument basedoc) 217 private XmlNode MakeRegionNode(Scene scene, XmlDocument basedoc)
diff --git a/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
index c099fa1..90d1c12 100644
--- a/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
+++ b/OpenSim/Region/Environment/Interfaces/IAgentAssetTransactions.cs
@@ -25,20 +25,20 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30 30
31namespace OpenSim.Region.Environment.Interfaces 31namespace OpenSim.Region.Environment.Interfaces
32{ 32{
33 public interface IAgentAssetTransactions 33 public interface IAgentAssetTransactions
34 { 34 {
35 void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, 35 void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
36 InventoryItemBase item); 36 InventoryItemBase item);
37 37
38 void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 38 void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
39 uint callbackID, string description, string name, sbyte invType, 39 uint callbackID, string description, string name, sbyte invType,
40 sbyte type, byte wearableType, uint nextOwnerMask); 40 sbyte type, byte wearableType, uint nextOwnerMask);
41 41
42 void RemoveAgentAssetTransactions(LLUUID userID); 42 void RemoveAgentAssetTransactions(UUID userID);
43 } 43 }
44} 44}
diff --git a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
index d03e167..a722833 100644
--- a/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
+++ b/OpenSim/Region/Environment/Interfaces/IAvatarFactory.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public interface IAvatarFactory 34 public interface IAvatarFactory
35 { 35 {
36 bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance); 36 bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance);
37 void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance); 37 void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance);
38 } 38 }
39} 39}
diff --git a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
index aeb47e1..c54c697 100644
--- a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
+++ b/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
@@ -26,22 +26,22 @@
26 */ 26 */
27 27
28using System.IO; 28using System.IO;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Region.Environment.Interfaces 31namespace OpenSim.Region.Environment.Interfaces
32{ 32{
33 public interface IDynamicTextureManager 33 public interface IDynamicTextureManager
34 { 34 {
35 void RegisterRender(string handleType, IDynamicTextureRender render); 35 void RegisterRender(string handleType, IDynamicTextureRender render);
36 void ReturnData(LLUUID id, byte[] data); 36 void ReturnData(UUID id, byte[] data);
37 37
38 LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, 38 UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams,
39 int updateTimer); 39 int updateTimer);
40 LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, 40 UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams,
41 int updateTimer, bool SetBlending, byte AlphaValue); 41 int updateTimer, bool SetBlending, byte AlphaValue);
42 LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, 42 UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams,
43 int updateTimer); 43 int updateTimer);
44 LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, 44 UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams,
45 int updateTimer, bool SetBlending, byte AlphaValue); 45 int updateTimer, bool SetBlending, byte AlphaValue);
46 } 46 }
47 47
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Environment.Interfaces
52 bool SupportsAsynchronous(); 52 bool SupportsAsynchronous();
53 byte[] ConvertUrl(string url, string extraParams); 53 byte[] ConvertUrl(string url, string extraParams);
54 byte[] ConvertStream(Stream data, string extraParams); 54 byte[] ConvertStream(Stream data, string extraParams);
55 bool AsyncConvertUrl(LLUUID id, string url, string extraParams); 55 bool AsyncConvertUrl(UUID id, string url, string extraParams);
56 bool AsyncConvertData(LLUUID id, string bodyData, string extraParams); 56 bool AsyncConvertData(UUID id, string bodyData, string extraParams);
57 } 57 }
58} 58}
diff --git a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs b/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
index 3726ba5..5f1bcf3 100644
--- a/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IEmailModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Interfaces
42 42
43 public interface IEmailModule : IRegionModule 43 public interface IEmailModule : IRegionModule
44 { 44 {
45 void SendEmail(LLUUID objectID, string address, string subject, string body); 45 void SendEmail(UUID objectID, string address, string subject, string body);
46 Email GetNextEmail(LLUUID objectID, string sender, string subject); 46 Email GetNextEmail(UUID objectID, string sender, string subject);
47 } 47 }
48} 48}
diff --git a/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
index ecac2ca..f2d14a6 100644
--- a/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
+++ b/OpenSim/Region/Environment/Interfaces/IEstateDataStore.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Interfaces
35 { 35 {
36 void Initialise(string connectstring); 36 void Initialise(string connectstring);
37 37
38 EstateSettings LoadEstateSettings(LLUUID regionID); 38 EstateSettings LoadEstateSettings(UUID regionID);
39 void StoreEstateSettings(EstateSettings es); 39 void StoreEstateSettings(EstateSettings es);
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs b/OpenSim/Region/Environment/Interfaces/IEstateModule.cs
index bfe3591..70c5800 100644
--- a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IEstateModule.cs
@@ -27,13 +27,13 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public interface IEstateModule : IRegionModule 34 public interface IEstateModule : IRegionModule
35 { 35 {
36 uint GetRegionFlags(); 36 uint GetRegionFlags();
37 bool IsManager(LLUUID avatarID); 37 bool IsManager(UUID avatarID);
38 } 38 }
39} 39}
diff --git a/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs b/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs
index 3a635de..216782b 100644
--- a/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs
+++ b/OpenSim/Region/Environment/Interfaces/IHttpRequests.cs
@@ -26,17 +26,17 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment.Modules.Scripting.HttpRequest; 30using OpenSim.Region.Environment.Modules.Scripting.HttpRequest;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public interface IHttpRequests 34 public interface IHttpRequests
35 { 35 {
36 LLUUID MakeHttpRequest(string url, string parameters, string body); 36 UUID MakeHttpRequest(string url, string parameters, string body);
37 LLUUID StartHttpRequest(uint localID, LLUUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body); 37 UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body);
38 void StopHttpRequest(uint m_localID, LLUUID m_itemID); 38 void StopHttpRequest(uint m_localID, UUID m_itemID);
39 HttpRequestClass GetNextCompletedRequest(); 39 HttpRequestClass GetNextCompletedRequest();
40 void RemoveCompletedRequest(LLUUID id); 40 void RemoveCompletedRequest(UUID id);
41 } 41 }
42} 42}
diff --git a/OpenSim/Region/Environment/Interfaces/IInventoryModule.cs b/OpenSim/Region/Environment/Interfaces/IInventoryModule.cs
index c93694a9..50f4af3 100644
--- a/OpenSim/Region/Environment/Interfaces/IInventoryModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IInventoryModule.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment; 30using OpenSim.Region.Environment;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32 32
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
37 /// </summary> 37 /// </summary>
38 public interface IInventoryModule 38 public interface IInventoryModule
39 { 39 {
40 void SetRootAgentScene(LLUUID agentID, Scene scene); 40 void SetRootAgentScene(UUID agentID, Scene scene);
41 bool NeedSceneCacheClear(LLUUID agentID, Scene scene); 41 bool NeedSceneCacheClear(UUID agentID, Scene scene);
42 } 42 }
43} 43}
diff --git a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs
index c1f6f45..4a74949 100644
--- a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs
+++ b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32 32
@@ -35,13 +35,13 @@ namespace OpenSim.Region.Environment.Interfaces
35 public interface ILandChannel 35 public interface ILandChannel
36 { 36 {
37 37
38 List<ILandObject> ParcelsNearPoint(LLVector3 position); 38 List<ILandObject> ParcelsNearPoint(Vector3 position);
39 ILandObject GetLandObject(int x, int y); 39 ILandObject GetLandObject(int x, int y);
40 ILandObject GetLandObject(float x, float y); 40 ILandObject GetLandObject(float x, float y);
41 bool IsLandPrimCountTainted(); 41 bool IsLandPrimCountTainted();
42 bool IsForcefulBansAllowed(); 42 bool IsForcefulBansAllowed();
43 void UpdateLandObject(int localID, LandData data); 43 void UpdateLandObject(int localID, LandData data);
44 void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient); 44 void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
45 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); 45 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
46 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); 46 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
47 } 47 }
diff --git a/OpenSim/Region/Environment/Interfaces/ILandObject.cs b/OpenSim/Region/Environment/Interfaces/ILandObject.cs
index 750b387..96fa378 100644
--- a/OpenSim/Region/Environment/Interfaces/ILandObject.cs
+++ b/OpenSim/Region/Environment/Interfaces/ILandObject.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32 32
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Interfaces
42 42
43 LandData landData { get; set; } 43 LandData landData { get; set; }
44 bool[,] landBitmap { get; set; } 44 bool[,] landBitmap { get; set; }
45 LLUUID regionUUID { get; } 45 UUID regionUUID { get; }
46 bool containsPoint(int x, int y); 46 bool containsPoint(int x, int y);
47 ILandObject Copy(); 47 ILandObject Copy();
48 48
@@ -50,12 +50,12 @@ namespace OpenSim.Region.Environment.Interfaces
50 50
51 void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); 51 void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
52 void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client); 52 void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
53 bool isEitherBannedOrRestricted(LLUUID avatar); 53 bool isEitherBannedOrRestricted(UUID avatar);
54 bool isBannedFromLand(LLUUID avatar); 54 bool isBannedFromLand(UUID avatar);
55 bool isRestrictedFromLand(LLUUID avatar); 55 bool isRestrictedFromLand(UUID avatar);
56 void sendLandUpdateToClient(IClientAPI remote_client); 56 void sendLandUpdateToClient(IClientAPI remote_client);
57 List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag); 57 List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag);
58 void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, IClientAPI remote_client); 58 void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
59 void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client); 59 void updateAccessList(uint flags, List<ParcelManager.ParcelAccessEntry> entries, IClientAPI remote_client);
60 void updateLandBitmapByteArray(); 60 void updateLandBitmapByteArray();
61 void setLandBitmapFromByteArray(); 61 void setLandBitmapFromByteArray();
@@ -71,11 +71,11 @@ namespace OpenSim.Region.Environment.Interfaces
71 void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client); 71 void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client);
72 void sendLandObjectOwners(IClientAPI remote_client); 72 void sendLandObjectOwners(IClientAPI remote_client);
73 void returnObject(SceneObjectGroup obj); 73 void returnObject(SceneObjectGroup obj);
74 void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client); 74 void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client);
75 void resetLandPrimCounts(); 75 void resetLandPrimCounts();
76 void addPrimToCount(SceneObjectGroup obj); 76 void addPrimToCount(SceneObjectGroup obj);
77 void removePrimFromCount(SceneObjectGroup obj); 77 void removePrimFromCount(SceneObjectGroup obj);
78 void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); 78 void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
79 79
80 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); 80 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
81 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); 81 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
index 4e716a2..5f10ec5 100644
--- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32 32
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Interfaces
46 /// </summary> 46 /// </summary>
47 /// <param name="obj"></param> 47 /// <param name="obj"></param>
48 /// <param name="regionUUID"></param> 48 /// <param name="regionUUID"></param>
49 void StoreObject(SceneObjectGroup obj, LLUUID regionUUID); 49 void StoreObject(SceneObjectGroup obj, UUID regionUUID);
50 50
51 /// <summary> 51 /// <summary>
52 /// Entirely removes the object, including inventory 52 /// Entirely removes the object, including inventory
@@ -54,25 +54,25 @@ namespace OpenSim.Region.Environment.Interfaces
54 /// <param name="uuid"></param> 54 /// <param name="uuid"></param>
55 /// <param name="regionUUID"></param> 55 /// <param name="regionUUID"></param>
56 /// <returns></returns> 56 /// <returns></returns>
57 void RemoveObject(LLUUID uuid, LLUUID regionUUID); 57 void RemoveObject(UUID uuid, UUID regionUUID);
58 58
59 /// <summary> 59 /// <summary>
60 /// Store a prim's inventory 60 /// Store a prim's inventory
61 /// </summary> 61 /// </summary>
62 /// <returns></returns> 62 /// <returns></returns>
63 void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items); 63 void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items);
64 64
65 List<SceneObjectGroup> LoadObjects(LLUUID regionUUID); 65 List<SceneObjectGroup> LoadObjects(UUID regionUUID);
66 66
67 void StoreTerrain(double[,] terrain, LLUUID regionID); 67 void StoreTerrain(double[,] terrain, UUID regionID);
68 double[,] LoadTerrain(LLUUID regionID); 68 double[,] LoadTerrain(UUID regionID);
69 69
70 void StoreLandObject(ILandObject Parcel); 70 void StoreLandObject(ILandObject Parcel);
71 void RemoveLandObject(LLUUID globalID); 71 void RemoveLandObject(UUID globalID);
72 List<LandData> LoadLandObjects(LLUUID regionUUID); 72 List<LandData> LoadLandObjects(UUID regionUUID);
73 73
74 void StoreRegionSettings(RegionSettings rs); 74 void StoreRegionSettings(RegionSettings rs);
75 RegionSettings LoadRegionSettings(LLUUID regionUUID); 75 RegionSettings LoadRegionSettings(UUID regionUUID);
76 76
77 void Shutdown(); 77 void Shutdown();
78 } 78 }
diff --git a/OpenSim/Region/Environment/Interfaces/IScriptModule.cs b/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
index 8d3868e..efe7944 100644
--- a/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
+++ b/OpenSim/Region/Environment/Interfaces/IScriptModule.cs
@@ -27,12 +27,12 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Interfaces 32namespace OpenSim.Region.Environment.Interfaces
33{ 33{
34 public interface IScriptModule : IRegionModule 34 public interface IScriptModule : IRegionModule
35 { 35 {
36 bool GetScriptRunning(LLUUID objectID, LLUUID itemID); 36 bool GetScriptRunning(UUID objectID, UUID itemID);
37 } 37 }
38} 38}
diff --git a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
index c2a55eb..1a33450 100644
--- a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Modules.Scripting.WorldComm; 31using OpenSim.Region.Environment.Modules.Scripting.WorldComm;
32 32
@@ -34,15 +34,15 @@ namespace OpenSim.Region.Environment.Interfaces
34{ 34{
35 public interface IWorldComm 35 public interface IWorldComm
36 { 36 {
37 int Listen(uint LocalID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg); 37 int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
38 void DeliverMessage(ChatTypeEnum type, int channel, string name, LLUUID id, string msg); 38 void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg);
39 bool HasMessages(); 39 bool HasMessages();
40 ListenerInfo GetNextMessage(); 40 ListenerInfo GetNextMessage();
41 void ListenControl(LLUUID itemID, int handle, int active); 41 void ListenControl(UUID itemID, int handle, int active);
42 void ListenRemove(LLUUID itemID, int handle); 42 void ListenRemove(UUID itemID, int handle);
43 void DeleteListener(LLUUID itemID); 43 void DeleteListener(UUID itemID);
44 Object[] GetSerializationData(LLUUID itemID); 44 Object[] GetSerializationData(UUID itemID);
45 void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 45 void CreateFromData(uint localID, UUID itemID, UUID hostID,
46 Object[] data); 46 Object[] data);
47 } 47 }
48} 48}
diff --git a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
index a2c164f..88e9ab5 100644
--- a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
+++ b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
@@ -25,24 +25,24 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; 29using OpenSim.Region.Environment.Modules.Scripting.XMLRPC;
30 30
31namespace OpenSim.Region.Environment.Interfaces 31namespace OpenSim.Region.Environment.Interfaces
32{ 32{
33 public interface IXMLRPC 33 public interface IXMLRPC
34 { 34 {
35 LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID, LLUUID channelID); 35 UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID);
36 void CloseXMLRPCChannel(LLUUID channelKey); 36 void CloseXMLRPCChannel(UUID channelKey);
37 bool hasRequests(); 37 bool hasRequests();
38 void RemoteDataReply(string channel, string message_id, string sdata, int idata); 38 void RemoteDataReply(string channel, string message_id, string sdata, int idata);
39 bool IsEnabled(); 39 bool IsEnabled();
40 RPCRequestInfo GetNextCompletedRequest(); 40 RPCRequestInfo GetNextCompletedRequest();
41 void RemoveCompletedRequest(LLUUID id); 41 void RemoveCompletedRequest(UUID id);
42 void DeleteChannels(LLUUID itemID); 42 void DeleteChannels(UUID itemID);
43 LLUUID SendRemoteData(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata); 43 UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata);
44 SendRemoteDataRequest GetNextCompletedSRDRequest(); 44 SendRemoteDataRequest GetNextCompletedSRDRequest();
45 void RemoveCompletedSRDRequest(LLUUID id); 45 void RemoveCompletedSRDRequest(UUID id);
46 void CancelSRDRequests(LLUUID itemID); 46 void CancelSRDRequests(UUID itemID);
47 } 47 }
48} 48}
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
index d3cf41e..3b521c3 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
@@ -26,8 +26,8 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -43,16 +43,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
43 private List<AssetRequest> AssetRequests; 43 private List<AssetRequest> AssetRequests;
44 44
45 private Scene m_scene; 45 private Scene m_scene;
46 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 46 private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
47 47
48 /// 48 ///
49 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests 49 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests
50 /// </summary> 50 /// </summary>
51 private Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>> RequestedAssets; 51 private Dictionary<UUID, Dictionary<UUID, AssetRequest>> RequestedAssets;
52 52
53 public AssetDownloadModule() 53 public AssetDownloadModule()
54 { 54 {
55 RequestedAssets = new Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>>(); 55 RequestedAssets = new Dictionary<UUID, Dictionary<UUID, AssetRequest>>();
56 AssetRequests = new List<AssetRequest>(); 56 AssetRequests = new List<AssetRequest>();
57 } 57 }
58 58
@@ -109,24 +109,24 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
109 /// <param name="transferRequest"></param> 109 /// <param name="transferRequest"></param>
110 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) 110 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
111 { 111 {
112 LLUUID requestID = null; 112 UUID requestID = null;
113 byte source = 2; 113 byte source = 2;
114 if (transferRequest.TransferInfo.SourceType == 2) 114 if (transferRequest.TransferInfo.SourceType == 2)
115 { 115 {
116 //direct asset request 116 //direct asset request
117 requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); 117 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
118 } 118 }
119 else if (transferRequest.TransferInfo.SourceType == 3) 119 else if (transferRequest.TransferInfo.SourceType == 3)
120 { 120 {
121 //inventory asset request 121 //inventory asset request
122 requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); 122 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
123 source = 3; 123 source = 3;
124 //Console.WriteLine("asset request " + requestID); 124 //Console.WriteLine("asset request " + requestID);
125 } 125 }
126 126
127 //not found asset 127 //not found asset
128 // so request from asset server 128 // so request from asset server
129 Dictionary<LLUUID, AssetRequest> userRequests = null; 129 Dictionary<UUID, AssetRequest> userRequests = null;
130 if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests)) 130 if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests))
131 { 131 {
132 if (!userRequests.ContainsKey(requestID)) 132 if (!userRequests.ContainsKey(requestID))
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
143 } 143 }
144 else 144 else
145 { 145 {
146 userRequests = new Dictionary<LLUUID, AssetRequest>(); 146 userRequests = new Dictionary<UUID, AssetRequest>();
147 AssetRequest request = new AssetRequest(); 147 AssetRequest request = new AssetRequest();
148 request.RequestUser = userInfo; 148 request.RequestUser = userInfo;
149 request.RequestAssetID = requestID; 149 request.RequestAssetID = requestID;
@@ -156,11 +156,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
156 } 156 }
157 } 157 }
158 158
159 public void AssetCallback(LLUUID assetID, AssetBase asset) 159 public void AssetCallback(UUID assetID, AssetBase asset)
160 { 160 {
161 if (asset != null) 161 if (asset != null)
162 { 162 {
163 foreach (Dictionary<LLUUID, AssetRequest> userRequests in RequestedAssets.Values) 163 foreach (Dictionary<UUID, AssetRequest> userRequests in RequestedAssets.Values)
164 { 164 {
165 if (userRequests.ContainsKey(assetID)) 165 if (userRequests.ContainsKey(assetID))
166 { 166 {
@@ -212,9 +212,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
212 public int NumPackets = 0; 212 public int NumPackets = 0;
213 public int PacketCounter = 0; 213 public int PacketCounter = 0;
214 public byte[] Params = null; 214 public byte[] Params = null;
215 public LLUUID RequestAssetID; 215 public UUID RequestAssetID;
216 public IClientAPI RequestUser; 216 public IClientAPI RequestUser;
217 public LLUUID TransferRequestID; 217 public UUID TransferRequestID;
218 //public bool AssetInCache; 218 //public bool AssetInCache;
219 //public int TimeRequested; 219 //public int TimeRequested;
220 220
@@ -225,4 +225,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
225 225
226 #endregion 226 #endregion
227 } 227 }
228} \ No newline at end of file 228}
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index bc1d710..c46c4a4 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
35 35
@@ -46,18 +46,18 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
46 // Fields 46 // Fields
47 private bool m_dumpAssetsToFile; 47 private bool m_dumpAssetsToFile;
48 public AgentAssetTransactionsManager Manager; 48 public AgentAssetTransactionsManager Manager;
49 public LLUUID UserID; 49 public UUID UserID;
50 public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>(); 50 public Dictionary<UUID, AssetXferUploader> XferUploaders = new Dictionary<UUID, AssetXferUploader>();
51 51
52 // Methods 52 // Methods
53 public AgentAssetTransactions(LLUUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile) 53 public AgentAssetTransactions(UUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile)
54 { 54 {
55 UserID = agentID; 55 UserID = agentID;
56 Manager = manager; 56 Manager = manager;
57 m_dumpAssetsToFile = dumpAssetsToFile; 57 m_dumpAssetsToFile = dumpAssetsToFile;
58 } 58 }
59 59
60 public AssetXferUploader RequestXferUploader(LLUUID transactionID) 60 public AssetXferUploader RequestXferUploader(UUID transactionID)
61 { 61 {
62 if (!XferUploaders.ContainsKey(transactionID)) 62 if (!XferUploaders.ContainsKey(transactionID))
63 { 63 {
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
90 } 90 }
91 } 91 }
92 92
93 public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 93 public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
94 uint callbackID, string description, string name, sbyte invType, 94 uint callbackID, string description, string name, sbyte invType,
95 sbyte type, byte wearableType, uint nextOwnerMask) 95 sbyte type, byte wearableType, uint nextOwnerMask)
96 { 96 {
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
102 } 102 }
103 } 103 }
104 104
105 public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, 105 public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
106 InventoryItemBase item) 106 InventoryItemBase item)
107 { 107 {
108 if (XferUploaders.ContainsKey(transactionID)) 108 if (XferUploaders.ContainsKey(transactionID))
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
116 /// </summary> 116 /// </summary>
117 /// <param name="transactionID"></param> 117 /// <param name="transactionID"></param>
118 /// <returns>The asset if the upload has completed, null if it has not.</returns> 118 /// <returns>The asset if the upload has completed, null if it has not.</returns>
119 public AssetBase GetTransactionAsset(LLUUID transactionID) 119 public AssetBase GetTransactionAsset(UUID transactionID)
120 { 120 {
121 if (XferUploaders.ContainsKey(transactionID)) 121 if (XferUploaders.ContainsKey(transactionID))
122 { 122 {
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
143 // Fields 143 // Fields
144 public bool AddToInventory; 144 public bool AddToInventory;
145 public AssetBase Asset; 145 public AssetBase Asset;
146 public LLUUID InventFolder = LLUUID.Zero; 146 public UUID InventFolder = UUID.Zero;
147 private sbyte invType = 0; 147 private sbyte invType = 0;
148 private bool m_createItem = false; 148 private bool m_createItem = false;
149 private string m_description = String.Empty; 149 private string m_description = String.Empty;
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
154 private AgentAssetTransactions m_userTransactions; 154 private AgentAssetTransactions m_userTransactions;
155 private uint nextPerm = 0; 155 private uint nextPerm = 0;
156 private IClientAPI ourClient; 156 private IClientAPI ourClient;
157 public LLUUID TransactionID = LLUUID.Zero; 157 public UUID TransactionID = UUID.Zero;
158 private sbyte type = 0; 158 private sbyte type = 0;
159 public bool UploadComplete; 159 public bool UploadComplete;
160 private byte wearableType = 0; 160 private byte wearableType = 0;
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
210 /// <param name="packetID"></param> 210 /// <param name="packetID"></param>
211 /// <param name="data"></param> 211 /// <param name="data"></param>
212 /// <returns>True if the transfer is complete, false otherwise</returns> 212 /// <returns>True if the transfer is complete, false otherwise</returns>
213 public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, 213 public bool Initialise(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data,
214 bool storeLocal, bool tempFile) 214 bool storeLocal, bool tempFile)
215 { 215 {
216 ourClient = remoteClient; 216 ourClient = remoteClient;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
297 fs.Close(); 297 fs.Close();
298 } 298 }
299 299
300 public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 300 public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
301 uint callbackID, string description, string name, sbyte invType, 301 uint callbackID, string description, string name, sbyte invType,
302 sbyte type, byte wearableType, uint nextOwnerMask) 302 sbyte type, byte wearableType, uint nextOwnerMask)
303 { 303 {
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
321 } 321 }
322 } 322 }
323 323
324 public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, 324 public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
325 InventoryItemBase item) 325 InventoryItemBase item)
326 { 326 {
327 if (TransactionID == transactionID) 327 if (TransactionID == transactionID)
@@ -332,7 +332,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
332 332
333 if (userInfo != null) 333 if (userInfo != null)
334 { 334 {
335 LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId); 335 UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId);
336 336
337 AssetBase asset 337 AssetBase asset
338 = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( 338 = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset(
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
346 if (asset != null && asset.FullID == assetID) 346 if (asset != null && asset.FullID == assetID)
347 { 347 {
348 // Assets never get updated, new ones get created 348 // Assets never get updated, new ones get created
349 asset.FullID = LLUUID.Random(); 349 asset.FullID = UUID.Random();
350 asset.Name = item.Name; 350 asset.Name = item.Name;
351 asset.Description = item.Description; 351 asset.Description = item.Description;
352 asset.Type = (sbyte) item.AssetType; 352 asset.Type = (sbyte) item.AssetType;
@@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
371 InventoryItemBase item = new InventoryItemBase(); 371 InventoryItemBase item = new InventoryItemBase();
372 item.Owner = ourClient.AgentId; 372 item.Owner = ourClient.AgentId;
373 item.Creator = ourClient.AgentId; 373 item.Creator = ourClient.AgentId;
374 item.ID = LLUUID.Random(); 374 item.ID = UUID.Random();
375 item.AssetID = Asset.FullID; 375 item.AssetID = Asset.FullID;
376 item.Description = m_description; 376 item.Description = m_description;
377 item.Name = m_name; 377 item.Name = m_name;
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
index b1cbdcc..e6e27be 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
40{ 40{
41 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions 41 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
42 { 42 {
43 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 43 private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
44 private bool m_dumpAssetsToFile = false; 44 private bool m_dumpAssetsToFile = false;
45 private Scene m_scene = null; 45 private Scene m_scene = null;
46 46
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
53 53
54 #region IAgentAssetTransactions Members 54 #region IAgentAssetTransactions Members
55 55
56 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 56 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
57 uint callbackID, string description, string name, sbyte invType, 57 uint callbackID, string description, string name, sbyte invType,
58 sbyte type, byte wearableType, uint nextOwnerMask) 58 sbyte type, byte wearableType, uint nextOwnerMask)
59 { 59 {
@@ -61,13 +61,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
61 wearableType, nextOwnerMask); 61 wearableType, nextOwnerMask);
62 } 62 }
63 63
64 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, 64 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
65 InventoryItemBase item) 65 InventoryItemBase item)
66 { 66 {
67 m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); 67 m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
68 } 68 }
69 69
70 public void RemoveAgentAssetTransactions(LLUUID userID) 70 public void RemoveAgentAssetTransactions(UUID userID)
71 { 71 {
72 m_transactionManager.RemoveAgentAssetTransactions(userID); 72 m_transactionManager.RemoveAgentAssetTransactions(userID);
73 } 73 }
@@ -146,8 +146,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
146 /// <summary> 146 /// <summary>
147 /// Each agent has its own singleton collection of transactions 147 /// Each agent has its own singleton collection of transactions
148 /// </summary> 148 /// </summary>
149 private Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = 149 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
150 new Dictionary<LLUUID, AgentAssetTransactions>(); 150 new Dictionary<UUID, AgentAssetTransactions>();
151 151
152 /// <summary> 152 /// <summary>
153 /// Should we dump uploaded assets to the filesystem? 153 /// Should we dump uploaded assets to the filesystem?
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
168 /// </summary> 168 /// </summary>
169 /// <param name="userID"></param> 169 /// <param name="userID"></param>
170 /// <returns></returns> 170 /// <returns></returns>
171 private AgentAssetTransactions GetUserTransactions(LLUUID userID) 171 private AgentAssetTransactions GetUserTransactions(UUID userID)
172 { 172 {
173 lock (AgentTransactions) 173 lock (AgentTransactions)
174 { 174 {
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
188 /// from a scene (and hence won't be making any more transactions here). 188 /// from a scene (and hence won't be making any more transactions here).
189 /// </summary> 189 /// </summary>
190 /// <param name="userID"></param> 190 /// <param name="userID"></param>
191 public void RemoveAgentAssetTransactions(LLUUID userID) 191 public void RemoveAgentAssetTransactions(UUID userID)
192 { 192 {
193 // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); 193 // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID);
194 194
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
214 /// <param name="type"></param> 214 /// <param name="type"></param>
215 /// <param name="wearableType"></param> 215 /// <param name="wearableType"></param>
216 /// <param name="nextOwnerMask"></param> 216 /// <param name="nextOwnerMask"></param>
217 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 217 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
218 uint callbackID, string description, string name, sbyte invType, 218 uint callbackID, string description, string name, sbyte invType,
219 sbyte type, byte wearableType, uint nextOwnerMask) 219 sbyte type, byte wearableType, uint nextOwnerMask)
220 { 220 {
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
237 /// <param name="remoteClient"></param> 237 /// <param name="remoteClient"></param>
238 /// <param name="transactionID"></param> 238 /// <param name="transactionID"></param>
239 /// <param name="item"></param> 239 /// <param name="item"></param>
240 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, 240 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
241 InventoryItemBase item) 241 InventoryItemBase item)
242 { 242 {
243 m_log.DebugFormat( 243 m_log.DebugFormat(
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
259 /// <param name="type"></param> 259 /// <param name="type"></param>
260 /// <param name="data"></param></param> 260 /// <param name="data"></param></param>
261 /// <param name="tempFile"></param> 261 /// <param name="tempFile"></param>
262 public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, 262 public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
263 byte[] data, bool storeLocal, bool tempFile) 263 byte[] data, bool storeLocal, bool tempFile)
264 { 264 {
265 if (((AssetType)type == AssetType.Texture || 265 if (((AssetType)type == AssetType.Texture ||
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index 8f81f3d..813d271 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Threading; 30using System.Threading;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -50,8 +50,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
50 /// <summary> 50 /// <summary>
51 /// Each user has their own texture download service. 51 /// Each user has their own texture download service.
52 /// </summary> 52 /// </summary>
53 private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = 53 private readonly Dictionary<UUID, UserTextureDownloadService> m_userTextureServices =
54 new Dictionary<LLUUID, UserTextureDownloadService>(); 54 new Dictionary<UUID, UserTextureDownloadService>();
55 55
56 private Scene m_scene; 56 private Scene m_scene;
57 private List<Scene> m_scenes = new List<Scene>(); 57 private List<Scene> m_scenes = new List<Scene>();
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
109 /// Cleanup the texture service related objects for the removed presence. 109 /// Cleanup the texture service related objects for the removed presence.
110 /// </summary> 110 /// </summary>
111 /// <param name="agentId"> </param> 111 /// <param name="agentId"> </param>
112 private void EventManager_OnRemovePresence(LLUUID agentId) 112 private void EventManager_OnRemovePresence(UUID agentId)
113 { 113 {
114 UserTextureDownloadService textureService; 114 UserTextureDownloadService textureService;
115 115
@@ -216,4 +216,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
216 m_scene.AddPendingDownloads(-1); 216 m_scene.AddPendingDownloads(-1);
217 } 217 }
218 } 218 }
219} \ No newline at end of file 219}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index c5af174..f6d8543 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -25,8 +25,8 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using libsecondlife.Packets; 29using OpenMetaverse.Packets;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32 32
@@ -46,11 +46,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
46 // See ITextureSender 46 // See ITextureSender
47 47
48 // private bool m_sending = false; 48 // private bool m_sending = false;
49 private LLUUID m_textureId; 49 private UUID m_textureId;
50 50
51 // See ITextureSender 51 // See ITextureSender
52 52
53 public TextureNotFoundSender(IClientAPI client, LLUUID textureID) 53 public TextureNotFoundSender(IClientAPI client, UUID textureID)
54 { 54 {
55 // // m_client = client; 55 // // m_client = client;
56 m_textureId = textureID; 56 m_textureId = textureID;
@@ -101,4 +101,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
101 101
102 #endregion 102 #endregion
103 } 103 }
104} \ No newline at end of file 104}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index e6ee75f..c38bc62 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications.Limit; 33using OpenSim.Framework.Communications.Limit;
@@ -65,8 +65,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
65 /// <summary> 65 /// <summary>
66 /// XXX Also going to limit requests for found textures. 66 /// XXX Also going to limit requests for found textures.
67 /// </summary> 67 /// </summary>
68 private readonly IRequestLimitStrategy<LLUUID> foundTextureLimitStrategy 68 private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy
69 = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 69 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
70 70
71 private readonly IClientAPI m_client; 71 private readonly IClientAPI m_client;
72 private readonly Scene m_scene; 72 private readonly Scene m_scene;
@@ -80,15 +80,15 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
80 /// <summary> 80 /// <summary>
81 /// Holds texture senders before they have received the appropriate texture from the asset cache. 81 /// Holds texture senders before they have received the appropriate texture from the asset cache.
82 /// </summary> 82 /// </summary>
83 private readonly Dictionary<LLUUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender.TextureSender>(); 83 private readonly Dictionary<UUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<UUID, TextureSender.TextureSender>();
84 84
85 /// <summary> 85 /// <summary>
86 /// We're going to limit requests for the same missing texture. 86 /// We're going to limit requests for the same missing texture.
87 /// XXX This is really a temporary solution to deal with the situation where a client continually requests 87 /// XXX This is really a temporary solution to deal with the situation where a client continually requests
88 /// the same missing textures 88 /// the same missing textures
89 /// </summary> 89 /// </summary>
90 private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy 90 private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
91 = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 91 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
92 92
93 public UserTextureDownloadService( 93 public UserTextureDownloadService(
94 IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue) 94 IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue)
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
172 /// </summary> 172 /// </summary>
173 /// <param name="textureID"></param> 173 /// <param name="textureID"></param>
174 /// <param name="texture"></param> 174 /// <param name="texture"></param>
175 public void TextureCallback(LLUUID textureID, AssetBase texture) 175 public void TextureCallback(UUID textureID, AssetBase texture)
176 { 176 {
177 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false)); 177 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false));
178 178
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index 7554d1a..dbfd4d2 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
55 /// </summary> 55 /// </summary>
56 private AssetBase m_asset; 56 private AssetBase m_asset;
57 57
58 //public LLUUID assetID { get { return m_asset.FullID; } } 58 //public UUID assetID { get { return m_asset.FullID; } }
59 59
60 // private bool m_cancel = false; 60 // private bool m_cancel = false;
61 61
@@ -220,4 +220,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
220 return numPackets; 220 return numPackets;
221 } 221 }
222 } 222 }
223} \ No newline at end of file 223}
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index 16874d7..3c69621 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -228,4 +228,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
228 228
229 #endregion 229 #endregion
230 } 230 }
231} \ No newline at end of file 231}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 5df3f52..9433cf6 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -29,7 +29,7 @@
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules
43 public class AvatarFactoryModule : IAvatarFactory 43 public class AvatarFactoryModule : IAvatarFactory
44 { 44 {
45 private Scene m_scene = null; 45 private Scene m_scene = null;
46 private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>(); 46 private readonly Dictionary<UUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<UUID, AvatarAppearance>();
47 47
48 private bool m_enablePersist = false; 48 private bool m_enablePersist = false;
49 private string m_connectionString; 49 private string m_connectionString;
@@ -51,10 +51,10 @@ namespace OpenSim.Region.Environment.Modules
51 private BaseDatabaseConnector m_databaseMapper; 51 private BaseDatabaseConnector m_databaseMapper;
52 private AppearanceTableMapper m_appearanceMapper; 52 private AppearanceTableMapper m_appearanceMapper;
53 53
54 private Dictionary<LLUUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<LLUUID, EventWaitHandle>(); 54 private Dictionary<UUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<UUID, EventWaitHandle>();
55 private object m_syncLock = new object(); 55 private object m_syncLock = new object();
56 56
57 public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) 57 public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance)
58 { 58 {
59 59
60 //should only let one thread at a time do this part 60 //should only let one thread at a time do this part
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules
163 } 163 }
164 } 164 }
165 165
166 private AvatarAppearance CreateDefault(LLUUID avatarId) 166 private AvatarAppearance CreateDefault(UUID avatarId)
167 { 167 {
168 AvatarAppearance appearance = null; 168 AvatarAppearance appearance = null;
169 AvatarWearable[] wearables; 169 AvatarWearable[] wearables;
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules
174 return appearance; 174 return appearance;
175 } 175 }
176 176
177 private AvatarAppearance CheckDatabase(LLUUID avatarId) 177 private AvatarAppearance CheckDatabase(UUID avatarId)
178 { 178 {
179 AvatarAppearance appearance = null; 179 AvatarAppearance appearance = null;
180 if (m_enablePersist) 180 if (m_enablePersist)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules
192 return appearance; 192 return appearance;
193 } 193 }
194 194
195 private AvatarAppearance CheckCache(LLUUID avatarId) 195 private AvatarAppearance CheckCache(UUID avatarId)
196 { 196 {
197 AvatarAppearance appearance = null; 197 AvatarAppearance appearance = null;
198 lock (m_avatarsAppearance) 198 lock (m_avatarsAppearance)
@@ -282,16 +282,16 @@ namespace OpenSim.Region.Environment.Modules
282 { 282 {
283 if (wear.Type < 13) 283 if (wear.Type < 13)
284 { 284 {
285 if (wear.ItemID == LLUUID.Zero) 285 if (wear.ItemID == UUID.Zero)
286 { 286 {
287 avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; 287 avatAppearance.Wearables[wear.Type].ItemID = UUID.Zero;
288 avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; 288 avatAppearance.Wearables[wear.Type].AssetID = UUID.Zero;
289 289
290 UpdateDatabase(clientView.AgentId, avatAppearance); 290 UpdateDatabase(clientView.AgentId, avatAppearance);
291 } 291 }
292 else 292 else
293 { 293 {
294 LLUUID assetId; 294 UUID assetId;
295 295
296 InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); 296 InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID);
297 if (baseItem != null) 297 if (baseItem != null)
@@ -310,11 +310,11 @@ namespace OpenSim.Region.Environment.Modules
310 } 310 }
311 } 311 }
312 312
313 public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) 313 public void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance)
314 { 314 {
315 if (m_enablePersist) 315 if (m_enablePersist)
316 { 316 {
317 m_appearanceMapper.Update(userID.UUID, avatAppearance); 317 m_appearanceMapper.Update(userID.Guid, avatAppearance);
318 } 318 }
319 } 319 }
320 320
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 1493e32..e1599a8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
115 115
116 // chat works by redistributing every incoming chat 116 // chat works by redistributing every incoming chat
117 // message to each avatar in the scene 117 // message to each avatar in the scene
118 LLVector3 pos = new LLVector3(128, 128, 30); 118 Vector3 pos = new Vector3(128, 128, 30);
119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) 119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
120 { 120 {
121 if (presence.IsChildAgent) return; 121 if (presence.IsChildAgent) return;
@@ -129,12 +129,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
129 129
130 if (null == c.SenderObject) 130 if (null == c.SenderObject)
131 client.SendChatMessage(c.Message, (byte)c.Type, 131 client.SendChatMessage(c.Message, (byte)c.Type,
132 pos, c.From, LLUUID.Zero, 132 pos, c.From, UUID.Zero,
133 (byte)ChatSourceType.Agent, 133 (byte)ChatSourceType.Agent,
134 (byte)ChatAudibleLevel.Fully); 134 (byte)ChatAudibleLevel.Fully);
135 else 135 else
136 client.SendChatMessage(c.Message, (byte)c.Type, 136 client.SendChatMessage(c.Message, (byte)c.Type,
137 pos, c.From, LLUUID.Zero, 137 pos, c.From, UUID.Zero,
138 (byte)ChatSourceType.Object, 138 (byte)ChatSourceType.Object,
139 (byte)ChatAudibleLevel.Fully); 139 (byte)ChatAudibleLevel.Fully);
140 }); 140 });
@@ -153,13 +153,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
153 scene = m_scenes[0]; 153 scene = m_scenes[0];
154 154
155 // Filled in since it's easier than rewriting right now. 155 // Filled in since it's easier than rewriting right now.
156 LLVector3 fromPos = e.Position; 156 Vector3 fromPos = e.Position;
157 LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 157 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
159 159
160 string fromName = e.From; 160 string fromName = e.From;
161 string message = e.Message; 161 string message = e.Message;
162 LLUUID fromID = e.SenderUUID; 162 UUID fromID = e.SenderUUID;
163 163
164 if(message.Length >= 1000) // libomv limit 164 if(message.Length >= 1000) // libomv limit
165 message = message.Substring(0, 1000); 165 message = message.Substring(0, 1000);
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
172 if (avatar != null) 172 if (avatar != null)
173 { 173 {
174 fromPos = avatar.AbsolutePosition; 174 fromPos = avatar.AbsolutePosition;
175 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 175 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
177 fromName = avatar.Firstname + " " + avatar.Lastname; 177 fromName = avatar.Firstname + " " + avatar.Lastname;
178 fromID = e.Sender.AgentId; 178 fromID = e.Sender.AgentId;
@@ -217,16 +217,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
217 } 217 }
218 } 218 }
219 219
220 private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, 220 private void TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
221 LLUUID fromAgentID, string fromName, ChatTypeEnum type, 221 UUID fromAgentID, string fromName, ChatTypeEnum type,
222 string message, ChatSourceType src) 222 string message, ChatSourceType src)
223 { 223 {
224 // don't send stuff to child agents 224 // don't send stuff to child agents
225 if (presence.IsChildAgent) return; 225 if (presence.IsChildAgent) return;
226 226
227 LLVector3 fromRegionPos = fromPos + regionPos; 227 Vector3 fromRegionPos = fromPos + regionPos;
228 LLVector3 toRegionPos = presence.AbsolutePosition + 228 Vector3 toRegionPos = presence.AbsolutePosition +
229 new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, 229 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
231 231
232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); 232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 9df05e0..8fe5080 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -617,7 +617,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
617 public void ListenerRun() 617 public void ListenerRun()
618 { 618 {
619 string inputLine; 619 string inputLine;
620 LLVector3 pos = new LLVector3(128, 128, 20); 620 Vector3 pos = new Vector3(128, 128, 20);
621 while (m_enabled) 621 while (m_enabled)
622 { 622 {
623 try 623 try
@@ -638,7 +638,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
638 c.Position = pos; 638 c.Position = pos;
639 c.From = data["nick"]; 639 c.From = data["nick"];
640 c.Sender = null; 640 c.Sender = null;
641 c.SenderUUID = LLUUID.Zero; 641 c.SenderUUID = UUID.Zero;
642 642
643 // is message "\001ACTION foo 643 // is message "\001ACTION foo
644 // bar\001"? -> "/me foo bar" 644 // bar\001"? -> "/me foo bar"
@@ -684,9 +684,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
684 c.Message = String.Format(format, args); 684 c.Message = String.Format(format, args);
685 c.Type = ChatTypeEnum.Say; 685 c.Type = ChatTypeEnum.Say;
686 c.Channel = 0; 686 c.Channel = 0;
687 c.Position = new LLVector3(128, 128, 20); 687 c.Position = new Vector3(128, 128, 20);
688 c.Sender = null; 688 c.Sender = null;
689 c.SenderUUID = LLUUID.Zero; 689 c.SenderUUID = UUID.Zero;
690 690
691 foreach (Scene m_scene in m_scenes) 691 foreach (Scene m_scene in m_scenes)
692 { 692 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index 2a0bba4..19c193f 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -32,7 +32,7 @@ using System.Net;
32using System.Net.Sockets; 32using System.Net.Sockets;
33using System.Reflection; 33using System.Reflection;
34using System.Xml; 34using System.Xml;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using Nwc.XmlRpc; 38using Nwc.XmlRpc;
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
62 /// <summary> 62 /// <summary>
63 /// Where Stipends come from and Fees go to. 63 /// Where Stipends come from and Fees go to.
64 /// </summary> 64 /// </summary>
65 // private LLUUID EconomyBaseAccount = LLUUID.Zero; 65 // private UUID EconomyBaseAccount = UUID.Zero;
66 66
67 private float EnergyEfficiency = 0f; 67 private float EnergyEfficiency = 0f;
68 private bool gridmode = false; 68 private bool gridmode = false;
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
72 private IConfigSource m_gConfig; 72 private IConfigSource m_gConfig;
73 73
74 private bool m_keepMoneyAcrossLogins = true; 74 private bool m_keepMoneyAcrossLogins = true;
75 private Dictionary<LLUUID, int> m_KnownClientFunds = new Dictionary<LLUUID, int>(); 75 private Dictionary<UUID, int> m_KnownClientFunds = new Dictionary<UUID, int>();
76 // private string m_LandAddress = String.Empty; 76 // private string m_LandAddress = String.Empty;
77 77
78 private int m_minFundsBeforeRefresh = 100; 78 private int m_minFundsBeforeRefresh = 100;
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
81 /// <summary> 81 /// <summary>
82 /// Region UUIDS indexed by AgentID 82 /// Region UUIDS indexed by AgentID
83 /// </summary> 83 /// </summary>
84 private Dictionary<LLUUID, LLUUID> m_rootAgents = new Dictionary<LLUUID, LLUUID>(); 84 private Dictionary<UUID, UUID> m_rootAgents = new Dictionary<UUID, UUID>();
85 85
86 /// <summary> 86 /// <summary>
87 /// Scenes by Region Handle 87 /// Scenes by Region Handle
@@ -184,11 +184,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
184 } 184 }
185 } 185 }
186 186
187 public void ApplyUploadCharge(LLUUID agentID) 187 public void ApplyUploadCharge(UUID agentID)
188 { 188 {
189 } 189 }
190 190
191 public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) 191 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
192 { 192 {
193 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 193 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
194 194
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
252 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); 252 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
253 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); 253 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
254 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); 254 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
255 // string EBA = startupConfig.GetString("EconomyBaseAccount", LLUUID.Zero.ToString()); 255 // string EBA = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString());
256 // Helpers.TryParse(EBA, out EconomyBaseAccount); 256 // Helpers.TryParse(EBA, out EconomyBaseAccount);
257 257
258 // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1); 258 // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1);
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
294 if (s != null && agent != null && childYN == false) 294 if (s != null && agent != null && childYN == false)
295 { 295 {
296 //s.RegionInfo.RegionHandle; 296 //s.RegionInfo.RegionHandle;
297 LLUUID agentID = LLUUID.Zero; 297 UUID agentID = UUID.Zero;
298 int funds = 0; 298 int funds = 0;
299 299
300 Hashtable hbinfo = 300 Hashtable hbinfo =
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
302 s.RegionInfo.regionSecret); 302 s.RegionInfo.regionSecret);
303 if ((bool) hbinfo["success"] == true) 303 if ((bool) hbinfo["success"] == true)
304 { 304 {
305 Helpers.TryParse((string) hbinfo["agentId"], out agentID); 305 UUID.TryParse((string)hbinfo["agentId"], out agentID);
306 try 306 try
307 { 307 {
308 funds = (Int32) hbinfo["funds"]; 308 funds = (Int32) hbinfo["funds"];
@@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
331 (string) hbinfo["errorMessage"]); 331 (string) hbinfo["errorMessage"]);
332 client.SendAlertMessage((string) hbinfo["errorMessage"]); 332 client.SendAlertMessage((string) hbinfo["errorMessage"]);
333 } 333 }
334 SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero); 334 SendMoneyBalance(client, agentID, client.SessionId, UUID.Zero);
335 } 335 }
336 } 336 }
337 } 337 }
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
365 /// <param name="Receiver"></param> 365 /// <param name="Receiver"></param>
366 /// <param name="amount"></param> 366 /// <param name="amount"></param>
367 /// <returns></returns> 367 /// <returns></returns>
368 private bool doMoneyTransfer(LLUUID Sender, LLUUID Receiver, int amount, int transactiontype, string description) 368 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description)
369 { 369 {
370 bool result = false; 370 bool result = false;
371 if (amount >= 0) 371 if (amount >= 0)
@@ -425,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
425 /// <param name="agentID"></param> 425 /// <param name="agentID"></param>
426 /// <param name="SessionID"></param> 426 /// <param name="SessionID"></param>
427 /// <param name="TransactionID"></param> 427 /// <param name="TransactionID"></param>
428 public void SendMoneyBalance(IClientAPI client, LLUUID agentID, LLUUID SessionID, LLUUID TransactionID) 428 public void SendMoneyBalance(IClientAPI client, UUID agentID, UUID SessionID, UUID TransactionID)
429 { 429 {
430 if (client.AgentId == agentID && client.SessionId == SessionID) 430 if (client.AgentId == agentID && client.SessionId == SessionID)
431 { 431 {
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
456 /// <param name="regionId"></param> 456 /// <param name="regionId"></param>
457 /// <param name="regionSecret"></param> 457 /// <param name="regionSecret"></param>
458 /// <returns></returns> 458 /// <returns></returns>
459 public Hashtable GetBalanceForUserFromMoneyServer(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) 459 public Hashtable GetBalanceForUserFromMoneyServer(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret)
460 { 460 {
461 Hashtable MoneyBalanceRequestParams = new Hashtable(); 461 Hashtable MoneyBalanceRequestParams = new Hashtable();
462 MoneyBalanceRequestParams["agentId"] = agentId.ToString(); 462 MoneyBalanceRequestParams["agentId"] = agentId.ToString();
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
551 /// <param name="regionId"></param> 551 /// <param name="regionId"></param>
552 /// <param name="regionSecret"></param> 552 /// <param name="regionSecret"></param>
553 /// <returns></returns> 553 /// <returns></returns>
554 public Hashtable claim_user(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) 554 public Hashtable claim_user(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret)
555 { 555 {
556 Hashtable MoneyBalanceRequestParams = new Hashtable(); 556 Hashtable MoneyBalanceRequestParams = new Hashtable();
557 MoneyBalanceRequestParams["agentId"] = agentId.ToString(); 557 MoneyBalanceRequestParams["agentId"] = agentId.ToString();
@@ -563,12 +563,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
563 IClientAPI sendMoneyBal = LocateClientObject(agentId); 563 IClientAPI sendMoneyBal = LocateClientObject(agentId);
564 if (sendMoneyBal != null) 564 if (sendMoneyBal != null)
565 { 565 {
566 SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, LLUUID.Zero); 566 SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, UUID.Zero);
567 } 567 }
568 return MoneyRespData; 568 return MoneyRespData;
569 } 569 }
570 570
571 private SceneObjectPart findPrim(LLUUID objectID) 571 private SceneObjectPart findPrim(UUID objectID)
572 { 572 {
573 lock (m_scenel) 573 lock (m_scenel)
574 { 574 {
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
584 return null; 584 return null;
585 } 585 }
586 586
587 private string resolveObjectName(LLUUID objectID) 587 private string resolveObjectName(UUID objectID)
588 { 588 {
589 SceneObjectPart part = findPrim(objectID); 589 SceneObjectPart part = findPrim(objectID);
590 if (part != null) 590 if (part != null)
@@ -594,7 +594,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
594 return String.Empty; 594 return String.Empty;
595 } 595 }
596 596
597 private string resolveAgentName(LLUUID agentID) 597 private string resolveAgentName(UUID agentID)
598 { 598 {
599 // try avatar username surname 599 // try avatar username surname
600 Scene scene = GetRandomScene(); 600 Scene scene = GetRandomScene();
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
607 return String.Empty; 607 return String.Empty;
608 } 608 }
609 609
610 private void BalanceUpdate(LLUUID senderID, LLUUID receiverID, bool transactionresult, string description) 610 private void BalanceUpdate(UUID senderID, UUID receiverID, bool transactionresult, string description)
611 { 611 {
612 IClientAPI sender = LocateClientObject(senderID); 612 IClientAPI sender = LocateClientObject(senderID);
613 IClientAPI receiver = LocateClientObject(receiverID); 613 IClientAPI receiver = LocateClientObject(receiverID);
@@ -616,12 +616,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
616 { 616 {
617 if (sender != null) 617 if (sender != null)
618 { 618 {
619 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(senderID)); 619 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID));
620 } 620 }
621 621
622 if (receiver != null) 622 if (receiver != null)
623 { 623 {
624 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(receiverID)); 624 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID));
625 } 625 }
626 } 626 }
627 } 627 }
@@ -633,7 +633,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
633 /// <param name="destId"></param> 633 /// <param name="destId"></param>
634 /// <param name="amount"></param> 634 /// <param name="amount"></param>
635 /// <returns></returns> 635 /// <returns></returns>
636 public bool TransferMoneyonMoneyServer(LLUUID sourceId, LLUUID destId, int amount, int transactiontype, string description) 636 public bool TransferMoneyonMoneyServer(UUID sourceId, UUID destId, int amount, int transactiontype, string description)
637 { 637 {
638 int aggregatePermInventory = 0; 638 int aggregatePermInventory = 0;
639 int aggregatePermNextOwner = 0; 639 int aggregatePermNextOwner = 0;
@@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
709 return rvalue; 709 return rvalue;
710 } 710 }
711 711
712 public int GetRemoteBalance(LLUUID agentId) 712 public int GetRemoteBalance(UUID agentId)
713 { 713 {
714 int funds = 0; 714 int funds = 0;
715 715
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
755 } 755 }
756 756
757 SetLocalFundsForAgentID(agentId, funds); 757 SetLocalFundsForAgentID(agentId, funds);
758 SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); 758 SendMoneyBalance(aClient, agentId, aClient.SessionId, UUID.Zero);
759 } 759 }
760 else 760 else
761 { 761 {
@@ -776,10 +776,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
776 776
777 if (requestData.ContainsKey("agentId")) 777 if (requestData.ContainsKey("agentId"))
778 { 778 {
779 LLUUID agentId = LLUUID.Zero; 779 UUID agentId = UUID.Zero;
780 780
781 Helpers.TryParse((string) requestData["agentId"], out agentId); 781 UUID.TryParse((string) requestData["agentId"], out agentId);
782 if (agentId != LLUUID.Zero) 782 if (agentId != UUID.Zero)
783 { 783 {
784 GetRemoteBalance(agentId); 784 GetRemoteBalance(agentId);
785 } 785 }
@@ -809,13 +809,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
809 Hashtable retparam = new Hashtable(); 809 Hashtable retparam = new Hashtable();
810 Hashtable requestData = (Hashtable) request.Params[0]; 810 Hashtable requestData = (Hashtable) request.Params[0];
811 811
812 LLUUID agentId = LLUUID.Zero; 812 UUID agentId = UUID.Zero;
813 LLUUID soundId = LLUUID.Zero; 813 UUID soundId = UUID.Zero;
814 LLUUID regionId = LLUUID.Zero; 814 UUID regionId = UUID.Zero;
815 815
816 Helpers.TryParse((string) requestData["agentId"], out agentId); 816 UUID.TryParse((string) requestData["agentId"], out agentId);
817 Helpers.TryParse((string) requestData["soundId"], out soundId); 817 UUID.TryParse((string) requestData["soundId"], out soundId);
818 Helpers.TryParse((string) requestData["regionId"], out regionId); 818 UUID.TryParse((string) requestData["regionId"], out regionId);
819 string text = (string) requestData["text"]; 819 string text = (string) requestData["text"];
820 string secret = (string) requestData["secret"]; 820 string secret = (string) requestData["secret"];
821 821
@@ -828,9 +828,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
828 IClientAPI client = LocateClientObject(agentId); 828 IClientAPI client = LocateClientObject(agentId);
829 if (client != null) 829 if (client != null)
830 { 830 {
831 if (soundId != LLUUID.Zero) 831
832 client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); 832 if (soundId != UUID.Zero)
833 client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); 833 client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
834
835 client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
836
834 retparam.Add("success", true); 837 retparam.Add("success", true);
835 } 838 }
836 else 839 else
@@ -843,10 +846,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
843 retparam.Add("success", false); 846 retparam.Add("success", false);
844 } 847 }
845 } 848 }
846 else 849
847 {
848 retparam.Add("success", false);
849 }
850 ret.Value = retparam; 850 ret.Value = retparam;
851 return ret; 851 return ret;
852 } 852 }
@@ -856,14 +856,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
856 public XmlRpcResponse quote_func(XmlRpcRequest request) 856 public XmlRpcResponse quote_func(XmlRpcRequest request)
857 { 857 {
858 Hashtable requestData = (Hashtable) request.Params[0]; 858 Hashtable requestData = (Hashtable) request.Params[0];
859 LLUUID agentId = LLUUID.Zero; 859 UUID agentId = UUID.Zero;
860 int amount = 0; 860 int amount = 0;
861 Hashtable quoteResponse = new Hashtable(); 861 Hashtable quoteResponse = new Hashtable();
862 XmlRpcResponse returnval = new XmlRpcResponse(); 862 XmlRpcResponse returnval = new XmlRpcResponse();
863 863
864 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 864 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
865 { 865 {
866 Helpers.TryParse((string) requestData["agentId"], out agentId); 866 UUID.TryParse((string) requestData["agentId"], out agentId);
867 try 867 try
868 { 868 {
869 amount = (Int32) requestData["currencyBuy"]; 869 amount = (Int32) requestData["currencyBuy"];
@@ -894,11 +894,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
894 public XmlRpcResponse buy_func(XmlRpcRequest request) 894 public XmlRpcResponse buy_func(XmlRpcRequest request)
895 { 895 {
896 Hashtable requestData = (Hashtable) request.Params[0]; 896 Hashtable requestData = (Hashtable) request.Params[0];
897 LLUUID agentId = LLUUID.Zero; 897 UUID agentId = UUID.Zero;
898 int amount = 0; 898 int amount = 0;
899 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 899 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
900 { 900 {
901 Helpers.TryParse((string) requestData["agentId"], out agentId); 901 UUID.TryParse((string) requestData["agentId"], out agentId);
902 try 902 try
903 { 903 {
904 amount = (Int32) requestData["currencyBuy"]; 904 amount = (Int32) requestData["currencyBuy"];
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
906 catch (InvalidCastException) 906 catch (InvalidCastException)
907 { 907 {
908 } 908 }
909 if (agentId != LLUUID.Zero) 909 if (agentId != UUID.Zero)
910 { 910 {
911 lock (m_KnownClientFunds) 911 lock (m_KnownClientFunds)
912 { 912 {
@@ -922,7 +922,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
922 IClientAPI client = LocateClientObject(agentId); 922 IClientAPI client = LocateClientObject(agentId);
923 if (client != null) 923 if (client != null)
924 { 924 {
925 SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); 925 SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero);
926 } 926 }
927 } 927 }
928 } 928 }
@@ -974,11 +974,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
974 Hashtable retparam = new Hashtable(); 974 Hashtable retparam = new Hashtable();
975 Hashtable requestData = (Hashtable) request.Params[0]; 975 Hashtable requestData = (Hashtable) request.Params[0];
976 976
977 LLUUID agentId = LLUUID.Zero; 977 UUID agentId = UUID.Zero;
978 int amount = 0; 978 int amount = 0;
979 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 979 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
980 { 980 {
981 Helpers.TryParse((string) requestData["agentId"], out agentId); 981 UUID.TryParse((string) requestData["agentId"], out agentId);
982 try 982 try
983 { 983 {
984 amount = (Int32) requestData["currencyBuy"]; 984 amount = (Int32) requestData["currencyBuy"];
@@ -986,7 +986,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
986 catch (InvalidCastException) 986 catch (InvalidCastException)
987 { 987 {
988 } 988 }
989 if (agentId != LLUUID.Zero) 989 if (agentId != UUID.Zero)
990 { 990 {
991 lock (m_KnownClientFunds) 991 lock (m_KnownClientFunds)
992 { 992 {
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1002 IClientAPI client = LocateClientObject(agentId); 1002 IClientAPI client = LocateClientObject(agentId);
1003 if (client != null) 1003 if (client != null)
1004 { 1004 {
1005 SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); 1005 SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero);
1006 } 1006 }
1007 } 1007 }
1008 } 1008 }
@@ -1020,7 +1020,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1020 /// Ensures that the agent accounting data is set up in this instance. 1020 /// Ensures that the agent accounting data is set up in this instance.
1021 /// </summary> 1021 /// </summary>
1022 /// <param name="agentID"></param> 1022 /// <param name="agentID"></param>
1023 private void CheckExistAndRefreshFunds(LLUUID agentID) 1023 private void CheckExistAndRefreshFunds(UUID agentID)
1024 { 1024 {
1025 lock (m_KnownClientFunds) 1025 lock (m_KnownClientFunds)
1026 { 1026 {
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1043 /// </summary> 1043 /// </summary>
1044 /// <param name="AgentID"></param> 1044 /// <param name="AgentID"></param>
1045 /// <returns></returns> 1045 /// <returns></returns>
1046 private int GetFundsForAgentID(LLUUID AgentID) 1046 private int GetFundsForAgentID(UUID AgentID)
1047 { 1047 {
1048 int returnfunds = 0; 1048 int returnfunds = 0;
1049 lock (m_KnownClientFunds) 1049 lock (m_KnownClientFunds)
@@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1060 return returnfunds; 1060 return returnfunds;
1061 } 1061 }
1062 1062
1063 private void SetLocalFundsForAgentID(LLUUID AgentID, int amount) 1063 private void SetLocalFundsForAgentID(UUID AgentID, int amount)
1064 { 1064 {
1065 lock (m_KnownClientFunds) 1065 lock (m_KnownClientFunds)
1066 { 1066 {
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1084 /// </summary> 1084 /// </summary>
1085 /// <param name="AgentID"></param> 1085 /// <param name="AgentID"></param>
1086 /// <returns></returns> 1086 /// <returns></returns>
1087 private IClientAPI LocateClientObject(LLUUID AgentID) 1087 private IClientAPI LocateClientObject(UUID AgentID)
1088 { 1088 {
1089 ScenePresence tPresence = null; 1089 ScenePresence tPresence = null;
1090 IClientAPI rclient = null; 1090 IClientAPI rclient = null;
@@ -1110,7 +1110,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1110 return null; 1110 return null;
1111 } 1111 }
1112 1112
1113 private Scene LocateSceneClientIn(LLUUID AgentId) 1113 private Scene LocateSceneClientIn(UUID AgentId)
1114 { 1114 {
1115 lock (m_scenel) 1115 lock (m_scenel)
1116 { 1116 {
@@ -1148,7 +1148,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1148 /// </summary> 1148 /// </summary>
1149 /// <param name="RegionID"></param> 1149 /// <param name="RegionID"></param>
1150 /// <returns></returns> 1150 /// <returns></returns>
1151 public Scene GetSceneByUUID(LLUUID RegionID) 1151 public Scene GetSceneByUUID(UUID RegionID)
1152 { 1152 {
1153 lock (m_scenel) 1153 lock (m_scenel)
1154 { 1154 {
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1167 1167
1168 #region event Handlers 1168 #region event Handlers
1169 1169
1170 public void requestPayPrice(IClientAPI client, LLUUID objectID) 1170 public void requestPayPrice(IClientAPI client, UUID objectID)
1171 { 1171 {
1172 Scene scene = LocateSceneClientIn(client.AgentId); 1172 Scene scene = LocateSceneClientIn(client.AgentId);
1173 if (scene == null) 1173 if (scene == null)
@@ -1186,7 +1186,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1186 /// When the client closes the connection we remove their accounting info from memory to free up resources. 1186 /// When the client closes the connection we remove their accounting info from memory to free up resources.
1187 /// </summary> 1187 /// </summary>
1188 /// <param name="AgentID"></param> 1188 /// <param name="AgentID"></param>
1189 public void ClientClosed(LLUUID AgentID) 1189 public void ClientClosed(UUID AgentID)
1190 { 1190 {
1191 lock (m_KnownClientFunds) 1191 lock (m_KnownClientFunds)
1192 { 1192 {
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1204 /// Event called Economy Data Request handler. 1204 /// Event called Economy Data Request handler.
1205 /// </summary> 1205 /// </summary>
1206 /// <param name="agentId"></param> 1206 /// <param name="agentId"></param>
1207 public void EconomyDataRequestHandler(LLUUID agentId) 1207 public void EconomyDataRequestHandler(UUID agentId)
1208 { 1208 {
1209 IClientAPI user = LocateClientObject(agentId); 1209 IClientAPI user = LocateClientObject(agentId);
1210 1210
@@ -1309,11 +1309,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1309 1309
1310 if (e.sender != e.receiver) 1310 if (e.sender != e.receiver)
1311 { 1311 {
1312 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); 1312 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender));
1313 } 1313 }
1314 if (receiver != null) 1314 if (receiver != null)
1315 { 1315 {
1316 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); 1316 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(part.OwnerID));
1317 } 1317 }
1318 } 1318 }
1319 return; 1319 return;
@@ -1330,13 +1330,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1330 { 1330 {
1331 if (sender != null) 1331 if (sender != null)
1332 { 1332 {
1333 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); 1333 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender));
1334 } 1334 }
1335 } 1335 }
1336 1336
1337 if (receiver != null) 1337 if (receiver != null)
1338 { 1338 {
1339 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.receiver)); 1339 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.receiver));
1340 } 1340 }
1341 } 1341 }
1342 else 1342 else
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1369 /// Event Handler for when the client logs out. 1369 /// Event Handler for when the client logs out.
1370 /// </summary> 1370 /// </summary>
1371 /// <param name="AgentId"></param> 1371 /// <param name="AgentId"></param>
1372 private void ClientLoggedOut(LLUUID AgentId) 1372 private void ClientLoggedOut(UUID AgentId)
1373 { 1373 {
1374 lock (m_rootAgents) 1374 lock (m_rootAgents)
1375 { 1375 {
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1396 /// <param name="avatar"></param> 1396 /// <param name="avatar"></param>
1397 /// <param name="localLandID"></param> 1397 /// <param name="localLandID"></param>
1398 /// <param name="regionID"></param> 1398 /// <param name="regionID"></param>
1399 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 1399 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
1400 { 1400 {
1401 lock (m_rootAgents) 1401 lock (m_rootAgents)
1402 { 1402 {
@@ -1404,8 +1404,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1404 { 1404 {
1405 if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID]) 1405 if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID])
1406 { 1406 {
1407
1408
1409 m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; 1407 m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID;
1410 1408
1411 1409
@@ -1527,7 +1525,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1527 else 1525 else
1528 { 1526 {
1529 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); 1527 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID);
1530 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impailed yourself on " + part.Name + " owned by " + killer +"!", true); 1528 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true);
1531 } 1529 }
1532 //DeadAvatar.Scene. part.ObjectOwner 1530 //DeadAvatar.Scene. part.ObjectOwner
1533 } 1531 }
@@ -1564,8 +1562,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1564 1562
1565 #endregion 1563 #endregion
1566 1564
1567 public void ObjectBuy(IClientAPI remoteClient, LLUUID agentID, 1565 public void ObjectBuy(IClientAPI remoteClient, UUID agentID,
1568 LLUUID sessionID, LLUUID groupID, LLUUID categoryID, 1566 UUID sessionID, UUID groupID, UUID categoryID,
1569 uint localID, byte saleType, int salePrice) 1567 uint localID, byte saleType, int salePrice)
1570 { 1568 {
1571 GetClientFunds(remoteClient); 1569 GetClientFunds(remoteClient);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index 4a98622..0be540d 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -28,8 +28,8 @@ using System;
28using System.Collections; 28using System.Collections;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using Nwc.XmlRpc; 35using Nwc.XmlRpc;
@@ -43,10 +43,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>(); 46 private Dictionary<UUID, List<FriendListItem>> FriendLists = new Dictionary<UUID, List<FriendListItem>>();
47 private Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>(); 47 private Dictionary<UUID, UUID> m_pendingFriendRequests = new Dictionary<UUID, UUID>();
48 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 48 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
49 private Dictionary<LLUUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<LLUUID, List<StoredFriendListUpdate>>(); 49 private Dictionary<UUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<UUID, List<StoredFriendListUpdate>>();
50 50
51 private List<Scene> m_scene = new List<Scene>(); 51 private List<Scene> m_scene = new List<Scene>();
52 52
@@ -98,16 +98,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
98 98
99 if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) 99 if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status"))
100 { 100 {
101 LLUUID notifyAgentId = LLUUID.Zero; 101 UUID notifyAgentId = UUID.Zero;
102 LLUUID notifyAboutAgentId = LLUUID.Zero; 102 UUID notifyAboutAgentId = UUID.Zero;
103 bool notifyOnlineStatus = false; 103 bool notifyOnlineStatus = false;
104 104
105 if ((string)requestData["status"] == "TRUE") 105 if ((string)requestData["status"] == "TRUE")
106 notifyOnlineStatus = true; 106 notifyOnlineStatus = true;
107 107
108 Helpers.TryParse((string)requestData["notify_id"], out notifyAgentId); 108 UUID.TryParse((string)requestData["notify_id"], out notifyAgentId);
109 109
110 Helpers.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); 110 UUID.TryParse((string)requestData["agent_id"], out notifyAboutAgentId);
111 m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); 111 m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString());
112 ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); 112 ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId);
113 if (avatar != null) 113 if (avatar != null)
@@ -189,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
189 189
190 } 190 }
191 191
192 private void doFriendListUpdateOnline(LLUUID AgentId) 192 private void doFriendListUpdateOnline(UUID AgentId)
193 { 193 {
194 List<FriendListItem> fl = new List<FriendListItem>(); 194 List<FriendListItem> fl = new List<FriendListItem>();
195 195
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
213 } 213 }
214 } 214 }
215 215
216 List<LLUUID> UpdateUsers = new List<LLUUID>(); 216 List<UUID> UpdateUsers = new List<UUID>();
217 217
218 foreach (FriendListItem f in fl) 218 foreach (FriendListItem f in fl)
219 { 219 {
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
226 } 226 }
227 } 227 }
228 } 228 }
229 foreach (LLUUID user in UpdateUsers) 229 foreach (UUID user in UpdateUsers)
230 { 230 {
231 ScenePresence av = GetPresenceFromAgentID(user); 231 ScenePresence av = GetPresenceFromAgentID(user);
232 if (av != null) 232 if (av != null)
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
245 if (fli.Friend == AgentId) 245 if (fli.Friend == AgentId)
246 { 246 {
247 fli.onlinestatus = true; 247 fli.onlinestatus = true;
248 LLUUID[] Agents = new LLUUID[1]; 248 UUID[] Agents = new UUID[1];
249 Agents[0] = AgentId; 249 Agents[0] = AgentId;
250 av.ControllingClient.SendAgentOnline(Agents); 250 av.ControllingClient.SendAgentOnline(Agents);
251 251
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
266 } 266 }
267 } 267 }
268 268
269 private void ClientLoggedOut(LLUUID AgentId) 269 private void ClientLoggedOut(UUID AgentId)
270 { 270 {
271 lock (m_rootAgents) 271 lock (m_rootAgents)
272 { 272 {
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
284 lfli = FriendLists[AgentId]; 284 lfli = FriendLists[AgentId];
285 } 285 }
286 } 286 }
287 List<LLUUID> updateUsers = new List<LLUUID>(); 287 List<UUID> updateUsers = new List<UUID>();
288 foreach (FriendListItem fli in lfli) 288 foreach (FriendListItem fli in lfli)
289 { 289 {
290 if (fli.onlinestatus == true) 290 if (fli.onlinestatus == true)
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
352 ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); 352 ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
353 if (av != null) 353 if (av != null)
354 { 354 {
355 LLUUID[] agents = new LLUUID[1]; 355 UUID[] agents = new UUID[1];
356 agents[0] = AgentId; 356 agents[0] = AgentId;
357 av.ControllingClient.SendAgentOffline(agents); 357 av.ControllingClient.SendAgentOffline(agents);
358 } 358 }
@@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
364 } 364 }
365 } 365 }
366 366
367 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 367 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
368 { 368 {
369 lock (m_rootAgents) 369 lock (m_rootAgents)
370 { 370 {
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
427 } 427 }
428 } 428 }
429 429
430 private ScenePresence GetPresenceFromAgentID(LLUUID AgentID) 430 private ScenePresence GetPresenceFromAgentID(UUID AgentID)
431 { 431 {
432 ScenePresence returnAgent = null; 432 ScenePresence returnAgent = null;
433 lock (m_scene) 433 lock (m_scene)
@@ -451,11 +451,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
451 451
452 #region FriendRequestHandling 452 #region FriendRequestHandling
453 453
454 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 454 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
455 LLUUID fromAgentSession, LLUUID toAgentID, 455 UUID fromAgentSession, UUID toAgentID,
456 LLUUID imSessionID, uint timestamp, string fromAgentName, 456 UUID imSessionID, uint timestamp, string fromAgentName,
457 string message, byte dialog, bool fromGroup, byte offline, 457 string message, byte dialog, bool fromGroup, byte offline,
458 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 458 uint ParentEstateID, Vector3 Position, UUID RegionID,
459 byte[] binaryBucket) 459 byte[] binaryBucket)
460 { 460 {
461 // Friend Requests go by Instant Message.. using the dialog param 461 // Friend Requests go by Instant Message.. using the dialog param
@@ -464,17 +464,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
464 // 38 == Offer friendship 464 // 38 == Offer friendship
465 if (dialog == (byte) 38) 465 if (dialog == (byte) 38)
466 { 466 {
467 LLUUID friendTransactionID = LLUUID.Random(); 467 UUID friendTransactionID = UUID.Random();
468 468
469 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 469 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
470 470
471 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + 471 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
472 message); 472 message);
473 GridInstantMessage msg = new GridInstantMessage(); 473 GridInstantMessage msg = new GridInstantMessage();
474 msg.fromAgentID = fromAgentID.UUID; 474 msg.fromAgentID = fromAgentID.Guid;
475 msg.fromAgentSession = fromAgentSession.UUID; 475 msg.fromAgentSession = fromAgentSession.Guid;
476 msg.toAgentID = toAgentID.UUID; 476 msg.toAgentID = toAgentID.Guid;
477 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here 477 msg.imSessionID = friendTransactionID.Guid; // This is the item we're mucking with here
478 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); 478 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
479 msg.timestamp = timestamp; 479 msg.timestamp = timestamp;
480 if (client != null) 480 if (client != null)
@@ -490,8 +490,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
490 msg.fromGroup = fromGroup; 490 msg.fromGroup = fromGroup;
491 msg.offline = offline; 491 msg.offline = offline;
492 msg.ParentEstateID = ParentEstateID; 492 msg.ParentEstateID = ParentEstateID;
493 msg.Position = new sLLVector3(Position); 493 msg.Position = Position;
494 msg.RegionID = RegionID.UUID; 494 msg.RegionID = RegionID.Guid;
495 msg.binaryBucket = binaryBucket; 495 msg.binaryBucket = binaryBucket;
496 // We don't really care which scene we pipe it through. 496 // We don't really care which scene we pipe it through.
497 m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 497 m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
@@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
512 } 512 }
513 } 513 }
514 514
515 private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) 515 private void OnApprovedFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders)
516 { 516 {
517 if (m_pendingFriendRequests.ContainsKey(transactionID)) 517 if (m_pendingFriendRequests.ContainsKey(transactionID))
518 { 518 {
@@ -528,18 +528,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
528 528
529 // Compose response to other agent. 529 // Compose response to other agent.
530 GridInstantMessage msg = new GridInstantMessage(); 530 GridInstantMessage msg = new GridInstantMessage();
531 msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; 531 msg.toAgentID = m_pendingFriendRequests[transactionID].Guid;
532 msg.fromAgentID = agentID.UUID; 532 msg.fromAgentID = agentID.Guid;
533 msg.fromAgentName = client.Name; 533 msg.fromAgentName = client.Name;
534 msg.fromAgentSession = client.SessionId.UUID; 534 msg.fromAgentSession = client.SessionId.Guid;
535 msg.fromGroup = false; 535 msg.fromGroup = false;
536 msg.imSessionID = transactionID.UUID; 536 msg.imSessionID = transactionID.Guid;
537 msg.message = agentID.UUID.ToString(); 537 msg.message = agentID.Guid.ToString();
538 msg.ParentEstateID = 0; 538 msg.ParentEstateID = 0;
539 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 539 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
540 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 540 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid;
541 msg.dialog = (byte) 39; // Approved friend request 541 msg.dialog = (byte) 39; // Approved friend request
542 msg.Position = new sLLVector3(); 542 msg.Position = Vector3.Zero;
543 msg.offline = (byte) 0; 543 msg.offline = (byte) 0;
544 msg.binaryBucket = new byte[0]; 544 msg.binaryBucket = new byte[0];
545 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database 545 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database
@@ -548,7 +548,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
548 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1); 548 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1);
549 549
550 550
551 //LLUUID[] Agents = new LLUUID[1]; 551 //UUID[] Agents = new UUID[1];
552 //Agents[0] = msg.toAgentID; 552 //Agents[0] = msg.toAgentID;
553 //av.ControllingClient.SendAgentOnline(Agents); 553 //av.ControllingClient.SendAgentOnline(Agents);
554 554
@@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
557 } 557 }
558 } 558 }
559 559
560 private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) 560 private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders)
561 { 561 {
562 if (m_pendingFriendRequests.ContainsKey(transactionID)) 562 if (m_pendingFriendRequests.ContainsKey(transactionID))
563 { 563 {
@@ -571,18 +571,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
571 } 571 }
572 // Compose response to other agent. 572 // Compose response to other agent.
573 GridInstantMessage msg = new GridInstantMessage(); 573 GridInstantMessage msg = new GridInstantMessage();
574 msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; 574 msg.toAgentID = m_pendingFriendRequests[transactionID].Guid;
575 msg.fromAgentID = agentID.UUID; 575 msg.fromAgentID = agentID.Guid;
576 msg.fromAgentName = client.Name; 576 msg.fromAgentName = client.Name;
577 msg.fromAgentSession = client.SessionId.UUID; 577 msg.fromAgentSession = client.SessionId.Guid;
578 msg.fromGroup = false; 578 msg.fromGroup = false;
579 msg.imSessionID = transactionID.UUID; 579 msg.imSessionID = transactionID.Guid;
580 msg.message = agentID.UUID.ToString(); 580 msg.message = agentID.Guid.ToString();
581 msg.ParentEstateID = 0; 581 msg.ParentEstateID = 0;
582 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 582 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
583 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 583 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid;
584 msg.dialog = (byte) 40; // Deny friend request 584 msg.dialog = (byte) 40; // Deny friend request
585 msg.Position = new sLLVector3(); 585 msg.Position = Vector3.Zero;
586 msg.offline = (byte) 0; 586 msg.offline = (byte) 0;
587 msg.binaryBucket = new byte[0]; 587 msg.binaryBucket = new byte[0];
588 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 588 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
590 } 590 }
591 } 591 }
592 592
593 private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) 593 private void OnTerminateFriendship(IClientAPI client, UUID agent, UUID exfriendID)
594 { 594 {
595 m_scene[0].StoreRemoveFriendship(agent, exfriendID); 595 m_scene[0].StoreRemoveFriendship(agent, exfriendID);
596 // TODO: Inform the client that the ExFriend is offline 596 // TODO: Inform the client that the ExFriend is offline
@@ -599,10 +599,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
599 private void OnGridInstantMessage(GridInstantMessage msg) 599 private void OnGridInstantMessage(GridInstantMessage msg)
600 { 600 {
601 // Trigger the above event handler 601 // Trigger the above event handler
602 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 602 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
603 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 603 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
604 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 604 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
605 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 605 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
606 msg.binaryBucket); 606 msg.binaryBucket);
607 } 607 }
608 608
@@ -611,8 +611,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
611 611
612 public struct StoredFriendListUpdate 612 public struct StoredFriendListUpdate
613 { 613 {
614 public LLUUID storedFor; 614 public UUID storedFor;
615 public LLUUID storedAbout; 615 public UUID storedAbout;
616 public bool OnlineYN; 616 public bool OnlineYN;
617 } 617 }
618} 618}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index eaa5013..ad0cac0 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); 44 private Dictionary<UUID, GroupList> m_grouplistmap = new Dictionary<UUID, GroupList>();
45 private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); 45 private Dictionary<UUID, GroupData> m_groupmap = new Dictionary<UUID, GroupData>();
46 private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); 46 private Dictionary<UUID, IClientAPI> m_iclientmap = new Dictionary<UUID, IClientAPI>();
47 private Dictionary<LLUUID, GroupData> m_groupUUIDGroup = new Dictionary<LLUUID, GroupData>(); 47 private Dictionary<UUID, GroupData> m_groupUUIDGroup = new Dictionary<UUID, GroupData>();
48 private LLUUID opensimulatorGroupID = new LLUUID("00000000-68f9-1111-024e-222222111123"); 48 private UUID opensimulatorGroupID = new UUID("00000000-68f9-1111-024e-222222111123");
49 49
50 private List<Scene> m_scene = new List<Scene>(); 50 private List<Scene> m_scene = new List<Scene>();
51 51
@@ -161,13 +161,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
161 client.SendGroupMembership(updateGroups); 161 client.SendGroupMembership(updateGroups);
162 } 162 }
163 163
164 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID) 164 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID AgentID, UUID SessionID)
165 { 165 {
166 // Adam, this is one of those impossible to refactor items without resorting to .Split hackery 166 // Adam, this is one of those impossible to refactor items without resorting to .Split hackery
167 string firstname = remoteClient.FirstName; 167 string firstname = remoteClient.FirstName;
168 string lastname = remoteClient.LastName; 168 string lastname = remoteClient.LastName;
169 169
170 LLUUID ActiveGroupID = LLUUID.Zero; 170 UUID ActiveGroupID = UUID.Zero;
171 uint ActiveGroupPowers = 0; 171 uint ActiveGroupPowers = 0;
172 string ActiveGroupName = "OpenSimulator Tester"; 172 string ActiveGroupName = "OpenSimulator Tester";
173 string ActiveGroupTitle = "I IZ N0T"; 173 string ActiveGroupTitle = "I IZ N0T";
@@ -202,11 +202,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
202 } 202 }
203 } 203 }
204 204
205 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 205 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
206 LLUUID fromAgentSession, LLUUID toAgentID, 206 UUID fromAgentSession, UUID toAgentID,
207 LLUUID imSessionID, uint timestamp, string fromAgentName, 207 UUID imSessionID, uint timestamp, string fromAgentName,
208 string message, byte dialog, bool fromGroup, byte offline, 208 string message, byte dialog, bool fromGroup, byte offline,
209 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 209 uint ParentEstateID, Vector3 Position, UUID RegionID,
210 byte[] binaryBucket) 210 byte[] binaryBucket)
211 { 211 {
212 } 212 }
@@ -214,16 +214,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
214 private void OnGridInstantMessage(GridInstantMessage msg) 214 private void OnGridInstantMessage(GridInstantMessage msg)
215 { 215 {
216 // Trigger the above event handler 216 // Trigger the above event handler
217 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 217 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
218 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 218 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
219 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 219 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
220 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 220 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
221 msg.binaryBucket); 221 msg.binaryBucket);
222 } 222 }
223 private void HandleUUIDGroupNameRequest(LLUUID id,IClientAPI remote_client) 223 private void HandleUUIDGroupNameRequest(UUID id,IClientAPI remote_client)
224 { 224 {
225 string groupnamereply = "Unknown"; 225 string groupnamereply = "Unknown";
226 LLUUID groupUUID = LLUUID.Zero; 226 UUID groupUUID = UUID.Zero;
227 227
228 lock (m_groupUUIDGroup) 228 lock (m_groupUUIDGroup)
229 { 229 {
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
236 } 236 }
237 remote_client.SendGroupNameReply(groupUUID, groupnamereply); 237 remote_client.SendGroupNameReply(groupUUID, groupnamereply);
238 } 238 }
239 private void OnClientClosed(LLUUID agentID) 239 private void OnClientClosed(UUID agentID)
240 { 240 {
241 lock (m_iclientmap) 241 lock (m_iclientmap)
242 { 242 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
index bb3303f..6b2de80 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Net; 31using System.Net;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using Nini.Config; 35using Nini.Config;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 private readonly List<Scene> m_scenes = new List<Scene>(); 47 private readonly List<Scene> m_scenes = new List<Scene>();
48 private Dictionary<LLUUID, ulong> m_userRegionMap = new Dictionary<LLUUID, ulong>(); 48 private Dictionary<UUID, ulong> m_userRegionMap = new Dictionary<UUID, ulong>();
49 49
50 #region IRegionModule Members 50 #region IRegionModule Members
51 51
@@ -106,11 +106,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
106 client.OnInstantMessage += OnInstantMessage; 106 client.OnInstantMessage += OnInstantMessage;
107 } 107 }
108 108
109 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 109 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
110 LLUUID fromAgentSession, LLUUID toAgentID, 110 UUID fromAgentSession, UUID toAgentID,
111 LLUUID imSessionID, uint timestamp, string fromAgentName, 111 UUID imSessionID, uint timestamp, string fromAgentName,
112 string message, byte dialog, bool fromGroup, byte offline, 112 string message, byte dialog, bool fromGroup, byte offline,
113 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 113 uint ParentEstateID, Vector3 Position, UUID RegionID,
114 byte[] binaryBucket) 114 byte[] binaryBucket)
115 { 115 {
116 bool dialogHandledElsewhere 116 bool dialogHandledElsewhere
@@ -122,8 +122,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
122 // IM dialogs need to be pre-processed and have their sessionID filled by the server 122 // IM dialogs need to be pre-processed and have their sessionID filled by the server
123 // so the sim can match the transaction on the return packet. 123 // so the sim can match the transaction on the return packet.
124 124
125 // Don't send a Friend Dialog IM with a LLUUID.Zero session. 125 // Don't send a Friend Dialog IM with a UUID.Zero session.
126 if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero)) 126 if (!(dialogHandledElsewhere && imSessionID == UUID.Zero))
127 { 127 {
128 // Try root avatar only first 128 // Try root avatar only first
129 foreach (Scene scene in m_scenes) 129 foreach (Scene scene in m_scenes)
@@ -195,10 +195,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
195 private void OnGridInstantMessage(GridInstantMessage msg) 195 private void OnGridInstantMessage(GridInstantMessage msg)
196 { 196 {
197 // Trigger the above event handler 197 // Trigger the above event handler
198 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 198 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
199 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 199 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
200 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 200 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
201 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 201 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
202 msg.binaryBucket); 202 msg.binaryBucket);
203 } 203 }
204 204
@@ -214,10 +214,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
214 { 214 {
215 bool successful = false; 215 bool successful = false;
216 // various rational defaults 216 // various rational defaults
217 LLUUID fromAgentID = LLUUID.Zero; 217 UUID fromAgentID = UUID.Zero;
218 LLUUID fromAgentSession = LLUUID.Zero; 218 UUID fromAgentSession = UUID.Zero;
219 LLUUID toAgentID = LLUUID.Zero; 219 UUID toAgentID = UUID.Zero;
220 LLUUID imSessionID = LLUUID.Zero; 220 UUID imSessionID = UUID.Zero;
221 uint timestamp = 0; 221 uint timestamp = 0;
222 string fromAgentName = ""; 222 string fromAgentName = "";
223 string message = ""; 223 string message = "";
@@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
225 bool fromGroup = false; 225 bool fromGroup = false;
226 byte offline = (byte)0; 226 byte offline = (byte)0;
227 uint ParentEstateID=0; 227 uint ParentEstateID=0;
228 LLVector3 Position = LLVector3.Zero; 228 Vector3 Position = Vector3.Zero;
229 LLUUID RegionID = LLUUID.Zero ; 229 UUID RegionID = UUID.Zero ;
230 byte[] binaryBucket = new byte[0]; 230 byte[] binaryBucket = new byte[0];
231 231
232 float pos_x = 0; 232 float pos_x = 0;
@@ -248,11 +248,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
248 && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle")) 248 && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle"))
249 { 249 {
250 // Do the easy way of validating the UUIDs 250 // Do the easy way of validating the UUIDs
251 Helpers.TryParse((string)requestData["from_agent_id"], out fromAgentID); 251 UUID.TryParse((string)requestData["from_agent_id"], out fromAgentID);
252 Helpers.TryParse((string)requestData["from_agent_session"], out fromAgentSession); 252 UUID.TryParse((string)requestData["from_agent_session"], out fromAgentSession);
253 Helpers.TryParse((string)requestData["to_agent_id"], out toAgentID); 253 UUID.TryParse((string)requestData["to_agent_id"], out toAgentID);
254 Helpers.TryParse((string)requestData["im_session_id"], out imSessionID); 254 UUID.TryParse((string)requestData["im_session_id"], out imSessionID);
255 Helpers.TryParse((string)requestData["region_id"], out RegionID); 255 UUID.TryParse((string)requestData["region_id"], out RegionID);
256 256
257 # region timestamp 257 # region timestamp
258 try 258 try
@@ -345,24 +345,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
345 } 345 }
346 # endregion 346 # endregion
347 347
348 Position = new LLVector3(pos_x, pos_y, pos_z); 348 Position = new Vector3(pos_x, pos_y, pos_z);
349 binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); 349 binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]);
350 350
351 // Create a New GridInstantMessageObject the the data 351 // Create a New GridInstantMessageObject the the data
352 GridInstantMessage gim = new GridInstantMessage(); 352 GridInstantMessage gim = new GridInstantMessage();
353 gim.fromAgentID = fromAgentID.UUID; 353 gim.fromAgentID = fromAgentID.Guid;
354 gim.fromAgentName = fromAgentName; 354 gim.fromAgentName = fromAgentName;
355 gim.fromAgentSession = fromAgentSession.UUID; 355 gim.fromAgentSession = fromAgentSession.Guid;
356 gim.fromGroup = fromGroup; 356 gim.fromGroup = fromGroup;
357 gim.imSessionID = imSessionID.UUID; 357 gim.imSessionID = imSessionID.Guid;
358 gim.RegionID = RegionID.UUID; 358 gim.RegionID = RegionID.Guid;
359 gim.timestamp = timestamp; 359 gim.timestamp = timestamp;
360 gim.toAgentID = toAgentID.UUID; 360 gim.toAgentID = toAgentID.Guid;
361 gim.message = message; 361 gim.message = message;
362 gim.dialog = dialog; 362 gim.dialog = dialog;
363 gim.offline = offline; 363 gim.offline = offline;
364 gim.ParentEstateID = ParentEstateID; 364 gim.ParentEstateID = ParentEstateID;
365 gim.Position = new sLLVector3(Position); 365 gim.Position = Position;
366 gim.binaryBucket = binaryBucket; 366 gim.binaryBucket = binaryBucket;
367 367
368 368
@@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
418 /// <param name="binaryBucket"></param> 418 /// <param name="binaryBucket"></param>
419 /// <param name="regionhandle"></param> 419 /// <param name="regionhandle"></param>
420 /// <param name="prevRegionHandle"></param> 420 /// <param name="prevRegionHandle"></param>
421 public delegate void GridInstantMessageDelegate(IClientAPI client, LLUUID fromAgentID, 421 public delegate void GridInstantMessageDelegate(IClientAPI client, UUID fromAgentID,
422 LLUUID fromAgentSession, LLUUID toAgentID, 422 UUID fromAgentSession, UUID toAgentID,
423 LLUUID imSessionID, uint timestamp, string fromAgentName, 423 UUID imSessionID, uint timestamp, string fromAgentName,
424 string message, byte dialog, bool fromGroup, byte offline, 424 string message, byte dialog, bool fromGroup, byte offline,
425 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 425 uint ParentEstateID, Vector3 Position, UUID RegionID,
426 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle); 426 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle);
427 427
428 private void GridInstantMessageCompleted(IAsyncResult iar) 428 private void GridInstantMessageCompleted(IAsyncResult iar)
@@ -432,11 +432,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
432 } 432 }
433 433
434 434
435 protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, LLUUID fromAgentID, 435 protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, UUID fromAgentID,
436 LLUUID fromAgentSession, LLUUID toAgentID, 436 UUID fromAgentSession, UUID toAgentID,
437 LLUUID imSessionID, uint timestamp, string fromAgentName, 437 UUID imSessionID, uint timestamp, string fromAgentName,
438 string message, byte dialog, bool fromGroup, byte offline, 438 string message, byte dialog, bool fromGroup, byte offline,
439 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 439 uint ParentEstateID, Vector3 Position, UUID RegionID,
440 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) 440 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle)
441 { 441 {
442 GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync; 442 GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync;
@@ -459,11 +459,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
459 /// if it's the same as the user's looked up region handle, then we end the recursive loop 459 /// if it's the same as the user's looked up region handle, then we end the recursive loop
460 /// </summary> 460 /// </summary>
461 /// <param name="prevRegionHandle"></param> 461 /// <param name="prevRegionHandle"></param>
462 protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, LLUUID fromAgentID, 462 protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, UUID fromAgentID,
463 LLUUID fromAgentSession, LLUUID toAgentID, 463 UUID fromAgentSession, UUID toAgentID,
464 LLUUID imSessionID, uint timestamp, string fromAgentName, 464 UUID imSessionID, uint timestamp, string fromAgentName,
465 string message, byte dialog, bool fromGroup, byte offline, 465 string message, byte dialog, bool fromGroup, byte offline,
466 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 466 uint ParentEstateID, Vector3 Position, UUID RegionID,
467 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) 467 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle)
468 { 468 {
469 UserAgentData upd = null; 469 UserAgentData upd = null;
@@ -527,10 +527,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
527 if (reginfo != null) 527 if (reginfo != null)
528 { 528 {
529 GridInstantMessage msg = new GridInstantMessage(); 529 GridInstantMessage msg = new GridInstantMessage();
530 msg.fromAgentID = fromAgentID.UUID; 530 msg.fromAgentID = fromAgentID.Guid;
531 msg.fromAgentSession = fromAgentSession.UUID; 531 msg.fromAgentSession = fromAgentSession.Guid;
532 msg.toAgentID = toAgentID.UUID; 532 msg.toAgentID = toAgentID.Guid;
533 msg.imSessionID = imSessionID.UUID; 533 msg.imSessionID = imSessionID.Guid;
534 msg.timestamp = timestamp; 534 msg.timestamp = timestamp;
535 msg.fromAgentName = fromAgentName; 535 msg.fromAgentName = fromAgentName;
536 msg.message = message; 536 msg.message = message;
@@ -538,8 +538,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
538 msg.fromGroup = fromGroup; 538 msg.fromGroup = fromGroup;
539 msg.offline = offline; 539 msg.offline = offline;
540 msg.ParentEstateID = ParentEstateID; 540 msg.ParentEstateID = ParentEstateID;
541 msg.Position = new sLLVector3(Position); 541 msg.Position = Position;
542 msg.RegionID = RegionID.UUID; 542 msg.RegionID = RegionID.Guid;
543 msg.binaryBucket = binaryBucket; 543 msg.binaryBucket = binaryBucket;
544 544
545 Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg); 545 Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg);
@@ -649,7 +649,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
649 /// </summary> 649 /// </summary>
650 /// <param name="regionID">UUID of region to get the region handle for</param> 650 /// <param name="regionID">UUID of region to get the region handle for</param>
651 /// <returns></returns> 651 /// <returns></returns>
652 private ulong getLocalRegionHandleFromUUID(LLUUID regionID) 652 private ulong getLocalRegionHandleFromUUID(UUID regionID)
653 { 653 {
654 ulong returnhandle = 0; 654 ulong returnhandle = 0;
655 655
@@ -692,13 +692,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
692 byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline; 692 byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline;
693 gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None); 693 gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None);
694 gim["parent_estate_id"] = msg.ParentEstateID.ToString(); 694 gim["parent_estate_id"] = msg.ParentEstateID.ToString();
695 gim["position_x"] = msg.Position.x.ToString(); 695 gim["position_x"] = msg.Position.X.ToString();
696 gim["position_y"] = msg.Position.y.ToString(); 696 gim["position_y"] = msg.Position.Y.ToString();
697 gim["position_z"] = msg.Position.z.ToString(); 697 gim["position_z"] = msg.Position.Z.ToString();
698 gim["region_id"] = msg.RegionID.ToString(); 698 gim["region_id"] = msg.RegionID.ToString();
699 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None); 699 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None);
700 return gim; 700 return gim;
701 } 701 }
702 702
703 } 703 }
704} \ No newline at end of file 704}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
index d036dbb..344cb5e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
@@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
46 /// occurs in the initial offer message, not the accept message. So this dictionary links 46 /// occurs in the initial offer message, not the accept message. So this dictionary links
47 /// IM Session Ids to ItemIds 47 /// IM Session Ids to ItemIds
48 /// </summary> 48 /// </summary>
49 private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); 49 private IDictionary<UUID, UUID> m_pendingOffers = new Dictionary<UUID, UUID>();
50 50
51 private List<Scene> m_Scenelist = new List<Scene>(); 51 private List<Scene> m_Scenelist = new List<Scene>();
52 private Dictionary<LLUUID, Scene> m_AgentRegions = new Dictionary<LLUUID, Scene>(); 52 private Dictionary<UUID, Scene> m_AgentRegions = new Dictionary<UUID, Scene>();
53 53
54 #region IRegionModule Members 54 #region IRegionModule Members
55 55
@@ -92,11 +92,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
92 client.OnInstantMessage += OnInstantMessage; 92 client.OnInstantMessage += OnInstantMessage;
93 } 93 }
94 94
95 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 95 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
96 LLUUID fromAgentSession, LLUUID toAgentID, 96 UUID fromAgentSession, UUID toAgentID,
97 LLUUID imSessionID, uint timestamp, string fromAgentName, 97 UUID imSessionID, uint timestamp, string fromAgentName,
98 string message, byte dialog, bool fromGroup, byte offline, 98 string message, byte dialog, bool fromGroup, byte offline,
99 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 99 uint ParentEstateID, Vector3 Position, UUID RegionID,
100 byte[] binaryBucket) 100 byte[] binaryBucket)
101 { 101 {
102 if (dialog == (byte) InstantMessageDialog.InventoryOffered) 102 if (dialog == (byte) InstantMessageDialog.InventoryOffered)
@@ -117,8 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
117 // Next 16 bytes are the UUID 117 // Next 16 bytes are the UUID
118 //Array.Copy(binaryBucket, 1, rawId, 0, 16); 118 //Array.Copy(binaryBucket, 1, rawId, 0, 16);
119 119
120 //LLUUID itemId = new LLUUID(new Guid(rawId)); 120 //UUID itemId = new UUID(new Guid(rawId));
121 LLUUID itemId = new LLUUID(binaryBucket, 1); 121 UUID itemId = new UUID(binaryBucket, 1);
122 122
123 m_log.DebugFormat( 123 m_log.DebugFormat(
124 "[AGENT INVENTORY]: ItemId for giving is {0}", itemId); 124 "[AGENT INVENTORY]: ItemId for giving is {0}", itemId);
@@ -225,12 +225,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
225 } 225 }
226 } 226 }
227 227
228 public void SetRootAgentScene(LLUUID agentID, Scene scene) 228 public void SetRootAgentScene(UUID agentID, Scene scene)
229 { 229 {
230 m_AgentRegions[agentID] = scene; 230 m_AgentRegions[agentID] = scene;
231 } 231 }
232 232
233 public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) 233 public bool NeedSceneCacheClear(UUID agentID, Scene scene)
234 { 234 {
235 if (!m_AgentRegions.ContainsKey(agentID)) 235 if (!m_AgentRegions.ContainsKey(agentID))
236 { 236 {
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
279 return false; 279 return false;
280 } 280 }
281 281
282 public void ClientLoggedOut(LLUUID agentID) 282 public void ClientLoggedOut(UUID agentID)
283 { 283 {
284 if (m_AgentRegions.ContainsKey(agentID)) 284 if (m_AgentRegions.ContainsKey(agentID))
285 m_AgentRegions.Remove(agentID); 285 m_AgentRegions.Remove(agentID);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
index 20b1c1c..f9c0dcf 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
90 /// </summary> 90 /// </summary>
91 /// <param name="remoteClient"></param> 91 /// <param name="remoteClient"></param>
92 /// <param name="avatarID"></param> 92 /// <param name="avatarID"></param>
93 public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID) 93 public void RequestAvatarProperty(IClientAPI remoteClient, UUID avatarID)
94 { 94 {
95 // FIXME: finish adding fields such as url, masking, etc. 95 // FIXME: finish adding fields such as url, masking, etc.
96 UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); 96 UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID);
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
104 } 104 }
105 else 105 else
106 { 106 {
107 charterMember = Helpers.StringToField(profile.CustomType); 107 charterMember = Utils.StringToBytes(profile.CustomType);
108 } 108 }
109 109
110 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, 110 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText,
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
index 1f41a92..e3a9a45 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
125 125
126 #endregion 126 #endregion
127 127
128 public void OnRegisterCaps(LLUUID agentID, Caps caps) 128 public void OnRegisterCaps(UUID agentID, Caps caps)
129 { 129 {
130 m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 130 m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
131 string capsBase = "/CAPS/" + caps.CapsObjectPath; 131 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
157 /// <param name="caps"></param> 157 /// <param name="caps"></param>
158 /// <returns></returns> 158 /// <returns></returns>
159 public string ParcelVoiceInfoRequest(string request, string path, string param, 159 public string ParcelVoiceInfoRequest(string request, string path, string param,
160 LLUUID agentID, Caps caps) 160 UUID agentID, Caps caps)
161 { 161 {
162 // we need to do: 162 // we need to do:
163 // - send channel_uri: as "sip:regionID@m_sipDomain" 163 // - send channel_uri: as "sip:regionID@m_sipDomain"
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
226 /// <param name="caps"></param> 226 /// <param name="caps"></param>
227 /// <returns></returns> 227 /// <returns></returns>
228 public string ProvisionVoiceAccountRequest(string request, string path, string param, 228 public string ProvisionVoiceAccountRequest(string request, string path, string param,
229 LLUUID agentID, Caps caps) 229 UUID agentID, Caps caps)
230 { 230 {
231 // we need to 231 // we need to
232 // - get user data from UserProfileCacheService 232 // - get user data from UserProfileCacheService
@@ -289,4 +289,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
289 } 289 }
290 } 290 }
291 } 291 }
292} \ No newline at end of file 292}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
index c6852f7..bd89175 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
98 98
99 #endregion 99 #endregion
100 100
101 public void OnRegisterCaps(LLUUID agentID, Caps caps) 101 public void OnRegisterCaps(UUID agentID, Caps caps)
102 { 102 {
103 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 103 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
104 string capsBase = "/CAPS/" + caps.CapsObjectPath; 104 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
130 /// <param name="caps"></param> 130 /// <param name="caps"></param>
131 /// <returns></returns> 131 /// <returns></returns>
132 public string ParcelVoiceInfoRequest(string request, string path, string param, 132 public string ParcelVoiceInfoRequest(string request, string path, string param,
133 LLUUID agentID, Caps caps) 133 UUID agentID, Caps caps)
134 { 134 {
135 try 135 try
136 { 136 {
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
172 /// <param name="caps"></param> 172 /// <param name="caps"></param>
173 /// <returns></returns> 173 /// <returns></returns>
174 public string ProvisionVoiceAccountRequest(string request, string path, string param, 174 public string ProvisionVoiceAccountRequest(string request, string path, string param,
175 LLUUID agentID, Caps caps) 175 UUID agentID, Caps caps)
176 { 176 {
177 try 177 try
178 { 178 {
@@ -199,4 +199,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
199 return null; 199 return null;
200 } 200 }
201 } 201 }
202} \ No newline at end of file 202}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index f99bfc5..dd592dd 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class AuraMetaEntity : PointMetaEntity 55 public class AuraMetaEntity : PointMetaEntity
@@ -59,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
59 #region Constructors 57 #region Constructors
60 58
61 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency. 59 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency.
62 public AuraMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 60 public AuraMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
63 : base(scene, LocalId, groupPos, transparency) 61 : base(scene, LocalId, groupPos, transparency)
64 { 62 {
65 SetAura(color, scale); 63 SetAura(color, scale);
66 } 64 }
67 65
68 public AuraMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 66 public AuraMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
69 : base(scene, uuid, LocalId, groupPos, transparency) 67 : base(scene, uuid, LocalId, groupPos, transparency)
70 { 68 {
71 SetAura(color, scale); 69 SetAura(color, scale);
@@ -75,7 +73,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 73
76 #region Private Methods 74 #region Private Methods
77 75
78 private float Average(LLVector3 values) 76 private float Average(Vector3 values)
79 { 77 {
80 return (values.X + values.Y + values.Z)/3f; 78 return (values.X + values.Y + values.Z)/3f;
81 } 79 }
@@ -84,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
84 82
85 #region Public Methods 83 #region Public Methods
86 84
87 public void SetAura(LLVector3 color, LLVector3 scale) 85 public void SetAura(Vector3 color, Vector3 scale)
88 { 86 {
89 SetAura(color, Average(scale) * 2.0f); 87 SetAura(color, Average(scale) * 2.0f);
90 } 88 }
91 89
92 public void SetAura(LLVector3 color, float radius) 90 public void SetAura(Vector3 color, float radius)
93 { 91 {
94 SceneObjectPart From = m_Entity.RootPart; 92 SceneObjectPart From = m_Entity.RootPart;
95 93
@@ -110,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
110 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); 108 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
111 } 109 }
112 110
113 public void SetAura(SceneObjectPart From, LLVector3 color, float radius, float burstRadius, float age, float burstRate, libsecondlife.Primitive.ParticleSystem.SourcePattern patternFlags) 111 public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags)
114 { 112 {
115 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 113 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
116 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 114 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -139,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
139 prules.PartAcceleration.Y = 0.0f; 137 prules.PartAcceleration.Y = 0.0f;
140 prules.PartAcceleration.Z = 0.0f; 138 prules.PartAcceleration.Z = 0.0f;
141 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN 139 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN
142 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 140 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
143 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE 141 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE
144 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT 142 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT
145 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS 143 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS
@@ -160,4 +158,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 158
161 #endregion Public Methods 159 #endregion Public Methods
162 } 160 }
163} \ No newline at end of file 161}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index 9e39088..b27bbc0 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,21 +50,19 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class BeamMetaEntity : PointMetaEntity 55 public class BeamMetaEntity : PointMetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public BeamMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 59 public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
62 : base(scene, LocalId, groupPos, transparency) 60 : base(scene, LocalId, groupPos, transparency)
63 { 61 {
64 SetBeamToUUID(To, color); 62 SetBeamToUUID(To, color);
65 } 63 }
66 64
67 public BeamMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 65 public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
68 : base(scene, uuid, LocalId, groupPos, transparency) 66 : base(scene, uuid, LocalId, groupPos, transparency)
69 { 67 {
70 SetBeamToUUID(To, color); 68 SetBeamToUUID(To, color);
@@ -74,13 +72,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
74 72
75 #region Public Methods 73 #region Public Methods
76 74
77 public void SetBeamToUUID(SceneObjectPart To, LLVector3 color) 75 public void SetBeamToUUID(SceneObjectPart To, Vector3 color)
78 { 76 {
79 SceneObjectPart From = m_Entity.RootPart; 77 SceneObjectPart From = m_Entity.RootPart;
80 //Scale size of particles to distance objects are apart (for better visibility) 78 //Scale size of particles to distance objects are apart (for better visibility)
81 LLVector3 FromPos = From.GetWorldPosition(); 79 Vector3 FromPos = From.GetWorldPosition();
82 LLVector3 ToPos = From.GetWorldPosition(); 80 Vector3 ToPos = From.GetWorldPosition();
83// LLUUID toUUID = To.UUID; 81 UUID toUUID = To.UUID;
84 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + 82 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) +
85 Math.Pow(FromPos.X-ToPos.Y, 2) + 83 Math.Pow(FromPos.X-ToPos.Y, 2) +
86 Math.Pow(FromPos.X-ToPos.Z, 2) 84 Math.Pow(FromPos.X-ToPos.Z, 2)
@@ -94,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
94 SetBeamToUUID(From, To, color, rate, scale, speed); 92 SetBeamToUUID(From, To, color, rate, scale, speed);
95 } 93 }
96 94
97 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, LLVector3 color, float rate, float scale, float speed) 95 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed)
98 { 96 {
99 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 97 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
100 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 98 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -118,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
118 prules.PartAcceleration.Y = 0.0f; 116 prules.PartAcceleration.Y = 0.0f;
119 prules.PartAcceleration.Z = 0.0f; 117 prules.PartAcceleration.Z = 0.0f;
120 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN 118 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN
121 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 119 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
122 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE 120 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE
123 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT 121 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT
124 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS 122 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS
@@ -138,4 +136,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
138 136
139 #endregion Public Methods 137 #endregion Public Methods
140 } 138 }
141} \ No newline at end of file 139}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index 6ccb646..072de5e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -39,7 +39,7 @@ using System.Collections.Generic;
39using System.Diagnostics; 39using System.Diagnostics;
40using System.Threading; 40using System.Threading;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 /// <summary> 54 /// <summary>
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 /// <summary> 264 /// <summary>
267 /// Only called by the MainLoop. 265 /// Only called by the MainLoop.
268 /// </summary> 266 /// </summary>
269 private void UndoDid(CMModel model, CMView view, LLUUID uuid) 267 private void UndoDid(CMModel model, CMView view, UUID uuid)
270 { 268 {
271 if ((m_state & State.SHOWING_CHANGES) > 0) 269 if ((m_state & State.SHOWING_CHANGES) > 0)
272 { 270 {
@@ -289,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
289 m_WorkQueue.Enqueue(moreWork); 287 m_WorkQueue.Enqueue(moreWork);
290 } 288 }
291 289
292 protected void ObjectDuplicated(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID) 290 protected void ObjectDuplicated(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID)
293 { 291 {
294 Work moreWork = new Work(); 292 Work moreWork = new Work();
295 moreWork.Type = WorkType.OBJECTDUPLICATED; 293 moreWork.Type = WorkType.OBJECTDUPLICATED;
@@ -298,8 +296,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
298 m_log.Debug("[CONTENT MANAGEMENT] dup queue"); 296 m_log.Debug("[CONTENT MANAGEMENT] dup queue");
299 } 297 }
300 298
301 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 299 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
302 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 300 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
303 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) 301 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates)
304 { 302 {
305 Work moreWork = new Work(); 303 Work moreWork = new Work();
@@ -318,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
318 m_log.Debug("[CONTENT MANAGEMENT] new client"); 316 m_log.Debug("[CONTENT MANAGEMENT] new client");
319 } 317 }
320 318
321 protected void OnUnDid(IClientAPI remoteClient, LLUUID primId) 319 protected void OnUnDid(IClientAPI remoteClient, UUID primId)
322 { 320 {
323 Work moreWork = new Work(); 321 Work moreWork = new Work();
324 moreWork.Type = WorkType.UNDODID; 322 moreWork.Type = WorkType.UNDODID;
@@ -405,7 +403,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
405 /// <summary> 403 /// <summary>
406 /// 404 ///
407 /// </summary> 405 /// </summary>
408 protected void StopManaging(LLUUID clientUUID) 406 protected void StopManaging(UUID clientUUID)
409 { 407 {
410 foreach(Object sceneobj in m_sceneList.Values) 408 foreach(Object sceneobj in m_sceneList.Values)
411 { 409 {
@@ -433,7 +431,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
433 } 431 }
434 } 432 }
435 433
436 protected void UpdateMultiplePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 434 protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
437 { 435 {
438 Work moreWork = new Work(); 436 Work moreWork = new Work();
439 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 437 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -442,7 +440,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
442 m_log.Debug("[CONTENT MANAGEMENT] pos"); 440 m_log.Debug("[CONTENT MANAGEMENT] pos");
443 } 441 }
444 442
445 protected void UpdateMultipleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 443 protected void UpdateMultipleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
446 { 444 {
447 Work moreWork = new Work(); 445 Work moreWork = new Work();
448 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 446 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -451,7 +449,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
451 m_log.Debug("[CONTENT MANAGEMENT] rot"); 449 m_log.Debug("[CONTENT MANAGEMENT] rot");
452 } 450 }
453 451
454 protected void UpdateMultipleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 452 protected void UpdateMultipleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
455 { 453 {
456 Work moreWork = new Work(); 454 Work moreWork = new Work();
457 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 455 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -460,8 +458,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
460 m_log.Debug("[CONTENT MANAGEMENT]scale"); 458 m_log.Debug("[CONTENT MANAGEMENT]scale");
461 } 459 }
462 460
463 protected void UpdateNewParts(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, 461 protected void UpdateNewParts(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape,
464 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 462 byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
465 byte RayEndIsIntersection) 463 byte RayEndIsIntersection)
466 { 464 {
467 Work moreWork = new Work(); 465 Work moreWork = new Work();
@@ -471,7 +469,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
471 m_log.Debug("[CONTENT MANAGEMENT] new parts"); 469 m_log.Debug("[CONTENT MANAGEMENT] new parts");
472 } 470 }
473 471
474 protected void UpdateSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 472 protected void UpdateSinglePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
475 { 473 {
476 Work moreWork = new Work(); 474 Work moreWork = new Work();
477 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 475 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -483,7 +481,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
483 /// <summary> 481 /// <summary>
484 /// 482 ///
485 /// </summary> 483 /// </summary>
486 protected void UpdateSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 484 protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
487 { 485 {
488 Work moreWork = new Work(); 486 Work moreWork = new Work();
489 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 487 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -492,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
492 m_log.Debug("[CONTENT MANAGEMENT] rot"); 490 m_log.Debug("[CONTENT MANAGEMENT] rot");
493 } 491 }
494 492
495 protected void UpdateSingleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 493 protected void UpdateSingleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
496 { 494 {
497 Work moreWork = new Work(); 495 Work moreWork = new Work();
498 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 496 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -723,7 +721,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
723 public Object Data2; //Just more space for holding data. 721 public Object Data2; //Just more space for holding data.
724 public uint LocalId; //Convenient 722 public uint LocalId; //Convenient
725 public WorkType Type; 723 public WorkType Type;
726 public LLUUID UUID; //Convenient 724 public UUID UUID; //Convenient
727 725
728 #endregion Fields 726 #endregion Fields
729 } 727 }
@@ -745,4 +743,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
745 743
746 #endregion Other 744 #endregion Other
747 } 745 }
748} \ No newline at end of file 746}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index 454429c..996badf 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -40,7 +40,7 @@ using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41using System.Threading; 41using System.Threading;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -52,8 +52,6 @@ using OpenSim.Region.Physics.Manager;
52 52
53using log4net; 53using log4net;
54 54
55using Axiom.Math;
56
57namespace OpenSim.Region.Environment.Modules.ContentManagement 55namespace OpenSim.Region.Environment.Modules.ContentManagement
58{ 56{
59 public class CMEntityCollection 57 public class CMEntityCollection
@@ -63,12 +61,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
63 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
64 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or 62 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
65 // old versions of deleted SceneObjectGroups will be stored in this hash table. 63 // old versions of deleted SceneObjectGroups will be stored in this hash table.
66 // The LLUUID keys are from the SceneObjectGroup RootPart UUIDs 64 // The UUID keys are from the SceneObjectGroup RootPart UUIDs
67 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //LLUUID to ContentManagementEntity 65 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity
68 66
69 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable 67 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable
70 // The LLUUID keys are from the SceneObjectPart that they are supposed to be on. 68 // The UUID keys are from the SceneObjectPart that they are supposed to be on.
71 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //LLUUID to AuraMetaEntity 69 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //UUID to AuraMetaEntity
72 70
73 #endregion Fields 71 #endregion Fields
74 72
@@ -151,7 +149,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
151 part.ParentGroup.Scene.PrimIDAllocate(), 149 part.ParentGroup.Scene.PrimIDAllocate(),
152 part.GetWorldPosition(), 150 part.GetWorldPosition(),
153 MetaEntity.TRANSLUCENT, 151 MetaEntity.TRANSLUCENT,
154 new LLVector3(0,254,0), 152 new Vector3(0,254,0),
155 part.Scale 153 part.Scale
156 ); 154 );
157 m_NewlyCreatedEntityAura.Add(part.UUID, ent); 155 m_NewlyCreatedEntityAura.Add(part.UUID, ent);
@@ -175,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
175 return ent; 173 return ent;
176 } 174 }
177 175
178 public bool RemoveEntity(LLUUID uuid) 176 public bool RemoveEntity(UUID uuid)
179 { 177 {
180 if (!m_CMEntityHash.ContainsKey(uuid)) 178 if (!m_CMEntityHash.ContainsKey(uuid))
181 return false; 179 return false;
@@ -183,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
183 return true; 181 return true;
184 } 182 }
185 183
186 public bool RemoveNewlyCreatedEntityAura(LLUUID uuid) 184 public bool RemoveNewlyCreatedEntityAura(UUID uuid)
187 { 185 {
188 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) 186 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
189 return false; 187 return false;
@@ -193,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
193 191
194 #endregion Public Methods 192 #endregion Public Methods
195 } 193 }
196} \ No newline at end of file 194}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index 92ae0d7..e1b4129 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -39,7 +39,7 @@ using System.Collections;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Diagnostics; 40using System.Diagnostics;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMModel 54 public class CMModel
@@ -133,14 +131,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 m_MetaEntityCollection.ClearAll(); 131 m_MetaEntityCollection.ClearAll();
134 } 132 }
135 133
136 public ContentManagementEntity FindMetaEntityAffectedByUndo(LLUUID uuid) 134 public ContentManagementEntity FindMetaEntityAffectedByUndo(UUID uuid)
137 { 135 {
138 ContentManagementEntity ent = GetMetaGroupByPrim(uuid); 136 ContentManagementEntity ent = GetMetaGroupByPrim(uuid);
139 return ent; 137 return ent;
140 } 138 }
141 139
142 //-------------------------------- HELPERS --------------------------------------------------------------------// 140 //-------------------------------- HELPERS --------------------------------------------------------------------//
143 public ContentManagementEntity GetMetaGroupByPrim(LLUUID uuid) 141 public ContentManagementEntity GetMetaGroupByPrim(UUID uuid)
144 { 142 {
145 foreach (Object ent in m_MetaEntityCollection.Entities.Values) 143 foreach (Object ent in m_MetaEntityCollection.Entities.Values)
146 { 144 {
@@ -194,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
194 SceneObjectGroup temp = null; 192 SceneObjectGroup temp = null;
195 System.Collections.Hashtable deleteListUUIDs = new Hashtable(); 193 System.Collections.Hashtable deleteListUUIDs = new Hashtable();
196// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>(); 194// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>();
197 Dictionary<LLUUID, EntityBase> ReplacementList = new Dictionary<LLUUID,EntityBase>(); 195 Dictionary<UUID, EntityBase> ReplacementList = new Dictionary<UUID,EntityBase>();
198 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID); 196 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID);
199// EntityBase[] searchArray; 197// EntityBase[] searchArray;
200 198
@@ -255,14 +253,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
255 break; 253 break;
256 } 254 }
257 255
258 foreach(LLUUID uuid in deleteListUUIDs.Keys) 256 foreach(UUID uuid in deleteListUUIDs.Keys)
259 { 257 {
260 try 258 try
261 { 259 {
262 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. 260 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles.
263 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); 261 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]);
264 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); 262 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor);
265 scene.SendKillObject(scene.Entities[uuid].LocalId); 263 scene.SendKiPrimitive(scene.Entities[uuid].LocalId);
266 scene.m_innerScene.DeleteSceneObject(uuid, false); 264 scene.m_innerScene.DeleteSceneObject(uuid, false);
267 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(); 265 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup();
268 } 266 }
@@ -284,7 +282,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
284 if (!(ent is SceneObjectGroup)) 282 if (!(ent is SceneObjectGroup))
285 continue; 283 continue;
286 284
287 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Phantom) == 0) 285 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0)
288 ((SceneObjectGroup)ent).ApplyPhysics(true); 286 ((SceneObjectGroup)ent).ApplyPhysics(true);
289 ((SceneObjectGroup)ent).AttachToBackup(); 287 ((SceneObjectGroup)ent).AttachToBackup();
290 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected. 288 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected.
@@ -346,7 +344,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
346 { 344 {
347 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) 345 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
348 { 346 {
349 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new LLVector3(0,254,0), part.Scale); 347 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new Vector3(0,254,0), part.Scale);
350 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition(); 348 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition();
351 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]); 349 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]);
352 } 350 }
@@ -356,4 +354,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
356 354
357 #endregion Public Methods 355 #endregion Public Methods
358 } 356 }
359} \ No newline at end of file 357}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
index fca2830..90ef6ef 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections; 39using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMView 54 public class CMView
@@ -136,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
136 SendSimChatMessage(scene, menu); 134 SendSimChatMessage(scene, menu);
137 } 135 }
138 136
139 public void DisplayMetaEntity(LLUUID uuid) 137 public void DisplayMetaEntity(UUID uuid)
140 { 138 {
141 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); 139 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
142 if (group != null) 140 if (group != null)
@@ -199,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
199 197
200 public void SendSimChatMessage(Scene scene, string message) 198 public void SendSimChatMessage(Scene scene, string message)
201 { 199 {
202 scene.SimChat(Helpers.StringToField(message), 200 scene.SimChat(Utils.StringToBytes(message),
203 ChatTypeEnum.Broadcast, 0, new LLVector3(0,0,0), "Content Manager", LLUUID.Zero, false); 201 ChatTypeEnum.Broadcast, 0, new Vector3(0,0,0), "Content Manager", UUID.Zero, false);
204 } 202 }
205 203
206 #endregion Public Methods 204 #endregion Public Methods
207 } 205 }
208} \ No newline at end of file 206}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index 8e0dd33..819ff87 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -38,7 +38,7 @@ using System;
38using System.Collections.Generic; 38using System.Collections.Generic;
39using System.Drawing; 39using System.Drawing;
40 40
41using libsecondlife; 41using OpenMetaverse;
42 42
43using Nini.Config; 43using Nini.Config;
44 44
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class ContentManagementEntity : MetaEntity 54 public class ContentManagementEntity : MetaEntity
@@ -64,8 +62,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
64 62
65 #region Fields 63 #region Fields
66 64
67 protected Dictionary<LLUUID, AuraMetaEntity> m_AuraEntities = new Dictionary<LLUUID, AuraMetaEntity>(); 65 protected Dictionary<UUID, AuraMetaEntity> m_AuraEntities = new Dictionary<UUID, AuraMetaEntity>();
68 protected Dictionary<LLUUID, BeamMetaEntity> m_BeamEntities = new Dictionary<LLUUID, BeamMetaEntity>(); 66 protected Dictionary<UUID, BeamMetaEntity> m_BeamEntities = new Dictionary<UUID, BeamMetaEntity>();
69 67
70 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different. 68 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different.
71 // This can come in handy. 69 // This can come in handy.
@@ -108,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
108 /// <summary> 106 /// <summary>
109 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid. 107 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid.
110 /// </summary> 108 /// </summary>
111 private bool ContainsKey(List<EntityBase> list, LLUUID uuid) 109 private bool ContainsKey(List<EntityBase> list, UUID uuid)
112 { 110 {
113 foreach( EntityBase part in list) 111 foreach( EntityBase part in list)
114 if (part.UUID == uuid) 112 if (part.UUID == uuid)
@@ -116,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
116 return false; 114 return false;
117 } 115 }
118 116
119 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, LLUUID uuid) 117 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, UUID uuid)
120 { 118 {
121 foreach (EntityBase ent in list) 119 foreach (EntityBase ent in list)
122 { 120 {
@@ -150,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
150 // if already displaying a red aura over part, make sure its red 148 // if already displaying a red aura over part, make sure its red
151 if (m_AuraEntities.ContainsKey(part.UUID)) 149 if (m_AuraEntities.ContainsKey(part.UUID))
152 { 150 {
153 m_AuraEntities[part.UUID].SetAura(new LLVector3(254,0,0), part.Scale); 151 m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
154 } 152 }
155 else 153 else
156 { 154 {
@@ -158,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
158 m_Entity.Scene.PrimIDAllocate(), 156 m_Entity.Scene.PrimIDAllocate(),
159 part.GetWorldPosition(), 157 part.GetWorldPosition(),
160 MetaEntity.TRANSLUCENT, 158 MetaEntity.TRANSLUCENT,
161 new LLVector3(254,0,0), 159 new Vector3(254,0,0),
162 part.Scale 160 part.Scale
163 ); 161 );
164 m_AuraEntities.Add(part.UUID, auraGroup); 162 m_AuraEntities.Add(part.UUID, auraGroup);
@@ -189,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
189 /// <summary> 187 /// <summary>
190 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID. 188 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID.
191 /// </summary> 189 /// </summary>
192 public bool HasChildPrim(LLUUID uuid) 190 public bool HasChildPrim(UUID uuid)
193 { 191 {
194 if (m_UnchangedEntity.Children.ContainsKey(uuid)) 192 if (m_UnchangedEntity.Children.ContainsKey(uuid))
195 return true; 193 return true;
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 m_UnchangedEntity.RootPart.GetWorldPosition(), 264 m_UnchangedEntity.RootPart.GetWorldPosition(),
267 MetaEntity.TRANSLUCENT, 265 MetaEntity.TRANSLUCENT,
268 sceneEntityPart, 266 sceneEntityPart,
269 new LLVector3(0,0,254) 267 new Vector3(0,0,254)
270 ); 268 );
271 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); 269 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
272 } 270 }
@@ -280,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 m_Entity.Scene.PrimIDAllocate(), 278 m_Entity.Scene.PrimIDAllocate(),
281 UnchangedPart.GetWorldPosition(), 279 UnchangedPart.GetWorldPosition(),
282 MetaEntity.TRANSLUCENT, 280 MetaEntity.TRANSLUCENT,
283 new LLVector3(0,0,254), 281 new Vector3(0,0,254),
284 UnchangedPart.Scale 282 UnchangedPart.Scale
285 ); 283 );
286 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 284 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -314,7 +312,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
314 m_Entity.Scene.PrimIDAllocate(), 312 m_Entity.Scene.PrimIDAllocate(),
315 UnchangedPart.GetWorldPosition(), 313 UnchangedPart.GetWorldPosition(),
316 MetaEntity.TRANSLUCENT, 314 MetaEntity.TRANSLUCENT,
317 new LLVector3(254,0,0), 315 new Vector3(254,0,0),
318 UnchangedPart.Scale 316 UnchangedPart.Scale
319 ); 317 );
320 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -386,4 +384,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
386 384
387 #endregion Public Methods 385 #endregion Public Methods
388 } 386 }
389} \ No newline at end of file 387}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
index d5423e0..85eb927 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
@@ -36,7 +36,7 @@ using System;
36using System.Collections.Generic; 36using System.Collections.Generic;
37using System.Threading; 37using System.Threading;
38 38
39using libsecondlife; 39using OpenMetaverse;
40 40
41using Nini.Config; 41using Nini.Config;
42 42
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 public class ContentManagementModule : IRegionModule 53 public class ContentManagementModule : IRegionModule
@@ -162,4 +160,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
162 160
163 #endregion Public Methods 161 #endregion Public Methods
164 } 162 }
165} \ No newline at end of file 163}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index c675365..66d279a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -40,7 +40,7 @@ using Slash = System.IO.Path;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -53,8 +53,6 @@ using OpenSim.Region.Physics.Manager;
53 53
54using log4net; 54using log4net;
55 55
56using Axiom.Math;
57
58namespace OpenSim.Region.Environment.Modules.ContentManagement 56namespace OpenSim.Region.Environment.Modules.ContentManagement
59{ 57{
60 public class FileSystemDatabase : IContentDatabase 58 public class FileSystemDatabase : IContentDatabase
@@ -70,8 +68,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
70 #region Fields 68 #region Fields
71 69
72 private string m_repodir = null; 70 private string m_repodir = null;
73 private Dictionary<LLUUID, Scene> m_scenes = new Dictionary<LLUUID, Scene>(); 71 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
74 private Dictionary<LLUUID, IRegionSerialiser> m_serialiser = new Dictionary<LLUUID, IRegionSerialiser>(); 72 private Dictionary<UUID, IRegionSerialiser> m_serialiser = new Dictionary<UUID, IRegionSerialiser>();
75 73
76 #endregion Fields 74 #endregion Fields
77 75
@@ -92,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
92 if (!Directory.Exists(m_repodir)) 90 if (!Directory.Exists(m_repodir))
93 Directory.CreateDirectory(m_repodir); 91 Directory.CreateDirectory(m_repodir);
94 92
95 foreach (LLUUID region in m_scenes.Keys) 93 foreach (UUID region in m_scenes.Keys)
96 { 94 {
97 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; 95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
98 if (!Directory.Exists(scenedir)) 96 if (!Directory.Exists(scenedir))
@@ -104,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
104 private void SetupSerialiser() 102 private void SetupSerialiser()
105 { 103 {
106 if (m_serialiser.Count == 0) 104 if (m_serialiser.Count == 0)
107 foreach(LLUUID region in m_scenes.Keys) 105 foreach(UUID region in m_scenes.Keys)
108 m_serialiser.Add(region, 106 m_serialiser.Add(region,
109 m_scenes[region].RequestModuleInterface<IRegionSerialiser>() 107 m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
110 ); 108 );
@@ -114,12 +112,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
114 112
115 #region Public Methods 113 #region Public Methods
116 114
117 public int GetMostRecentRevision(LLUUID regionid) 115 public int GetMostRecentRevision(UUID regionid)
118 { 116 {
119 return NumOfRegionRev(regionid); 117 return NumOfRegionRev(regionid);
120 } 118 }
121 119
122 public string GetRegionObjectHeightMap(LLUUID regionid) 120 public string GetRegionObjectHeightMap(UUID regionid)
123 { 121 {
124 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 122 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
125 Slash.DirectorySeparatorChar + "heightmap.r32"; 123 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -131,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
131 return result; 129 return result;
132 } 130 }
133 131
134 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 132 public string GetRegionObjectHeightMap(UUID regionid, int revision)
135 { 133 {
136 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 134 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
137 Slash.DirectorySeparatorChar + "heightmap.r32"; 135 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -143,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
143 return result; 141 return result;
144 } 142 }
145 143
146 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 144 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
147 { 145 {
148 System.Collections.ArrayList objectList = new System.Collections.ArrayList(); 146 System.Collections.ArrayList objectList = new System.Collections.ArrayList();
149 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 147 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
@@ -169,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
169 return null; 167 return null;
170 } 168 }
171 169
172 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 170 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
173 { 171 {
174 int revision = NumOfRegionRev(regionid); 172 int revision = NumOfRegionRev(regionid);
175 m_log.Info("[FSDB]: found revisions:" + revision); 173 m_log.Info("[FSDB]: found revisions:" + revision);
@@ -215,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
215 m_scenes.Add(scene.RegionInfo.RegionID, scene); 213 m_scenes.Add(scene.RegionInfo.RegionID, scene);
216 } 214 }
217 215
218 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID regionid) 216 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
219 { 217 {
220 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>(); 218 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>();
221 219
@@ -244,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
244 return revisionDict; 242 return revisionDict;
245 } 243 }
246 244
247 public int NumOfRegionRev(LLUUID regionid) 245 public int NumOfRegionRev(UUID regionid)
248 { 246 {
249 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 247 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
250 m_log.Info("[FSDB]: Reading scene dir: " + scenedir); 248 m_log.Info("[FSDB]: Reading scene dir: " + scenedir);
@@ -261,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
261 CreateDirectory(); 259 CreateDirectory();
262 } 260 }
263 261
264 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 262 public void SaveRegion(UUID regionid, string regionName, string logMessage)
265 { 263 {
266 m_log.Info("[FSDB]: ..............................."); 264 m_log.Info("[FSDB]: ...............................");
267 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 265 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
@@ -311,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
311 309
312 #endregion Public Methods 310 #endregion Public Methods
313 } 311 }
314} \ No newline at end of file 312}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
index 6417a0f..9fd542c 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
@@ -41,7 +41,7 @@ using Slash = System.IO.Path;
41using System.Reflection; 41using System.Reflection;
42using System.Xml; 42using System.Xml;
43 43
44using libsecondlife; 44using OpenMetaverse;
45 45
46using Nini.Config; 46using Nini.Config;
47 47
@@ -54,8 +54,6 @@ using OpenSim.Region.Physics.Manager;
54 54
55using log4net; 55using log4net;
56 56
57using Axiom.Math;
58
59namespace OpenSim.Region.Environment.Modules.ContentManagement 57namespace OpenSim.Region.Environment.Modules.ContentManagement
60{ 58{
61 /// <summary> 59 /// <summary>
@@ -73,57 +71,57 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
73 71
74 #region Public Methods 72 #region Public Methods
75 73
76 public SceneObjectGroup GetMostRecentObjectRevision(LLUUID id) 74 public SceneObjectGroup GetMostRecentObjectRevision(UUID id)
77 { 75 {
78 return null; 76 return null;
79 } 77 }
80 78
81 public int GetMostRecentRevision(LLUUID regionid) 79 public int GetMostRecentRevision(UUID regionid)
82 { 80 {
83 return 0; 81 return 0;
84 } 82 }
85 83
86 public SceneObjectGroup GetObjectRevision(LLUUID id, int revision) 84 public SceneObjectGroup GetObjectRevision(UUID id, int revision)
87 { 85 {
88 return null; 86 return null;
89 } 87 }
90 88
91 public System.Collections.ArrayList GetObjectsFromRegion(LLUUID regionid, int revision) 89 public System.Collections.ArrayList GetObjectsFromRegion(UUID regionid, int revision)
92 { 90 {
93 return null; 91 return null;
94 } 92 }
95 93
96 public string GetRegionObjectHeightMap(LLUUID regionid) 94 public string GetRegionObjectHeightMap(UUID regionid)
97 { 95 {
98 return null; 96 return null;
99 } 97 }
100 98
101 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 99 public string GetRegionObjectHeightMap(UUID regionid, int revision)
102 { 100 {
103 return null; 101 return null;
104 } 102 }
105 103
106 public string GetRegionObjectXML(LLUUID regionid) 104 public string GetRegionObjectXML(UUID regionid)
107 { 105 {
108 return null; 106 return null;
109 } 107 }
110 108
111 public string GetRegionObjectXML(LLUUID regionid, int revision) 109 public string GetRegionObjectXML(UUID regionid, int revision)
112 { 110 {
113 return null; 111 return null;
114 } 112 }
115 113
116 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 114 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
117 { 115 {
118 return null; 116 return null;
119 } 117 }
120 118
121 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 119 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
122 { 120 {
123 return null; 121 return null;
124 } 122 }
125 123
126 public bool InRepository(LLUUID id) 124 public bool InRepository(UUID id)
127 { 125 {
128 return false; 126 return false;
129 } 127 }
@@ -132,22 +130,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
132 { 130 {
133 } 131 }
134 132
135 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(LLUUID id) 133 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(UUID id)
136 { 134 {
137 return null; 135 return null;
138 } 136 }
139 137
140 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id) 138 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id)
141 { 139 {
142 return null; 140 return null;
143 } 141 }
144 142
145 public int NumOfObjectRev(LLUUID id) 143 public int NumOfObjectRev(UUID id)
146 { 144 {
147 return 0; 145 return 0;
148 } 146 }
149 147
150 public int NumOfRegionRev(LLUUID regionid) 148 public int NumOfRegionRev(UUID regionid)
151 { 149 {
152 return 0; 150 return 0;
153 } 151 }
@@ -160,10 +158,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 { 158 {
161 } 159 }
162 160
163 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 161 public void SaveRegion(UUID regionid, string regionName, string logMessage)
164 { 162 {
165 } 163 }
166 164
167 #endregion Public Methods 165 #endregion Public Methods
168 } 166 }
169} \ No newline at end of file 167}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
index 6a940d3..638172b 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
@@ -36,11 +36,8 @@
36#endregion Header 36#endregion Header
37 37
38using System; 38using System;
39 39using OpenMetaverse;
40using libsecondlife;
41
42using OpenSim.Region.Environment.Scenes; 40using OpenSim.Region.Environment.Scenes;
43
44using Nini.Config; 41using Nini.Config;
45 42
46namespace OpenSim.Region.Environment.Modules.ContentManagement 43namespace OpenSim.Region.Environment.Modules.ContentManagement
@@ -52,18 +49,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
52 /// <summary> 49 /// <summary>
53 /// Returns the most recent revision number of a region. 50 /// Returns the most recent revision number of a region.
54 /// </summary> 51 /// </summary>
55 int GetMostRecentRevision(LLUUID regionid); 52 int GetMostRecentRevision(UUID regionid);
56 53
57 string GetRegionObjectHeightMap(LLUUID regionid); 54 string GetRegionObjectHeightMap(UUID regionid);
58 55
59 string GetRegionObjectHeightMap(LLUUID regionid, int revision); 56 string GetRegionObjectHeightMap(UUID regionid, int revision);
60 57
61 /// <summary> 58 /// <summary>
62 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region. 59 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region.
63 /// </summary> 60 /// </summary>
64 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid); 61 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid);
65 62
66 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision); 63 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision);
67 64
68 /// <summary> 65 /// <summary>
69 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database. 66 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database.
@@ -75,12 +72,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 /// <summary> 72 /// <summary>
76 /// Returns a list of the revision numbers and corresponding log messages for a given region. 73 /// Returns a list of the revision numbers and corresponding log messages for a given region.
77 /// </summary> 74 /// </summary>
78 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id); 75 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id);
79 76
80 /// <summary> 77 /// <summary>
81 /// Returns the total number of revisions saved for a specific region. 78 /// Returns the total number of revisions saved for a specific region.
82 /// </summary> 79 /// </summary>
83 int NumOfRegionRev(LLUUID regionid); 80 int NumOfRegionRev(UUID regionid);
84 81
85 /// <summary> 82 /// <summary>
86 /// Should be called once after Initialise has been called. 83 /// Should be called once after Initialise has been called.
@@ -90,8 +87,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
90 /// <summary> 87 /// <summary>
91 /// Saves the Region terrain map and objects within the region as xml to the database. 88 /// Saves the Region terrain map and objects within the region as xml to the database.
92 /// </summary> 89 /// </summary>
93 void SaveRegion(LLUUID regionid, string regionName, string logMessage); 90 void SaveRegion(UUID regionid, string regionName, string logMessage);
94 91
95 #endregion Methods 92 #endregion Methods
96 } 93 }
97} \ No newline at end of file 94}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index 4823bfd..5a6dbc8 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class MetaEntity 55 public class MetaEntity
@@ -109,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
109 107
110 #region Public Properties 108 #region Public Properties
111 109
112 public Dictionary<LLUUID, SceneObjectPart> Children 110 public Dictionary<UUID, SceneObjectPart> Children
113 { 111 {
114 get { return m_Entity.Children; } 112 get { return m_Entity.Children; }
115 set { m_Entity.Children = value; } 113 set { m_Entity.Children = value; }
@@ -142,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
142 get { return m_Entity.Scene; } 140 get { return m_Entity.Scene; }
143 } 141 }
144 142
145 public LLUUID UUID 143 public UUID UUID
146 { 144 {
147 get { return m_Entity.UUID; } 145 get { return m_Entity.UUID; }
148 set { m_Entity.UUID = value; } 146 set { m_Entity.UUID = value; }
@@ -161,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
161 protected void Initialize(bool physics) 159 protected void Initialize(bool physics)
162 { 160 {
163 //make new uuids 161 //make new uuids
164 Dictionary<LLUUID, SceneObjectPart> parts = new Dictionary<LLUUID, SceneObjectPart>(); 162 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
165 foreach(SceneObjectPart part in m_Entity.Children.Values) 163 foreach(SceneObjectPart part in m_Entity.Children.Values)
166 { 164 {
167 part.ResetIDs(part.LinkNum); 165 part.ResetIDs(part.LinkNum);
@@ -191,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
191 //This is important because we are not IN any database. 189 //This is important because we are not IN any database.
192 //m_Entity.FakeDeleteGroup(); 190 //m_Entity.FakeDeleteGroup();
193 foreach( SceneObjectPart part in m_Entity.Children.Values) 191 foreach( SceneObjectPart part in m_Entity.Children.Values)
194 client.SendKillObject(m_Entity.RegionHandle, part.LocalId); 192 client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
195 } 193 }
196 194
197 /// <summary> 195 /// <summary>
@@ -201,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
201 { 199 {
202 foreach( SceneObjectPart part in m_Entity.Children.Values) 200 foreach( SceneObjectPart part in m_Entity.Children.Values)
203 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) 201 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
204 { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); } 202 { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
205 ); 203 );
206 } 204 }
207 205
@@ -237,12 +235,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
237 /// </param> 235 /// </param>
238 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount) 236 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount)
239 { 237 {
240 LLObject.TextureEntry tex = null; 238 Primitive.TextureEntry tex = null;
241 LLColor texcolor; 239 Color4 texcolor;
242 try 240 try
243 { 241 {
244 tex = part.Shape.Textures; 242 tex = part.Shape.Textures;
245 texcolor = new LLColor(); 243 texcolor = new Color4();
246 } 244 }
247 catch(Exception) 245 catch(Exception)
248 { 246 {
@@ -280,4 +278,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 278
281 #endregion Public Methods 279 #endregion Public Methods
282 } 280 }
283} \ No newline at end of file 281}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index cafc2bf..b0c6955 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,22 +50,20 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class PointMetaEntity : MetaEntity 55 public class PointMetaEntity : MetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency) 59 public PointMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency)
62 : base() 60 : base()
63 { 61 {
64 CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos); 62 CreatePointEntity(scene, UUID.Random(), LocalId, groupPos);
65 SetPartTransparency(m_Entity.RootPart, transparency); 63 SetPartTransparency(m_Entity.RootPart, transparency);
66 } 64 }
67 65
68 public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency) 66 public PointMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency)
69 : base() 67 : base()
70 { 68 {
71 CreatePointEntity(scene, uuid, LocalId, groupPos); 69 CreatePointEntity(scene, uuid, LocalId, groupPos);
@@ -76,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
76 74
77 #region Private Methods 75 #region Private Methods
78 76
79 private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos) 77 private void CreatePointEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos)
80 { 78 {
81 SceneObjectGroup x = new SceneObjectGroup(); 79 SceneObjectGroup x = new SceneObjectGroup();
82 SceneObjectPart y = new SceneObjectPart(); 80 SceneObjectPart y = new SceneObjectPart();
@@ -85,23 +83,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
85 y.Name = "Very Small Point"; 83 y.Name = "Very Small Point";
86 y.RegionHandle = scene.RegionInfo.RegionHandle; 84 y.RegionHandle = scene.RegionInfo.RegionHandle;
87 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 85 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
88 y.OwnerID = LLUUID.Zero; 86 y.OwnerID = UUID.Zero;
89 y.CreatorID = LLUUID.Zero; 87 y.CreatorID = UUID.Zero;
90 y.LastOwnerID = LLUUID.Zero; 88 y.LastOwnerID = UUID.Zero;
91 y.UUID = uuid; 89 y.UUID = uuid;
92 90
93 y.LocalId = LocalId; 91 y.LocalId = LocalId;
94 92
95 y.Shape = PrimitiveBaseShape.CreateBox(); 93 y.Shape = PrimitiveBaseShape.CreateBox();
96 y.Scale = new LLVector3(0.01f,0.01f,0.01f); 94 y.Scale = new Vector3(0.01f,0.01f,0.01f);
97 y.LastOwnerID = LLUUID.Zero; 95 y.LastOwnerID = UUID.Zero;
98 y.GroupPosition = groupPos; 96 y.GroupPosition = groupPos;
99 y.OffsetPosition = new LLVector3(0, 0, 0); 97 y.OffsetPosition = new Vector3(0, 0, 0);
100 y.RotationOffset = new LLQuaternion(0,0,0,0); 98 y.RotationOffset = new Quaternion(0,0,0,0);
101 y.Velocity = new LLVector3(0, 0, 0); 99 y.Velocity = new Vector3(0, 0, 0);
102 y.RotationalVelocity = new LLVector3(0, 0, 0); 100 y.RotationalVelocity = new Vector3(0, 0, 0);
103 y.AngularVelocity = new LLVector3(0, 0, 0); 101 y.AngularVelocity = new Vector3(0, 0, 0);
104 y.Acceleration = new LLVector3(0, 0, 0); 102 y.Acceleration = new Vector3(0, 0, 0);
105 103
106 y.Flags = 0; 104 y.Flags = 0;
107 y.TrimPermissions(); 105 y.TrimPermissions();
@@ -121,4 +119,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
121 119
122 #endregion Private Methods 120 #endregion Private Methods
123 } 121 }
124} \ No newline at end of file 122}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
index 38938c6..ba937f5 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
@@ -37,7 +37,7 @@ using System.Collections.Generic;
37using System.Diagnostics; 37using System.Diagnostics;
38using System.Drawing; 38using System.Drawing;
39 39
40using libsecondlife; 40using OpenMetaverse;
41 41
42using Nini.Config; 42using Nini.Config;
43 43
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 #region Enumerations 53 #region Enumerations
@@ -99,14 +97,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
99 97
100 #region Private Methods 98 #region Private Methods
101 99
102 private static bool AreQuaternionsEquivalent(LLQuaternion first, LLQuaternion second) 100 private static bool AreQuaternionsEquivalent(Quaternion first, Quaternion second)
103 { 101 {
104 LLVector3 firstVector = llRot2Euler(first); 102 Vector3 firstVector = llRot2Euler(first);
105 LLVector3 secondVector = llRot2Euler(second); 103 Vector3 secondVector = llRot2Euler(second);
106 return AreVectorsEquivalent(firstVector, secondVector); 104 return AreVectorsEquivalent(firstVector, secondVector);
107 } 105 }
108 106
109 private static bool AreVectorsEquivalent(LLVector3 first, LLVector3 second) 107 private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
110 { 108 {
111 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) 109 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
112 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) 110 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
@@ -133,21 +131,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 131
134 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs 132 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
135 // Also changed the original function from LSL_Types to LL types 133 // Also changed the original function from LSL_Types to LL types
136 private static LLVector3 llRot2Euler(LLQuaternion r) 134 private static Vector3 llRot2Euler(Quaternion r)
137 { 135 {
138 LLQuaternion t = new LLQuaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); 136 Quaternion t = new Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W);
139 double m = (t.X + t.Y + t.Z + t.W); 137 double m = (t.X + t.Y + t.Z + t.W);
140 if (m == 0) return new LLVector3(); 138 if (m == 0) return new Vector3();
141 double n = 2 * (r.Y * r.W + r.X * r.Z); 139 double n = 2 * (r.Y * r.W + r.X * r.Z);
142 double p = m * m - n * n; 140 double p = m * m - n * n;
143 if (p > 0) 141 if (p > 0)
144 return new LLVector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))), 142 return new Vector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))),
145 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), 143 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))),
146 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W)))); 144 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W))));
147 else if (n > 0) 145 else if (n > 0)
148 return new LLVector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 146 return new Vector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
149 else 147 else
150 return new LLVector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 148 return new Vector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
151 } 149 }
152 150
153 #endregion Private Methods 151 #endregion Private Methods
@@ -187,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
187 result |= Diff.ROTATIONOFFSET; 185 result |= Diff.ROTATIONOFFSET;
188 186
189 187
190 // MISC COMPARISONS (LLUUID, Byte) 188 // MISC COMPARISONS (UUID, Byte)
191 if(first.ClickAction != second.ClickAction) 189 if(first.ClickAction != second.ClickAction)
192 result |= Diff.CLICKACTION; 190 result |= Diff.CLICKACTION;
193 if(first.ObjectOwner != second.ObjectOwner) 191 if(first.ObjectOwner != second.ObjectOwner)
@@ -217,4 +215,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
217 215
218 #endregion Public Methods 216 #endregion Public Methods
219 } 217 }
220} \ No newline at end of file 218}
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 8fad62f..8fd4104 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -37,8 +37,8 @@ using System.Reflection;
37using System.Text.RegularExpressions; 37using System.Text.RegularExpressions;
38using System.Threading; 38using System.Threading;
39 39
40using libsecondlife; 40using OpenMetaverse;
41using libsecondlife.StructuredData; 41using OpenMetaverse.StructuredData;
42 42
43using log4net; 43using log4net;
44using Nini.Config; 44using Nini.Config;
@@ -50,9 +50,9 @@ using OpenSim.Region.Environment.Scenes;
50using OpenSim.Framework.Communications.Cache; 50using OpenSim.Framework.Communications.Cache;
51using OpenSim.Framework.Communications.Capabilities; 51using OpenSim.Framework.Communications.Capabilities;
52using OpenSim.Framework.Statistics; 52using OpenSim.Framework.Statistics;
53using LLSD = libsecondlife.StructuredData.LLSD; 53using LLSD = OpenMetaverse.StructuredData.LLSD;
54using LLSDMap = libsecondlife.StructuredData.LLSDMap; 54using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
55using LLSDArray = libsecondlife.StructuredData.LLSDArray; 55using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
56 56
57namespace OpenSim.Region.Environment.Modules.InterGrid 57namespace OpenSim.Region.Environment.Modules.InterGrid
58{ 58{
@@ -60,12 +60,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
60 { 60 {
61 public string first_name; 61 public string first_name;
62 public string last_name; 62 public string last_name;
63 public LLUUID agent_id; 63 public UUID agent_id;
64 public LLUUID local_agent_id; 64 public UUID local_agent_id;
65 public LLUUID region_id; 65 public UUID region_id;
66 public uint circuit_code; 66 public uint circuit_code;
67 public LLUUID secure_session_id; 67 public UUID secure_session_id;
68 public LLUUID session_id; 68 public UUID session_id;
69 public bool agent_access; 69 public bool agent_access;
70 public string sim_access; 70 public string sim_access;
71 public uint god_level; 71 public uint god_level;
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
89 private List<Scene> m_scene = new List<Scene>(); 89 private List<Scene> m_scene = new List<Scene>();
90 90
91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>(); 91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
92 private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>(); 92 private Dictionary<UUID, OGPState> m_OGPState = new Dictionary<UUID, OGPState>();
93 private string LastNameSuffix = "_EXTERNAL"; 93 private string LastNameSuffix = "_EXTERNAL";
94 private string FirstNamePrefix = ""; 94 private string FirstNamePrefix = "";
95 95
@@ -231,10 +231,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
231 //string RegionURI = reg.ServerURI; 231 //string RegionURI = reg.ServerURI;
232 //int RegionPort = (int)reg.HttpPort; 232 //int RegionPort = (int)reg.HttpPort;
233 233
234 LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); 234 UUID RemoteAgentID = requestMap["agent_id"].AsUUID();
235 235
236 // will be used in the future. The client always connects with the aditi agentid currently 236 // will be used in the future. The client always connects with the aditi agentid currently
237 LLUUID LocalAgentID = RemoteAgentID; 237 UUID LocalAgentID = RemoteAgentID;
238 238
239 string FirstName = requestMap["first_name"].AsString(); 239 string FirstName = requestMap["first_name"].AsString();
240 string LastName = requestMap["last_name"].AsString(); 240 string LastName = requestMap["last_name"].AsString();
@@ -274,15 +274,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
274 // Generate a dummy agent for the user so we can get back a CAPS path 274 // Generate a dummy agent for the user so we can get back a CAPS path
275 AgentCircuitData agentData = new AgentCircuitData(); 275 AgentCircuitData agentData = new AgentCircuitData();
276 agentData.AgentID = LocalAgentID; 276 agentData.AgentID = LocalAgentID;
277 agentData.BaseFolder=LLUUID.Zero; 277 agentData.BaseFolder=UUID.Zero;
278 agentData.CapsPath=Util.GetRandomCapsPath(); 278 agentData.CapsPath=Util.GetRandomCapsPath();
279 agentData.child = false; 279 agentData.child = false;
280 agentData.circuitcode = (uint)(Util.RandomClass.Next()); 280 agentData.circuitcode = (uint)(Util.RandomClass.Next());
281 agentData.firstname = FirstName; 281 agentData.firstname = FirstName;
282 agentData.lastname = LastName; 282 agentData.lastname = LastName;
283 agentData.SecureSessionID=LLUUID.Random(); 283 agentData.SecureSessionID=UUID.Random();
284 agentData.SessionID=LLUUID.Random(); 284 agentData.SessionID=UUID.Random();
285 agentData.startpos = new LLVector3(128f, 128f, 100f); 285 agentData.startpos = new Vector3(128f, 128f, 100f);
286 286
287 // Pre-Fill our region cache with information on the agent. 287 // Pre-Fill our region cache with information on the agent.
288 UserAgentData useragent = new UserAgentData(); 288 UserAgentData useragent = new UserAgentData();
@@ -308,14 +308,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
308 userProfile.CurrentAgent = useragent; 308 userProfile.CurrentAgent = useragent;
309 userProfile.CustomType = "OGP"; 309 userProfile.CustomType = "OGP";
310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol"; 310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol";
311 userProfile.FirstLifeImage = LLUUID.Zero; 311 userProfile.FirstLifeImage = UUID.Zero;
312 userProfile.FirstName = agentData.firstname; 312 userProfile.FirstName = agentData.firstname;
313 userProfile.GodLevel = 0; 313 userProfile.GodLevel = 0;
314 userProfile.HomeLocation = agentData.startpos; 314 userProfile.HomeLocation = agentData.startpos;
315 userProfile.HomeLocationX = agentData.startpos.X; 315 userProfile.HomeLocationX = agentData.startpos.X;
316 userProfile.HomeLocationY = agentData.startpos.Y; 316 userProfile.HomeLocationY = agentData.startpos.Y;
317 userProfile.HomeLocationZ = agentData.startpos.Z; 317 userProfile.HomeLocationZ = agentData.startpos.Z;
318 userProfile.HomeLookAt = LLVector3.Zero; 318 userProfile.HomeLookAt = Vector3.Zero;
319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X; 319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X;
320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y; 320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y;
321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z; 321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z;
@@ -324,18 +324,18 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
324 userProfile.HomeRegionX = reg.RegionLocX; 324 userProfile.HomeRegionX = reg.RegionLocX;
325 userProfile.HomeRegionY = reg.RegionLocY; 325 userProfile.HomeRegionY = reg.RegionLocY;
326 userProfile.ID = agentData.AgentID; 326 userProfile.ID = agentData.AgentID;
327 userProfile.Image = LLUUID.Zero; 327 userProfile.Image = UUID.Zero;
328 userProfile.LastLogin = Util.UnixTimeSinceEpoch(); 328 userProfile.LastLogin = Util.UnixTimeSinceEpoch();
329 userProfile.Partner = LLUUID.Zero; 329 userProfile.Partner = UUID.Zero;
330 userProfile.PasswordHash = "$1$"; 330 userProfile.PasswordHash = "$1$";
331 userProfile.PasswordSalt = ""; 331 userProfile.PasswordSalt = "";
332 userProfile.RootInventoryFolderID = LLUUID.Zero; 332 userProfile.RootInventoryFolderID = UUID.Zero;
333 userProfile.SurName = agentData.lastname; 333 userProfile.SurName = agentData.lastname;
334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; 334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL;
335 userProfile.UserFlags = 0; 335 userProfile.UserFlags = 0;
336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; 336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL;
337 userProfile.WantDoMask = 0; 337 userProfile.WantDoMask = 0;
338 userProfile.WebLoginKey = LLUUID.Random(); 338 userProfile.WebLoginKey = UUID.Random();
339 339
340 // Do caps registration 340 // Do caps registration
341 // get seed cap 341 // get seed cap
@@ -348,7 +348,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
348 348
349 //string raCap = string.Empty; 349 //string raCap = string.Empty;
350 350
351 LLUUID AvatarRezCapUUID = LLUUID.Random(); 351 UUID AvatarRezCapUUID = UUID.Random();
352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar"; 352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar";
353 353
354 // Get a reference to the user's cap so we can pull out the Caps Object Path 354 // Get a reference to the user's cap so we can pull out the Caps Object Path
@@ -389,8 +389,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
389 LLSDMap requestMap = (LLSDMap)request; 389 LLSDMap requestMap = (LLSDMap)request;
390 390
391 // take these values to start. There's a few more 391 // take these values to start. There's a few more
392 LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); 392 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
393 LLUUID SessionID = requestMap["session_id"].AsUUID(); 393 UUID SessionID = requestMap["session_id"].AsUUID();
394 int circuitcode = requestMap["circuit_code"].AsInteger(); 394 int circuitcode = requestMap["circuit_code"].AsInteger();
395 LLSDArray Parameter = new LLSDArray(); 395 LLSDArray Parameter = new LLSDArray();
396 if (requestMap.ContainsKey("parameter")) 396 if (requestMap.ContainsKey("parameter"))
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
401 //int version = 1; 401 //int version = 1;
402 int estateID = 1; 402 int estateID = 1;
403 int parentEstateID = 1; 403 int parentEstateID = 1;
404 LLUUID regionID = LLUUID.Zero; 404 UUID regionID = UUID.Zero;
405 bool visibleToParent = true; 405 bool visibleToParent = true;
406 406
407 for (int i = 0; i < Parameter.Count; i++) 407 for (int i = 0; i < Parameter.Count; i++)
@@ -537,17 +537,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); 537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
538 string uuidString = PathArray[2]; 538 string uuidString = PathArray[2];
539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString); 539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString);
540 LLUUID userUUID = LLUUID.Zero; 540 UUID userUUID = UUID.Zero;
541 if (Helpers.TryParse(uuidString, out userUUID)) 541 if (UUID.TryParse(uuidString, out userUUID))
542 { 542 {
543 LLUUID RemoteID = uuidString; 543 UUID RemoteID = uuidString;
544 LLUUID LocalID = RemoteID; 544 UUID LocalID = RemoteID;
545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds 545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
546 // would be done already.. but the client connects with the Aditi UUID 546 // would be done already.. but the client connects with the Aditi UUID
547 // regardless over the UDP stack 547 // regardless over the UDP stack
548 548
549 OGPState userState = GetOGPState(LocalID); 549 OGPState userState = GetOGPState(LocalID);
550 if (userState.agent_id != LLUUID.Zero) 550 if (userState.agent_id != UUID.Zero)
551 { 551 {
552 //LLSDMap outboundRequestMap = new LLSDMap(); 552 //LLSDMap outboundRequestMap = new LLSDMap();
553 LLSDMap inboundRequestMap = (LLSDMap)request; 553 LLSDMap inboundRequestMap = (LLSDMap)request;
@@ -592,7 +592,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
592 int rrX = rezResponseMap["region_x"].AsInteger(); 592 int rrX = rezResponseMap["region_x"].AsInteger();
593 int rrY = rezResponseMap["region_y"].AsInteger(); 593 int rrY = rezResponseMap["region_y"].AsInteger();
594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); 594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
595 LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); 595 UUID rrRID = rezResponseMap["region_id"].AsUUID();
596 596
597 string rrAccess = rezResponseMap["sim_access"].AsString(); 597 string rrAccess = rezResponseMap["sim_access"].AsString();
598 598
@@ -802,12 +802,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
802 OGPState returnState = new OGPState(); 802 OGPState returnState = new OGPState();
803 returnState.first_name = ""; 803 returnState.first_name = "";
804 returnState.last_name = ""; 804 returnState.last_name = "";
805 returnState.agent_id = LLUUID.Zero; 805 returnState.agent_id = UUID.Zero;
806 returnState.local_agent_id = LLUUID.Zero; 806 returnState.local_agent_id = UUID.Zero;
807 returnState.region_id = LLUUID.Zero; 807 returnState.region_id = UUID.Zero;
808 returnState.circuit_code = 0; 808 returnState.circuit_code = 0;
809 returnState.secure_session_id = LLUUID.Zero; 809 returnState.secure_session_id = UUID.Zero;
810 returnState.session_id = LLUUID.Zero; 810 returnState.session_id = UUID.Zero;
811 returnState.agent_access = true; 811 returnState.agent_access = true;
812 returnState.god_level = 0; 812 returnState.god_level = 0;
813 returnState.god_overide = false; 813 returnState.god_overide = false;
@@ -827,7 +827,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
827 return returnState; 827 return returnState;
828 } 828 }
829 829
830 private OGPState GetOGPState(LLUUID agentId) 830 private OGPState GetOGPState(UUID agentId)
831 { 831 {
832 lock (m_OGPState) 832 lock (m_OGPState)
833 { 833 {
@@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
842 } 842 }
843 } 843 }
844 844
845 public void DeleteOGPState(LLUUID agentId) 845 public void DeleteOGPState(UUID agentId)
846 { 846 {
847 lock (m_OGPState) 847 lock (m_OGPState)
848 { 848 {
@@ -851,7 +851,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
851 } 851 }
852 } 852 }
853 853
854 private void UpdateOGPState(LLUUID agentId, OGPState state) 854 private void UpdateOGPState(UUID agentId, OGPState state)
855 { 855 {
856 lock (m_OGPState) 856 lock (m_OGPState)
857 { 857 {
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
866 } 866 }
867 } 867 }
868 868
869 public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) 869 public void ShutdownConnection(UUID avatarId, OpenGridProtocolModule mod)
870 { 870 {
871 Scene homeScene = GetRootScene(); 871 Scene homeScene = GetRootScene();
872 ScenePresence avatar = null; 872 ScenePresence avatar = null;
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
905 905
906 public void ShutdownNoLogout() 906 public void ShutdownNoLogout()
907 { 907 {
908 LLUUID avUUID = LLUUID.Zero; 908 UUID avUUID = UUID.Zero;
909 909
910 if (avToBeKilled != null) 910 if (avToBeKilled != null)
911 { 911 {
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 15ce584..59d29d6 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -29,9 +29,9 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using libsecondlife; 32using OpenMetaverse;
33using OpenMetaverse.Imaging;
33using Nini.Config; 34using Nini.Config;
34using OpenJPEGNet;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
40{ 40{
41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager 41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
42 { 42 {
43 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 43 private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
44 44
45 private Dictionary<string, IDynamicTextureRender> RenderPlugins = 45 private Dictionary<string, IDynamicTextureRender> RenderPlugins =
46 new Dictionary<string, IDynamicTextureRender>(); 46 new Dictionary<string, IDynamicTextureRender>();
47 47
48 private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); 48 private Dictionary<UUID, DynamicTextureUpdater> Updaters = new Dictionary<UUID, DynamicTextureUpdater>();
49 49
50 #region IDynamicTextureManager Members 50 #region IDynamicTextureManager Members
51 51
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
62 /// </summary> 62 /// </summary>
63 /// <param name="id"></param> 63 /// <param name="id"></param>
64 /// <param name="data"></param> 64 /// <param name="data"></param>
65 public void ReturnData(LLUUID id, byte[] data) 65 public void ReturnData(UUID id, byte[] data)
66 { 66 {
67 if (Updaters.ContainsKey(id)) 67 if (Updaters.ContainsKey(id))
68 { 68 {
@@ -75,13 +75,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
75 } 75 }
76 } 76 }
77 77
78 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 78 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
79 string extraParams, int updateTimer) 79 string extraParams, int updateTimer)
80 { 80 {
81 return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); 81 return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255);
82 } 82 }
83 83
84 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 84 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
85 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 85 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
86 { 86 {
87 if (RenderPlugins.ContainsKey(contentType)) 87 if (RenderPlugins.ContainsKey(contentType))
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
94 updater.ContentType = contentType; 94 updater.ContentType = contentType;
95 updater.Url = url; 95 updater.Url = url;
96 updater.UpdateTimer = updateTimer; 96 updater.UpdateTimer = updateTimer;
97 updater.UpdaterID = LLUUID.Random(); 97 updater.UpdaterID = UUID.Random();
98 updater.Params = extraParams; 98 updater.Params = extraParams;
99 updater.BlendWithOldTexture = SetBlending; 99 updater.BlendWithOldTexture = SetBlending;
100 updater.FrontAlpha = AlphaValue; 100 updater.FrontAlpha = AlphaValue;
@@ -107,16 +107,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
107 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); 107 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams);
108 return updater.UpdaterID; 108 return updater.UpdaterID;
109 } 109 }
110 return LLUUID.Zero; 110 return UUID.Zero;
111 } 111 }
112 112
113 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, 113 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
114 string extraParams, int updateTimer) 114 string extraParams, int updateTimer)
115 { 115 {
116 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); 116 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255);
117 } 117 }
118 118
119 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, 119 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
120 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 120 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
121 { 121 {
122 if (RenderPlugins.ContainsKey(contentType)) 122 if (RenderPlugins.ContainsKey(contentType))
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
127 updater.ContentType = contentType; 127 updater.ContentType = contentType;
128 updater.BodyData = data; 128 updater.BodyData = data;
129 updater.UpdateTimer = updateTimer; 129 updater.UpdateTimer = updateTimer;
130 updater.UpdaterID = LLUUID.Random(); 130 updater.UpdaterID = UUID.Random();
131 updater.Params = extraParams; 131 updater.Params = extraParams;
132 updater.BlendWithOldTexture = SetBlending; 132 updater.BlendWithOldTexture = SetBlending;
133 updater.FrontAlpha = AlphaValue; 133 updater.FrontAlpha = AlphaValue;
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
140 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); 140 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
141 return updater.UpdaterID; 141 return updater.UpdaterID;
142 } 142 }
143 return LLUUID.Zero; 143 return UUID.Zero;
144 } 144 }
145 145
146 #endregion 146 #endregion
@@ -184,18 +184,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
184 public string BodyData; 184 public string BodyData;
185 public string ContentType; 185 public string ContentType;
186 public byte FrontAlpha = 255; 186 public byte FrontAlpha = 255;
187 public LLUUID LastAssetID; 187 public UUID LastAssetID;
188 public string Params; 188 public string Params;
189 public LLUUID PrimID; 189 public UUID PrimID;
190 public bool SetNewFrontAlpha = false; 190 public bool SetNewFrontAlpha = false;
191 public LLUUID SimUUID; 191 public UUID SimUUID;
192 public LLUUID UpdaterID; 192 public UUID UpdaterID;
193 public int UpdateTimer; 193 public int UpdateTimer;
194 public string Url; 194 public string Url;
195 195
196 public DynamicTextureUpdater() 196 public DynamicTextureUpdater()
197 { 197 {
198 LastAssetID = LLUUID.Zero; 198 LastAssetID = UUID.Zero;
199 UpdateTimer = 0; 199 UpdateTimer = 0;
200 BodyData = null; 200 BodyData = null;
201 } 201 }
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
211 211
212 if (BlendWithOldTexture) 212 if (BlendWithOldTexture)
213 { 213 {
214 LLUUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; 214 UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID;
215 oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); 215 oldAsset = scene.AssetCache.GetAsset(lastTextureID, true);
216 if (oldAsset != null) 216 if (oldAsset != null)
217 { 217 {
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
231 231
232 // Create a new asset for user 232 // Create a new asset for user
233 AssetBase asset = new AssetBase(); 233 AssetBase asset = new AssetBase();
234 asset.FullID = LLUUID.Random(); 234 asset.FullID = UUID.Random();
235 asset.Data = assetData; 235 asset.Data = assetData;
236 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); 236 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000);
237 asset.Type = 0; 237 asset.Type = 0;
@@ -243,10 +243,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
243 LastAssetID = asset.FullID; 243 LastAssetID = asset.FullID;
244 244
245 // mostly keep the values from before 245 // mostly keep the values from before
246 LLObject.TextureEntry tmptex = part.Shape.Textures; 246 Primitive.TextureEntry tmptex = part.Shape.Textures;
247 247
248 // remove the old asset from the cache 248 // remove the old asset from the cache
249 LLUUID oldID = tmptex.DefaultTexture.TextureID; 249 UUID oldID = tmptex.DefaultTexture.TextureID;
250 scene.AssetCache.ExpireAsset(oldID); 250 scene.AssetCache.ExpireAsset(oldID);
251 251
252 tmptex.DefaultTexture.TextureID = asset.FullID; 252 tmptex.DefaultTexture.TextureID = asset.FullID;
@@ -259,15 +259,27 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
259 259
260 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) 260 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
261 { 261 {
262 Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); 262 ManagedImage managedImage;
263 Bitmap image2 = new Bitmap(OpenJPEG.DecodeToImage(backImage)); 263 Image image;
264 if (setNewAlpha) 264
265 if (OpenJPEG.DecodeToImage(frontImage, out managedImage, out image))
265 { 266 {
266 SetAlpha(ref image1, newAlpha); 267 Bitmap image1 = new Bitmap(image);
268
269 if (OpenJPEG.DecodeToImage(backImage, out managedImage, out image))
270 {
271 Bitmap image2 = new Bitmap(image);
272
273 if (setNewAlpha)
274 SetAlpha(ref image1, newAlpha);
275
276 Bitmap joint = MergeBitMaps(image1, image2);
277
278 return OpenJPEG.EncodeFromImage(joint, true);
279 }
267 } 280 }
268 Bitmap joint = MergeBitMaps(image1, image2);
269 281
270 return OpenJPEG.EncodeFromImage(joint, true); 282 return null;
271 } 283 }
272 284
273 public Bitmap MergeBitMaps(Bitmap front, Bitmap back) 285 public Bitmap MergeBitMaps(Bitmap front, Bitmap back)
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
index bcf3e76..5a715f5 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
@@ -29,7 +29,7 @@ using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using libsecondlife; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
161 } 161 }
162 } 162 }
163 163
164 private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) 164 private SceneObjectPart findPrim(UUID objectID, out string ObjectRegionName)
165 { 165 {
166 lock (m_Scenes) 166 lock (m_Scenes)
167 { 167 {
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
179 return null; 179 return null;
180 } 180 }
181 181
182 private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) 182 private void resolveNamePositionRegionName(UUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName)
183 { 183 {
184 string m_ObjectRegionName; 184 string m_ObjectRegionName;
185 SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); 185 SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName);
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
203 /// <param name="address"></param> 203 /// <param name="address"></param>
204 /// <param name="subject"></param> 204 /// <param name="subject"></param>
205 /// <param name="body"></param> 205 /// <param name="body"></param>
206 public void SendEmail(LLUUID objectID, string address, string subject, string body) 206 public void SendEmail(UUID objectID, string address, string subject, string body)
207 { 207 {
208 //Check if address is empty 208 //Check if address is empty
209 if (address == string.Empty) 209 if (address == string.Empty)
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
240 //Creation EmailMessage 240 //Creation EmailMessage
241 EmailMessage emailMessage = new EmailMessage(); 241 EmailMessage emailMessage = new EmailMessage();
242 //From 242 //From
243 emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); 243 emailMessage.FromAddress = new EmailAddress(objectID.ToString()+"@"+m_HostName);
244 //To - Only One 244 //To - Only One
245 emailMessage.AddToAddress(new EmailAddress(address)); 245 emailMessage.AddToAddress(new EmailAddress(address));
246 //Subject 246 //Subject
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
264 //Send Email Message 264 //Send Email Message
265 emailMessage.Send(smtpServer); 265 emailMessage.Send(smtpServer);
266 //Log 266 //Log
267 m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); 267 m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.ToString());
268 } 268 }
269 catch (Exception e) 269 catch (Exception e)
270 { 270 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
280 /// <param name="sender"></param> 280 /// <param name="sender"></param>
281 /// <param name="subject"></param> 281 /// <param name="subject"></param>
282 /// <returns></returns> 282 /// <returns></returns>
283 public Email GetNextEmail(LLUUID objectID, string sender, string subject) 283 public Email GetNextEmail(UUID objectID, string sender, string subject)
284 { 284 {
285 return null; 285 return null;
286 } 286 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 1eb0387..9595588 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Net; 31using System.Net;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using Nini.Config; 35using Nini.Config;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
91 private string m_name = "HttpScriptRequests"; 91 private string m_name = "HttpScriptRequests";
92 92
93 // <request id, HttpRequestClass> 93 // <request id, HttpRequestClass>
94 private Dictionary<LLUUID, HttpRequestClass> m_pendingRequests; 94 private Dictionary<UUID, HttpRequestClass> m_pendingRequests;
95 private Scene m_scene; 95 private Scene m_scene;
96 // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>(); 96 // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>();
97 97
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
101 101
102 #region IHttpRequests Members 102 #region IHttpRequests Members
103 103
104 public LLUUID MakeHttpRequest(string url, string parameters, string body) 104 public UUID MakeHttpRequest(string url, string parameters, string body)
105 { 105 {
106 return LLUUID.Zero; 106 return UUID.Zero;
107 } 107 }
108 108
109 public LLUUID StartHttpRequest(uint localID, LLUUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body) 109 public UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body)
110 { 110 {
111 LLUUID reqID = LLUUID.Random(); 111 UUID reqID = UUID.Random();
112 HttpRequestClass htc = new HttpRequestClass(); 112 HttpRequestClass htc = new HttpRequestClass();
113 113
114 // Partial implementation: support for parameter flags needed 114 // Partial implementation: support for parameter flags needed
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
163 return reqID; 163 return reqID;
164 } 164 }
165 165
166 public void StopHttpRequest(uint m_localID, LLUUID m_itemID) 166 public void StopHttpRequest(uint m_localID, UUID m_itemID)
167 { 167 {
168 if (m_pendingRequests != null) 168 if (m_pendingRequests != null)
169 { 169 {
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
192 { 192 {
193 lock (HttpListLock) 193 lock (HttpListLock)
194 { 194 {
195 foreach (LLUUID luid in m_pendingRequests.Keys) 195 foreach (UUID luid in m_pendingRequests.Keys)
196 { 196 {
197 HttpRequestClass tmpReq; 197 HttpRequestClass tmpReq;
198 198
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
208 return null; 208 return null;
209 } 209 }
210 210
211 public void RemoveCompletedRequest(LLUUID id) 211 public void RemoveCompletedRequest(UUID id)
212 { 212 {
213 lock (HttpListLock) 213 lock (HttpListLock)
214 { 214 {
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
232 232
233 m_scene.RegisterModuleInterface<IHttpRequests>(this); 233 m_scene.RegisterModuleInterface<IHttpRequests>(this);
234 234
235 m_pendingRequests = new Dictionary<LLUUID, HttpRequestClass>(); 235 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
236 } 236 }
237 237
238 public void PostInitialise() 238 public void PostInitialise()
@@ -274,11 +274,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
274 public bool httpVerifyCert = true; // not implemented 274 public bool httpVerifyCert = true; // not implemented
275 275
276 // Request info 276 // Request info
277 public LLUUID itemID; 277 public UUID itemID;
278 public uint localID; 278 public uint localID;
279 public DateTime next; 279 public DateTime next;
280 public string outbound_body; 280 public string outbound_body;
281 public LLUUID reqID; 281 public UUID reqID;
282 public HttpWebRequest request; 282 public HttpWebRequest request;
283 public string response_body; 283 public string response_body;
284 public List<string> response_metadata; 284 public List<string> response_metadata;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 725322b..339ad42 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -29,9 +29,9 @@ using System;
29using System.Drawing; 29using System.Drawing;
30using System.IO; 30using System.IO;
31using System.Net; 31using System.Net;
32using libsecondlife; 32using OpenMetaverse;
33using OpenMetaverse.Imaging;
33using Nini.Config; 34using Nini.Config;
34using OpenJPEGNet;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
37 37
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
70 return null; 70 return null;
71 } 71 }
72 72
73 public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) 73 public bool AsyncConvertUrl(UUID id, string url, string extraParams)
74 { 74 {
75 MakeHttpRequest(url, id); 75 MakeHttpRequest(url, id);
76 return true; 76 return true;
77 } 77 }
78 78
79 public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) 79 public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
80 { 80 {
81 return false; 81 return false;
82 } 82 }
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
118 118
119 #endregion 119 #endregion
120 120
121 private void MakeHttpRequest(string url, LLUUID requestID) 121 private void MakeHttpRequest(string url, UUID requestID)
122 { 122 {
123 WebRequest request = HttpWebRequest.Create(url); 123 WebRequest request = HttpWebRequest.Create(url);
124 RequestState state = new RequestState((HttpWebRequest) request, requestID); 124 RequestState state = new RequestState((HttpWebRequest) request, requestID);
@@ -177,10 +177,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
177 public class RequestState 177 public class RequestState
178 { 178 {
179 public HttpWebRequest Request = null; 179 public HttpWebRequest Request = null;
180 public LLUUID RequestID = LLUUID.Zero; 180 public UUID RequestID = UUID.Zero;
181 public int TimeOfRequest = 0; 181 public int TimeOfRequest = 0;
182 182
183 public RequestState(HttpWebRequest request, LLUUID requestID) 183 public RequestState(HttpWebRequest request, UUID requestID)
184 { 184 {
185 Request = request; 185 Request = request;
186 RequestID = requestID; 186 RequestID = requestID;
@@ -189,4 +189,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
189 189
190 #endregion 190 #endregion
191 } 191 }
192} \ No newline at end of file 192}
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index 27f1182..256bf27 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -31,12 +31,11 @@ using System.Drawing.Imaging;
31using System.Globalization; 31using System.Globalization;
32using System.IO; 32using System.IO;
33using System.Net; 33using System.Net;
34using libsecondlife; 34using OpenMetaverse;
35using OpenMetaverse.Imaging;
35using Nini.Config; 36using Nini.Config;
36using OpenJPEGNet;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
38using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
39using Image=System.Drawing.Image;
40 39
41//using Cairo; 40//using Cairo;
42 41
@@ -79,12 +78,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
79 return null; 78 return null;
80 } 79 }
81 80
82 public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) 81 public bool AsyncConvertUrl(UUID id, string url, string extraParams)
83 { 82 {
84 return false; 83 return false;
85 } 84 }
86 85
87 public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) 86 public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
88 { 87 {
89 Draw(bodyData, id, extraParams); 88 Draw(bodyData, id, extraParams);
90 return true; 89 return true;
@@ -127,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
127 126
128 #endregion 127 #endregion
129 128
130 private void Draw(string data, LLUUID id, string extraParams) 129 private void Draw(string data, UUID id, string extraParams)
131 { 130 {
132 // TODO: this is a brutal hack. extraParams should actually be parsed reasonably. 131 // TODO: this is a brutal hack. extraParams should actually be parsed reasonably.
133 int size = 256; 132 int size = 256;
@@ -374,4 +373,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
374 return null; 373 return null;
375 } 374 }
376 } 375 }
377} \ No newline at end of file 376}
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index 2f67dee..ae5eefc 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -66,7 +66,7 @@ using OpenSim.Region.Environment.Scenes;
66 * 66 *
67 * For LSL compliance, note the following: 67 * For LSL compliance, note the following:
68 * (Tested again 1.21.1 on May 2, 2008) 68 * (Tested again 1.21.1 on May 2, 2008)
69 * 1. 'id' has to be parsed into a LLUUID. None-UUID keys are 69 * 1. 'id' has to be parsed into a UUID. None-UUID keys are
70 * to be replaced by the ZeroID key. (Well, TryParse does 70 * to be replaced by the ZeroID key. (Well, TryParse does
71 * that for us. 71 * that for us.
72 * 2. Setting up an listen event from the same script, with the 72 * 2. Setting up an listen event from the same script, with the
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
157 /// <param name="id">key to filter on (user given, could be totally faked)</param> 157 /// <param name="id">key to filter on (user given, could be totally faked)</param>
158 /// <param name="msg">msg to filter on</param> 158 /// <param name="msg">msg to filter on</param>
159 /// <returns>number of the scripts handle</returns> 159 /// <returns>number of the scripts handle</returns>
160 public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) 160 public int Listen(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg)
161 { 161 {
162 return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg); 162 return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg);
163 } 163 }
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
169 /// <param name="itemID">UUID of the script engine</param> 169 /// <param name="itemID">UUID of the script engine</param>
170 /// <param name="handle">handle returned by Listen()</param> 170 /// <param name="handle">handle returned by Listen()</param>
171 /// <param name="active">temp. activate or deactivate the Listen()</param> 171 /// <param name="active">temp. activate or deactivate the Listen()</param>
172 public void ListenControl(LLUUID itemID, int handle, int active) 172 public void ListenControl(UUID itemID, int handle, int active)
173 { 173 {
174 if (active == 1) 174 if (active == 1)
175 m_listenerManager.Activate(itemID, handle); 175 m_listenerManager.Activate(itemID, handle);
@@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
182 /// </summary> 182 /// </summary>
183 /// <param name="itemID">UUID of the script engine</param> 183 /// <param name="itemID">UUID of the script engine</param>
184 /// <param name="handle">handle returned by Listen()</param> 184 /// <param name="handle">handle returned by Listen()</param>
185 public void ListenRemove(LLUUID itemID, int handle) 185 public void ListenRemove(UUID itemID, int handle)
186 { 186 {
187 m_listenerManager.Remove(itemID, handle); 187 m_listenerManager.Remove(itemID, handle);
188 } 188 }
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
192 /// (script engine) 192 /// (script engine)
193 /// </summary> 193 /// </summary>
194 /// <param name="itemID">UUID of the script engine</param> 194 /// <param name="itemID">UUID of the script engine</param>
195 public void DeleteListener(LLUUID itemID) 195 public void DeleteListener(UUID itemID)
196 { 196 {
197 m_listenerManager.DeleteListener(itemID); 197 m_listenerManager.DeleteListener(itemID);
198 } 198 }
@@ -210,11 +210,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
210 /// <param name="name">name of sender (object or avatar)</param> 210 /// <param name="name">name of sender (object or avatar)</param>
211 /// <param name="id">key of sender (object or avatar)</param> 211 /// <param name="id">key of sender (object or avatar)</param>
212 /// <param name="msg">msg to sent</param> 212 /// <param name="msg">msg to sent</param>
213 public void DeliverMessage(ChatTypeEnum type, int channel, string name, LLUUID id, string msg) 213 public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg)
214 { 214 {
215 SceneObjectPart source = null; 215 SceneObjectPart source = null;
216 ScenePresence avatar = null; 216 ScenePresence avatar = null;
217 LLVector3 position; 217 Vector3 position;
218 218
219 source = m_scene.GetSceneObjectPart(id); 219 source = m_scene.GetSceneObjectPart(id);
220 if (source != null) 220 if (source != null)
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
231 // Determine which listen event filters match the given set of arguments, this results 231 // Determine which listen event filters match the given set of arguments, this results
232 // in a limited set of listeners, each belonging a host. If the host is in range, add them 232 // in a limited set of listeners, each belonging a host. If the host is in range, add them
233 // to the pending queue. 233 // to the pending queue.
234 foreach (ListenerInfo li in m_listenerManager.GetListeners(LLUUID.Zero, channel, name, id, msg)) 234 foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg))
235 { 235 {
236 // Dont process if this message is from yourself! 236 // Dont process if this message is from yourself!
237 if (li.GetHostID().Equals(id)) 237 if (li.GetHostID().Equals(id))
@@ -331,12 +331,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
331 e.Message); 331 e.Message);
332 } 332 }
333 333
334 public Object[] GetSerializationData(LLUUID itemID) 334 public Object[] GetSerializationData(UUID itemID)
335 { 335 {
336 return m_listenerManager.GetSerializationData(itemID); 336 return m_listenerManager.GetSerializationData(itemID);
337 } 337 }
338 338
339 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 339 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
340 Object[] data) 340 Object[] data)
341 { 341 {
342 m_listenerManager.AddFromData(localID, itemID, hostID, data); 342 m_listenerManager.AddFromData(localID, itemID, hostID, data);
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
357 m_curlisteners = 0; 357 m_curlisteners = 0;
358 } 358 }
359 359
360 public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) 360 public int AddListener(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg)
361 { 361 {
362 // do we already have a match on this particular filter event? 362 // do we already have a match on this particular filter event?
363 List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg); 363 List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg);
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
395 return -1; 395 return -1;
396 } 396 }
397 397
398 public void Remove(LLUUID itemID, int handle) 398 public void Remove(UUID itemID, int handle)
399 { 399 {
400 lock (m_listeners) 400 lock (m_listeners)
401 { 401 {
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
419 } 419 }
420 } 420 }
421 421
422 public void DeleteListener(LLUUID itemID) 422 public void DeleteListener(UUID itemID)
423 { 423 {
424 List<int> emptyChannels = new List<int>(); 424 List<int> emptyChannels = new List<int>();
425 List<ListenerInfo> removedListeners = new List<ListenerInfo>(); 425 List<ListenerInfo> removedListeners = new List<ListenerInfo>();
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
455 } 455 }
456 } 456 }
457 457
458 public void Activate(LLUUID itemID, int handle) 458 public void Activate(UUID itemID, int handle)
459 { 459 {
460 lock (m_listeners) 460 lock (m_listeners)
461 { 461 {
@@ -474,7 +474,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
474 } 474 }
475 } 475 }
476 476
477 public void Dectivate(LLUUID itemID, int handle) 477 public void Dectivate(UUID itemID, int handle)
478 { 478 {
479 lock (m_listeners) 479 lock (m_listeners)
480 { 480 {
@@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
494 } 494 }
495 495
496 // non-locked access, since its always called in the context of the lock 496 // non-locked access, since its always called in the context of the lock
497 private int GetNewHandle(LLUUID itemID) 497 private int GetNewHandle(UUID itemID)
498 { 498 {
499 List<int> handles = new List<int>(); 499 List<int> handles = new List<int>();
500 500
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
521 // Theres probably a more clever and efficient way to 521 // Theres probably a more clever and efficient way to
522 // do this, maybe with regex. 522 // do this, maybe with regex.
523 // PM2008: Ha, one could even be smart and define a specialized Enumerator. 523 // PM2008: Ha, one could even be smart and define a specialized Enumerator.
524 public List<ListenerInfo> GetListeners(LLUUID itemID, int channel, string name, LLUUID id, string msg) 524 public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg)
525 { 525 {
526 List<ListenerInfo> collection = new List<ListenerInfo>(); 526 List<ListenerInfo> collection = new List<ListenerInfo>();
527 527
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
539 { 539 {
540 continue; 540 continue;
541 } 541 }
542 if (!itemID.Equals(LLUUID.Zero) && !li.GetItemID().Equals(itemID)) 542 if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID))
543 { 543 {
544 continue; 544 continue;
545 } 545 }
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
547 { 547 {
548 continue; 548 continue;
549 } 549 }
550 if (!li.GetID().Equals(LLUUID.Zero) && !li.GetID().Equals(id)) 550 if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id))
551 { 551 {
552 continue; 552 continue;
553 } 553 }
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
561 return collection; 561 return collection;
562 } 562 }
563 563
564 public Object[] GetSerializationData(LLUUID itemID) 564 public Object[] GetSerializationData(UUID itemID)
565 { 565 {
566 List<Object> data = new List<Object>(); 566 List<Object> data = new List<Object>();
567 567
@@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
576 return (Object[])data.ToArray(); 576 return (Object[])data.ToArray();
577 } 577 }
578 578
579 public void AddFromData(uint localID, LLUUID itemID, LLUUID hostID, 579 public void AddFromData(uint localID, UUID itemID, UUID hostID,
580 Object[] data) 580 Object[] data)
581 { 581 {
582 int idx = 0; 582 int idx = 0;
@@ -603,25 +603,25 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
603 private bool m_active; // Listener is active or not 603 private bool m_active; // Listener is active or not
604 private int m_handle; // Assigned handle of this listener 604 private int m_handle; // Assigned handle of this listener
605 private uint m_localID; // Local ID from script engine 605 private uint m_localID; // Local ID from script engine
606 private LLUUID m_itemID; // ID of the host script engine 606 private UUID m_itemID; // ID of the host script engine
607 private LLUUID m_hostID; // ID of the host/scene part 607 private UUID m_hostID; // ID of the host/scene part
608 private int m_channel; // Channel 608 private int m_channel; // Channel
609 private LLUUID m_id; // ID to filter messages from 609 private UUID m_id; // ID to filter messages from
610 private string m_name; // Object name to filter messages from 610 private string m_name; // Object name to filter messages from
611 private string m_message; // The message 611 private string m_message; // The message
612 612
613 public ListenerInfo(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) 613 public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message)
614 { 614 {
615 Initialise(handle, localID, ItemID, hostID, channel, name, id, message); 615 Initialise(handle, localID, ItemID, hostID, channel, name, id, message);
616 } 616 }
617 617
618 public ListenerInfo(ListenerInfo li, string name, LLUUID id, string message) 618 public ListenerInfo(ListenerInfo li, string name, UUID id, string message)
619 { 619 {
620 Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); 620 Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message);
621 } 621 }
622 622
623 private void Initialise(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, 623 private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name,
624 LLUUID id, string message) 624 UUID id, string message)
625 { 625 {
626 m_active = true; 626 m_active = true;
627 m_handle = handle; 627 m_handle = handle;
@@ -648,22 +648,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
648 return data; 648 return data;
649 } 649 }
650 650
651 public static ListenerInfo FromData(uint localID, LLUUID ItemID, LLUUID hostID, Object[] data) 651 public static ListenerInfo FromData(uint localID, UUID ItemID, UUID hostID, Object[] data)
652 { 652 {
653 ListenerInfo linfo = new ListenerInfo((int)data[1], localID, 653 ListenerInfo linfo = new ListenerInfo((int)data[1], localID,
654 ItemID, hostID, (int)data[2], (string)data[3], 654 ItemID, hostID, (int)data[2], (string)data[3],
655 (LLUUID)data[4], (string)data[5]); 655 (UUID)data[4], (string)data[5]);
656 linfo.m_active=(bool)data[0]; 656 linfo.m_active=(bool)data[0];
657 657
658 return linfo; 658 return linfo;
659 } 659 }
660 660
661 public LLUUID GetItemID() 661 public UUID GetItemID()
662 { 662 {
663 return m_itemID; 663 return m_itemID;
664 } 664 }
665 665
666 public LLUUID GetHostID() 666 public UUID GetHostID()
667 { 667 {
668 return m_hostID; 668 return m_hostID;
669 } 669 }
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
708 m_active = true; 708 m_active = true;
709 } 709 }
710 710
711 public LLUUID GetID() 711 public UUID GetID()
712 { 712 {
713 return m_id; 713 return m_id;
714 } 714 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
index bde90bc..85aa344 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nini.Config; 36using Nini.Config;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
@@ -82,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
82 private string m_name = "XMLRPCModule"; 82 private string m_name = "XMLRPCModule";
83 83
84 // <channel id, RPCChannelInfo> 84 // <channel id, RPCChannelInfo>
85 private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; 85 private Dictionary<UUID, RPCChannelInfo> m_openChannels;
86 private Dictionary<LLUUID, SendRemoteDataRequest> m_pendingSRDResponses; 86 private Dictionary<UUID, SendRemoteDataRequest> m_pendingSRDResponses;
87 private int m_remoteDataPort = 0; 87 private int m_remoteDataPort = 0;
88 88
89 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPending; 89 private Dictionary<UUID, RPCRequestInfo> m_rpcPending;
90 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPendingResponses; 90 private Dictionary<UUID, RPCRequestInfo> m_rpcPendingResponses;
91 private List<Scene> m_scenes = new List<Scene>(); 91 private List<Scene> m_scenes = new List<Scene>();
92 private int RemoteReplyScriptTimeout = 9000; 92 private int RemoteReplyScriptTimeout = 9000;
93 private int RemoteReplyScriptWait = 300; 93 private int RemoteReplyScriptWait = 300;
@@ -102,10 +102,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
102 // get called only one time (or we lose any open channels) 102 // get called only one time (or we lose any open channels)
103 if (null == m_openChannels) 103 if (null == m_openChannels)
104 { 104 {
105 m_openChannels = new Dictionary<LLUUID, RPCChannelInfo>(); 105 m_openChannels = new Dictionary<UUID, RPCChannelInfo>();
106 m_rpcPending = new Dictionary<LLUUID, RPCRequestInfo>(); 106 m_rpcPending = new Dictionary<UUID, RPCRequestInfo>();
107 m_rpcPendingResponses = new Dictionary<LLUUID, RPCRequestInfo>(); 107 m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>();
108 m_pendingSRDResponses = new Dictionary<LLUUID, SendRemoteDataRequest>(); 108 m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>();
109 109
110 try 110 try
111 { 111 {
@@ -164,11 +164,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
164 /********************************************** 164 /**********************************************
165 * OpenXMLRPCChannel 165 * OpenXMLRPCChannel
166 * 166 *
167 * Generate a LLUUID channel key and add it and 167 * Generate a UUID channel key and add it and
168 * the prim id to dictionary <channelUUID, primUUID> 168 * the prim id to dictionary <channelUUID, primUUID>
169 * 169 *
170 * A custom channel key can be proposed. 170 * A custom channel key can be proposed.
171 * Otherwise, passing LLUUID.Zero will generate 171 * Otherwise, passing UUID.Zero will generate
172 * and return a random channel 172 * and return a random channel
173 * 173 *
174 * First check if there is a channel assigned for 174 * First check if there is a channel assigned for
@@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
179 * 179 *
180 * ********************************************/ 180 * ********************************************/
181 181
182 public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID, LLUUID channelID) 182 public UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID)
183 { 183 {
184 LLUUID newChannel = LLUUID.Zero; 184 UUID newChannel = UUID.Zero;
185 185
186 // This should no longer happen, but the check is reasonable anyway 186 // This should no longer happen, but the check is reasonable anyway
187 if (null == m_openChannels) 187 if (null == m_openChannels)
@@ -201,9 +201,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
201 } 201 }
202 } 202 }
203 203
204 if (newChannel == LLUUID.Zero) 204 if (newChannel == UUID.Zero)
205 { 205 {
206 newChannel = (channelID == LLUUID.Zero) ? LLUUID.Random() : channelID; 206 newChannel = (channelID == UUID.Zero) ? UUID.Random() : channelID;
207 RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel); 207 RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel);
208 lock (XMLRPCListLock) 208 lock (XMLRPCListLock)
209 { 209 {
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
216 216
217 // Delete channels based on itemID 217 // Delete channels based on itemID
218 // for when a script is deleted 218 // for when a script is deleted
219 public void DeleteChannels(LLUUID itemID) 219 public void DeleteChannels(UUID itemID)
220 { 220 {
221 if (m_openChannels != null) 221 if (m_openChannels != null)
222 { 222 {
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
234 234
235 IEnumerator tmpEnumerator = tmp.GetEnumerator(); 235 IEnumerator tmpEnumerator = tmp.GetEnumerator();
236 while (tmpEnumerator.MoveNext()) 236 while (tmpEnumerator.MoveNext())
237 m_openChannels.Remove((LLUUID) tmpEnumerator.Current); 237 m_openChannels.Remove((UUID) tmpEnumerator.Current);
238 } 238 }
239 } 239 }
240 } 240 }
@@ -248,12 +248,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
248 248
249 public void RemoteDataReply(string channel, string message_id, string sdata, int idata) 249 public void RemoteDataReply(string channel, string message_id, string sdata, int idata)
250 { 250 {
251 LLUUID message_key = new LLUUID(message_id); 251 UUID message_key = new UUID(message_id);
252 LLUUID channel_key = new LLUUID(channel); 252 UUID channel_key = new UUID(channel);
253 253
254 RPCRequestInfo rpcInfo = null; 254 RPCRequestInfo rpcInfo = null;
255 255
256 if (message_key == LLUUID.Zero) 256 if (message_key == UUID.Zero)
257 { 257 {
258 foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) 258 foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values)
259 if (oneRpcInfo.GetChannelKey() == channel_key) 259 if (oneRpcInfo.GetChannelKey() == channel_key)
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
284 * 284 *
285 *********************************************/ 285 *********************************************/
286 286
287 public void CloseXMLRPCChannel(LLUUID channelKey) 287 public void CloseXMLRPCChannel(UUID channelKey)
288 { 288 {
289 if (m_openChannels.ContainsKey(channelKey)) 289 if (m_openChannels.ContainsKey(channelKey))
290 m_openChannels.Remove(channelKey); 290 m_openChannels.Remove(channelKey);
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
308 { 308 {
309 lock (XMLRPCListLock) 309 lock (XMLRPCListLock)
310 { 310 {
311 foreach (LLUUID luid in m_rpcPending.Keys) 311 foreach (UUID luid in m_rpcPending.Keys)
312 { 312 {
313 RPCRequestInfo tmpReq; 313 RPCRequestInfo tmpReq;
314 314
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
322 return null; 322 return null;
323 } 323 }
324 324
325 public void RemoveCompletedRequest(LLUUID id) 325 public void RemoveCompletedRequest(UUID id)
326 { 326 {
327 lock (XMLRPCListLock) 327 lock (XMLRPCListLock)
328 { 328 {
@@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
339 } 339 }
340 } 340 }
341 341
342 public LLUUID SendRemoteData(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) 342 public UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata)
343 { 343 {
344 SendRemoteDataRequest req = new SendRemoteDataRequest( 344 SendRemoteDataRequest req = new SendRemoteDataRequest(
345 localID, itemID, channel, dest, idata, sdata 345 localID, itemID, channel, dest, idata, sdata
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
354 { 354 {
355 lock (XMLRPCListLock) 355 lock (XMLRPCListLock)
356 { 356 {
357 foreach (LLUUID luid in m_pendingSRDResponses.Keys) 357 foreach (UUID luid in m_pendingSRDResponses.Keys)
358 { 358 {
359 SendRemoteDataRequest tmpReq; 359 SendRemoteDataRequest tmpReq;
360 360
@@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
369 return null; 369 return null;
370 } 370 }
371 371
372 public void RemoveCompletedSRDRequest(LLUUID id) 372 public void RemoveCompletedSRDRequest(UUID id)
373 { 373 {
374 lock (XMLRPCListLock) 374 lock (XMLRPCListLock)
375 { 375 {
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
381 } 381 }
382 } 382 }
383 383
384 public void CancelSRDRequests(LLUUID itemID) 384 public void CancelSRDRequests(UUID itemID)
385 { 385 {
386 if (m_pendingSRDResponses != null) 386 if (m_pendingSRDResponses != null)
387 { 387 {
@@ -408,7 +408,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
408 408
409 if (GoodXML) 409 if (GoodXML)
410 { 410 {
411 LLUUID channel = new LLUUID((string) requestData["Channel"]); 411 UUID channel = new UUID((string) requestData["Channel"]);
412 RPCChannelInfo rpcChanInfo; 412 RPCChannelInfo rpcChanInfo;
413 if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) 413 if (m_openChannels.TryGetValue(channel, out rpcChanInfo))
414 { 414 {
@@ -462,24 +462,24 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
462 462
463 public class RPCRequestInfo 463 public class RPCRequestInfo
464 { 464 {
465 private LLUUID m_ChannelKey; 465 private UUID m_ChannelKey;
466 private string m_IntVal; 466 private string m_IntVal;
467 private LLUUID m_ItemID; 467 private UUID m_ItemID;
468 private uint m_localID; 468 private uint m_localID;
469 private LLUUID m_MessageID; 469 private UUID m_MessageID;
470 private bool m_processed; 470 private bool m_processed;
471 private int m_respInt; 471 private int m_respInt;
472 private string m_respStr; 472 private string m_respStr;
473 private string m_StrVal; 473 private string m_StrVal;
474 474
475 public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal) 475 public RPCRequestInfo(uint localID, UUID itemID, UUID channelKey, string strVal, string intVal)
476 { 476 {
477 m_localID = localID; 477 m_localID = localID;
478 m_StrVal = strVal; 478 m_StrVal = strVal;
479 m_IntVal = intVal; 479 m_IntVal = intVal;
480 m_ItemID = itemID; 480 m_ItemID = itemID;
481 m_ChannelKey = channelKey; 481 m_ChannelKey = channelKey;
482 m_MessageID = LLUUID.Random(); 482 m_MessageID = UUID.Random();
483 m_processed = false; 483 m_processed = false;
484 m_respStr = String.Empty; 484 m_respStr = String.Empty;
485 m_respInt = 0; 485 m_respInt = 0;
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
490 return m_processed; 490 return m_processed;
491 } 491 }
492 492
493 public LLUUID GetChannelKey() 493 public UUID GetChannelKey()
494 { 494 {
495 return m_ChannelKey; 495 return m_ChannelKey;
496 } 496 }
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
525 return m_localID; 525 return m_localID;
526 } 526 }
527 527
528 public LLUUID GetItemID() 528 public UUID GetItemID()
529 { 529 {
530 return m_ItemID; 530 return m_ItemID;
531 } 531 }
@@ -540,7 +540,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
540 return int.Parse(m_IntVal); 540 return int.Parse(m_IntVal);
541 } 541 }
542 542
543 public LLUUID GetMessageID() 543 public UUID GetMessageID()
544 { 544 {
545 return m_MessageID; 545 return m_MessageID;
546 } 546 }
@@ -548,23 +548,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
548 548
549 public class RPCChannelInfo 549 public class RPCChannelInfo
550 { 550 {
551 private LLUUID m_ChannelKey; 551 private UUID m_ChannelKey;
552 private LLUUID m_itemID; 552 private UUID m_itemID;
553 private uint m_localID; 553 private uint m_localID;
554 554
555 public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID) 555 public RPCChannelInfo(uint localID, UUID itemID, UUID channelID)
556 { 556 {
557 m_ChannelKey = channelID; 557 m_ChannelKey = channelID;
558 m_localID = localID; 558 m_localID = localID;
559 m_itemID = itemID; 559 m_itemID = itemID;
560 } 560 }
561 561
562 public LLUUID GetItemID() 562 public UUID GetItemID()
563 { 563 {
564 return m_itemID; 564 return m_itemID;
565 } 565 }
566 566
567 public LLUUID GetChannelID() 567 public UUID GetChannelID()
568 { 568 {
569 return m_ChannelKey; 569 return m_ChannelKey;
570 } 570 }
@@ -583,15 +583,15 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
583 public bool finished; 583 public bool finished;
584 private Thread httpThread; 584 private Thread httpThread;
585 public int idata; 585 public int idata;
586 public LLUUID m_itemID; 586 public UUID m_itemID;
587 public uint m_localID; 587 public uint m_localID;
588 public LLUUID reqID; 588 public UUID reqID;
589 public XmlRpcRequest request; 589 public XmlRpcRequest request;
590 public int response_idata; 590 public int response_idata;
591 public string response_sdata; 591 public string response_sdata;
592 public string sdata; 592 public string sdata;
593 593
594 public SendRemoteDataRequest(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) 594 public SendRemoteDataRequest(uint localID, UUID itemID, string channel, string dest, int idata, string sdata)
595 { 595 {
596 this.channel = channel; 596 this.channel = channel;
597 destURL = dest; 597 destURL = dest;
@@ -600,10 +600,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
600 m_itemID = itemID; 600 m_itemID = itemID;
601 m_localID = localID; 601 m_localID = localID;
602 602
603 reqID = LLUUID.Random(); 603 reqID = UUID.Random();
604 } 604 }
605 605
606 public LLUUID process() 606 public UUID process()
607 { 607 {
608 httpThread = new Thread(SendRequest); 608 httpThread = new Thread(SendRequest);
609 httpThread.Name = "HttpRequestThread"; 609 httpThread.Name = "HttpRequestThread";
@@ -625,12 +625,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
625 { 625 {
626 Hashtable param = new Hashtable(); 626 Hashtable param = new Hashtable();
627 627
628 // Check if channel is an LLUUID 628 // Check if channel is an UUID
629 // if not, use as method name 629 // if not, use as method name
630 LLUUID parseUID; 630 UUID parseUID;
631 string mName = "llRemoteData"; 631 string mName = "llRemoteData";
632 if ((channel != null) && (channel != "")) 632 if ((channel != null) && (channel != ""))
633 if (!LLUUID.TryParse(channel, out parseUID)) 633 if (!UUID.TryParse(channel, out parseUID))
634 mName = channel; 634 mName = channel;
635 else 635 else
636 param["Channel"] = channel; 636 param["Channel"] = channel;
@@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
698 } 698 }
699 } 699 }
700 700
701 public LLUUID GetReqID() 701 public UUID GetReqID()
702 { 702 {
703 return reqID; 703 return reqID;
704 } 704 }
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
index 012f8d4..8d74160 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Region.Environment.Modules.World.Archiver 31namespace OpenSim.Region.Environment.Modules.World.Archiver
32{ 32{
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
38 /// <summary> 38 /// <summary>
39 /// The location of the archive control file 39 /// The location of the archive control file
40 /// </summary> 40 /// </summary>
41 public static readonly string CONTROL_FILE_PATH = "archive.xml"; 41 public static readonly string CONTROL_FILE_PATH = "archive.Xml";
42 42
43 /// <summary> 43 /// <summary>
44 /// Path for the assets held in an archive 44 /// Path for the assets held in an archive
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
48 /// <summary> 48 /// <summary>
49 /// Path for the assets metadata file 49 /// Path for the assets metadata file
50 /// </summary> 50 /// </summary>
51 //public static readonly string ASSETS_METADATA_PATH = "assets.xml"; 51 //public static readonly string ASSETS_METADATA_PATH = "assets.Xml";
52 52
53 /// <summary> 53 /// <summary>
54 /// Path for the prims file 54 /// Path for the prims file
@@ -88,11 +88,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
88 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt"; 88 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt";
89 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml"; 89 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml";
90 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this 90 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this
91// disable warning: we know Script is obsolete, but need to support it
92// anyhow
93#pragma warning disable 0612
94 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Script] = ASSET_EXTENSION_SEPARATOR + "script.txt"; // Not sure if we'll ever see this
95#pragma warning restore 0612
96 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this 91 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this
97 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this 92 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this
98 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg"; 93 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg";
@@ -116,11 +111,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
116 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard; 111 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard;
117 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object; 112 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object;
118 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder; 113 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder;
119// disable warning: we know Script is obsolete, but need to support it
120// anyhow
121#pragma warning disable 0612
122 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.txt"] = (sbyte)AssetType.Script;
123#pragma warning restore 0612
124 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate; 114 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate;
125 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder; 115 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder;
126 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound; 116 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index 89f5fd7..776ea78 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -31,13 +31,12 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Modules.World.Terrain; 31using OpenSim.Region.Environment.Modules.World.Terrain;
32using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using System; 33using System;
34using Axiom.Math;
35using System.Collections.Generic; 34using System.Collections.Generic;
36using System.IO; 35using System.IO;
37using System.IO.Compression; 36using System.IO.Compression;
38using System.Reflection; 37using System.Reflection;
39using System.Xml; 38using System.Xml;
40using libsecondlife; 39using OpenMetaverse;
41using log4net; 40using log4net;
42 41
43namespace OpenSim.Region.Environment.Modules.World.Archiver 42namespace OpenSim.Region.Environment.Modules.World.Archiver
@@ -57,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
57 /// <summary> 56 /// <summary>
58 /// Used to cache lookups for valid uuids. 57 /// Used to cache lookups for valid uuids.
59 /// </summary> 58 /// </summary>
60 private IDictionary<LLUUID, bool> m_validUserUuids = new Dictionary<LLUUID, bool>(); 59 private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>();
61 60
62 public ArchiveReadRequest(Scene scene, string loadPath) 61 public ArchiveReadRequest(Scene scene, string loadPath)
63 { 62 {
@@ -137,8 +136,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
137 136
138 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid 137 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
139 // otherwise, use the master avatar uuid instead 138 // otherwise, use the master avatar uuid instead
140 LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; 139 UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
141 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 140 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
142 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; 141 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
143 foreach (SceneObjectPart part in sceneObject.Children.Values) 142 foreach (SceneObjectPart part in sceneObject.Children.Values)
144 { 143 {
@@ -184,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
184 /// </summary> 183 /// </summary>
185 /// <param name="uuid"></param> 184 /// <param name="uuid"></param>
186 /// <returns></returns> 185 /// <returns></returns>
187 private bool resolveUserUuid(LLUUID uuid) 186 private bool resolveUserUuid(UUID uuid)
188 { 187 {
189 if (!m_validUserUuids.ContainsKey(uuid)) 188 if (!m_validUserUuids.ContainsKey(uuid))
190 { 189 {
@@ -209,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
209 /// <returns>true if asset was successfully loaded, false otherwise</returns> 208 /// <returns>true if asset was successfully loaded, false otherwise</returns>
210 private bool LoadAsset(string assetPath, byte[] data) 209 private bool LoadAsset(string assetPath, byte[] data)
211 { 210 {
212 // Right now we're nastily obtaining the lluuid from the filename 211 // Right now we're nastily obtaining the UUID from the filename
213 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); 212 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
214 int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); 213 int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
215 214
@@ -231,7 +230,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
231 230
232 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); 231 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
233 232
234 AssetBase asset = new AssetBase(new LLUUID(uuid), String.Empty); 233 AssetBase asset = new AssetBase(new UUID(uuid), String.Empty);
235 asset.Type = assetType; 234 asset.Type = assetType;
236 asset.Data = data; 235 asset.Data = data;
237 236
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
index 26d4797..6276d34 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.IO.Compression; 31using System.IO.Compression;
32using System.Reflection; 32using System.Reflection;
33using System.Xml; 33using System.Xml;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
44 /// <summary> 44 /// <summary>
45 /// Method called when all the necessary assets for an archive request have been received. 45 /// Method called when all the necessary assets for an archive request have been received.
46 /// </summary> 46 /// </summary>
47 public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assetsFound, ICollection<LLUUID> assetsNotFoundUuids); 47 public delegate void AssetsRequestCallback(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids);
48 48
49 /// <summary> 49 /// <summary>
50 /// Execute the write of an archive once we have received all the necessary data 50 /// Execute the write of an archive once we have received all the necessary data
@@ -73,9 +73,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
73 m_savePath = savePath; 73 m_savePath = savePath;
74 } 74 }
75 75
76 protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assetsFound, ICollection<LLUUID> assetsNotFoundUuids) 76 protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids)
77 { 77 {
78 foreach (LLUUID uuid in assetsNotFoundUuids) 78 foreach (UUID uuid in assetsNotFoundUuids)
79 { 79 {
80 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); 80 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid);
81 } 81 }
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
100 { 100 {
101 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); 101 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType());
102 102
103 LLVector3 position = sceneObject.AbsolutePosition; 103 Vector3 position = sceneObject.AbsolutePosition;
104 104
105 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); 105 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject);
106 string filename 106 string filename
107 = string.Format( 107 = string.Format(
108 "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.xml", 108 "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.Xml",
109 ArchiveConstants.OBJECTS_PATH, sceneObject.Name, 109 ArchiveConstants.OBJECTS_PATH, sceneObject.Name,
110 Math.Round(position.X), Math.Round(position.Y), Math.Round(position.Z), 110 Math.Round(position.X), Math.Round(position.Y), Math.Round(position.Z),
111 sceneObject.UUID); 111 sceneObject.UUID);
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 20e15ab..a59148b 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -37,7 +37,7 @@ using System.Reflection;
37//using System.Text; 37//using System.Text;
38using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
39using System.Threading; 39using System.Threading;
40using libsecondlife; 40using OpenMetaverse;
41using log4net; 41using log4net;
42using Nini.Config; 42using Nini.Config;
43 43
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
84 /// <summary> 84 /// <summary>
85 /// The callback made when we request the asset for an object from the asset service. 85 /// The callback made when we request the asset for an object from the asset service.
86 /// </summary> 86 /// </summary>
87 public void AssetRequestCallback(LLUUID assetID, AssetBase asset) 87 public void AssetRequestCallback(UUID assetID, AssetBase asset)
88 { 88 {
89 lock (this) 89 lock (this)
90 { 90 {
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
100 /// </summary> 100 /// </summary>
101 /// <param name="uuid"></param> 101 /// <param name="uuid"></param>
102 /// <returns></returns> 102 /// <returns></returns>
103 protected AssetBase GetAsset(LLUUID uuid) 103 protected AssetBase GetAsset(UUID uuid)
104 { 104 {
105 m_waitingForObjectAsset = true; 105 m_waitingForObjectAsset = true;
106 m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true); 106 m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true);
@@ -128,20 +128,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
128 /// </summary> 128 /// </summary>
129 /// <param name="scriptUuid"></param> 129 /// <param name="scriptUuid"></param>
130 /// <param name="assetUuids">Dictionary in which to record the references</param> 130 /// <param name="assetUuids">Dictionary in which to record the references</param>
131 protected void GetScriptAssetUuids(LLUUID scriptUuid, IDictionary<LLUUID, int> assetUuids) 131 protected void GetScriptAssetUuids(UUID scriptUuid, IDictionary<UUID, int> assetUuids)
132 { 132 {
133 AssetBase scriptAsset = GetAsset(scriptUuid); 133 AssetBase scriptAsset = GetAsset(scriptUuid);
134 134
135 if (null != scriptAsset) 135 if (null != scriptAsset)
136 { 136 {
137 string script = Helpers.FieldToUTF8String(scriptAsset.Data); 137 string script = Utils.BytesToString(scriptAsset.Data);
138 //m_log.DebugFormat("[ARCHIVER]: Script {0}", script); 138 //m_log.DebugFormat("[ARCHIVER]: Script {0}", script);
139 MatchCollection uuidMatches = m_uuidRegex.Matches(script); 139 MatchCollection uuidMatches = m_uuidRegex.Matches(script);
140 //m_log.DebugFormat("[ARCHIVER]: Found {0} matches in script", uuidMatches.Count); 140 //m_log.DebugFormat("[ARCHIVER]: Found {0} matches in script", uuidMatches.Count);
141 141
142 foreach (Match uuidMatch in uuidMatches) 142 foreach (Match uuidMatch in uuidMatches)
143 { 143 {
144 LLUUID uuid = new LLUUID(uuidMatch.Value); 144 UUID uuid = new UUID(uuidMatch.Value);
145 //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid); 145 //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid);
146 assetUuids[uuid] = 1; 146 assetUuids[uuid] = 1;
147 } 147 }
@@ -153,17 +153,17 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
153 /// </summary> 153 /// </summary>
154 /// <param name="wearableAssetUuid"></param> 154 /// <param name="wearableAssetUuid"></param>
155 /// <param name="assetUuids">Dictionary in which to record the references</param> 155 /// <param name="assetUuids">Dictionary in which to record the references</param>
156 protected void GetWearableAssetUuids(LLUUID wearableAssetUuid, IDictionary<LLUUID, int> assetUuids) 156 protected void GetWearableAssetUuids(UUID wearableAssetUuid, IDictionary<UUID, int> assetUuids)
157 { 157 {
158 AssetBase assetBase = GetAsset(wearableAssetUuid); 158 AssetBase assetBase = GetAsset(wearableAssetUuid);
159 //m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data)); 159 //m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data));
160 AssetWearable wearableAsset = new AssetBodypart(assetBase.Data); 160 AssetWearable wearableAsset = new AssetBodypart(wearableAssetUuid, assetBase.Data);
161 wearableAsset.Decode(); 161 wearableAsset.Decode();
162 162
163 //m_log.DebugFormat( 163 //m_log.DebugFormat(
164 // "[ARCHIVER]: Wearable asset {0} references {1} assets", wearableAssetUuid, wearableAsset.Textures.Count); 164 // "[ARCHIVER]: Wearable asset {0} references {1} assets", wearableAssetUuid, wearableAsset.Textures.Count);
165 165
166 foreach (LLUUID uuid in wearableAsset.Textures.Values) 166 foreach (UUID uuid in wearableAsset.Textures.Values)
167 { 167 {
168 //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid); 168 //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid);
169 assetUuids[uuid] = 1; 169 assetUuids[uuid] = 1;
@@ -176,14 +176,14 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
176 /// within this object). 176 /// within this object).
177 /// </summary> 177 /// </summary>
178 /// <param name="sceneObject"></param> 178 /// <param name="sceneObject"></param>
179 /// <param name="assetUuids"></param> 179 /// <param name="assetUuids"></param>
180 protected void GetSceneObjectAssetUuids(LLUUID sceneObjectUuid, IDictionary<LLUUID, int> assetUuids) 180 protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, int> assetUuids)
181 { 181 {
182 AssetBase objectAsset = GetAsset(sceneObjectUuid); 182 AssetBase objectAsset = GetAsset(sceneObjectUuid);
183 183
184 if (null != objectAsset) 184 if (null != objectAsset)
185 { 185 {
186 string xml = Helpers.FieldToUTF8String(objectAsset.Data); 186 string xml = Utils.BytesToString(objectAsset.Data);
187 SceneObjectGroup sog = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, xml); 187 SceneObjectGroup sog = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, xml);
188 GetSceneObjectAssetUuids(sog, assetUuids); 188 GetSceneObjectAssetUuids(sog, assetUuids);
189 } 189 }
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
196 /// </summary> 196 /// </summary>
197 /// <param name="sceneObject"></param> 197 /// <param name="sceneObject"></param>
198 /// <param name="assetUuids"></param> 198 /// <param name="assetUuids"></param>
199 protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<LLUUID, int> assetUuids) 199 protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, int> assetUuids)
200 { 200 {
201 m_log.DebugFormat( 201 m_log.DebugFormat(
202 "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); 202 "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID);
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
208 208
209 try 209 try
210 { 210 {
211 LLObject.TextureEntry textureEntry = part.Shape.Textures; 211 Primitive.TextureEntry textureEntry = part.Shape.Textures;
212 212
213 // Get the prim's default texture. This will be used for faces which don't have their own texture 213 // Get the prim's default texture. This will be used for faces which don't have their own texture
214 assetUuids[textureEntry.DefaultTexture.TextureID] = 1; 214 assetUuids[textureEntry.DefaultTexture.TextureID] = 1;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
216 // XXX: Not a great way to iterate through face textures, but there's no 216 // XXX: Not a great way to iterate through face textures, but there's no
217 // other method available to tell how many faces there actually are 217 // other method available to tell how many faces there actually are
218 //int i = 0; 218 //int i = 0;
219 foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures) 219 foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures)
220 { 220 {
221 if (texture != null) 221 if (texture != null)
222 { 222 {
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
262 262
263 public void ArchiveRegion() 263 public void ArchiveRegion()
264 { 264 {
265 Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>(); 265 Dictionary<UUID, int> assetUuids = new Dictionary<UUID, int>();
266 266
267 List<EntityBase> entities = m_scene.GetEntities(); 267 List<EntityBase> entities = m_scene.GetEntities();
268 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 268 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index 69f712c..df17ad2 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -31,7 +31,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nini.Config; 36using Nini.Config;
37 37
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
index 73212ff..b49b2a4 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
@@ -29,7 +29,7 @@ using System.Collections.Generic;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using System.Xml; 31using System.Xml;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35 35
@@ -45,9 +45,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
45 /// <summary> 45 /// <summary>
46 /// Archive assets 46 /// Archive assets
47 /// </summary> 47 /// </summary>
48 protected IDictionary<LLUUID, AssetBase> m_assets; 48 protected IDictionary<UUID, AssetBase> m_assets;
49 49
50 public AssetsArchiver(IDictionary<LLUUID, AssetBase> assets) 50 public AssetsArchiver(IDictionary<UUID, AssetBase> assets)
51 { 51 {
52 m_assets = assets; 52 m_assets = assets;
53 } 53 }
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
76 76
77 xtw.WriteStartElement("assets"); 77 xtw.WriteStartElement("assets");
78 78
79 foreach (LLUUID uuid in m_assets.Keys) 79 foreach (UUID uuid in m_assets.Keys)
80 { 80 {
81 AssetBase asset = m_assets[uuid]; 81 AssetBase asset = m_assets[uuid];
82 82
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
105 105
106 xtw.WriteEndDocument(); 106 xtw.WriteEndDocument();
107 107
108 archive.AddFile("assets.xml", sw.ToString()); 108 archive.AddFile("assets.Xml", sw.ToString());
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
117 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar 117 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
118 //archive.AddDir("assets"); 118 //archive.AddDir("assets");
119 119
120 foreach (LLUUID uuid in m_assets.Keys) 120 foreach (UUID uuid in m_assets.Keys)
121 { 121 {
122 AssetBase asset = m_assets[uuid]; 122 AssetBase asset = m_assets[uuid];
123 123
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
index 17abb24..b26fe4c 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
141 /// <param name="data"></param> 141 /// <param name="data"></param>
142 protected void ResolveAssetData(string assetPath, byte[] data) 142 protected void ResolveAssetData(string assetPath, byte[] data)
143 { 143 {
144 // Right now we're nastily obtaining the lluuid from the filename 144 // Right now we're nastily obtaining the UUID from the filename
145 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); 145 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
146 146
147 if (m_metadata.ContainsKey(filename)) 147 if (m_metadata.ContainsKey(filename))
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
156 156
157 m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); 157 m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename);
158 158
159 AssetBase asset = new AssetBase(new LLUUID(filename), metadata.Name); 159 AssetBase asset = new AssetBase(new UUID(filename), metadata.Name);
160 asset.Description = metadata.Description; 160 asset.Description = metadata.Description;
161 asset.Type = metadata.AssetType; 161 asset.Type = metadata.AssetType;
162 asset.Data = data; 162 asset.Data = data;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
index 2164f7e..41fbc16 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
@@ -32,7 +32,7 @@ using OpenSim.Region.Environment.Scenes;
32using System.Collections.Generic; 32using System.Collections.Generic;
33//using System.Reflection; 33//using System.Reflection;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36//using log4net; 36//using log4net;
37 37
38namespace OpenSim.Region.Environment.Modules.World.Archiver 38namespace OpenSim.Region.Environment.Modules.World.Archiver
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
47 /// <summary> 47 /// <summary>
48 /// uuids to request 48 /// uuids to request
49 /// </summary> 49 /// </summary>
50 protected ICollection<LLUUID> m_uuids; 50 protected ICollection<UUID> m_uuids;
51 51
52 /// <summary> 52 /// <summary>
53 /// Callback used when all the assets requested have been received. 53 /// Callback used when all the assets requested have been received.
@@ -57,12 +57,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
57 /// <summary> 57 /// <summary>
58 /// Assets retrieved in this request 58 /// Assets retrieved in this request
59 /// </summary> 59 /// </summary>
60 protected Dictionary<LLUUID, AssetBase> m_assets = new Dictionary<LLUUID, AssetBase>(); 60 protected Dictionary<UUID, AssetBase> m_assets = new Dictionary<UUID, AssetBase>();
61 61
62 /// <summary> 62 /// <summary>
63 /// Maintain a list of assets that could not be found. This will be passed back to the requester. 63 /// Maintain a list of assets that could not be found. This will be passed back to the requester.
64 /// </summary> 64 /// </summary>
65 protected List<LLUUID> m_notFoundAssetUuids = new List<LLUUID>(); 65 protected List<UUID> m_notFoundAssetUuids = new List<UUID>();
66 66
67 /// <summary> 67 /// <summary>
68 /// Record the number of asset replies required so we know when we've finished 68 /// Record the number of asset replies required so we know when we've finished
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
74 /// </summary> 74 /// </summary>
75 protected AssetCache m_assetCache; 75 protected AssetCache m_assetCache;
76 76
77 protected internal AssetsRequest(ICollection<LLUUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) 77 protected internal AssetsRequest(ICollection<UUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
78 { 78 {
79 m_uuids = uuids; 79 m_uuids = uuids;
80 m_assetsRequestCallback = assetsRequestCallback; 80 m_assetsRequestCallback = assetsRequestCallback;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
88 if (m_repliesRequired == 0) 88 if (m_repliesRequired == 0)
89 m_assetsRequestCallback(m_assets, m_notFoundAssetUuids); 89 m_assetsRequestCallback(m_assets, m_notFoundAssetUuids);
90 90
91 foreach (LLUUID uuid in m_uuids) 91 foreach (UUID uuid in m_uuids)
92 { 92 {
93 m_assetCache.GetAsset(uuid, AssetRequestCallback, true); 93 m_assetCache.GetAsset(uuid, AssetRequestCallback, true);
94 } 94 }
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
99 /// </summary> 99 /// </summary>
100 /// <param name="assetID"></param> 100 /// <param name="assetID"></param>
101 /// <param name="asset"></param> 101 /// <param name="asset"></param>
102 public void AssetRequestCallback(LLUUID assetID, AssetBase asset) 102 public void AssetRequestCallback(UUID assetID, AssetBase asset)
103 { 103 {
104 if (asset != null) 104 if (asset != null)
105 m_assets[assetID] = asset; 105 m_assets[assetID] = asset;
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 28347d0..976a634 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -28,7 +28,7 @@ using System;
28using System.Threading; 28using System.Threading;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -41,15 +41,15 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private delegate void LookupUUIDS(List<LLUUID> uuidLst); 44 private delegate void LookupUUIDS(List<UUID> uuidLst);
45 45
46 private Scene m_scene; 46 private Scene m_scene;
47 47
48 #region Packet Data Responders 48 #region Packet Data Responders
49 49
50 private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) 50 private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice)
51 { 51 {
52 //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) 52 //SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant)
53 53
54 uint sun = 0; 54 uint sun = 0;
55 if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) 55 if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
@@ -119,9 +119,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
119 sendRegionInfoPacketToAll(); 119 sendRegionInfoPacketToAll();
120 } 120 }
121 121
122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, LLUUID texture) 122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
123 { 123 {
124 if (texture == LLUUID.Zero) 124 if(texture == UUID.Zero)
125 return; 125 return;
126 126
127 switch (corner) 127 switch (corner)
@@ -202,13 +202,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
202 m_scene.Restart(timeInSeconds); 202 m_scene.Restart(timeInSeconds);
203 } 203 }
204 204
205 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, LLUUID estateCovenantID) 205 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
206 { 206 {
207 m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; 207 m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
208 m_scene.RegionInfo.RegionSettings.Save(); 208 m_scene.RegionInfo.RegionSettings.Save();
209 } 209 }
210 210
211 private void handleEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user) 211 private void handleEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user)
212 { 212 {
213 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. 213 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
214 214
@@ -338,17 +338,17 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
338 } 338 }
339 } 339 }
340 340
341 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) 341 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
342 { 342 {
343 m_scene.SendRegionMessageFromEstateTools(senderID, sessionID, senderName, message); 343 m_scene.SendRegionMessageFromEstateTools(senderID, sessionID, senderName, message);
344 } 344 }
345 345
346 private void SendEstateBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) 346 private void SendEstateBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
347 { 347 {
348 m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message); 348 m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message);
349 } 349 }
350 350
351 private void handleEstateDebugRegionRequest(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics) 351 private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics)
352 { 352 {
353 if (physics) 353 if (physics)
354 m_scene.RegionInfo.RegionSettings.DisablePhysics = true; 354 m_scene.RegionInfo.RegionSettings.DisablePhysics = true;
@@ -371,9 +371,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
371 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); 371 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
372 } 372 }
373 373
374 private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, LLUUID invoice, LLUUID senderID, LLUUID prey) 374 private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey)
375 { 375 {
376 if (prey != LLUUID.Zero) 376 if (prey != UUID.Zero)
377 { 377 {
378 ScenePresence s = m_scene.GetScenePresence(prey); 378 ScenePresence s = m_scene.GetScenePresence(prey);
379 if (s != null) 379 if (s != null)
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
419 private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) 419 private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient)
420 { 420 {
421 Dictionary<uint, float> SceneData = new Dictionary<uint,float>(); 421 Dictionary<uint, float> SceneData = new Dictionary<uint,float>();
422 List<LLUUID> uuidNameLookupList = new List<LLUUID>(); 422 List<UUID> uuidNameLookupList = new List<UUID>();
423 423
424 if (reportType == 1) 424 if (reportType == 1)
425 { 425 {
@@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
491 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; 491 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState;
492 icon.EndInvoke(iar); 492 icon.EndInvoke(iar);
493 } 493 }
494 private void LookupUUID(List<LLUUID> uuidLst) 494 private void LookupUUID(List<UUID> uuidLst)
495 { 495 {
496 LookupUUIDS d = LookupUUIDsAsync; 496 LookupUUIDS d = LookupUUIDsAsync;
497 497
@@ -499,9 +499,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
499 LookupUUIDSCompleted, 499 LookupUUIDSCompleted,
500 d); 500 d);
501 } 501 }
502 private void LookupUUIDsAsync(List<LLUUID> uuidLst) 502 private void LookupUUIDsAsync(List<UUID> uuidLst)
503 { 503 {
504 LLUUID[] uuidarr = new LLUUID[0]; 504 UUID[] uuidarr = new UUID[0];
505 505
506 lock (uuidLst) 506 lock (uuidLst)
507 { 507 {
@@ -533,7 +533,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
533 { 533 {
534 RegionHandshakeArgs args = new RegionHandshakeArgs(); 534 RegionHandshakeArgs args = new RegionHandshakeArgs();
535 bool estatemanager = false; 535 bool estatemanager = false;
536 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers; 536 UUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers;
537 for (int i = 0; i < EstateManagers.Length; i++) 537 for (int i = 0; i < EstateManagers.Length; i++)
538 { 538 {
539 if (EstateManagers[i] == remoteClient.AgentId) 539 if (EstateManagers[i] == remoteClient.AgentId)
@@ -559,14 +559,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
559 559
560 args.regionFlags = GetRegionFlags(); 560 args.regionFlags = GetRegionFlags();
561 args.regionName = m_scene.RegionInfo.RegionName; 561 args.regionName = m_scene.RegionInfo.RegionName;
562 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 562 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
563 args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; 563 args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
564 else 564 else
565 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; 565 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
566 args.terrainBase0 = LLUUID.Zero; 566 args.terrainBase0 = UUID.Zero;
567 args.terrainBase1 = LLUUID.Zero; 567 args.terrainBase1 = UUID.Zero;
568 args.terrainBase2 = LLUUID.Zero; 568 args.terrainBase2 = UUID.Zero;
569 args.terrainBase3 = LLUUID.Zero; 569 args.terrainBase3 = UUID.Zero;
570 args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1; 570 args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
571 args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2; 571 args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
572 args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3; 572 args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
582 ); 582 );
583 } 583 }
584 584
585 public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) 585 public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
586 { 586 {
587 if (parms2 == 0) 587 if (parms2 == 0)
588 { 588 {
@@ -812,14 +812,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
812 return (uint)flags; 812 return (uint)flags;
813 } 813 }
814 814
815 public bool IsManager(LLUUID avatarID) 815 public bool IsManager(UUID avatarID)
816 { 816 {
817 if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) 817 if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID)
818 return true; 818 return true;
819 if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) 819 if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
820 return true; 820 return true;
821 821
822 List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); 822 List<UUID> ems = new List<UUID>(m_scene.RegionInfo.EstateSettings.EstateManagers);
823 if (ems.Contains(avatarID)) 823 if (ems.Contains(avatarID))
824 return true; 824 return true;
825 825
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index d519d4d..1e1291a 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
88 { 88 {
89 return m_landManagementModule.GetLandObject(x_float, y_float); 89 return m_landManagementModule.GetLandObject(x_float, y_float);
90 } 90 }
91 ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); 91 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
92 obj.landData.Name = "NO LAND"; 92 obj.landData.Name = "NO LAND";
93 return obj; 93 return obj;
94 } 94 }
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land
100 { 100 {
101 return m_landManagementModule.GetLandObject(x, y); 101 return m_landManagementModule.GetLandObject(x, y);
102 } 102 }
103 ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); 103 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
104 obj.landData.Name = "NO LAND"; 104 obj.landData.Name = "NO LAND";
105 return obj; 105 return obj;
106 } 106 }
107 107
108 public List<ILandObject> ParcelsNearPoint(LLVector3 position) 108 public List<ILandObject> ParcelsNearPoint(Vector3 position)
109 { 109 {
110 if (m_landManagementModule != null) 110 if (m_landManagementModule != null)
111 { 111 {
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
142 m_landManagementModule.UpdateLandObject(localID, data); 142 m_landManagementModule.UpdateLandObject(localID, data);
143 } 143 }
144 } 144 }
145 public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) 145 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
146 { 146 {
147 if (m_landManagementModule != null) 147 if (m_landManagementModule != null)
148 { 148 {
@@ -168,4 +168,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land
168 #endregion 168 #endregion
169 169
170 } 170 }
171} \ No newline at end of file 171}
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 00994fb..e5bdafc 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
@@ -38,7 +38,6 @@ using OpenSim.Framework;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Communications.Capabilities; 39using OpenSim.Framework.Communications.Capabilities;
40using OpenSim.Region.Physics.Manager; 40using OpenSim.Region.Physics.Manager;
41using Axiom.Math;
42using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 41using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
43 42
44namespace OpenSim.Region.Environment.Modules.World.Land 43namespace OpenSim.Region.Environment.Modules.World.Land
@@ -165,10 +164,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
165 lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; 164 lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
166 landIDList.Initialize(); 165 landIDList.Initialize();
167 166
168 ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); 167 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
169 168
170 fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 169 fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
171 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 170 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
172 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 171 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
173 else 172 else
174 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 173 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -176,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
176 AddLandObject(fullSimParcel); 175 AddLandObject(fullSimParcel);
177 } 176 }
178 177
179 public List<ILandObject> ParcelsNearPoint(LLVector3 position) 178 public List<ILandObject> ParcelsNearPoint(Vector3 position)
180 { 179 {
181 List<ILandObject> parcelsNear = new List<ILandObject>(); 180 List<ILandObject> parcelsNear = new List<ILandObject>();
182 for (int x = -4; x <= 4; x += 4) 181 for (int x = -4; x <= 4; x += 4)
@@ -205,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
205 "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers"); 204 "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers");
206 205
207 avatar.PhysicsActor.Position = 206 avatar.PhysicsActor.Position =
208 new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y, 207 new PhysicsVector(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y,
209 avatar.lastKnownAllowedPosition.z); 208 avatar.lastKnownAllowedPosition.Z);
210 avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0); 209 avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0);
211 } 210 }
212 else 211 else
@@ -216,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
216 } 215 }
217 } 216 }
218 217
219 public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 218 public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID)
220 { 219 {
221 if (m_scene.RegionInfo.RegionID == regionID) 220 if (m_scene.RegionInfo.RegionID == regionID)
222 { 221 {
@@ -353,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
353 } 352 }
354 353
355 354
356 public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, 355 public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
357 int landLocalID, IClientAPI remote_client) 356 int landLocalID, IClientAPI remote_client)
358 { 357 {
359 if (landList.ContainsKey(landLocalID)) 358 if (landList.ContainsKey(landLocalID))
@@ -362,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
362 } 361 }
363 } 362 }
364 363
365 public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, 364 public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
366 List<ParcelManager.ParcelAccessEntry> entries, 365 List<ParcelManager.ParcelAccessEntry> entries,
367 IClientAPI remote_client) 366 IClientAPI remote_client)
368 { 367 {
@@ -385,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
385 /// <returns></returns> 384 /// <returns></returns>
386 public ILandObject CreateBaseLand() 385 public ILandObject CreateBaseLand()
387 { 386 {
388 return new LandObject(LLUUID.Zero, false, m_scene); 387 return new LandObject(UUID.Zero, false, m_scene);
389 } 388 }
390 389
391 /// <summary> 390 /// <summary>
@@ -529,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
529 528
530 public void AddPrimToLandPrimCounts(SceneObjectGroup obj) 529 public void AddPrimToLandPrimCounts(SceneObjectGroup obj)
531 { 530 {
532 LLVector3 position = obj.AbsolutePosition; 531 Vector3 position = obj.AbsolutePosition;
533 ILandObject landUnderPrim = GetLandObject(position.X, position.Y); 532 ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
534 if (landUnderPrim != null) 533 if (landUnderPrim != null)
535 { 534 {
@@ -548,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
548 public void FinalizeLandPrimCountUpdate() 547 public void FinalizeLandPrimCountUpdate()
549 { 548 {
550 //Get Simwide prim count for owner 549 //Get Simwide prim count for owner
551 Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>(); 550 Dictionary<UUID, List<LandObject>> landOwnersAndParcels = new Dictionary<UUID, List<LandObject>>();
552 foreach (LandObject p in landList.Values) 551 foreach (LandObject p in landList.Values)
553 { 552 {
554 if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) 553 if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID))
@@ -563,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
563 } 562 }
564 } 563 }
565 564
566 foreach (LLUUID owner in landOwnersAndParcels.Keys) 565 foreach (UUID owner in landOwnersAndParcels.Keys)
567 { 566 {
568 int simArea = 0; 567 int simArea = 0;
569 int simPrims = 0; 568 int simPrims = 0;
@@ -617,9 +616,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
617 /// <param name="start_y">South Point</param> 616 /// <param name="start_y">South Point</param>
618 /// <param name="end_x">East Point</param> 617 /// <param name="end_x">East Point</param>
619 /// <param name="end_y">North Point</param> 618 /// <param name="end_y">North Point</param>
620 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param> 619 /// <param name="attempting_user_id">UUID of user who is trying to subdivide</param>
621 /// <returns>Returns true if successful</returns> 620 /// <returns>Returns true if successful</returns>
622 private void subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 621 private void subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
623 { 622 {
624 //First, lets loop through the points and make sure they are all in the same peice of land 623 //First, lets loop through the points and make sure they are all in the same peice of land
625 //Get the land object at start 624 //Get the land object at start
@@ -658,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
658 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) 657 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
659 ILandObject newLand = startLandObject.Copy(); 658 ILandObject newLand = startLandObject.Copy();
660 newLand.landData.Name = "Subdivision of " + newLand.landData.Name; 659 newLand.landData.Name = "Subdivision of " + newLand.landData.Name;
661 newLand.landData.GlobalID = LLUUID.Random(); 660 newLand.landData.GlobalID = UUID.Random();
662 661
663 newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); 662 newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y));
664 663
@@ -683,9 +682,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
683 /// <param name="start_y">y value in first piece of land</param> 682 /// <param name="start_y">y value in first piece of land</param>
684 /// <param name="end_x">x value in second peice of land</param> 683 /// <param name="end_x">x value in second peice of land</param>
685 /// <param name="end_y">y value in second peice of land</param> 684 /// <param name="end_y">y value in second peice of land</param>
686 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the land objects</param> 685 /// <param name="attempting_user_id">UUID of the avatar trying to join the land objects</param>
687 /// <returns>Returns true if successful</returns> 686 /// <returns>Returns true if successful</returns>
688 private void join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 687 private void join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
689 { 688 {
690 end_x -= 4; 689 end_x -= 4;
691 end_y -= 4; 690 end_y -= 4;
@@ -770,13 +769,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
770 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); 769 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
771 } 770 }
772 else if (currentParcelBlock.landData.SalePrice > 0 && 771 else if (currentParcelBlock.landData.SalePrice > 0 &&
773 (currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero || 772 (currentParcelBlock.landData.AuthBuyerID == UUID.Zero ||
774 currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) 773 currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId))
775 { 774 {
776 //Sale Flag 775 //Sale Flag
777 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); 776 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
778 } 777 }
779 else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero) 778 else if (currentParcelBlock.landData.OwnerID == UUID.Zero)
780 { 779 {
781 //Public Flag 780 //Public Flag
782 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); 781 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@@ -914,7 +913,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
914 { 913 {
915 if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) 914 if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id]))
916 { 915 {
917 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 916 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
918 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 917 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
919 else 918 else
920 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 919 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -930,7 +929,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
930 { 929 {
931 if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) 930 if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
932 { 931 {
933 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 932 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
934 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 933 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
935 else 934 else
936 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 935 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -979,13 +978,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
979 } 978 }
980 if (lob != null) 979 if (lob != null)
981 { 980 {
982 LLUUID AuthorizedID = lob.landData.AuthBuyerID; 981 UUID AuthorizedID = lob.landData.AuthBuyerID;
983 int saleprice = lob.landData.SalePrice; 982 int saleprice = lob.landData.SalePrice;
984 LLUUID pOwnerID = lob.landData.OwnerID; 983 UUID pOwnerID = lob.landData.OwnerID;
985 984
986 bool landforsale = ((lob.landData.Flags & 985 bool landforsale = ((lob.landData.Flags &
987 (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); 986 (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0);
988 if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) 987 if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
989 { 988 {
990 lock (e) 989 lock (e)
991 { 990 {
@@ -1027,7 +1026,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1027 AddLandObject(new_land); 1026 AddLandObject(new_land);
1028 } 1027 }
1029 1028
1030 public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) 1029 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
1031 { 1030 {
1032 ILandObject selectedParcel = null; 1031 ILandObject selectedParcel = null;
1033 lock (landList) 1032 lock (landList)
@@ -1065,7 +1064,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1065 1064
1066 #region CAPS handler 1065 #region CAPS handler
1067 1066
1068 private void OnRegisterCaps(LLUUID agentID, Caps caps) 1067 private void OnRegisterCaps(UUID agentID, Caps caps)
1069 { 1068 {
1070 string capsBase = "/CAPS/" + caps.CapsObjectPath; 1069 string capsBase = "/CAPS/" + caps.CapsObjectPath;
1071 caps.RegisterHandler("RemoteParcelRequest", 1070 caps.RegisterHandler("RemoteParcelRequest",
@@ -1080,7 +1079,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1080 // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the 1079 // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the
1081 // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. 1080 // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to.
1082 // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x 1081 // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x
1083 // and y coordinate (each 8 bit), encoded in a LLUUID (128 bit). 1082 // and y coordinate (each 8 bit), encoded in a UUID (128 bit).
1084 // 1083 //
1085 // Request format: 1084 // Request format:
1086 // <llsd> 1085 // <llsd>
@@ -1095,16 +1094,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1095 // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> 1094 // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
1096 // </map> 1095 // </map>
1097 // </llsd> 1096 // </llsd>
1098 private string RemoteParcelRequest(string request, string path, string param, LLUUID agentID, Caps caps) 1097 private string RemoteParcelRequest(string request, string path, string param, UUID agentID, Caps caps)
1099 { 1098 {
1100 LLUUID parcelID = LLUUID.Zero; 1099 UUID parcelID = UUID.Zero;
1101 try 1100 try
1102 { 1101 {
1103 Hashtable hash = new Hashtable(); 1102 Hashtable hash = new Hashtable();
1104 hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); 1103 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
1105 if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) 1104 if (hash.ContainsKey("region_id") && hash.ContainsKey("location"))
1106 { 1105 {
1107 LLUUID regionID = (LLUUID)hash["region_id"]; 1106 UUID regionID = (UUID)hash["region_id"];
1108 ArrayList list = (ArrayList)hash["location"]; 1107 ArrayList list = (ArrayList)hash["location"];
1109 uint x = (uint)(double)list[0]; 1108 uint x = (uint)(double)list[0];
1110 uint y = (uint)(double)list[1]; 1109 uint y = (uint)(double)list[1];
@@ -1148,9 +1147,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1148 1147
1149 #endregion 1148 #endregion
1150 1149
1151 private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) 1150 private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID)
1152 { 1151 {
1153 if (parcelID == LLUUID.Zero) 1152 if (parcelID == UUID.Zero)
1154 return; 1153 return;
1155 1154
1156 // assume we've got the parcelID we just computed in RemoteParcelRequest 1155 // assume we've got the parcelID we just computed in RemoteParcelRequest
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 6388a1c..640b665 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
67 set { m_landData = value; } 67 set { m_landData = value; }
68 } 68 }
69 69
70 public LLUUID regionUUID 70 public UUID regionUUID
71 { 71 {
72 get { return m_scene.RegionInfo.RegionID; } 72 get { return m_scene.RegionInfo.RegionID; }
73 } 73 }
74 74
75 #region Constructors 75 #region Constructors
76 76
77 public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) 77 public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
78 { 78 {
79 m_scene = scene; 79 m_scene = scene;
80 landData.OwnerID = owner_id; 80 landData.OwnerID = owner_id;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
216 } 216 }
217 } 217 }
218 218
219 public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) 219 public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
220 { 220 {
221 LandData newData = landData.Copy(); 221 LandData newData = landData.Copy();
222 newData.OwnerID = avatarID; 222 newData.OwnerID = avatarID;
@@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
226 newData.ClaimDate = Util.UnixTimeSinceEpoch(); 226 newData.ClaimDate = Util.UnixTimeSinceEpoch();
227 newData.ClaimPrice = claimprice; 227 newData.ClaimPrice = claimprice;
228 newData.SalePrice = 0; 228 newData.SalePrice = 0;
229 newData.AuthBuyerID = LLUUID.Zero; 229 newData.AuthBuyerID = UUID.Zero;
230 newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); 230 newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
231 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 231 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
232 232
233 sendLandUpdateToAvatarsOverMe(); 233 sendLandUpdateToAvatarsOverMe();
234 } 234 }
235 235
236 public bool isEitherBannedOrRestricted(LLUUID avatar) 236 public bool isEitherBannedOrRestricted(UUID avatar)
237 { 237 {
238 if (isBannedFromLand(avatar)) 238 if (isBannedFromLand(avatar))
239 { 239 {
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
246 return false; 246 return false;
247 } 247 }
248 248
249 public bool isBannedFromLand(LLUUID avatar) 249 public bool isBannedFromLand(UUID avatar)
250 { 250 {
251 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) 251 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
252 { 252 {
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
263 return false; 263 return false;
264 } 264 }
265 265
266 public bool isRestrictedFromLand(LLUUID avatar) 266 public bool isRestrictedFromLand(UUID avatar)
267 { 267 {
268 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) 268 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
269 { 269 {
@@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
322 322
323 #region AccessList Functions 323 #region AccessList Functions
324 324
325 public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) 325 public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
326 { 326 {
327 List<LLUUID> list = new List<LLUUID>(); 327 List<UUID> list = new List<UUID>();
328 foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) 328 foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
329 { 329 {
330 if (entry.Flags == flag) 330 if (entry.Flags == flag)
@@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land
334 } 334 }
335 if (list.Count == 0) 335 if (list.Count == 0)
336 { 336 {
337 list.Add(LLUUID.Zero); 337 list.Add(UUID.Zero);
338 } 338 }
339 339
340 return list; 340 return list;
341 } 341 }
342 342
343 public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, 343 public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID,
344 IClientAPI remote_client) 344 IClientAPI remote_client)
345 { 345 {
346 346
347 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) 347 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
348 { 348 {
349 List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); 349 List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
350 remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); 350 remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID);
351 } 351 }
352 352
353 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) 353 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
354 { 354 {
355 List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); 355 List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
356 remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); 356 remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID);
357 } 357 }
358 } 358 }
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
361 { 361 {
362 LandData newData = landData.Copy(); 362 LandData newData = landData.Copy();
363 363
364 if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero) 364 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
365 { 365 {
366 entries.Clear(); 366 entries.Clear();
367 } 367 }
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
450 if (ty > 255) 450 if (ty > 255)
451 ty = 255; 451 ty = 255;
452 landData.AABBMin = 452 landData.AABBMin =
453 new LLVector3((float) (min_x * 4), (float) (min_y * 4), 453 new Vector3((float) (min_x * 4), (float) (min_y * 4),
454 (float) m_scene.Heightmap[tx, ty]); 454 (float) m_scene.Heightmap[tx, ty]);
455 455
456 tx = max_x * 4; 456 tx = max_x * 4;
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
460 if (ty > 255) 460 if (ty > 255)
461 ty = 255; 461 ty = 255;
462 landData.AABBMax = 462 landData.AABBMax =
463 new LLVector3((float) (max_x * 4), (float) (max_y * 4), 463 new Vector3((float) (max_x * 4), (float) (max_y * 4),
464 (float) m_scene.Heightmap[tx, ty]); 464 (float) m_scene.Heightmap[tx, ty]);
465 landData.Area = tempArea; 465 landData.Area = tempArea;
466 } 466 }
@@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
694 { 694 {
695 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) 695 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
696 { 696 {
697 Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>(); 697 Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
698 698
699 lock (primsOverMe) 699 lock (primsOverMe)
700 { 700 {
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
734 } 734 }
735 } 735 }
736 736
737 public Dictionary<LLUUID, int> getLandObjectOwners() 737 public Dictionary<UUID, int> getLandObjectOwners()
738 { 738 {
739 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); 739 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
740 lock (primsOverMe) 740 lock (primsOverMe)
741 { 741 {
742 try 742 try
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
771 m_scene.returnObjects(objs, obj.OwnerID); 771 m_scene.returnObjects(objs, obj.OwnerID);
772 } 772 }
773 773
774 public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client) 774 public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client)
775 { 775 {
776 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); 776 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
777 for (int i = 0; i < owners.Length; i++) 777 for (int i = 0; i < owners.Length; i++)
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
814 public void addPrimToCount(SceneObjectGroup obj) 814 public void addPrimToCount(SceneObjectGroup obj)
815 { 815 {
816 816
817 LLUUID prim_owner = obj.OwnerID; 817 UUID prim_owner = obj.OwnerID;
818 int prim_count = obj.PrimCount; 818 int prim_count = obj.PrimCount;
819 819
820 if (obj.IsSelected) 820 if (obj.IsSelected)
@@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
843 { 843 {
844 if (primsOverMe.Contains(obj)) 844 if (primsOverMe.Contains(obj))
845 { 845 {
846 LLUUID prim_owner = obj.OwnerID; 846 UUID prim_owner = obj.OwnerID;
847 int prim_count = obj.PrimCount; 847 int prim_count = obj.PrimCount;
848 848
849 if (prim_owner == landData.OwnerID) 849 if (prim_owner == landData.OwnerID)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index c1f5566..541ca18 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35 35
@@ -39,12 +39,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
39 { 39 {
40 private readonly string m_firstname; 40 private readonly string m_firstname;
41 private readonly string m_lastname; 41 private readonly string m_lastname;
42 private readonly LLVector3 m_startPos; 42 private readonly Vector3 m_startPos;
43 private readonly LLUUID m_uuid = LLUUID.Random(); 43 private readonly UUID m_uuid = UUID.Random();
44 private readonly Scene m_scene; 44 private readonly Scene m_scene;
45 45
46 46
47 public NPCAvatar(string firstname, string lastname, LLVector3 position, Scene scene) 47 public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene)
48 { 48 {
49 m_firstname = firstname; 49 m_firstname = firstname;
50 m_lastname = lastname; 50 m_lastname = lastname;
@@ -77,34 +77,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
77 SendOnChatFromViewer(message, ChatTypeEnum.Broadcast); 77 SendOnChatFromViewer(message, ChatTypeEnum.Broadcast);
78 } 78 }
79 79
80 public void GiveMoney(LLUUID target, int amount) 80 public void GiveMoney(UUID target, int amount)
81 { 81 {
82 OnMoneyTransferRequest(m_uuid, target, amount, 1, "Payment"); 82 OnMoneyTransferRequest(m_uuid, target, amount, 1, "Payment");
83 } 83 }
84 84
85 public void InstantMessage(LLUUID target, string message) 85 public void InstantMessage(UUID target, string message)
86 { 86 {
87 OnInstantMessage(this, m_uuid, SessionId, target, LLUUID.Combine(m_uuid, target), 87 OnInstantMessage(this, m_uuid, SessionId, target, UUID.Combine(m_uuid, target),
88 (uint) Util.UnixTimeSinceEpoch(), Name, message, 0, false, 0, 0, 88 (uint) Util.UnixTimeSinceEpoch(), Name, message, 0, false, 0, 0,
89 Position, m_scene.RegionInfo.RegionID, new byte[0]); 89 Position, m_scene.RegionInfo.RegionID, new byte[0]);
90 } 90 }
91 91
92 public void SendAgentOffline(LLUUID[] agentIDs) 92 public void SendAgentOffline(UUID[] agentIDs)
93 { 93 {
94 94
95 } 95 }
96 96
97 public void SendAgentOnline(LLUUID[] agentIDs) 97 public void SendAgentOnline(UUID[] agentIDs)
98 { 98 {
99 99
100 } 100 }
101 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 101 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
102 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) 102 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
103 { 103 {
104 104
105 } 105 }
106 106
107 public void SendAdminResponse(LLUUID Token, uint AdminLevel) 107 public void SendAdminResponse(UUID Token, uint AdminLevel)
108 { 108 {
109 109
110 } 110 }
@@ -114,12 +114,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
114 114
115 } 115 }
116 116
117 public LLUUID GetDefaultAnimation(string name) 117 public UUID GetDefaultAnimation(string name)
118 { 118 {
119 return LLUUID.Zero; 119 return UUID.Zero;
120 } 120 }
121 121
122 public LLVector3 Position 122 public Vector3 Position
123 { 123 {
124 get { return m_scene.Entities[m_uuid].AbsolutePosition; } 124 get { return m_scene.Entities[m_uuid].AbsolutePosition; }
125 set { m_scene.Entities[m_uuid].AbsolutePosition = value; } 125 set { m_scene.Entities[m_uuid].AbsolutePosition = value; }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
222 public event UpdateVector OnUpdatePrimGroupScale; 222 public event UpdateVector OnUpdatePrimGroupScale;
223 public event StatusChange OnChildAgentStatus; 223 public event StatusChange OnChildAgentStatus;
224 public event GenericCall2 OnStopMovement; 224 public event GenericCall2 OnStopMovement;
225 public event Action<LLUUID> OnRemoveAvatar; 225 public event Action<UUID> OnRemoveAvatar;
226 226
227 public event CreateNewInventoryItem OnCreateNewInventoryItem; 227 public event CreateNewInventoryItem OnCreateNewInventoryItem;
228 public event CreateInventoryFolder OnCreateNewInventoryFolder; 228 public event CreateInventoryFolder OnCreateNewInventoryFolder;
@@ -322,34 +322,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
322 322
323 #endregion 323 #endregion
324 324
325 public void ActivateGesture(LLUUID assetId, LLUUID gestureId) 325 public void ActivateGesture(UUID assetId, UUID gestureId)
326 { 326 {
327 } 327 }
328 public void DeactivateGesture(LLUUID assetId, LLUUID gestureId) 328 public void DeactivateGesture(UUID assetId, UUID gestureId)
329 { 329 {
330 } 330 }
331 331
332 #region Overrriden Methods IGNORE 332 #region Overrriden Methods IGNORE
333 333
334 public virtual LLVector3 StartPos 334 public virtual Vector3 StartPos
335 { 335 {
336 get { return m_startPos; } 336 get { return m_startPos; }
337 set { } 337 set { }
338 } 338 }
339 339
340 public virtual LLUUID AgentId 340 public virtual UUID AgentId
341 { 341 {
342 get { return m_uuid; } 342 get { return m_uuid; }
343 } 343 }
344 344
345 public LLUUID SessionId 345 public UUID SessionId
346 { 346 {
347 get { return LLUUID.Zero; } 347 get { return UUID.Zero; }
348 } 348 }
349 349
350 public LLUUID SecureSessionId 350 public UUID SecureSessionId
351 { 351 {
352 get { return LLUUID.Zero; } 352 get { return UUID.Zero; }
353 } 353 }
354 354
355 public virtual string FirstName 355 public virtual string FirstName
@@ -373,9 +373,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
373 set { } 373 set { }
374 } 374 }
375 375
376 public LLUUID ActiveGroupId 376 public UUID ActiveGroupId
377 { 377 {
378 get { return LLUUID.Zero; } 378 get { return UUID.Zero; }
379 } 379 }
380 380
381 public string ActiveGroupName 381 public string ActiveGroupName
@@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
388 get { return 0; } 388 get { return 0; }
389 } 389 }
390 390
391 public ulong GetGroupPowers(LLUUID groupID) 391 public ulong GetGroupPowers(UUID groupID)
392 { 392 {
393 return 0; 393 return 0;
394 } 394 }
395 395
396 public virtual int NextAnimationSequenceNumber 396 public virtual int NextAnimationSequenceNumber
397 { 397 {
@@ -406,7 +406,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
406 { 406 {
407 } 407 }
408 408
409 public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) 409 public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
410 { 410 {
411 } 411 }
412 412
@@ -422,12 +422,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
422 { 422 {
423 } 423 }
424 424
425 public virtual void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 425 public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
426 { 426 {
427 427
428 } 428 }
429 429
430 public virtual void SendKillObject(ulong regionHandle, uint localID) 430 public virtual void SendKiPrimitive(ulong regionHandle, uint localID)
431 { 431 {
432 } 432 }
433 433
@@ -440,27 +440,27 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
440 } 440 }
441 441
442 442
443 public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) 443 public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
444 { 444 {
445 } 445 }
446 446
447 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, 447 public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
448 LLUUID fromAgentID, byte source, byte audible) 448 UUID fromAgentID, byte source, byte audible)
449 { 449 {
450 } 450 }
451 451
452 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, 452 public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
453 LLUUID fromAgentID, byte source, byte audible) 453 UUID fromAgentID, byte source, byte audible)
454 { 454 {
455 } 455 }
456 456
457 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 457 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
458 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 458 UUID imSessionID, string fromName, byte dialog, uint timeStamp)
459 { 459 {
460 } 460 }
461 461
462 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 462 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
463 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 463 UUID imSessionID, string fromName, byte dialog, uint timeStamp,
464 byte[] binaryBucket) 464 byte[] binaryBucket)
465 { 465 {
466 } 466 }
@@ -476,7 +476,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
476 { 476 {
477 } 477 }
478 478
479 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 479 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
480 { 480 {
481 } 481 }
482 482
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
489 return new AgentCircuitData(); 489 return new AgentCircuitData();
490 } 490 }
491 491
492 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, 492 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
493 IPEndPoint newRegionExternalEndPoint, string capsURL) 493 IPEndPoint newRegionExternalEndPoint, string capsURL)
494 { 494 {
495 } 495 }
@@ -498,7 +498,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
498 { 498 {
499 } 499 }
500 500
501 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) 501 public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
502 { 502 {
503 } 503 }
504 504
@@ -515,66 +515,66 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
515 { 515 {
516 } 516 }
517 517
518 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) 518 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
519 { 519 {
520 } 520 }
521 521
522 public virtual void SendPayPrice(LLUUID objectID, int[] payPrice) 522 public virtual void SendPayPrice(UUID objectID, int[] payPrice)
523 { 523 {
524 } 524 }
525 525
526 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, 526 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
527 uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) 527 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
528 { 528 {
529 } 529 }
530 530
531 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 531 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
532 LLVector3 position, LLVector3 velocity, LLQuaternion rotation) 532 Vector3 position, Vector3 velocity, Quaternion rotation)
533 { 533 {
534 } 534 }
535 535
536 public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) 536 public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
537 { 537 {
538 } 538 }
539 539
540 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 540 public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
541 { 541 {
542 } 542 }
543 543
544 public virtual void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) 544 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
545 { 545 {
546 } 546 }
547 547
548 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 548 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
549 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 549 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
550 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 550 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
551 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 551 UUID objectID, UUID ownerID, string text, byte[] color,
552 uint parentID, 552 uint parentID,
553 byte[] particleSystem, byte clickAction) 553 byte[] particleSystem, byte clickAction)
554 { 554 {
555 } 555 }
556 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 556 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
557 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 557 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
558 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 558 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
559 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 559 UUID objectID, UUID ownerID, string text, byte[] color,
560 uint parentID, 560 uint parentID,
561 byte[] particleSystem, byte clickAction, byte[] textureanimation, 561 byte[] particleSystem, byte clickAction, byte[] textureanimation,
562 bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) 562 bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
563 { 563 {
564 } 564 }
565 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 565 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
566 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 566 Vector3 position, Quaternion rotation, Vector3 velocity,
567 LLVector3 rotationalvelocity, byte state, LLUUID AssetId) 567 Vector3 rotationalvelocity, byte state, UUID AssetId)
568 { 568 {
569 } 569 }
570 570
571 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 571 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
572 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 572 Vector3 position, Quaternion rotation, Vector3 velocity,
573 LLVector3 rotationalvelocity) 573 Vector3 rotationalvelocity)
574 { 574 {
575 } 575 }
576 576
577 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, 577 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
578 List<InventoryItemBase> items, 578 List<InventoryItemBase> items,
579 List<InventoryFolderBase> folders, 579 List<InventoryFolderBase> folders,
580 bool fetchFolders, 580 bool fetchFolders,
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
582 { 582 {
583 } 583 }
584 584
585 public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) 585 public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
586 { 586 {
587 } 587 }
588 588
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
590 { 590 {
591 } 591 }
592 592
593 public virtual void SendRemoveInventoryItem(LLUUID itemID) 593 public virtual void SendRemoveInventoryItem(UUID itemID)
594 { 594 {
595 } 595 }
596 596
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
603 { 603 {
604 } 604 }
605 605
606 public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) 606 public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
607 { 607 {
608 } 608 }
609 609
@@ -618,24 +618,24 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
618 { 618 {
619 619
620 } 620 }
621 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) 621 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
622 { 622 {
623 } 623 }
624 624
625 public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) 625 public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
626 { 626 {
627 } 627 }
628 628
629 public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, 629 public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
630 byte flags) 630 byte flags)
631 { 631 {
632 } 632 }
633 633
634 public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) 634 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
635 { 635 {
636 } 636 }
637 637
638 public void SendAttachedSoundGainChange(LLUUID objectID, float gain) 638 public void SendAttachedSoundGainChange(UUID objectID, float gain)
639 { 639 {
640 640
641 } 641 }
@@ -652,7 +652,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
652 { 652 {
653 } 653 }
654 654
655 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, 655 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
656 string url) 656 string url)
657 { 657 {
658 } 658 }
@@ -669,7 +669,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
669 OnCompleteMovementToRegion(); 669 OnCompleteMovementToRegion();
670 } 670 }
671 } 671 }
672 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) 672 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
673 { 673 {
674 } 674 }
675 675
@@ -677,11 +677,11 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
677 { 677 {
678 } 678 }
679 679
680 public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) 680 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
681 { 681 {
682 } 682 }
683 683
684 public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 684 public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
685 { 685 {
686 } 686 }
687 687
@@ -693,16 +693,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
693 { 693 {
694 } 694 }
695 695
696 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 696 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
697 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 697 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
698 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, 698 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
699 LLUUID LastOwnerID, string ObjectName, string Description) 699 UUID LastOwnerID, string ObjectName, string Description)
700 { 700 {
701 } 701 }
702 702
703 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 703 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
704 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 704 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
705 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 705 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
706 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 706 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
707 uint BaseMask, byte saleType, int salePrice) 707 uint BaseMask, byte saleType, int salePrice)
708 { 708 {
@@ -713,7 +713,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
713 return false; 713 return false;
714 } 714 }
715 715
716 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong time, uint dlen, uint ylen, float phase) 716 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
717 { 717 {
718 } 718 }
719 719
@@ -721,9 +721,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
721 { 721 {
722 } 722 }
723 723
724 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 724 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
725 string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, 725 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
726 LLUUID partnerID) 726 UUID partnerID)
727 { 727 {
728 } 728 }
729 729
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
762 get { return m_circuitCode; } 762 get { return m_circuitCode; }
763 set { m_circuitCode = value; } 763 set { m_circuitCode = value; }
764 } 764 }
765 public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 765 public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
766 { 766 {
767 767
768 } 768 }
@@ -783,52 +783,52 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
783 { 783 {
784 } 784 }
785 785
786 public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question) 786 public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
787 { 787 {
788 } 788 }
789 public void SendHealth(float health) 789 public void SendHealth(float health)
790 { 790 {
791 } 791 }
792 792
793 public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) 793 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
794 { 794 {
795 } 795 }
796 796
797 public void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID) 797 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
798 { 798 {
799 } 799 }
800 800
801 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 801 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
802 { 802 {
803 } 803 }
804 public void SendEstateCovenantInformation(LLUUID covenant) 804 public void SendEstateCovenantInformation(UUID covenant)
805 { 805 {
806 } 806 }
807 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) 807 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail)
808 { 808 {
809 } 809 }
810 810
811 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 811 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
812 { 812 {
813 } 813 }
814 public void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 814 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
815 { 815 {
816 } 816 }
817 public void SendForceClientSelectObjects(List<uint> objectIDs) 817 public void SendForceClientSelectObjects(List<uint> objectIDs)
818 { 818 {
819 } 819 }
820 public void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) 820 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
821 { 821 {
822 } 822 }
823 public void SendLandParcelOverlay(byte[] data, int sequence_id) 823 public void SendLandParcelOverlay(byte[] data, int sequence_id)
824 { 824 {
825 } 825 }
826 826
827 public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) 827 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
828 { 828 {
829 } 829 }
830 830
831 public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) 831 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
832 { 832 {
833 } 833 }
834 834
@@ -842,25 +842,25 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
842 { 842 {
843 } 843 }
844 844
845 public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, 845 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
846 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, 846 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
847 byte mediaLoop) 847 byte mediaLoop)
848 { 848 {
849 } 849 }
850 850
851 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) 851 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
852 { 852 {
853 } 853 }
854 854
855 public void SendClearFollowCamProperties (LLUUID objectID) 855 public void SendClearFollowCamProperties (UUID objectID)
856 { 856 {
857 } 857 }
858 858
859 public void SendRegionHandle (LLUUID regoinID, ulong handle) 859 public void SendRegionHandle (UUID regoinID, ulong handle)
860 { 860 {
861 } 861 }
862 862
863 public void SendParcelInfo (RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) 863 public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
864 { 864 {
865 } 865 }
866 866
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
index 86472f6..7227cf0 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using OpenSim.Region.Environment.Interfaces; 30using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -40,8 +40,8 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
40 { 40 {
41 // if (m_enabled) 41 // if (m_enabled)
42 // { 42 // {
43 // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene); 43 // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new Vector3(128, 128, 40), scene);
44 // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene); 44 // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new Vector3(136, 128, 40), scene);
45 // scene.AddNewClient(testAvatar, false); 45 // scene.AddNewClient(testAvatar, false);
46 // scene.AddNewClient(testAvatar2, false); 46 // scene.AddNewClient(testAvatar2, false);
47 // } 47 // }
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index b9615ec..d92f33a 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using System; 30using System;
31using System.Collections; 31using System.Collections;
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
228 #endregion 228 #endregion
229 229
230 #region Helper Functions 230 #region Helper Functions
231 protected void SendPermissionError(LLUUID user, string reason) 231 protected void SendPermissionError(UUID user, string reason)
232 { 232 {
233 m_scene.EventManager.TriggerPermissionError(user, reason); 233 m_scene.EventManager.TriggerPermissionError(user, reason);
234 } 234 }
@@ -238,14 +238,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
238 m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); 238 m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
239 } 239 }
240 240
241 protected bool IsAdministrator(LLUUID user) 241 protected bool IsAdministrator(UUID user)
242 { 242 {
243 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 243 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
244 { 244 {
245 if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)) 245 if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
246 return true; 246 return true;
247 } 247 }
248 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 248 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
249 { 249 {
250 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) 250 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)
251 return true; 251 return true;
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
263 return false; 263 return false;
264 } 264 }
265 265
266 protected bool IsEstateManager(LLUUID user) 266 protected bool IsEstateManager(UUID user)
267 { 267 {
268 return m_scene.RegionInfo.EstateSettings.IsEstateManager(user); 268 return m_scene.RegionInfo.EstateSettings.IsEstateManager(user);
269 } 269 }
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
286 286
287 #region Object Permissions 287 #region Object Permissions
288 288
289 public uint GenerateClientFlags(LLUUID user, LLUUID objID) 289 public uint GenerateClientFlags(UUID user, UUID objID)
290 { 290 {
291 // Here's the way this works, 291 // Here's the way this works,
292 // ObjectFlags and Permission flags are two different enumerations 292 // ObjectFlags and Permission flags are two different enumerations
@@ -306,27 +306,27 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
306 return (uint)0; 306 return (uint)0;
307 307
308 uint objflags = task.GetEffectiveObjectFlags(); 308 uint objflags = task.GetEffectiveObjectFlags();
309 LLUUID objectOwner = task.OwnerID; 309 UUID objectOwner = task.OwnerID;
310 310
311 311
312 // Remove any of the objectFlags that are temporary. These will get added back if appropriate 312 // Remove any of the objectFlags that are temporary. These will get added back if appropriate
313 // in the next bit of code 313 // in the next bit of code
314 314
315 objflags &= (uint) 315 objflags &= (uint)
316 ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object 316 ~(PrimFlags.ObjectCopy | // Tells client you can copy the object
317 LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object 317 PrimFlags.ObjectModify | // tells client you can modify the object
318 LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) 318 PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod)
319 LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it 319 PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
320 LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object 320 PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object
321 LLObject.ObjectFlags.ObjectAnyOwner | // Tells client that someone owns the object 321 PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object
322 LLObject.ObjectFlags.ObjectOwnerModify | // Tells client that you're the owner of the object 322 PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
323 LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set 323 PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
324 ); 324 );
325 325
326 // Creating the three ObjectFlags options for this method to choose from. 326 // Creating the three ObjectFlags options for this method to choose from.
327 // Customize the OwnerMask 327 // Customize the OwnerMask
328 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags); 328 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
329 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner | (uint)LLObject.ObjectFlags.ObjectAnyOwner | (uint)LLObject.ObjectFlags.ObjectOwnerModify; 329 objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify;
330 330
331 // Customize the GroupMask 331 // Customize the GroupMask
332 // uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags); 332 // uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
@@ -336,8 +336,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
336 336
337 337
338 // Hack to allow collaboration until Groups and Group Permissions are implemented 338 // Hack to allow collaboration until Groups and Group Permissions are implemented
339 if ((objectEveryoneMask & (uint)LLObject.ObjectFlags.ObjectMove) != 0) 339 if ((objectEveryoneMask & (uint)PrimFlags.ObjectMove) != 0)
340 objectEveryoneMask |= (uint)LLObject.ObjectFlags.ObjectModify; 340 objectEveryoneMask |= (uint)PrimFlags.ObjectModify;
341 341
342 if (m_bypassPermissions) 342 if (m_bypassPermissions)
343 return objectOwnerMask; 343 return objectOwnerMask;
@@ -378,28 +378,28 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
378 378
379 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) 379 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0)
380 { 380 {
381 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectCopy; 381 objectFlagsMask |= (uint)PrimFlags.ObjectCopy;
382 } 382 }
383 383
384 if ((setPermissionMask & (uint)PermissionMask.Move) != 0) 384 if ((setPermissionMask & (uint)PermissionMask.Move) != 0)
385 { 385 {
386 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectMove; 386 objectFlagsMask |= (uint)PrimFlags.ObjectMove;
387 } 387 }
388 388
389 if ((setPermissionMask & (uint)PermissionMask.Modify) != 0) 389 if ((setPermissionMask & (uint)PermissionMask.Modify) != 0)
390 { 390 {
391 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectModify; 391 objectFlagsMask |= (uint)PrimFlags.ObjectModify;
392 } 392 }
393 393
394 if ((setPermissionMask & (uint)PermissionMask.Transfer) != 0) 394 if ((setPermissionMask & (uint)PermissionMask.Transfer) != 0)
395 { 395 {
396 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectTransfer; 396 objectFlagsMask |= (uint)PrimFlags.ObjectTransfer;
397 } 397 }
398 398
399 return objectFlagsMask; 399 return objectFlagsMask;
400 } 400 }
401 401
402 protected bool GenericObjectPermission(LLUUID currentUser, LLUUID objId, bool denyOnLocked) 402 protected bool GenericObjectPermission(UUID currentUser, UUID objId, bool denyOnLocked)
403 { 403 {
404 // Default: deny 404 // Default: deny
405 bool permission = false; 405 bool permission = false;
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
419 419
420 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId]; 420 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId];
421 421
422 LLUUID objectOwner = group.OwnerID; 422 UUID objectOwner = group.OwnerID;
423 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 423 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
424 424
425 // People shouldn't be able to do anything with locked objects, except the Administrator 425 // People shouldn't be able to do anything with locked objects, except the Administrator
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
472 #endregion 472 #endregion
473 473
474 #region Generic Permissions 474 #region Generic Permissions
475 protected bool GenericCommunicationPermission(LLUUID user, LLUUID target) 475 protected bool GenericCommunicationPermission(UUID user, UUID target)
476 { 476 {
477 // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission 477 // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission
478 bool permission = true; 478 bool permission = true;
@@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
491 return permission; 491 return permission;
492 } 492 }
493 493
494 public bool GenericEstatePermission(LLUUID user) 494 public bool GenericEstatePermission(UUID user)
495 { 495 {
496 // Default: deny 496 // Default: deny
497 bool permission = false; 497 bool permission = false;
@@ -507,7 +507,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
507 return permission; 507 return permission;
508 } 508 }
509 509
510 protected bool GenericParcelPermission(LLUUID user, ILandObject parcel) 510 protected bool GenericParcelPermission(UUID user, ILandObject parcel)
511 { 511 {
512 bool permission = false; 512 bool permission = false;
513 513
@@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
534 return permission; 534 return permission;
535 } 535 }
536 536
537 protected bool GenericParcelPermission(LLUUID user, LLVector3 pos) 537 protected bool GenericParcelPermission(UUID user, Vector3 pos)
538 { 538 {
539 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 539 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
540 if (parcel == null) return false; 540 if (parcel == null) return false;
@@ -543,7 +543,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
543#endregion 543#endregion
544 544
545 #region Permission Checks 545 #region Permission Checks
546 private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) 546 private bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
547 { 547 {
548 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 548 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
549 if (m_bypassPermissions) return m_bypassPermissionsValue; 549 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
551 return GenericParcelPermission(user, parcel); 551 return GenericParcelPermission(user, parcel);
552 } 552 }
553 553
554 private bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene) 554 private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
555 { 555 {
556 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 556 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
557 if (m_bypassPermissions) return m_bypassPermissionsValue; 557 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -559,7 +559,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
559 return GenericParcelPermission(user, parcel); 559 return GenericParcelPermission(user, parcel);
560 } 560 }
561 561
562 private bool CanBeGodLike(LLUUID user, Scene scene) 562 private bool CanBeGodLike(UUID user, Scene scene)
563 { 563 {
564 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 564 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
565 if (m_bypassPermissions) return m_bypassPermissionsValue; 565 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -567,7 +567,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
567 return IsAdministrator(user); 567 return IsAdministrator(user);
568 } 568 }
569 569
570 private bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition) 570 private bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition)
571 { 571 {
572 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 572 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
573 if (m_bypassPermissions) return m_bypassPermissionsValue; 573 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -581,7 +581,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
581 return CanRezObject(objectCount, owner, objectPosition, scene); 581 return CanRezObject(objectCount, owner, objectPosition, scene);
582 } 582 }
583 583
584 private bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene) 584 private bool CanDeleteObject(UUID objectID, UUID deleter, Scene scene)
585 { 585 {
586 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 586 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
587 if (m_bypassPermissions) return m_bypassPermissionsValue; 587 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -589,7 +589,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
589 return GenericObjectPermission(deleter, objectID, false); 589 return GenericObjectPermission(deleter, objectID, false);
590 } 590 }
591 591
592 private bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene) 592 private bool CanEditObject(UUID objectID, UUID editorID, Scene scene)
593 { 593 {
594 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 594 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
595 if (m_bypassPermissions) return m_bypassPermissionsValue; 595 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -598,7 +598,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
598 return GenericObjectPermission(editorID, objectID, false); 598 return GenericObjectPermission(editorID, objectID, false);
599 } 599 }
600 600
601 private bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene) 601 private bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
602 { 602 {
603 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 603 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
604 if (m_bypassPermissions) return m_bypassPermissionsValue; 604 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
606 return GenericParcelPermission(user, parcel); 606 return GenericParcelPermission(user, parcel);
607 } 607 }
608 608
609 private bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 609 private bool CanEditScript(UUID script, UUID objectID, UUID user, Scene scene)
610 { 610 {
611 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 611 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
612 if (m_bypassPermissions) return m_bypassPermissionsValue; 612 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -614,7 +614,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
614 return false; 614 return false;
615 } 615 }
616 616
617 private bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) 617 private bool CanEditNotecard(UUID notecard, UUID objectID, UUID user, Scene scene)
618 { 618 {
619 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 619 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
620 if (m_bypassPermissions) return m_bypassPermissionsValue; 620 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
622 return true; 622 return true;
623 } 623 }
624 624
625 private bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene) 625 private bool CanInstantMessage(UUID user, UUID target, Scene startScene)
626 { 626 {
627 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 627 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
628 if (m_bypassPermissions) return m_bypassPermissionsValue; 628 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
631 return GenericCommunicationPermission(user, target); 631 return GenericCommunicationPermission(user, target);
632 } 632 }
633 633
634 private bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene) 634 private bool CanInventoryTransfer(UUID user, UUID target, Scene startScene)
635 { 635 {
636 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 636 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
637 if (m_bypassPermissions) return m_bypassPermissionsValue; 637 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -639,7 +639,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
639 return GenericCommunicationPermission(user, target); 639 return GenericCommunicationPermission(user, target);
640 } 640 }
641 641
642 private bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand) 642 private bool CanIssueEstateCommand(UUID user, Scene requestFromScene, bool ownerCommand)
643 { 643 {
644 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 644 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
645 if (m_bypassPermissions) return m_bypassPermissionsValue; 645 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -656,7 +656,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
656 return GenericEstatePermission(user); 656 return GenericEstatePermission(user);
657 } 657 }
658 658
659 private bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene) 659 private bool CanMoveObject(UUID objectID, UUID moverID, Scene scene)
660 { 660 {
661 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 661 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
662 if (m_bypassPermissions) 662 if (m_bypassPermissions)
@@ -696,10 +696,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
696 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; 696 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
697 697
698 698
699 // LLUUID taskOwner = null; 699 // UUID taskOwner = null;
700 // Added this because at this point in time it wouldn't be wise for 700 // Added this because at this point in time it wouldn't be wise for
701 // the administrator object permissions to take effect. 701 // the administrator object permissions to take effect.
702 // LLUUID objectOwner = task.OwnerID; 702 // UUID objectOwner = task.OwnerID;
703 703
704 // Anyone can move 704 // Anyone can move
705 if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0) 705 if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0)
@@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
727 727
728 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objectID]; 728 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objectID];
729 729
730 LLUUID objectOwner = group.OwnerID; 730 UUID objectOwner = group.OwnerID;
731 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 731 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
732 732
733 733
@@ -747,7 +747,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
747 return permission; 747 return permission;
748 } 748 }
749 749
750 private bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene) 750 private bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene)
751 { 751 {
752 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 752 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
753 if (m_bypassPermissions) return m_bypassPermissionsValue; 753 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
764 return false; 764 return false;
765 } 765 }
766 766
767 if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) 767 if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAPrimitiveEntry)) != 0)
768 { 768 {
769 return true; 769 return true;
770 } 770 }
@@ -793,7 +793,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
793 return false; 793 return false;
794 } 794 }
795 795
796 private bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene) 796 private bool CanReturnObject(UUID objectID, UUID returnerID, Scene scene)
797 { 797 {
798 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 798 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
799 if (m_bypassPermissions) return m_bypassPermissionsValue; 799 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -801,7 +801,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
801 return GenericObjectPermission(returnerID, objectID, false); 801 return GenericObjectPermission(returnerID, objectID, false);
802 } 802 }
803 803
804 private bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene) 804 private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene)
805 { 805 {
806 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 806 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
807 if (m_bypassPermissions) return m_bypassPermissionsValue; 807 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -830,7 +830,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
830 return permission; 830 return permission;
831 } 831 }
832 832
833 private bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene) 833 private bool CanRunConsoleCommand(UUID user, Scene requestFromScene)
834 { 834 {
835 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 835 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
836 if (m_bypassPermissions) return m_bypassPermissionsValue; 836 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -839,7 +839,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
839 return IsAdministrator(user); 839 return IsAdministrator(user);
840 } 840 }
841 841
842 private bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 842 private bool CanRunScript(UUID script, UUID objectID, UUID user, Scene scene)
843 { 843 {
844 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 844 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
845 if (m_bypassPermissions) return m_bypassPermissionsValue; 845 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -847,7 +847,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
847 return true; 847 return true;
848 } 848 }
849 849
850 private bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene) 850 private bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
851 { 851 {
852 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 852 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
853 if (m_bypassPermissions) return m_bypassPermissionsValue; 853 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -855,7 +855,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
855 return GenericParcelPermission(user, parcel); 855 return GenericParcelPermission(user, parcel);
856 } 856 }
857 857
858 private bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene) 858 private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene)
859 { 859 {
860 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 860 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
861 if (m_bypassPermissions) return m_bypassPermissionsValue; 861 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -863,7 +863,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
863 return GenericObjectPermission(stealer,objectID, false); 863 return GenericObjectPermission(stealer,objectID, false);
864 } 864 }
865 865
866 private bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene) 866 private bool CanTakeCopyObject(UUID objectID, UUID userID, Scene inScene)
867 { 867 {
868 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 868 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
869 if (m_bypassPermissions) return m_bypassPermissionsValue; 869 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -883,10 +883,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
883 } 883 }
884 884
885 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; 885 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
886 // LLUUID taskOwner = null; 886 // UUID taskOwner = null;
887 // Added this because at this point in time it wouldn't be wise for 887 // Added this because at this point in time it wouldn't be wise for
888 // the administrator object permissions to take effect. 888 // the administrator object permissions to take effect.
889 // LLUUID objectOwner = task.OwnerID; 889 // UUID objectOwner = task.OwnerID;
890 890
891 891
892 if ((task.RootPart.EveryoneMask & PERM_COPY) != 0) 892 if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
895 return permission; 895 return permission;
896 } 896 }
897 897
898 private bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene) 898 private bool CanTerraformLand(UUID user, Vector3 position, Scene requestFromScene)
899 { 899 {
900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
901 if (m_bypassPermissions) return m_bypassPermissionsValue; 901 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -927,7 +927,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
927 return permission; 927 return permission;
928 } 928 }
929 929
930 private bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 930 private bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene)
931 { 931 {
932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
933 if (m_bypassPermissions) return m_bypassPermissionsValue; 933 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -935,7 +935,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
935 return false; 935 return false;
936 } 936 }
937 937
938 private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) 938 private bool CanViewNotecard(UUID notecard, UUID objectID, UUID user, Scene scene)
939 { 939 {
940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
941 if (m_bypassPermissions) return m_bypassPermissionsValue; 941 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -945,7 +945,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
945 945
946 #endregion 946 #endregion
947 947
948 public bool CanLinkObject(LLUUID userID, LLUUID objectID) 948 public bool CanLinkObject(UUID userID, UUID objectID)
949 { 949 {
950 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 950 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
951 if (m_bypassPermissions) return m_bypassPermissionsValue; 951 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
953 return true; 953 return true;
954 } 954 }
955 955
956 public bool CanDelinkObject(LLUUID userID, LLUUID objectID) 956 public bool CanDelinkObject(UUID userID, UUID objectID)
957 { 957 {
958 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 958 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
959 if (m_bypassPermissions) return m_bypassPermissionsValue; 959 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -961,7 +961,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
961 return true; 961 return true;
962 } 962 }
963 963
964 public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) 964 public bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene)
965 { 965 {
966 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 966 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
967 if (m_bypassPermissions) return m_bypassPermissionsValue; 967 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
969 return true; 969 return true;
970 } 970 }
971 971
972 public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 972 public bool CanCopyInventory(UUID itemID, UUID objectID, UUID userID)
973 { 973 {
974 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 974 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
975 if (m_bypassPermissions) return m_bypassPermissionsValue; 975 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -977,7 +977,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
977 return true; 977 return true;
978 } 978 }
979 979
980 public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 980 public bool CanDeleteInventory(UUID itemID, UUID objectID, UUID userID)
981 { 981 {
982 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 982 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
983 if (m_bypassPermissions) return m_bypassPermissionsValue; 983 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
985 return true; 985 return true;
986 } 986 }
987 987
988 public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) 988 public bool CanCreateInventory(uint invType, UUID objectID, UUID userID)
989 { 989 {
990 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 990 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
991 if (m_bypassPermissions) return m_bypassPermissionsValue; 991 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -993,7 +993,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
993 return true; 993 return true;
994 } 994 }
995 995
996 public bool CanTeleport(LLUUID userID) 996 public bool CanTeleport(UUID userID)
997 { 997 {
998 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 998 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
999 if (m_bypassPermissions) return m_bypassPermissionsValue; 999 if (m_bypassPermissions) return m_bypassPermissionsValue;
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
index e76d40d..bbc4acf 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
43 /// <param name="fileName"></param> 43 /// <param name="fileName"></param>
44 /// <param name="newIDS"></param> 44 /// <param name="newIDS"></param>
45 /// <param name="loadOffset"></param> 45 /// <param name="loadOffset"></param>
46 void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset); 46 void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset);
47 47
48 /// <summary> 48 /// <summary>
49 /// Save prims in the xml format 49 /// Save prims in the xml format
@@ -76,14 +76,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
76 76
77 /// <summary> 77 /// <summary>
78 /// Save prims in the xml2 format, optionally specifying a bounding box for which 78 /// Save prims in the xml2 format, optionally specifying a bounding box for which
79 /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims 79 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
80 /// are exported. 80 /// are exported.
81 /// </summary> 81 /// </summary>
82 /// <param name="scene"></param> 82 /// <param name="scene"></param>
83 /// <param name="stream"></param> 83 /// <param name="stream"></param>
84 /// <param name="min"></param> 84 /// <param name="min"></param>
85 /// <param name="max"></param> 85 /// <param name="max"></param>
86 void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max); 86 void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max);
87 87
88 /// <summary> 88 /// <summary>
89 /// Save a set of prims in the xml2 format 89 /// Save a set of prims in the xml2 format
@@ -94,14 +94,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
94 94
95 /// <summary> 95 /// <summary>
96 /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which 96 /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which
97 /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims 97 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
98 /// are exported. 98 /// are exported.
99 /// </summary> 99 /// </summary>
100 /// <param name="entityList"></param> 100 /// <param name="entityList"></param>
101 /// <param name="stream"></param> 101 /// <param name="stream"></param>
102 /// <param name="min"></param> 102 /// <param name="min"></param>
103 /// <param name="max"></param> 103 /// <param name="max"></param>
104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max); 104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max);
105 105
106 /// <summary> 106 /// <summary>
107 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene. 107 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
index 22c9b29..d1cc082 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
@@ -30,8 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31//using System.Reflection; 31//using System.Reflection;
32using System.Xml; 32using System.Xml;
33using Axiom.Math; 33using OpenMetaverse;
34using libsecondlife;
35//using log4net; 34//using log4net;
36using OpenSim.Framework; 35using OpenSim.Framework;
37using OpenSim.Region.Physics.Manager; 36using OpenSim.Region.Physics.Manager;
@@ -45,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes
45 { 44 {
46 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 46
48 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) 47 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
49 { 48 {
50 XmlDocument doc = new XmlDocument(); 49 XmlDocument doc = new XmlDocument();
51 XmlNode rootNode; 50 XmlNode rootNode;
@@ -208,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
208 SavePrimListToXml2(EntityList, fileName); 207 SavePrimListToXml2(EntityList, fileName);
209 } 208 }
210 209
211 public static void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) 210 public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max)
212 { 211 {
213 List<EntityBase> EntityList = scene.GetEntities(); 212 List<EntityBase> EntityList = scene.GetEntities();
214 213
@@ -223,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes
223 StreamWriter stream = new StreamWriter(file); 222 StreamWriter stream = new StreamWriter(file);
224 try 223 try
225 { 224 {
226 SavePrimListToXml2(entityList, stream, LLVector3.Zero, LLVector3.Zero); 225 SavePrimListToXml2(entityList, stream, Vector3.Zero, Vector3.Zero);
227 } 226 }
228 finally 227 finally
229 { 228 {
@@ -236,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes
236 } 235 }
237 } 236 }
238 237
239 public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max) 238 public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max)
240 { 239 {
241 int primCount = 0; 240 int primCount = 0;
242 stream.WriteLine("<scene>\n"); 241 stream.WriteLine("<scene>\n");
@@ -246,9 +245,9 @@ namespace OpenSim.Region.Environment.Scenes
246 if (ent is SceneObjectGroup) 245 if (ent is SceneObjectGroup)
247 { 246 {
248 SceneObjectGroup g = (SceneObjectGroup)ent; 247 SceneObjectGroup g = (SceneObjectGroup)ent;
249 if (!min.Equals(LLVector3.Zero) || !max.Equals(LLVector3.Zero)) 248 if (!min.Equals(Vector3.Zero) || !max.Equals(Vector3.Zero))
250 { 249 {
251 LLVector3 pos = g.RootPart.GetWorldPosition(); 250 Vector3 pos = g.RootPart.GetWorldPosition();
252 if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z) 251 if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z)
253 continue; 252 continue;
254 if (max.X < pos.X || max.Y < pos.Y || max.Z < pos.Z) 253 if (max.X < pos.X || max.Y < pos.Y || max.Z < pos.Z)
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
index 0d69553..ffd90bf 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
@@ -40,11 +40,11 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
40 40
41 public string WriteToFile(Scene scene, string dir) 41 public string WriteToFile(Scene scene, string dir)
42 { 42 {
43 string targetFileName = dir + "objects.xml"; 43 string targetFileName = dir + "objects.Xml";
44 44
45 SaveSerialisedToFile(targetFileName, scene); 45 SaveSerialisedToFile(targetFileName, scene);
46 46
47 return "objects.xml"; 47 return "objects.Xml";
48 } 48 }
49 49
50 #endregion 50 #endregion
@@ -122,4 +122,4 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
122 #endregion 122 #endregion
123 } 123 }
124 } 124 }
125} \ No newline at end of file 125}
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index d722d68..e3eb377 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
34using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander; 34using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
87 87
88 #region IRegionSerialiser Members 88 #region IRegionSerialiser Members
89 89
90 public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) 90 public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
91 { 91 {
92 SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset); 92 SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset);
93 } 93 }
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
112 SceneXmlLoader.SavePrimsToXml2(scene, fileName); 112 SceneXmlLoader.SavePrimsToXml2(scene, fileName);
113 } 113 }
114 114
115 public void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) 115 public void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max)
116 { 116 {
117 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max); 117 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max);
118 } 118 }
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
132 SceneXmlLoader.SavePrimListToXml2(entityList, fileName); 132 SceneXmlLoader.SavePrimListToXml2(entityList, fileName);
133 } 133 }
134 134
135 public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max) 135 public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max)
136 { 136 {
137 SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); 137 SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max);
138 } 138 }
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 9690433..826fe93 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -91,14 +91,14 @@ namespace OpenSim.Region.Environment.Modules
91 // private double VWTimeRatio; // VW time as a ratio of real time 91 // private double VWTimeRatio; // VW time as a ratio of real time
92 92
93 // Working values 93 // Working values
94 private LLVector3 Position = new LLVector3(0,0,0); 94 private Vector3 Position = Vector3.Zero;
95 private LLVector3 Velocity = new LLVector3(0,0,0); 95 private Vector3 Velocity = Vector3.Zero;
96 private LLQuaternion Tilt = new LLQuaternion(1,0,0,0); 96 private Quaternion Tilt = Quaternion.Identity;
97 97
98 private long LindenHourOffset = 0; 98 private long LindenHourOffset = 0;
99 private bool sunFixed = false; 99 private bool sunFixed = false;
100 100
101 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 101 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
102 102
103 // Current time in elpased seconds since Jan 1st 1970 103 // Current time in elpased seconds since Jan 1st 1970
104 private ulong CurrentTime 104 private ulong CurrentTime
@@ -348,14 +348,14 @@ namespace OpenSim.Region.Environment.Modules
348 // For interest we rotate it slightly about the X access. 348 // For interest we rotate it slightly about the X access.
349 // Celestial tilt is a value that ranges .025 349 // Celestial tilt is a value that ranges .025
350 350
351 Position = LLVector3.Rot(Position,Tilt); 351 Position *= Tilt;
352 352
353 // Finally we shift the axis so that more of the 353 // Finally we shift the axis so that more of the
354 // circle is above the horizon than below. This 354 // circle is above the horizon than below. This
355 // makes the nights shorter than the days. 355 // makes the nights shorter than the days.
356 356
357 Position.Z = Position.Z + (float) HorizonShift; 357 Position.Z = Position.Z + (float) HorizonShift;
358 Position = LLVector3.Norm(Position); 358 Position = Vector3.Normalize(Position);
359 359
360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")"); 360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")");
361 361
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules
365 365
366 // Correct angular velocity to reflect the seasonal rotation 366 // Correct angular velocity to reflect the seasonal rotation
367 367
368 Magnitude = LLVector3.Mag(Position); 368 Magnitude = Position.Length();
369 if (sunFixed) 369 if (sunFixed)
370 { 370 {
371 Velocity.X = 0; 371 Velocity.X = 0;
@@ -374,13 +374,12 @@ namespace OpenSim.Region.Environment.Modules
374 return; 374 return;
375 } 375 }
376 376
377 Velocity = LLVector3.Rot(Velocity, Tilt)*((float)(1.0/Magnitude)); 377 Velocity = (Velocity * Tilt) * (1.0f / Magnitude);
378 378
379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")"); 379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")");
380
381 } 380 }
382 381
383 private void ClientLoggedOut(LLUUID AgentId) 382 private void ClientLoggedOut(UUID AgentId)
384 { 383 {
385 lock (m_rootAgents) 384 lock (m_rootAgents)
386 { 385 {
@@ -392,7 +391,7 @@ namespace OpenSim.Region.Environment.Modules
392 } 391 }
393 } 392 }
394 393
395 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 394 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
396 { 395 {
397 lock (m_rootAgents) 396 lock (m_rootAgents)
398 { 397 {
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
index 4a62446..ed4075c 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -591,7 +591,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
591 float south, float east, IClientAPI remoteClient) 591 float south, float east, IClientAPI remoteClient)
592 { 592 {
593 // Not a good permissions check, if in area mode, need to check the entire area. 593 // Not a good permissions check, if in area mode, need to check the entire area.
594 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(north, west, 0))) 594 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(north, west, 0)))
595 { 595 {
596 if (north == south && east == west) 596 if (north == south && east == west)
597 { 597 {
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
648 // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. 648 // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area.
649 // for now check a point in the centre of the region 649 // for now check a point in the centre of the region
650 650
651 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(127, 127, 0))) 651 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(127, 127, 0)))
652 { 652 {
653 InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter 653 InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter
654 } 654 }
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index 98b3bf8..bbd7b70 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -29,8 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Timers; 31using System.Timers;
32using Axiom.Math; 32using OpenMetaverse;
33using libsecondlife;
34using log4net; 33using log4net;
35using Nini.Config; 34using Nini.Config;
36using OpenSim.Framework; 35using OpenSim.Framework;
@@ -49,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
49 48
50 public double m_tree_density = 50.0; // Aim for this many per region 49 public double m_tree_density = 50.0; // Aim for this many per region
51 public double m_tree_updates = 1000.0; // MS between updates 50 public double m_tree_updates = 1000.0; // MS between updates
52 private List<LLUUID> m_trees; 51 private List<UUID> m_trees;
53 52
54 #region IRegionModule Members 53 #region IRegionModule Members
55 54
@@ -63,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
63 { 62 {
64 } 63 }
65 64
66 m_trees = new List<LLUUID>(); 65 m_trees = new List<UUID>();
67 m_scene = scene; 66 m_scene = scene;
68 67
69 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; 68 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
@@ -98,24 +97,24 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
98 { 97 {
99 if (args[0] == "tree") 98 if (args[0] == "tree")
100 { 99 {
101 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 100 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
102 if (uuid == LLUUID.Zero) 101 if (uuid == UUID.Zero)
103 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 102 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
104 m_log.Debug("[TREES]: New tree planting"); 103 m_log.Debug("[TREES]: New tree planting");
105 CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f)); 104 CreateTree(uuid, new Vector3(128.0f, 128.0f, 0.0f));
106 } 105 }
107 } 106 }
108 107
109 private void growTrees() 108 private void growTrees()
110 { 109 {
111 foreach (LLUUID tree in m_trees) 110 foreach (UUID tree in m_trees)
112 { 111 {
113 if (m_scene.Entities.ContainsKey(tree)) 112 if (m_scene.Entities.ContainsKey(tree))
114 { 113 {
115 SceneObjectPart s_tree = ((SceneObjectGroup) m_scene.Entities[tree]).RootPart; 114 SceneObjectPart s_tree = ((SceneObjectGroup) m_scene.Entities[tree]).RootPart;
116 115
117 // 100 seconds to grow 1m 116 // 100 seconds to grow 1m
118 s_tree.Scale += new LLVector3(0.1f, 0.1f, 0.1f); 117 s_tree.Scale += new Vector3(0.1f, 0.1f, 0.1f);
119 s_tree.SendFullUpdateToAllClients(); 118 s_tree.SendFullUpdateToAllClients();
120 //s_tree.ScheduleTerseUpdate(); 119 //s_tree.ScheduleTerseUpdate();
121 } 120 }
@@ -128,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
128 127
129 private void seedTrees() 128 private void seedTrees()
130 { 129 {
131 foreach (LLUUID tree in m_trees) 130 foreach (UUID tree in m_trees)
132 { 131 {
133 if (m_scene.Entities.ContainsKey(tree)) 132 if (m_scene.Entities.ContainsKey(tree))
134 { 133 {
@@ -151,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
151 150
152 private void killTrees() 151 private void killTrees()
153 { 152 {
154 foreach (LLUUID tree in m_trees) 153 foreach (UUID tree in m_trees)
155 { 154 {
156 double killLikelyhood = 0.0; 155 double killLikelyhood = 0.0;
157 156
@@ -162,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
162 Math.Pow(selectedTree.Scale.Y, 2) + 161 Math.Pow(selectedTree.Scale.Y, 2) +
163 Math.Pow(selectedTree.Scale.Z, 2)); 162 Math.Pow(selectedTree.Scale.Z, 2));
164 163
165 foreach (LLUUID picktree in m_trees) 164 foreach (UUID picktree in m_trees)
166 { 165 {
167 if (picktree != tree) 166 if (picktree != tree)
168 { 167 {
@@ -187,7 +186,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
187 186
188 m_scene.ForEachClient(delegate(IClientAPI controller) 187 m_scene.ForEachClient(delegate(IClientAPI controller)
189 { 188 {
190 controller.SendKillObject(m_scene.RegionInfo.RegionHandle, 189 controller.SendKiPrimitive(m_scene.RegionInfo.RegionHandle,
191 selectedTree.LocalId); 190 selectedTree.LocalId);
192 }); 191 });
193 192
@@ -204,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
204 203
205 private void SpawnChild(SceneObjectPart s_tree) 204 private void SpawnChild(SceneObjectPart s_tree)
206 { 205 {
207 LLVector3 position = new LLVector3(); 206 Vector3 position = new Vector3();
208 207
209 position.X = s_tree.AbsolutePosition.X + (1 * (-1 * Util.RandomClass.Next(1))); 208 position.X = s_tree.AbsolutePosition.X + (1 * (-1 * Util.RandomClass.Next(1)));
210 if (position.X > 255) 209 if (position.X > 255)
@@ -223,20 +222,20 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
223 position.X += (float) randX; 222 position.X += (float) randX;
224 position.Y += (float) randY; 223 position.Y += (float) randY;
225 224
226 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 225 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
227 if (uuid == LLUUID.Zero) 226 if (uuid == UUID.Zero)
228 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 227 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
229 228
230 CreateTree(uuid, position); 229 CreateTree(uuid, position);
231 } 230 }
232 231
233 private void CreateTree(LLUUID uuid, LLVector3 position) 232 private void CreateTree(UUID uuid, Vector3 position)
234 { 233 {
235 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y]; 234 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y];
236 235
237 SceneObjectGroup tree = 236 SceneObjectGroup tree =
238 m_scene.AddTree(uuid, new LLVector3(0.1f, 0.1f, 0.1f), 237 m_scene.AddTree(uuid, new Vector3(0.1f, 0.1f, 0.1f),
239 LLQuaternion.Identity, 238 Quaternion.Identity,
240 position, 239 position,
241 Tree.Cypress1, 240 Tree.Cypress1,
242 false); 241 false);
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
index bfb5016..cfbe5ae 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
@@ -32,13 +32,12 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math;
36using Nini.Config; 35using Nini.Config;
36using OpenMetaverse.Imaging;
37using log4net; 37using log4net;
38using OpenJPEGNet;
39using OpenSim.Region.Environment.Interfaces; 38using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes; 39using OpenSim.Region.Environment.Scenes;
41using libsecondlife; 40using OpenMetaverse;
42 41
43namespace OpenSim.Region.Environment.Modules.World.WorldMap 42namespace OpenSim.Region.Environment.Modules.World.WorldMap
44{ 43{
@@ -252,7 +251,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
252 if (part.Shape.Textures.DefaultTexture == null) 251 if (part.Shape.Textures.DefaultTexture == null)
253 continue; 252 continue;
254 253
255 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; 254 Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA;
256 255
257 // Not sure why some of these are null, oh well. 256 // Not sure why some of these are null, oh well.
258 257
@@ -265,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
265 //Try to set the map spot color 264 //Try to set the map spot color
266 try 265 try
267 { 266 {
268 // If the color gets goofy somehow, skip it *shakes fist at LLColor 267 // If the color gets goofy somehow, skip it *shakes fist at Color4
269 mapdotspot = Color.FromArgb(colorr, colorg, colorb); 268 mapdotspot = Color.FromArgb(colorr, colorg, colorb);
270 } 269 }
271 catch (ArgumentException) 270 catch (ArgumentException)
@@ -282,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
282 // Mono Array 281 // Mono Array
283 } 282 }
284 283
285 LLVector3 pos = part.GetWorldPosition(); 284 Vector3 pos = part.GetWorldPosition();
286 285
287 // skip prim outside of retion 286 // skip prim outside of retion
288 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) 287 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f)
@@ -312,20 +311,20 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
312 Vector3 tScale = new Vector3(); 311 Vector3 tScale = new Vector3();
313 Vector3 axPos = new Vector3(pos.X,pos.Y,pos.Z); 312 Vector3 axPos = new Vector3(pos.X,pos.Y,pos.Z);
314 313
315 LLQuaternion llrot = part.GetWorldRotation(); 314 Quaternion llrot = part.GetWorldRotation();
316 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); 315 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z);
317 scale = rot * lscale; 316 scale = lscale * rot;
318 317
319 // negative scales don't work in this situation 318 // negative scales don't work in this situation
320 scale.x = Math.Abs(scale.x); 319 scale.X = Math.Abs(scale.X);
321 scale.y = Math.Abs(scale.y); 320 scale.Y = Math.Abs(scale.Y);
322 scale.z = Math.Abs(scale.z); 321 scale.Z = Math.Abs(scale.Z);
323 322
324 // This scaling isn't very accurate and doesn't take into account the face rotation :P 323 // This scaling isn't very accurate and doesn't take into account the face rotation :P
325 int mapdrawstartX = (int)(pos.X - scale.x); 324 int mapdrawstartX = (int)(pos.X - scale.X);
326 int mapdrawstartY = (int)(pos.Y - scale.y); 325 int mapdrawstartY = (int)(pos.Y - scale.Y);
327 int mapdrawendX = (int)(pos.X + scale.x); 326 int mapdrawendX = (int)(pos.X + scale.X);
328 int mapdrawendY = (int)(pos.Y + scale.y); 327 int mapdrawendY = (int)(pos.Y + scale.Y);
329 328
330 // If object is beyond the edge of the map, don't draw it to avoid errors 329 // If object is beyond the edge of the map, don't draw it to avoid errors
331 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 330 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255
@@ -342,9 +341,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
342 Vector3[] FaceC = new Vector3[6]; // vertex C for Facei 341 Vector3[] FaceC = new Vector3[6]; // vertex C for Facei
343 Vector3[] FaceD = new Vector3[6]; // vertex D for Facei 342 Vector3[] FaceD = new Vector3[6]; // vertex D for Facei
344 343
345 tScale = new Vector3(lscale.x, -lscale.y, lscale.z); 344 tScale = new Vector3(lscale.X, -lscale.Y, lscale.Z);
346 scale = ((rot * tScale)); 345 scale = ((tScale * rot));
347 vertexes[0] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 346 vertexes[0] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
348 // vertexes[0].x = pos.X + vertexes[0].x; 347 // vertexes[0].x = pos.X + vertexes[0].x;
349 //vertexes[0].y = pos.Y + vertexes[0].y; 348 //vertexes[0].y = pos.Y + vertexes[0].y;
350 //vertexes[0].z = pos.Z + vertexes[0].z; 349 //vertexes[0].z = pos.Z + vertexes[0].z;
@@ -354,8 +353,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
354 FaceA[4] = vertexes[0]; 353 FaceA[4] = vertexes[0];
355 354
356 tScale = lscale; 355 tScale = lscale;
357 scale = ((rot * tScale)); 356 scale = ((tScale * rot));
358 vertexes[1] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 357 vertexes[1] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
359 358
360 // vertexes[1].x = pos.X + vertexes[1].x; 359 // vertexes[1].x = pos.X + vertexes[1].x;
361 // vertexes[1].y = pos.Y + vertexes[1].y; 360 // vertexes[1].y = pos.Y + vertexes[1].y;
@@ -365,10 +364,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
365 FaceA[1] = vertexes[1]; 364 FaceA[1] = vertexes[1];
366 FaceC[4] = vertexes[1]; 365 FaceC[4] = vertexes[1];
367 366
368 tScale = new Vector3(lscale.x, -lscale.y, -lscale.z); 367 tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z);
369 scale = ((rot * tScale)); 368 scale = ((tScale * rot));
370 369
371 vertexes[2] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 370 vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
372 371
373 //vertexes[2].x = pos.X + vertexes[2].x; 372 //vertexes[2].x = pos.X + vertexes[2].x;
374 //vertexes[2].y = pos.Y + vertexes[2].y; 373 //vertexes[2].y = pos.Y + vertexes[2].y;
@@ -378,9 +377,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
378 FaceD[3] = vertexes[2]; 377 FaceD[3] = vertexes[2];
379 FaceC[5] = vertexes[2]; 378 FaceC[5] = vertexes[2];
380 379
381 tScale = new Vector3(lscale.x, lscale.y, -lscale.z); 380 tScale = new Vector3(lscale.X, lscale.Y, -lscale.Z);
382 scale = ((rot * tScale)); 381 scale = ((tScale * rot));
383 vertexes[3] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 382 vertexes[3] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
384 383
385 //vertexes[3].x = pos.X + vertexes[3].x; 384 //vertexes[3].x = pos.X + vertexes[3].x;
386 // vertexes[3].y = pos.Y + vertexes[3].y; 385 // vertexes[3].y = pos.Y + vertexes[3].y;
@@ -390,9 +389,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
390 FaceC[1] = vertexes[3]; 389 FaceC[1] = vertexes[3];
391 FaceA[5] = vertexes[3]; 390 FaceA[5] = vertexes[3];
392 391
393 tScale = new Vector3(-lscale.x, lscale.y, lscale.z); 392 tScale = new Vector3(-lscale.X, lscale.Y, lscale.Z);
394 scale = ((rot * tScale)); 393 scale = ((tScale * rot));
395 vertexes[4] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 394 vertexes[4] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
396 395
397 // vertexes[4].x = pos.X + vertexes[4].x; 396 // vertexes[4].x = pos.X + vertexes[4].x;
398 // vertexes[4].y = pos.Y + vertexes[4].y; 397 // vertexes[4].y = pos.Y + vertexes[4].y;
@@ -402,9 +401,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
402 FaceA[2] = vertexes[4]; 401 FaceA[2] = vertexes[4];
403 FaceD[4] = vertexes[4]; 402 FaceD[4] = vertexes[4];
404 403
405 tScale = new Vector3(-lscale.x, lscale.y, -lscale.z); 404 tScale = new Vector3(-lscale.X, lscale.Y, -lscale.Z);
406 scale = ((rot * tScale)); 405 scale = ((tScale * rot));
407 vertexes[5] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 406 vertexes[5] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
408 407
409 // vertexes[5].x = pos.X + vertexes[5].x; 408 // vertexes[5].x = pos.X + vertexes[5].x;
410 // vertexes[5].y = pos.Y + vertexes[5].y; 409 // vertexes[5].y = pos.Y + vertexes[5].y;
@@ -414,9 +413,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
414 FaceC[2] = vertexes[5]; 413 FaceC[2] = vertexes[5];
415 FaceB[5] = vertexes[5]; 414 FaceB[5] = vertexes[5];
416 415
417 tScale = new Vector3(-lscale.x, -lscale.y, lscale.z); 416 tScale = new Vector3(-lscale.X, -lscale.Y, lscale.Z);
418 scale = ((rot * tScale)); 417 scale = ((tScale * rot));
419 vertexes[6] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 418 vertexes[6] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
420 419
421 // vertexes[6].x = pos.X + vertexes[6].x; 420 // vertexes[6].x = pos.X + vertexes[6].x;
422 // vertexes[6].y = pos.Y + vertexes[6].y; 421 // vertexes[6].y = pos.Y + vertexes[6].y;
@@ -426,9 +425,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
426 FaceA[3] = vertexes[6]; 425 FaceA[3] = vertexes[6];
427 FaceB[4] = vertexes[6]; 426 FaceB[4] = vertexes[6];
428 427
429 tScale = new Vector3(-lscale.x, -lscale.y, -lscale.z); 428 tScale = new Vector3(-lscale.X, -lscale.Y, -lscale.Z);
430 scale = ((rot * tScale)); 429 scale = ((tScale * rot));
431 vertexes[7] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 430 vertexes[7] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
432 431
433 // vertexes[7].x = pos.X + vertexes[7].x; 432 // vertexes[7].x = pos.X + vertexes[7].x;
434 // vertexes[7].y = pos.Y + vertexes[7].y; 433 // vertexes[7].y = pos.Y + vertexes[7].y;
@@ -533,8 +532,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
533 //Vector3 topos = new Vector3(0, 0, 0); 532 //Vector3 topos = new Vector3(0, 0, 0);
534 // float z = -point3d.z - topos.z; 533 // float z = -point3d.z - topos.z;
535 534
536 returnpt.X = (int)point3d.x;//(int)((topos.x - point3d.x) / z * d); 535 returnpt.X = (int)point3d.X;//(int)((topos.x - point3d.x) / z * d);
537 returnpt.Y = (int)(255 - point3d.y);//(int)(255 - (((topos.y - point3d.y) / z * d))); 536 returnpt.Y = (int)(255 - point3d.Y);//(int)(255 - (((topos.y - point3d.y) / z * d)));
538 537
539 return returnpt; 538 return returnpt;
540 } 539 }
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
index 1ee86ba..dffa72a 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
@@ -32,13 +32,12 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math; 35using OpenMetaverse;
36using OpenMetaverse.Imaging;
36using Nini.Config; 37using Nini.Config;
37using log4net; 38using log4net;
38using OpenJPEGNet;
39using OpenSim.Region.Environment.Interfaces; 39using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes; 40using OpenSim.Region.Environment.Scenes;
41using libsecondlife;
42 41
43namespace OpenSim.Region.Environment.Modules.World.WorldMap 42namespace OpenSim.Region.Environment.Modules.World.WorldMap
44{ 43{
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
index 615befc..ff8d0b9 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -32,15 +32,14 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math; 35using OpenMetaverse;
36using Nini.Config; 36using Nini.Config;
37using log4net; 37using log4net;
38using OpenJPEGNet; 38using OpenMetaverse.Imaging;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.Environment.Interfaces; 40using OpenSim.Region.Environment.Interfaces;
41using OpenSim.Region.Environment.Scenes; 41using OpenSim.Region.Environment.Scenes;
42using OpenSim.Region.Environment.Modules.World.Terrain; 42using OpenSim.Region.Environment.Modules.World.Terrain;
43using libsecondlife;
44 43
45namespace OpenSim.Region.Environment.Modules.World.WorldMap 44namespace OpenSim.Region.Environment.Modules.World.WorldMap
46{ 45{
@@ -122,15 +121,15 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
122 121
123 // some hardcoded terrain UUIDs that work with SL 1.20 (the four default textures and "Blank"). 122 // some hardcoded terrain UUIDs that work with SL 1.20 (the four default textures and "Blank").
124 // The color-values were choosen because they "look right" (at least to me) ;-) 123 // The color-values were choosen because they "look right" (at least to me) ;-)
125 private static readonly LLUUID defaultTerrainTexture1 = new LLUUID("0bc58228-74a0-7e83-89bc-5c23464bcec5"); 124 private static readonly UUID defaultTerrainTexture1 = new UUID("0bc58228-74a0-7e83-89bc-5c23464bcec5");
126 private static readonly Color defaultColor1 = Color.FromArgb(165, 137, 118); 125 private static readonly Color defaultColor1 = Color.FromArgb(165, 137, 118);
127 private static readonly LLUUID defaultTerrainTexture2 = new LLUUID("63338ede-0037-c4fd-855b-015d77112fc8"); 126 private static readonly UUID defaultTerrainTexture2 = new UUID("63338ede-0037-c4fd-855b-015d77112fc8");
128 private static readonly Color defaultColor2 = Color.FromArgb(69, 89, 49); 127 private static readonly Color defaultColor2 = Color.FromArgb(69, 89, 49);
129 private static readonly LLUUID defaultTerrainTexture3 = new LLUUID("303cd381-8560-7579-23f1-f0a880799740"); 128 private static readonly UUID defaultTerrainTexture3 = new UUID("303cd381-8560-7579-23f1-f0a880799740");
130 private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141); 129 private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141);
131 private static readonly LLUUID defaultTerrainTexture4 = new LLUUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); 130 private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c");
132 private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); 131 private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200);
133 private static readonly LLUUID blankTerrainTexture = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); 132 private static readonly UUID blankTerrainTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
134 133
135 #endregion 134 #endregion
136 135
@@ -142,14 +141,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
142 // added when the terrain textures are changed in the estate dialog and a new map is generated (and will stay in 141 // added when the terrain textures are changed in the estate dialog and a new map is generated (and will stay in
143 // that map until the region-server restarts. This could be considered a memory-leak, but it's a *very* small one. 142 // that map until the region-server restarts. This could be considered a memory-leak, but it's a *very* small one.
144 // TODO does it make sense to use a "real" cache and regenerate missing entries on fetch? 143 // TODO does it make sense to use a "real" cache and regenerate missing entries on fetch?
145 private Dictionary<LLUUID, Color> m_mapping; 144 private Dictionary<UUID, Color> m_mapping;
146 145
147 146
148 public void Initialise(Scene scene, IConfigSource source) 147 public void Initialise(Scene scene, IConfigSource source)
149 { 148 {
150 m_scene = scene; 149 m_scene = scene;
151 // m_config = source; // not used currently 150 // m_config = source; // not used currently
152 m_mapping = new Dictionary<LLUUID,Color>(); 151 m_mapping = new Dictionary<UUID,Color>();
153 m_mapping.Add(defaultTerrainTexture1, defaultColor1); 152 m_mapping.Add(defaultTerrainTexture1, defaultColor1);
154 m_mapping.Add(defaultTerrainTexture2, defaultColor2); 153 m_mapping.Add(defaultTerrainTexture2, defaultColor2);
155 m_mapping.Add(defaultTerrainTexture3, defaultColor3); 154 m_mapping.Add(defaultTerrainTexture3, defaultColor3);
@@ -164,12 +163,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
164 // TODO (- on "map" command: We are in the command-line thread, we will wait for completion anyway) 163 // TODO (- on "map" command: We are in the command-line thread, we will wait for completion anyway)
165 // TODO (- on "automatic" update after some change: We are called from the mapUpdateTimer here and 164 // TODO (- on "automatic" update after some change: We are called from the mapUpdateTimer here and
166 // will wait anyway) 165 // will wait anyway)
167 private Bitmap fetchTexture(LLUUID id) 166 private Bitmap fetchTexture(UUID id)
168 { 167 {
169 AssetBase asset = m_scene.AssetCache.GetAsset(id, true); 168 AssetBase asset = m_scene.AssetCache.GetAsset(id, true);
170 m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); 169 m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null);
171 if (asset == null) return null; 170 if (asset == null) return null;
172 return new Bitmap(OpenJPEG.DecodeToImage(asset.Data)); 171
172 ManagedImage managedImage;
173 Image image;
174 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
175 return new Bitmap(image);
176 else
177 return null;
173 } 178 }
174 179
175 // Compute the average color of a texture. 180 // Compute the average color of a texture.
@@ -196,8 +201,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
196 201
197 // return either the average color of the texture, or the defaultColor if the texturID is invalid 202 // return either the average color of the texture, or the defaultColor if the texturID is invalid
198 // or the texture couldn't be found 203 // or the texture couldn't be found
199 private Color computeAverageColor(LLUUID textureID, Color defaultColor) { 204 private Color computeAverageColor(UUID textureID, Color defaultColor) {
200 if (textureID == LLUUID.Zero) return defaultColor; // not set 205 if (textureID == UUID.Zero) return defaultColor; // not set
201 if (m_mapping.ContainsKey(textureID)) return m_mapping[textureID]; // one of the predefined textures 206 if (m_mapping.ContainsKey(textureID)) return m_mapping[textureID]; // one of the predefined textures
202 207
203 Bitmap bmp = fetchTexture(textureID); 208 Bitmap bmp = fetchTexture(textureID);
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index 2430822..ec9b79c 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -32,8 +32,8 @@ using System.Drawing;
32using System.Drawing.Imaging; 32using System.Drawing.Imaging;
33using System.IO; 33using System.IO;
34using System.Reflection; 34using System.Reflection;
35using libsecondlife; 35using OpenMetaverse;
36using OpenJPEGNet; 36using OpenMetaverse.Imaging;
37using log4net; 37using log4net;
38using Nini.Config; 38using Nini.Config;
39using OpenSim.Framework; 39using OpenSim.Framework;
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
103 103
104 #endregion 104 #endregion
105 105
106 public void OnRegisterCaps(LLUUID agentID, Caps caps) 106 public void OnRegisterCaps(UUID agentID, Caps caps)
107 { 107 {
108 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 108 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
109 string capsBase = "/CAPS/" + caps.CapsObjectPath; 109 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
127 /// <param name="caps"></param> 127 /// <param name="caps"></param>
128 /// <returns></returns> 128 /// <returns></returns>
129 public string MapLayerRequest(string request, string path, string param, 129 public string MapLayerRequest(string request, string path, string param,
130 LLUUID agentID, Caps caps) 130 UUID agentID, Caps caps)
131 { 131 {
132 //try 132 //try
133 //{ 133 //{
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
197 LLSDMapLayer mapLayer = new LLSDMapLayer(); 197 LLSDMapLayer mapLayer = new LLSDMapLayer();
198 mapLayer.Right = 5000; 198 mapLayer.Right = 5000;
199 mapLayer.Top = 5000; 199 mapLayer.Top = 5000;
200 mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); 200 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
201 201
202 return mapLayer; 202 return mapLayer;
203 } 203 }
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
223 //doFriendListUpdateOnline(client.AgentId); 223 //doFriendListUpdateOnline(client.AgentId);
224 client.OnRequestMapBlocks += RequestMapBlocks; 224 client.OnRequestMapBlocks += RequestMapBlocks;
225 } 225 }
226 private void ClientLoggedOut(LLUUID AgentId) 226 private void ClientLoggedOut(UUID AgentId)
227 { 227 {
228 228
229 } 229 }
@@ -248,15 +248,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
248 m_log.Info("[WEBMAP]: Sending map image jpeg"); 248 m_log.Info("[WEBMAP]: Sending map image jpeg");
249 Hashtable reply = new Hashtable(); 249 Hashtable reply = new Hashtable();
250 int statuscode = 200; 250 int statuscode = 200;
251 251 byte[] jpeg = new byte[0];
252 byte[] jpeg;
253
254 252
255 if (myMapImageJPEG.Length == 0) 253 if (myMapImageJPEG.Length == 0)
256 { 254 {
257 MemoryStream imgstream = new MemoryStream(); 255 MemoryStream imgstream = new MemoryStream();
258 Bitmap mapTexture = new Bitmap(1,1); 256 Bitmap mapTexture = new Bitmap(1,1);
259 System.Drawing.Image image = (System.Drawing.Image)mapTexture; 257 ManagedImage managedImage;
258 Image image = (Image)mapTexture;
260 259
261 try 260 try
262 { 261 {
@@ -268,21 +267,24 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
268 AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true); 267 AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true);
269 268
270 // Decode image to System.Drawing.Image 269 // Decode image to System.Drawing.Image
271 image = OpenJPEG.DecodeToImage(mapasset.Data); 270 if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image))
271 {
272 // Save to bitmap
273 mapTexture = new Bitmap(image);
272 274
273 // Save to bitmap 275 ImageCodecInfo myImageCodecInfo;
274 mapTexture = new Bitmap(image);
275 276
276 ImageCodecInfo myImageCodecInfo; 277 Encoder myEncoder;
277 278
278 Encoder myEncoder; 279 EncoderParameter myEncoderParameter;
280 EncoderParameters myEncoderParameters = new EncoderParameters();
279 281
280 EncoderParameter myEncoderParameter; 282 myImageCodecInfo = GetEncoderInfo("image/jpeg");
281 EncoderParameters myEncoderParameters = new EncoderParameters();
282 283
283 myImageCodecInfo = GetEncoderInfo("image/jpeg"); 284 myEncoder = Encoder.Quality;
284 285
285 myEncoder = Encoder.Quality; 286 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
287 myEncoderParameters.Param[0] = myEncoderParameter;
286 288
287 myEncoderParameter = new EncoderParameter(myEncoder, 95L); 289 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
288 myEncoderParameters.Param[0] = myEncoderParameter; 290 myEncoderParameters.Param[0] = myEncoderParameter;
@@ -290,14 +292,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
290 // Save bitmap to stream 292 // Save bitmap to stream
291 mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters); 293 mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters);
292 294
293 // Write the stream to a byte array for output 295 // Write the stream to a byte array for output
294 jpeg = imgstream.ToArray(); 296 jpeg = imgstream.ToArray();
295 myMapImageJPEG = jpeg; 297 myMapImageJPEG = jpeg;
298 }
296 } 299 }
297 catch (Exception) 300 catch (Exception)
298 { 301 {
299 // Dummy! 302 // Dummy!
300 jpeg = new byte[0];
301 m_log.Warn("[WEBMAP]: Unable to generate Map image"); 303 m_log.Warn("[WEBMAP]: Unable to generate Map image");
302 } 304 }
303 finally 305 finally
@@ -314,7 +316,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
314 // Use cached version so we don't have to loose our mind 316 // Use cached version so we don't have to loose our mind
315 jpeg = myMapImageJPEG; 317 jpeg = myMapImageJPEG;
316 } 318 }
317 //jpeg = new byte[0];
318 319
319 reply["str_response_string"] = Convert.ToBase64String(jpeg); 320 reply["str_response_string"] = Convert.ToBase64String(jpeg);
320 reply["int_response_code"] = statuscode; 321 reply["int_response_code"] = statuscode;
diff --git a/OpenSim/Region/Environment/Scenes/Animation.cs b/OpenSim/Region/Environment/Scenes/Animation.cs
index b2fca90..2854e06 100644
--- a/OpenSim/Region/Environment/Scenes/Animation.cs
+++ b/OpenSim/Region/Environment/Scenes/Animation.cs
@@ -26,14 +26,14 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Region.Environment.Scenes 31namespace OpenSim.Region.Environment.Scenes
32{ 32{
33 public class Animation 33 public class Animation
34 { 34 {
35 private LLUUID animID; 35 private UUID animID;
36 public LLUUID AnimID 36 public UUID AnimID
37 { 37 {
38 get { return animID; } 38 get { return animID; }
39 set { animID = value; } 39 set { animID = value; }
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes
50 { 50 {
51 } 51 }
52 52
53 public Animation(LLUUID animID, int sequenceNum) 53 public Animation(UUID animID, int sequenceNum)
54 { 54 {
55 this.animID = animID; 55 this.animID = animID;
56 this.sequenceNum = sequenceNum; 56 this.sequenceNum = sequenceNum;
diff --git a/OpenSim/Region/Environment/Scenes/AnimationSet.cs b/OpenSim/Region/Environment/Scenes/AnimationSet.cs
index c485d30..0b7188a 100644
--- a/OpenSim/Region/Environment/Scenes/AnimationSet.cs
+++ b/OpenSim/Region/Environment/Scenes/AnimationSet.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
33{ 33{
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Scenes
43 ResetDefaultAnimation(); 43 ResetDefaultAnimation();
44 } 44 }
45 45
46 public bool HasAnimation(LLUUID animID) 46 public bool HasAnimation(UUID animID)
47 { 47 {
48 if (m_defaultAnimation.AnimID == animID) 48 if (m_defaultAnimation.AnimID == animID)
49 return true; 49 return true;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Environment.Scenes
57 return false; 57 return false;
58 } 58 }
59 59
60 public bool Add(LLUUID animID, int sequenceNum) 60 public bool Add(UUID animID, int sequenceNum)
61 { 61 {
62 lock (m_animations) 62 lock (m_animations)
63 { 63 {
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment.Scenes
70 return false; 70 return false;
71 } 71 }
72 72
73 public bool Remove(LLUUID animID) 73 public bool Remove(UUID animID)
74 { 74 {
75 lock (m_animations) 75 lock (m_animations)
76 { 76 {
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Scenes
103 /// The default animation is reserved for "main" animations 103 /// The default animation is reserved for "main" animations
104 /// that are mutually exclusive, e.g. flying and sitting. 104 /// that are mutually exclusive, e.g. flying and sitting.
105 /// </summary> 105 /// </summary>
106 public bool SetDefaultAnimation(LLUUID animID, int sequenceNum) 106 public bool SetDefaultAnimation(UUID animID, int sequenceNum)
107 { 107 {
108 if (m_defaultAnimation.AnimID != animID) 108 if (m_defaultAnimation.AnimID != animID)
109 { 109 {
@@ -123,18 +123,18 @@ namespace OpenSim.Region.Environment.Scenes
123 /// </summary> 123 /// </summary>
124 public bool TrySetDefaultAnimation(string anim, int sequenceNum) 124 public bool TrySetDefaultAnimation(string anim, int sequenceNum)
125 { 125 {
126 if (Animations.AnimsLLUUID.ContainsKey(anim)) 126 if (Animations.AnimsUUID.ContainsKey(anim))
127 { 127 {
128 return SetDefaultAnimation(Animations.AnimsLLUUID[anim], sequenceNum); 128 return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum);
129 } 129 }
130 return false; 130 return false;
131 } 131 }
132 132
133 public void GetArrays(out LLUUID[] animIDs, out int[] sequenceNums) 133 public void GetArrays(out UUID[] animIDs, out int[] sequenceNums)
134 { 134 {
135 lock (m_animations) 135 lock (m_animations)
136 { 136 {
137 animIDs = new LLUUID[m_animations.Count + 1]; 137 animIDs = new UUID[m_animations.Count + 1];
138 sequenceNums = new int[m_animations.Count + 1]; 138 sequenceNums = new int[m_animations.Count + 1];
139 139
140 animIDs[0] = m_defaultAnimation.AnimID; 140 animIDs[0] = m_defaultAnimation.AnimID;
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
index fe9c8e7..6bb5525 100644
--- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
+++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
@@ -27,18 +27,18 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Xml; 29using System.Xml;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
33{ 33{
34 public class AvatarAnimations 34 public class AvatarAnimations
35 { 35 {
36 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); 36 public Dictionary<string, UUID> AnimsUUID = new Dictionary<string, UUID>();
37 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); 37 public Dictionary<UUID, string> AnimsNames = new Dictionary<UUID, string>();
38 38
39 public AvatarAnimations() 39 public AvatarAnimations()
40 { 40 {
41 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) 41 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.Xml"))
42 { 42 {
43 XmlDocument doc = new XmlDocument(); 43 XmlDocument doc = new XmlDocument();
44 doc.Load(reader); 44 doc.Load(reader);
@@ -47,9 +47,9 @@ namespace OpenSim.Region.Environment.Scenes
47 if (nod.Attributes["name"] != null) 47 if (nod.Attributes["name"] != null)
48 { 48 {
49 string name = (string)nod.Attributes["name"].Value; 49 string name = (string)nod.Attributes["name"].Value;
50 LLUUID id = (LLUUID)nod.InnerText; 50 UUID id = (UUID)nod.InnerText;
51 51
52 AnimsLLUUID.Add(name, id); 52 AnimsUUID.Add(name, id);
53 AnimsNames.Add(id, name); 53 AnimsNames.Add(id, name);
54 } 54 }
55 } 55 }
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 40caabc..884ff32 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -28,8 +28,7 @@
28using System; 28using System;
29using System.Runtime.Serialization; 29using System.Runtime.Serialization;
30using System.Security.Permissions; 30using System.Security.Permissions;
31using Axiom.Math; 31using OpenMetaverse;
32using libsecondlife;
33 32
34namespace OpenSim.Region.Environment.Scenes 33namespace OpenSim.Region.Environment.Scenes
35{ 34{
@@ -45,9 +44,9 @@ namespace OpenSim.Region.Environment.Scenes
45 } 44 }
46 protected Scene m_scene; 45 protected Scene m_scene;
47 46
48 protected LLUUID m_uuid; 47 protected UUID m_uuid;
49 48
50 public virtual LLUUID UUID 49 public virtual UUID UUID
51 { 50 {
52 get { return m_uuid; } 51 get { return m_uuid; }
53 set { m_uuid = value; } 52 set { m_uuid = value; }
@@ -73,30 +72,30 @@ namespace OpenSim.Region.Environment.Scenes
73 } 72 }
74 protected bool m_isDeleted; 73 protected bool m_isDeleted;
75 74
76 protected LLVector3 m_pos; 75 protected Vector3 m_pos;
77 76
78 /// <summary> 77 /// <summary>
79 /// 78 ///
80 /// </summary> 79 /// </summary>
81 public virtual LLVector3 AbsolutePosition 80 public virtual Vector3 AbsolutePosition
82 { 81 {
83 get { return m_pos; } 82 get { return m_pos; }
84 set { m_pos = value; } 83 set { m_pos = value; }
85 } 84 }
86 85
87 protected LLVector3 m_velocity; 86 protected Vector3 m_velocity;
88 protected LLVector3 m_rotationalvelocity; 87 protected Vector3 m_rotationalvelocity;
89 88
90 /// <summary> 89 /// <summary>
91 /// 90 ///
92 /// </summary> 91 /// </summary>
93 public virtual LLVector3 Velocity 92 public virtual Vector3 Velocity
94 { 93 {
95 get { return m_velocity; } 94 get { return m_velocity; }
96 set { m_velocity = value; } 95 set { m_velocity = value; }
97 } 96 }
98 97
99 protected Quaternion m_rotation = new Quaternion(0, 0, 1, 0); 98 protected Quaternion m_rotation = new Quaternion(0f, 0f, 1f, 0f);
100 99
101 public virtual Quaternion Rotation 100 public virtual Quaternion Rotation
102 { 101 {
@@ -117,13 +116,13 @@ namespace OpenSim.Region.Environment.Scenes
117 /// </summary> 116 /// </summary>
118 public EntityBase() 117 public EntityBase()
119 { 118 {
120 m_uuid = LLUUID.Zero; 119 m_uuid = UUID.Zero;
121 120
122 m_pos = new LLVector3(); 121 m_pos = Vector3.Zero;
123 m_velocity = new LLVector3(); 122 m_velocity = Vector3.Zero;
124 Rotation = new Quaternion(); 123 Rotation = Quaternion.Identity;
125 m_name = "(basic entity)"; 124 m_name = "(basic entity)";
126 m_rotationalvelocity = new LLVector3(0, 0, 0); 125 m_rotationalvelocity = Vector3.Zero;
127 } 126 }
128 127
129 /// <summary> 128 /// <summary>
@@ -157,33 +156,33 @@ namespace OpenSim.Region.Environment.Scenes
157 throw new ArgumentNullException("info"); 156 throw new ArgumentNullException("info");
158 } 157 }
159 158
160 m_uuid = new LLUUID((Guid)info.GetValue("m_uuid", typeof(Guid))); 159 m_uuid = new UUID((Guid)info.GetValue("m_uuid", typeof(Guid)));
161 m_name = (string)info.GetValue("m_name", typeof(string)); 160 m_name = (string)info.GetValue("m_name", typeof(string));
162 161
163 m_pos 162 m_pos
164 = new LLVector3( 163 = new Vector3(
165 (float)info.GetValue("m_pos.X", typeof(float)), 164 (float)info.GetValue("m_pos.X", typeof(float)),
166 (float)info.GetValue("m_pos.Y", typeof(float)), 165 (float)info.GetValue("m_pos.Y", typeof(float)),
167 (float)info.GetValue("m_pos.Z", typeof(float))); 166 (float)info.GetValue("m_pos.Z", typeof(float)));
168 167
169 m_velocity 168 m_velocity
170 = new LLVector3( 169 = new Vector3(
171 (float)info.GetValue("m_velocity.X", typeof(float)), 170 (float)info.GetValue("m_velocity.X", typeof(float)),
172 (float)info.GetValue("m_velocity.Y", typeof(float)), 171 (float)info.GetValue("m_velocity.Y", typeof(float)),
173 (float)info.GetValue("m_velocity.Z", typeof(float))); 172 (float)info.GetValue("m_velocity.Z", typeof(float)));
174 173
175 m_rotationalvelocity 174 m_rotationalvelocity
176 = new LLVector3( 175 = new Vector3(
177 (float)info.GetValue("m_rotationalvelocity.X", typeof(float)), 176 (float)info.GetValue("m_rotationalvelocity.X", typeof(float)),
178 (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)), 177 (float)info.GetValue("m_rotationalvelocity.Y", typeof(float)),
179 (float)info.GetValue("m_rotationalvelocity.Z", typeof(float))); 178 (float)info.GetValue("m_rotationalvelocity.Z", typeof(float)));
180 179
181 m_rotation 180 m_rotation
182 = new Quaternion( 181 = new Quaternion(
183 (float)info.GetValue("m_rotation.w", typeof(float)), 182 (float)info.GetValue("m_rotation.X", typeof(float)),
184 (float)info.GetValue("m_rotation.x", typeof(float)), 183 (float)info.GetValue("m_rotation.Y", typeof(float)),
185 (float)info.GetValue("m_rotation.y", typeof(float)), 184 (float)info.GetValue("m_rotation.Z", typeof(float)),
186 (float)info.GetValue("m_rotation.z", typeof(float))); 185 (float)info.GetValue("m_rotation.W", typeof(float)));
187 186
188 m_localId = (uint)info.GetValue("m_localId", typeof(uint)); 187 m_localId = (uint)info.GetValue("m_localId", typeof(uint));
189 188
@@ -200,29 +199,29 @@ namespace OpenSim.Region.Environment.Scenes
200 throw new ArgumentNullException("info"); 199 throw new ArgumentNullException("info");
201 } 200 }
202 201
203 info.AddValue("m_uuid", m_uuid.UUID); 202 info.AddValue("m_uuid", m_uuid.Guid);
204 info.AddValue("m_name", m_name); 203 info.AddValue("m_name", m_name);
205 204
206 // LLVector3 205 // Vector3
207 info.AddValue("m_pos.X", m_pos.X); 206 info.AddValue("m_pos.X", m_pos.X);
208 info.AddValue("m_pos.Y", m_pos.Y); 207 info.AddValue("m_pos.Y", m_pos.Y);
209 info.AddValue("m_pos.Z", m_pos.Z); 208 info.AddValue("m_pos.Z", m_pos.Z);
210 209
211 // LLVector3 210 // Vector3
212 info.AddValue("m_velocity.X", m_velocity.X); 211 info.AddValue("m_velocity.X", m_velocity.X);
213 info.AddValue("m_velocity.Y", m_velocity.Y); 212 info.AddValue("m_velocity.Y", m_velocity.Y);
214 info.AddValue("m_velocity.Z", m_velocity.Z); 213 info.AddValue("m_velocity.Z", m_velocity.Z);
215 214
216 // LLVector3 215 // Vector3
217 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X); 216 info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X);
218 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y); 217 info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y);
219 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z); 218 info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z);
220 219
221 // Quaternion 220 // Quaternion
222 info.AddValue("m_rotation.w", m_rotation.w); 221 info.AddValue("m_rotation.X", m_rotation.X);
223 info.AddValue("m_rotation.x", m_rotation.x); 222 info.AddValue("m_rotation.Y", m_rotation.Y);
224 info.AddValue("m_rotation.y", m_rotation.y); 223 info.AddValue("m_rotation.Z", m_rotation.Z);
225 info.AddValue("m_rotation.z", m_rotation.z); 224 info.AddValue("m_rotation.W", m_rotation.W);
226 225
227 info.AddValue("m_localId", m_localId); 226 info.AddValue("m_localId", m_localId);
228 } 227 }
diff --git a/OpenSim/Region/Environment/Scenes/EntityList.cs b/OpenSim/Region/Environment/Scenes/EntityList.cs
index ff8def2..09eb84f 100644
--- a/OpenSim/Region/Environment/Scenes/EntityList.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityList.cs
@@ -29,9 +29,8 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using Axiom.Math; 32using OpenMetaverse;
33using libsecondlife; 33using OpenMetaverse.Packets;
34using libsecondlife.Packets;
35using log4net; 34using log4net;
36using OpenSim.Framework; 35using OpenSim.Framework;
37using OpenSim.Region.Environment.Types; 36using OpenSim.Region.Environment.Types;
@@ -69,9 +68,9 @@ namespace OpenSim.Region.Environment.Scenes
69 // ListObjects() 68 // ListObjects()
70 // ListPresenes() 69 // ListPresenes()
71 // RemoveAll() 70 // RemoveAll()
72 // FindObject(LLUUID) 71 // FindObject(UUID)
73 // FindObject(int) 72 // FindObject(int)
74 // FindPresence(LLUUID) 73 // FindPresence(UUID)
75 74
76 public void Add(SceneObjectGroup obj) 75 public void Add(SceneObjectGroup obj)
77 { 76 {
@@ -84,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes
84 m_pres_by_uuid[pres.UUID] = pres; 83 m_pres_by_uuid[pres.UUID] = pres;
85 } 84 }
86 85
87 public SceneObjectGroup RemoveObject(LLUUID uuid) 86 public SceneObjectGroup RemoveObject(UUID uuid)
88 { 87 {
89 SceneObjectGroup sog = null; 88 SceneObjectGroup sog = null;
90 try 89 try
@@ -101,7 +100,7 @@ namespace OpenSim.Region.Environment.Scenes
101 return sog; 100 return sog;
102 } 101 }
103 102
104 public ScenePresence RemovePresence(LLUUID uuid) 103 public ScenePresence RemovePresence(UUID uuid)
105 { 104 {
106 ScenePresence sp = null; 105 ScenePresence sp = null;
107 try 106 try
@@ -117,7 +116,7 @@ namespace OpenSim.Region.Environment.Scenes
117 return sp; 116 return sp;
118 } 117 }
119 118
120 public SceneObjectGroup FindObject(LLUUID uuid) 119 public SceneObjectGroup FindObject(UUID uuid)
121 { 120 {
122 try 121 try
123 { 122 {
@@ -135,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
135 { 134 {
136 try 135 try
137 { 136 {
138 LLUUID uuid = (LLUUID)m_obj_by_local[local]; 137 UUID uuid = (UUID)m_obj_by_local[local];
139 SceneObjectGroup sog = (SceneObjectGroup)m_obj_by_uuid[uuid]; 138 SceneObjectGroup sog = (SceneObjectGroup)m_obj_by_uuid[uuid];
140 return sog; 139 return sog;
141 } 140 }
@@ -146,7 +145,7 @@ namespace OpenSim.Region.Environment.Scenes
146 } 145 }
147 } 146 }
148 147
149 public ScenePresence FindPresense(LLUUID uuid) 148 public ScenePresence FindPresense(UUID uuid)
150 { 149 {
151 try 150 try
152 { 151 {
@@ -159,4 +158,4 @@ namespace OpenSim.Region.Environment.Scenes
159 } 158 }
160 } 159 }
161 } 160 }
162} \ No newline at end of file 161}
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index d48ef0c..58f5efe 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32using Caps=OpenSim.Framework.Communications.Capabilities.Caps; 32using Caps=OpenSim.Framework.Communications.Capabilities.Caps;
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Scenes
63 63
64 public event OnNewPresenceDelegate OnNewPresence; 64 public event OnNewPresenceDelegate OnNewPresence;
65 65
66 public delegate void OnRemovePresenceDelegate(LLUUID agentId); 66 public delegate void OnRemovePresenceDelegate(UUID agentId);
67 67
68 public event OnRemovePresenceDelegate OnRemovePresence; 68 public event OnRemovePresenceDelegate OnRemovePresence;
69 69
@@ -83,11 +83,11 @@ namespace OpenSim.Region.Environment.Scenes
83 83
84 public event OnShutdownDelegate OnShutdown; 84 public event OnShutdownDelegate OnShutdown;
85 85
86 public delegate void ObjectGrabDelegate(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient); 86 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient);
87 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient); 87 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient);
88 public delegate void ScriptResetDelegate(uint localID, LLUUID itemID); 88 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
89 89
90 public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); 90 public delegate void OnPermissionErrorDelegate(UUID user, string reason);
91 91
92 public event ObjectGrabDelegate OnObjectGrab; 92 public event ObjectGrabDelegate OnObjectGrab;
93 public event ObjectDeGrabDelegate OnObjectDeGrab; 93 public event ObjectDeGrabDelegate OnObjectDeGrab;
@@ -95,27 +95,27 @@ namespace OpenSim.Region.Environment.Scenes
95 95
96 public event OnPermissionErrorDelegate OnPermissionError; 96 public event OnPermissionErrorDelegate OnPermissionError;
97 97
98 public delegate void NewRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez); 98 public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez);
99 99
100 public event NewRezScript OnRezScript; 100 public event NewRezScript OnRezScript;
101 101
102 public delegate void RemoveScript(uint localID, LLUUID itemID); 102 public delegate void RemoveScript(uint localID, UUID itemID);
103 103
104 public event RemoveScript OnRemoveScript; 104 public event RemoveScript OnRemoveScript;
105 105
106 public delegate void StartScript(uint localID, LLUUID itemID); 106 public delegate void StartScript(uint localID, UUID itemID);
107 107
108 public event StartScript OnStartScript; 108 public event StartScript OnStartScript;
109 109
110 public delegate void StopScript(uint localID, LLUUID itemID); 110 public delegate void StopScript(uint localID, UUID itemID);
111 111
112 public event StopScript OnStopScript; 112 public event StopScript OnStopScript;
113 113
114 public delegate bool SceneGroupMoved(LLUUID groupID, LLVector3 delta); 114 public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta);
115 115
116 public event SceneGroupMoved OnSceneGroupMove; 116 public event SceneGroupMoved OnSceneGroupMove;
117 117
118 public delegate void SceneGroupGrabed(LLUUID groupID, LLVector3 offset, LLUUID userID); 118 public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID);
119 119
120 public event SceneGroupGrabed OnSceneGroupGrab; 120 public event SceneGroupGrabed OnSceneGroupGrab;
121 121
@@ -123,11 +123,11 @@ namespace OpenSim.Region.Environment.Scenes
123 123
124 public event LandObjectAdded OnLandObjectAdded; 124 public event LandObjectAdded OnLandObjectAdded;
125 125
126 public delegate void LandObjectRemoved(LLUUID globalID); 126 public delegate void LandObjectRemoved(UUID globalID);
127 127
128 public event LandObjectRemoved OnLandObjectRemoved; 128 public event LandObjectRemoved OnLandObjectRemoved;
129 129
130 public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID); 130 public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID);
131 131
132 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; 132 public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel;
133 133
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes
143 143
144 public event NewGridInstantMessage OnGridInstantMessageToGroupsModule; 144 public event NewGridInstantMessage OnGridInstantMessageToGroupsModule;
145 145
146 public delegate void ClientClosed(LLUUID clientID); 146 public delegate void ClientClosed(UUID clientID);
147 147
148 public event ClientClosed OnClientClosed; 148 public event ClientClosed OnClientClosed;
149 149
@@ -151,11 +151,11 @@ namespace OpenSim.Region.Environment.Scenes
151 151
152 public event ScriptChangedEvent OnScriptChangedEvent; 152 public event ScriptChangedEvent OnScriptChangedEvent;
153 153
154 public delegate void ScriptControlEvent(uint localID, LLUUID item, LLUUID avatarID, uint held, uint changed); 154 public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed);
155 155
156 public event ScriptControlEvent OnScriptControlEvent; 156 public event ScriptControlEvent OnScriptControlEvent;
157 157
158 public delegate void ScriptAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos); 158 public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
159 159
160 public event ScriptAtTargetEvent OnScriptAtTargetEvent; 160 public event ScriptAtTargetEvent OnScriptAtTargetEvent;
161 161
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Scenes
175 public delegate void OnMakeRootAgentDelegate(ScenePresence presence); 175 public delegate void OnMakeRootAgentDelegate(ScenePresence presence);
176 public event OnMakeRootAgentDelegate OnMakeRootAgent; 176 public event OnMakeRootAgentDelegate OnMakeRootAgent;
177 177
178 public delegate void NewInventoryItemUploadComplete(LLUUID avatarID, LLUUID assetID, string name, int userlevel); 178 public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel);
179 179
180 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; 180 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
181 181
@@ -217,13 +217,13 @@ namespace OpenSim.Region.Environment.Scenes
217 /// has been instantiated and before it is return to the 217 /// has been instantiated and before it is return to the
218 /// client and provides region modules to add their caps. 218 /// client and provides region modules to add their caps.
219 /// </summary> 219 /// </summary>
220 public delegate void RegisterCapsEvent(LLUUID agentID, Caps caps); 220 public delegate void RegisterCapsEvent(UUID agentID, Caps caps);
221 public event RegisterCapsEvent OnRegisterCaps; 221 public event RegisterCapsEvent OnRegisterCaps;
222 /// <summary> 222 /// <summary>
223 /// DeregisterCapsEvent is called by Scene when the caps 223 /// DeregisterCapsEvent is called by Scene when the caps
224 /// handler for an agent are removed. 224 /// handler for an agent are removed.
225 /// </summary> 225 /// </summary>
226 public delegate void DeregisterCapsEvent(LLUUID agentID, Caps caps); 226 public delegate void DeregisterCapsEvent(UUID agentID, Caps caps);
227 public event DeregisterCapsEvent OnDeregisterCaps; 227 public event DeregisterCapsEvent OnDeregisterCaps;
228 /// <summary> 228 /// <summary>
229 /// ChatFromWorldEvent is called via Scene when a chat message 229 /// ChatFromWorldEvent is called via Scene when a chat message
@@ -244,8 +244,8 @@ namespace OpenSim.Region.Environment.Scenes
244 244
245 public class MoneyTransferArgs : EventArgs 245 public class MoneyTransferArgs : EventArgs
246 { 246 {
247 public LLUUID sender; 247 public UUID sender;
248 public LLUUID receiver; 248 public UUID receiver;
249 249
250 // Always false. The SL protocol sucks. 250 // Always false. The SL protocol sucks.
251 public bool authenticated = false; 251 public bool authenticated = false;
@@ -254,7 +254,7 @@ namespace OpenSim.Region.Environment.Scenes
254 public int transactiontype; 254 public int transactiontype;
255 public string description; 255 public string description;
256 256
257 public MoneyTransferArgs(LLUUID asender, LLUUID areceiver, int aamount, int atransactiontype, string adescription) 257 public MoneyTransferArgs(UUID asender, UUID areceiver, int aamount, int atransactiontype, string adescription)
258 { 258 {
259 sender = asender; 259 sender = asender;
260 receiver = areceiver; 260 receiver = areceiver;
@@ -266,11 +266,11 @@ namespace OpenSim.Region.Environment.Scenes
266 266
267 public class LandBuyArgs : EventArgs 267 public class LandBuyArgs : EventArgs
268 { 268 {
269 public LLUUID agentId = LLUUID.Zero; 269 public UUID agentId = UUID.Zero;
270 270
271 public LLUUID groupId = LLUUID.Zero; 271 public UUID groupId = UUID.Zero;
272 272
273 public LLUUID parcelOwnerID = LLUUID.Zero; 273 public UUID parcelOwnerID = UUID.Zero;
274 274
275 public bool final = false; 275 public bool final = false;
276 public bool groupOwned = false; 276 public bool groupOwned = false;
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes
284 public int transactionID = 0; 284 public int transactionID = 0;
285 public int amountDebited = 0; 285 public int amountDebited = 0;
286 286
287 public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, 287 public LandBuyArgs(UUID pagentId, UUID pgroupId, bool pfinal, bool pgroupOwned,
288 bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, 288 bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice,
289 bool pauthenticated) 289 bool pauthenticated)
290 { 290 {
@@ -385,7 +385,7 @@ namespace OpenSim.Region.Environment.Scenes
385 handlerClientMovement(avatar); 385 handlerClientMovement(avatar);
386 } 386 }
387 387
388 public void TriggerPermissionError(LLUUID user, string reason) 388 public void TriggerPermissionError(UUID user, string reason)
389 { 389 {
390 handlerPermissionError = OnPermissionError; 390 handlerPermissionError = OnPermissionError;
391 if (handlerPermissionError != null) 391 if (handlerPermissionError != null)
@@ -422,7 +422,7 @@ namespace OpenSim.Region.Environment.Scenes
422 handlerNewPresence(presence); 422 handlerNewPresence(presence);
423 } 423 }
424 424
425 public void TriggerOnRemovePresence(LLUUID agentId) 425 public void TriggerOnRemovePresence(UUID agentId)
426 { 426 {
427 handlerRemovePresence = OnRemovePresence; 427 handlerRemovePresence = OnRemovePresence;
428 if (handlerRemovePresence != null) 428 if (handlerRemovePresence != null)
@@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
492 handlerShutdown(); 492 handlerShutdown();
493 } 493 }
494 494
495 public void TriggerObjectGrab(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient) 495 public void TriggerObjectGrab(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient)
496 { 496 {
497 handlerObjectGrab = OnObjectGrab; 497 handlerObjectGrab = OnObjectGrab;
498 if (handlerObjectGrab != null) 498 if (handlerObjectGrab != null)
@@ -510,7 +510,7 @@ namespace OpenSim.Region.Environment.Scenes
510 } 510 }
511 } 511 }
512 512
513 public void TriggerScriptReset(uint localID, LLUUID itemID) 513 public void TriggerScriptReset(uint localID, UUID itemID)
514 { 514 {
515 handlerScriptReset = OnScriptReset; 515 handlerScriptReset = OnScriptReset;
516 if (handlerScriptReset != null) 516 if (handlerScriptReset != null)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Environment.Scenes
519 } 519 }
520 } 520 }
521 521
522 public void TriggerRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 522 public void TriggerRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
523 { 523 {
524 handlerRezScript = OnRezScript; 524 handlerRezScript = OnRezScript;
525 if (handlerRezScript != null) 525 if (handlerRezScript != null)
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Scenes
528 } 528 }
529 } 529 }
530 530
531 public void TriggerStartScript(uint localID, LLUUID itemID) 531 public void TriggerStartScript(uint localID, UUID itemID)
532 { 532 {
533 handlerStartScript = OnStartScript; 533 handlerStartScript = OnStartScript;
534 if (handlerStartScript != null) 534 if (handlerStartScript != null)
@@ -537,7 +537,7 @@ namespace OpenSim.Region.Environment.Scenes
537 } 537 }
538 } 538 }
539 539
540 public void TriggerStopScript(uint localID, LLUUID itemID) 540 public void TriggerStopScript(uint localID, UUID itemID)
541 { 541 {
542 handlerStopScript = OnStopScript; 542 handlerStopScript = OnStopScript;
543 if (handlerStopScript != null) 543 if (handlerStopScript != null)
@@ -546,7 +546,7 @@ namespace OpenSim.Region.Environment.Scenes
546 } 546 }
547 } 547 }
548 548
549 public void TriggerRemoveScript(uint localID, LLUUID itemID) 549 public void TriggerRemoveScript(uint localID, UUID itemID)
550 { 550 {
551 handlerRemoveScript = OnRemoveScript; 551 handlerRemoveScript = OnRemoveScript;
552 if (handlerRemoveScript != null) 552 if (handlerRemoveScript != null)
@@ -555,7 +555,7 @@ namespace OpenSim.Region.Environment.Scenes
555 } 555 }
556 } 556 }
557 557
558 public bool TriggerGroupMove(LLUUID groupID, LLVector3 delta) 558 public bool TriggerGroupMove(UUID groupID, Vector3 delta)
559 { 559 {
560 handlerSceneGroupMove = OnSceneGroupMove; 560 handlerSceneGroupMove = OnSceneGroupMove;
561 561
@@ -566,7 +566,7 @@ namespace OpenSim.Region.Environment.Scenes
566 return true; 566 return true;
567 } 567 }
568 568
569 public void TriggerGroupGrab(LLUUID groupID, LLVector3 offset, LLUUID userID) 569 public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
570 { 570 {
571 handlerSceneGroupGrab = OnSceneGroupGrab; 571 handlerSceneGroupGrab = OnSceneGroupGrab;
572 if (handlerSceneGroupGrab != null) 572 if (handlerSceneGroupGrab != null)
@@ -585,7 +585,7 @@ namespace OpenSim.Region.Environment.Scenes
585 } 585 }
586 } 586 }
587 587
588 public void TriggerLandObjectRemoved(LLUUID globalID) 588 public void TriggerLandObjectRemoved(UUID globalID)
589 { 589 {
590 handlerLandObjectRemoved = OnLandObjectRemoved; 590 handlerLandObjectRemoved = OnLandObjectRemoved;
591 if (handlerLandObjectRemoved != null) 591 if (handlerLandObjectRemoved != null)
@@ -601,7 +601,7 @@ namespace OpenSim.Region.Environment.Scenes
601 TriggerLandObjectAdded(newParcel); 601 TriggerLandObjectAdded(newParcel);
602 } 602 }
603 603
604 public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 604 public void TriggerAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
605 { 605 {
606 handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel; 606 handlerAvatarEnteringNewParcel = OnAvatarEnteringNewParcel;
607 607
@@ -634,7 +634,7 @@ namespace OpenSim.Region.Environment.Scenes
634 } 634 }
635 } 635 }
636 636
637 public void TriggerClientClosed(LLUUID ClientID) 637 public void TriggerClientClosed(UUID ClientID)
638 { 638 {
639 handlerClientClosed = OnClientClosed; 639 handlerClientClosed = OnClientClosed;
640 if (handlerClientClosed != null) 640 if (handlerClientClosed != null)
@@ -661,7 +661,7 @@ namespace OpenSim.Region.Environment.Scenes
661 } 661 }
662 } 662 }
663 663
664 public void TriggerOnRegisterCaps(LLUUID agentID, Caps caps) 664 public void TriggerOnRegisterCaps(UUID agentID, Caps caps)
665 { 665 {
666 handlerRegisterCaps = OnRegisterCaps; 666 handlerRegisterCaps = OnRegisterCaps;
667 if (handlerRegisterCaps != null) 667 if (handlerRegisterCaps != null)
@@ -670,7 +670,7 @@ namespace OpenSim.Region.Environment.Scenes
670 } 670 }
671 } 671 }
672 672
673 public void TriggerOnDeregisterCaps(LLUUID agentID, Caps caps) 673 public void TriggerOnDeregisterCaps(UUID agentID, Caps caps)
674 { 674 {
675 handlerDeregisterCaps = OnDeregisterCaps; 675 handlerDeregisterCaps = OnDeregisterCaps;
676 if (handlerDeregisterCaps != null) 676 if (handlerDeregisterCaps != null)
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Environment.Scenes
679 } 679 }
680 } 680 }
681 681
682 public void TriggerOnNewInventoryItemUploadComplete(LLUUID agentID, LLUUID AssetID, String AssetName, int userlevel) 682 public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel)
683 { 683 {
684 handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; 684 handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
685 if (handlerNewInventoryItemUpdateComplete != null) 685 if (handlerNewInventoryItemUpdateComplete != null)
@@ -706,7 +706,7 @@ namespace OpenSim.Region.Environment.Scenes
706 } 706 }
707 } 707 }
708 708
709 public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) 709 public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
710 { 710 {
711 handlerScriptAtTargetEvent = OnScriptAtTargetEvent; 711 handlerScriptAtTargetEvent = OnScriptAtTargetEvent;
712 if (handlerScriptAtTargetEvent != null) 712 if (handlerScriptAtTargetEvent != null)
@@ -769,7 +769,7 @@ namespace OpenSim.Region.Environment.Scenes
769 } 769 }
770 } 770 }
771 771
772 internal void TriggerControlEvent(uint p, LLUUID scriptUUID, LLUUID avatarID, uint held, uint _changed) 772 internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed)
773 { 773 {
774 handlerScriptControlEvent = OnScriptControlEvent; 774 handlerScriptControlEvent = OnScriptControlEvent;
775 if (handlerScriptControlEvent != null) 775 if (handlerScriptControlEvent != null)
diff --git a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
index 3a20190..9a4c72f 100644
--- a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
+++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
@@ -25,13 +25,13 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30 30
31namespace OpenSim.Region.Environment.Scenes 31namespace OpenSim.Region.Environment.Scenes
32{ 32{
33 public interface IScenePresenceBody 33 public interface IScenePresenceBody
34 { 34 {
35 void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); 35 void processMovement(IClientAPI remoteClient, uint flags, Quaternion bodyRotation);
36 } 36 }
37} 37}
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 658478d..e61fb19 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -28,9 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using Axiom.Math; 31using OpenMetaverse;
32using libsecondlife; 32using OpenMetaverse.Packets;
33using libsecondlife.Packets;
34using log4net; 33using log4net;
35using OpenSim.Framework; 34using OpenSim.Framework;
36using OpenSim.Region.Environment.Types; 35using OpenSim.Region.Environment.Types;
@@ -53,11 +52,11 @@ namespace OpenSim.Region.Environment.Scenes
53 52
54 #region Fields 53 #region Fields
55 54
56 protected internal Dictionary<LLUUID, ScenePresence> ScenePresences = new Dictionary<LLUUID, ScenePresence>(); 55 protected internal Dictionary<UUID, ScenePresence> ScenePresences = new Dictionary<UUID, ScenePresence>();
57 // SceneObjects is not currently populated or used. 56 // SceneObjects is not currently populated or used.
58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects; 57 //public Dictionary<UUID, SceneObjectGroup> SceneObjects;
59 protected internal Dictionary<LLUUID, EntityBase> Entities = new Dictionary<LLUUID, EntityBase>(); 58 protected internal Dictionary<UUID, EntityBase> Entities = new Dictionary<UUID, EntityBase>();
60 protected internal Dictionary<LLUUID, ScenePresence> RestorePresences = new Dictionary<LLUUID, ScenePresence>(); 59 protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>();
61 60
62 protected internal BasicQuadTreeNode QuadTree; 61 protected internal BasicQuadTreeNode QuadTree;
63 62
@@ -276,7 +275,7 @@ namespace OpenSim.Region.Environment.Scenes
276 /// </summary> 275 /// </summary>
277 /// <param name="sceneObject"></param> 276 /// <param name="sceneObject"></param>
278 /// <returns>true if the object was deleted, false if there was no object to delete</returns> 277 /// <returns>true if the object was deleted, false if there was no object to delete</returns>
279 protected internal bool DeleteSceneObject(LLUUID uuid, bool resultOfObjectLinked) 278 protected internal bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
280 { 279 {
281 lock (Entities) 280 lock (Entities)
282 { 281 {
@@ -378,9 +377,9 @@ namespace OpenSim.Region.Environment.Scenes
378 } 377 }
379 } 378 }
380 379
381 protected internal void HandleUndo(IClientAPI remoteClient, LLUUID primId) 380 protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
382 { 381 {
383 if (primId != LLUUID.Zero) 382 if (primId != UUID.Zero)
384 { 383 {
385 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId); 384 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
386 if (part != null) 385 if (part != null)
@@ -389,7 +388,7 @@ namespace OpenSim.Region.Environment.Scenes
389 } 388 }
390 389
391 protected internal void HandleObjectGroupUpdate( 390 protected internal void HandleObjectGroupUpdate(
392 IClientAPI remoteClient, LLUUID GroupID, uint objectLocalID, LLUUID Garbage) 391 IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
393 { 392 {
394 List<EntityBase> EntityList = GetEntities(); 393 List<EntityBase> EntityList = GetEntities();
395 394
@@ -417,17 +416,17 @@ namespace OpenSim.Region.Environment.Scenes
417 /// <param name="objectLocalID"></param> 416 /// <param name="objectLocalID"></param>
418 /// <param name="AttachmentPt"></param> 417 /// <param name="AttachmentPt"></param>
419 /// <param name="rot"></param> 418 /// <param name="rot"></param>
420 protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) 419 protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot)
421 { 420 {
422 // Calls attach with a Zero position 421 // Calls attach with a Zero position
423 422
424 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); 423 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero);
425 } 424 }
426 425
427 public SceneObjectGroup RezSingleAttachment( 426 public SceneObjectGroup RezSingleAttachment(
428 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) 427 IClientAPI remoteClient, UUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
429 { 428 {
430 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true, 429 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
431 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), 430 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
432 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), 431 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
433 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), 432 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
@@ -435,17 +434,17 @@ namespace OpenSim.Region.Environment.Scenes
435 434
436 if (objatt != null) 435 if (objatt != null)
437 { 436 {
438 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition); 437 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition);
439 objatt.ScheduleGroupForFullUpdate(); 438 objatt.ScheduleGroupForFullUpdate();
440 } 439 }
441 return objatt; 440 return objatt;
442 } 441 }
443 442
444 // What makes this method odd and unique is it tries to detach using an LLUUID.... Yay for standards. 443 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards.
445 // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? 444 // To LocalId or UUID, *THAT* is the question. How now Brown UUID??
446 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) 445 public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
447 { 446 {
448 if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... 447 if (itemID == UUID.Zero) // If this happened, someone made a mistake....
449 return; 448 return;
450 449
451 List<EntityBase> EntityList = GetEntities(); 450 List<EntityBase> EntityList = GetEntities();
@@ -467,7 +466,7 @@ namespace OpenSim.Region.Environment.Scenes
467 } 466 }
468 467
469 protected internal void AttachObject( 468 protected internal void AttachObject(
470 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot, LLVector3 attachPos) 469 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos)
471 { 470 {
472 List<EntityBase> EntityList = GetEntities(); 471 List<EntityBase> EntityList = GetEntities();
473 foreach (EntityBase obj in EntityList) 472 foreach (EntityBase obj in EntityList)
@@ -485,7 +484,7 @@ namespace OpenSim.Region.Environment.Scenes
485 if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint()) 484 if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
486 { 485 {
487 486
488 attachPos = LLVector3.Zero; 487 attachPos = Vector3.Zero;
489 } 488 }
490 489
491 // AttachmentPt 0 means the client chose to 'wear' the attachment. 490 // AttachmentPt 0 means the client chose to 'wear' the attachment.
@@ -503,16 +502,16 @@ namespace OpenSim.Region.Environment.Scenes
503 { 502 {
504 // Stick it on left hand with Zero Offset from the attachment point. 503 // Stick it on left hand with Zero Offset from the attachment point.
505 AttachmentPt = (uint)AttachmentPoint.LeftHand; 504 AttachmentPt = (uint)AttachmentPoint.LeftHand;
506 attachPos = LLVector3.Zero; 505 attachPos = Vector3.Zero;
507 } 506 }
508 m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString()); 507 m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString());
509 508
510 509
511 510
512 // Saves and gets assetID 511 // Saves and gets assetID
513 if (group.GetFromAssetID() == LLUUID.Zero) 512 if (group.GetFromAssetID() == UUID.Zero)
514 { 513 {
515 LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId); 514 UUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId);
516 515
517 // sets assetID so client can show asset as 'attached' in inventory 516 // sets assetID so client can show asset as 'attached' in inventory
518 group.SetFromAssetID(newAssetID); 517 group.SetFromAssetID(newAssetID);
@@ -573,7 +572,7 @@ namespace OpenSim.Region.Environment.Scenes
573 /// <summary> 572 /// <summary>
574 /// Remove a presence from the scene 573 /// Remove a presence from the scene
575 /// </summary> 574 /// </summary>
576 protected internal void RemoveScenePresence(LLUUID agentID) 575 protected internal void RemoveScenePresence(UUID agentID)
577 { 576 {
578 lock (Entities) 577 lock (Entities)
579 { 578 {
@@ -696,7 +695,7 @@ namespace OpenSim.Region.Environment.Scenes
696 /// </summary> 695 /// </summary>
697 /// <param name="agentId"></param> 696 /// <param name="agentId"></param>
698 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns> 697 /// <returns>null if either the avatar wasn't in the scene, or they do not have a controlling client</returns>
699 protected internal IClientAPI GetControllingClient(LLUUID agentId) 698 protected internal IClientAPI GetControllingClient(UUID agentId)
700 { 699 {
701 ScenePresence presence = GetScenePresence(agentId); 700 ScenePresence presence = GetScenePresence(agentId);
702 701
@@ -735,7 +734,7 @@ namespace OpenSim.Region.Environment.Scenes
735 /// </summary> 734 /// </summary>
736 /// <param name="avatarID"></param> 735 /// <param name="avatarID"></param>
737 /// <returns>null if the agent was not found</returns> 736 /// <returns>null if the agent was not found</returns>
738 protected internal ScenePresence GetScenePresence(LLUUID agentID) 737 protected internal ScenePresence GetScenePresence(UUID agentID)
739 { 738 {
740 ScenePresence sp; 739 ScenePresence sp;
741 ScenePresences.TryGetValue(agentID, out sp); 740 ScenePresences.TryGetValue(agentID, out sp);
@@ -768,7 +767,7 @@ namespace OpenSim.Region.Environment.Scenes
768 /// </summary> 767 /// </summary>
769 /// <param name="fullID"></param> 768 /// <param name="fullID"></param>
770 /// <returns>null if no scene object group containing that prim is found</returns> 769 /// <returns>null if no scene object group containing that prim is found</returns>
771 private SceneObjectGroup GetGroupByPrim(LLUUID fullID) 770 private SceneObjectGroup GetGroupByPrim(UUID fullID)
772 { 771 {
773 List<EntityBase> EntityList = GetEntities(); 772 List<EntityBase> EntityList = GetEntities();
774 773
@@ -828,7 +827,7 @@ namespace OpenSim.Region.Environment.Scenes
828 /// </summary> 827 /// </summary>
829 /// <param name="fullID"></param> 828 /// <param name="fullID"></param>
830 /// <returns>null if the part was not found</returns> 829 /// <returns>null if the part was not found</returns>
831 protected internal SceneObjectPart GetSceneObjectPart(LLUUID fullID) 830 protected internal SceneObjectPart GetSceneObjectPart(UUID fullID)
832 { 831 {
833 SceneObjectGroup group = GetGroupByPrim(fullID); 832 SceneObjectGroup group = GetGroupByPrim(fullID);
834 if (group != null) 833 if (group != null)
@@ -837,7 +836,7 @@ namespace OpenSim.Region.Environment.Scenes
837 return null; 836 return null;
838 } 837 }
839 838
840 protected internal bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar) 839 protected internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
841 { 840 {
842 ScenePresence presence; 841 ScenePresence presence;
843 if (ScenePresences.TryGetValue(avatarId, out presence)) 842 if (ScenePresences.TryGetValue(avatarId, out presence))
@@ -906,7 +905,7 @@ namespace OpenSim.Region.Environment.Scenes
906 if (ent is SceneObjectGroup) 905 if (ent is SceneObjectGroup)
907 { 906 {
908 SceneObjectGroup grp = (SceneObjectGroup)ent; 907 SceneObjectGroup grp = (SceneObjectGroup)ent;
909 if ((grp.RootPart.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Scripted) != 0) 908 if ((grp.RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
910 { 909 {
911 if (grp.scriptScore >= 0.01) 910 if (grp.scriptScore >= 0.01)
912 { 911 {
@@ -938,13 +937,13 @@ namespace OpenSim.Region.Environment.Scenes
938 } 937 }
939 } 938 }
940 939
941 protected internal LLUUID ConvertLocalIDToFullID(uint localID) 940 protected internal UUID ConvertLocalIDToFullID(uint localID)
942 { 941 {
943 SceneObjectGroup group = GetGroupByPrim(localID); 942 SceneObjectGroup group = GetGroupByPrim(localID);
944 if (group != null) 943 if (group != null)
945 return group.GetPartsFullID(localID); 944 return group.GetPartsFullID(localID);
946 else 945 else
947 return LLUUID.Zero; 946 return UUID.Zero;
948 } 947 }
949 948
950 protected internal void ForEachClient(Action<IClientAPI> action) 949 protected internal void ForEachClient(Action<IClientAPI> action)
@@ -968,7 +967,7 @@ namespace OpenSim.Region.Environment.Scenes
968 /// <param name="localID"></param> 967 /// <param name="localID"></param>
969 /// <param name="scale"></param> 968 /// <param name="scale"></param>
970 /// <param name="remoteClient"></param> 969 /// <param name="remoteClient"></param>
971 protected internal void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 970 protected internal void UpdatePrimScale(uint localID, Vector3 scale, IClientAPI remoteClient)
972 { 971 {
973 SceneObjectGroup group = GetGroupByPrim(localID); 972 SceneObjectGroup group = GetGroupByPrim(localID);
974 if (group != null) 973 if (group != null)
@@ -980,7 +979,7 @@ namespace OpenSim.Region.Environment.Scenes
980 } 979 }
981 } 980 }
982 981
983 protected internal void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 982 protected internal void UpdatePrimGroupScale(uint localID, Vector3 scale, IClientAPI remoteClient)
984 { 983 {
985 SceneObjectGroup group = GetGroupByPrim(localID); 984 SceneObjectGroup group = GetGroupByPrim(localID);
986 if (group != null) 985 if (group != null)
@@ -1001,7 +1000,7 @@ namespace OpenSim.Region.Environment.Scenes
1001 /// <param name="RequestFlags"></param> 1000 /// <param name="RequestFlags"></param>
1002 /// <param name="ObjectID"></param> 1001 /// <param name="ObjectID"></param>
1003 protected internal void RequestObjectPropertiesFamily( 1002 protected internal void RequestObjectPropertiesFamily(
1004 IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID) 1003 IClientAPI remoteClient, UUID AgentID, uint RequestFlags, UUID ObjectID)
1005 { 1004 {
1006 SceneObjectGroup group = GetGroupByPrim(ObjectID); 1005 SceneObjectGroup group = GetGroupByPrim(ObjectID);
1007 if (group != null) 1006 if (group != null)
@@ -1016,7 +1015,7 @@ namespace OpenSim.Region.Environment.Scenes
1016 /// <param name="localID"></param> 1015 /// <param name="localID"></param>
1017 /// <param name="rot"></param> 1016 /// <param name="rot"></param>
1018 /// <param name="remoteClient"></param> 1017 /// <param name="remoteClient"></param>
1019 protected internal void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 1018 protected internal void UpdatePrimSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
1020 { 1019 {
1021 SceneObjectGroup group = GetGroupByPrim(localID); 1020 SceneObjectGroup group = GetGroupByPrim(localID);
1022 if (group != null) 1021 if (group != null)
@@ -1034,7 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes
1034 /// <param name="localID"></param> 1033 /// <param name="localID"></param>
1035 /// <param name="rot"></param> 1034 /// <param name="rot"></param>
1036 /// <param name="remoteClient"></param> 1035 /// <param name="remoteClient"></param>
1037 protected internal void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 1036 protected internal void UpdatePrimRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
1038 { 1037 {
1039 SceneObjectGroup group = GetGroupByPrim(localID); 1038 SceneObjectGroup group = GetGroupByPrim(localID);
1040 if (group != null) 1039 if (group != null)
@@ -1053,7 +1052,7 @@ namespace OpenSim.Region.Environment.Scenes
1053 /// <param name="pos"></param> 1052 /// <param name="pos"></param>
1054 /// <param name="rot"></param> 1053 /// <param name="rot"></param>
1055 /// <param name="remoteClient"></param> 1054 /// <param name="remoteClient"></param>
1056 protected internal void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient) 1055 protected internal void UpdatePrimRotation(uint localID, Vector3 pos, Quaternion rot, IClientAPI remoteClient)
1057 { 1056 {
1058 SceneObjectGroup group = GetGroupByPrim(localID); 1057 SceneObjectGroup group = GetGroupByPrim(localID);
1059 if (group != null) 1058 if (group != null)
@@ -1071,12 +1070,12 @@ namespace OpenSim.Region.Environment.Scenes
1071 /// <param name="localID"></param> 1070 /// <param name="localID"></param>
1072 /// <param name="pos"></param> 1071 /// <param name="pos"></param>
1073 /// <param name="remoteClient"></param> 1072 /// <param name="remoteClient"></param>
1074 protected internal void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 1073 protected internal void UpdatePrimSinglePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
1075 { 1074 {
1076 SceneObjectGroup group = GetGroupByPrim(localID); 1075 SceneObjectGroup group = GetGroupByPrim(localID);
1077 if (group != null) 1076 if (group != null)
1078 { 1077 {
1079 // LLVector3 oldPos = group.AbsolutePosition; 1078 // Vector3 oldPos = group.AbsolutePosition;
1080 if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.IsAttachment) 1079 if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.IsAttachment)
1081 { 1080 {
1082 group.SendGroupTerseUpdate(); 1081 group.SendGroupTerseUpdate();
@@ -1096,13 +1095,13 @@ namespace OpenSim.Region.Environment.Scenes
1096 /// <param name="localID"></param> 1095 /// <param name="localID"></param>
1097 /// <param name="pos"></param> 1096 /// <param name="pos"></param>
1098 /// <param name="remoteClient"></param> 1097 /// <param name="remoteClient"></param>
1099 protected internal void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 1098 protected internal void UpdatePrimPosition(uint localID, Vector3 pos, IClientAPI remoteClient)
1100 { 1099 {
1101 SceneObjectGroup group = GetGroupByPrim(localID); 1100 SceneObjectGroup group = GetGroupByPrim(localID);
1102 if (group != null) 1101 if (group != null)
1103 { 1102 {
1104 1103
1105 // LLVector3 oldPos = group.AbsolutePosition; 1104 // Vector3 oldPos = group.AbsolutePosition;
1106 if (group.RootPart.IsAttachment) 1105 if (group.RootPart.IsAttachment)
1107 { 1106 {
1108 group.UpdateGroupPosition(pos); 1107 group.UpdateGroupPosition(pos);
@@ -1166,7 +1165,7 @@ namespace OpenSim.Region.Environment.Scenes
1166 /// <param name="offset"></param> 1165 /// <param name="offset"></param>
1167 /// <param name="pos"></param> 1166 /// <param name="pos"></param>
1168 /// <param name="remoteClient"></param> 1167 /// <param name="remoteClient"></param>
1169 protected internal void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 1168 protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient)
1170 { 1169 {
1171 SceneObjectGroup group = GetGroupByPrim(objectID); 1170 SceneObjectGroup group = GetGroupByPrim(objectID);
1172 if (group != null) 1171 if (group != null)
@@ -1219,7 +1218,7 @@ namespace OpenSim.Region.Environment.Scenes
1219 } 1218 }
1220 } 1219 }
1221 1220
1222 protected internal void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) 1221 protected internal void UpdateExtraParam(UUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data)
1223 { 1222 {
1224 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1223 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1225 1224
@@ -1237,7 +1236,7 @@ namespace OpenSim.Region.Environment.Scenes
1237 /// </summary> 1236 /// </summary>
1238 /// <param name="primLocalID"></param> 1237 /// <param name="primLocalID"></param>
1239 /// <param name="shapeBlock"></param> 1238 /// <param name="shapeBlock"></param>
1240 protected internal void UpdatePrimShape(LLUUID agentID, uint primLocalID, UpdateShapeArgs shapeBlock) 1239 protected internal void UpdatePrimShape(UUID agentID, uint primLocalID, UpdateShapeArgs shapeBlock)
1241 { 1240 {
1242 SceneObjectGroup group = GetGroupByPrim(primLocalID); 1241 SceneObjectGroup group = GetGroupByPrim(primLocalID);
1243 if (group != null) 1242 if (group != null)
@@ -1323,7 +1322,7 @@ namespace OpenSim.Region.Environment.Scenes
1323 1322
1324 // We need to explicitly resend the newly link prim's object properties since no other actions 1323 // We need to explicitly resend the newly link prim's object properties since no other actions
1325 // occur on link to invoke this elsewhere (such as object selection) 1324 // occur on link to invoke this elsewhere (such as object selection)
1326 parenPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 1325 parenPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
1327 parenPrim.TriggerScriptChangedEvent(Changed.LINK); 1326 parenPrim.TriggerScriptChangedEvent(Changed.LINK);
1328 if (client != null) 1327 if (client != null)
1329 parenPrim.GetProperties(client); 1328 parenPrim.GetProperties(client);
@@ -1478,8 +1477,8 @@ namespace OpenSim.Region.Environment.Scenes
1478 1477
1479 protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID) 1478 protected internal void MakeObjectSearchable(IClientAPI remoteClient, bool IncludeInSearch, uint localID)
1480 { 1479 {
1481 LLUUID user = remoteClient.AgentId; 1480 UUID user = remoteClient.AgentId;
1482 LLUUID objid = null; 1481 UUID objid = null;
1483 SceneObjectPart obj = null; 1482 SceneObjectPart obj = null;
1484 1483
1485 List<EntityBase> EntityList = GetEntities(); 1484 List<EntityBase> EntityList = GetEntities();
@@ -1487,7 +1486,7 @@ namespace OpenSim.Region.Environment.Scenes
1487 { 1486 {
1488 if (ent is SceneObjectGroup) 1487 if (ent is SceneObjectGroup)
1489 { 1488 {
1490 foreach (KeyValuePair<LLUUID, SceneObjectPart> subent in ((SceneObjectGroup)ent).Children) 1489 foreach (KeyValuePair<UUID, SceneObjectPart> subent in ((SceneObjectGroup)ent).Children)
1491 { 1490 {
1492 if (subent.Value.LocalId == localID) 1491 if (subent.Value.LocalId == localID)
1493 { 1492 {
@@ -1512,11 +1511,11 @@ namespace OpenSim.Region.Environment.Scenes
1512 1511
1513 if (IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanEditObject(objid, user)) 1512 if (IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanEditObject(objid, user))
1514 { 1513 {
1515 obj.ParentGroup.RootPart.AddFlag(LLObject.ObjectFlags.JointWheel); 1514 obj.ParentGroup.RootPart.AddFlag(PrimFlags.JointWheel);
1516 } 1515 }
1517 else if (!IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(objid,user)) 1516 else if (!IncludeInSearch && m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(objid,user))
1518 { 1517 {
1519 obj.ParentGroup.RootPart.RemFlag(LLObject.ObjectFlags.JointWheel); 1518 obj.ParentGroup.RootPart.RemFlag(PrimFlags.JointWheel);
1520 } 1519 }
1521 } 1520 }
1522 1521
@@ -1526,12 +1525,12 @@ namespace OpenSim.Region.Environment.Scenes
1526 /// <param name="originalPrim"></param> 1525 /// <param name="originalPrim"></param>
1527 /// <param name="offset"></param> 1526 /// <param name="offset"></param>
1528 /// <param name="flags"></param> 1527 /// <param name="flags"></param>
1529 protected internal void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) 1528 protected internal void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID)
1530 { 1529 {
1531 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1530 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
1532 1531
1533 // SceneObjectGroup dupe = DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero); 1532 // SceneObjectGroup dupe = DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero);
1534 DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero); 1533 DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity);
1535 } 1534 }
1536 /// <summary> 1535 /// <summary>
1537 /// Duplicate the given object. 1536 /// Duplicate the given object.
@@ -1539,7 +1538,7 @@ namespace OpenSim.Region.Environment.Scenes
1539 /// <param name="originalPrim"></param> 1538 /// <param name="originalPrim"></param>
1540 /// <param name="offset"></param> 1539 /// <param name="offset"></param>
1541 /// <param name="flags"></param> 1540 /// <param name="flags"></param>
1542 protected internal SceneObjectGroup DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID, Quaternion rot) 1541 protected internal SceneObjectGroup DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
1543 { 1542 {
1544 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); 1543 //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
1545 1544
@@ -1580,9 +1579,9 @@ namespace OpenSim.Region.Environment.Scenes
1580 1579
1581 m_numPrim += copy.Children.Count; 1580 m_numPrim += copy.Children.Count;
1582 1581
1583 if (rot != Quaternion.Zero) 1582 if (rot != Quaternion.Identity)
1584 { 1583 {
1585 copy.UpdateGroupRotation(new LLQuaternion(rot.x, rot.y, rot.z, rot.w)); 1584 copy.UpdateGroupRotation(rot);
1586 } 1585 }
1587 1586
1588 copy.CreateScriptInstances(0, false); 1587 copy.CreateScriptInstances(0, false);
@@ -1610,7 +1609,7 @@ namespace OpenSim.Region.Environment.Scenes
1610 1609
1611 return 1610 return
1612 (float) 1611 (float)
1613 Math.Sqrt((v1.x - v2.x) * (v1.x - v2.x) + (v1.y - v2.y) * (v1.y - v2.y) + (v1.z - v2.z) * (v1.z - v2.z)); 1612 Math.Sqrt((v1.X - v2.X) * (v1.X - v2.X) + (v1.Y - v2.Y) * (v1.Y - v2.Y) + (v1.Z - v2.Z) * (v1.Z - v2.Z));
1614 } 1613 }
1615 1614
1616 #endregion 1615 #endregion
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index ab580ae..cdd6943 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Timers; 32using System.Timers;
33using libsecondlife; 33using OpenMetaverse;
34using libsecondlife.Packets; 34using OpenMetaverse.Packets;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes
46 public EntityBase selectedEnt; 46 public EntityBase selectedEnt;
47 public IClientAPI remoteClient; 47 public IClientAPI remoteClient;
48 public SceneObjectGroup objectGroup; 48 public SceneObjectGroup objectGroup;
49 public LLUUID folderID; 49 public UUID folderID;
50 public bool permissionToDelete; 50 public bool permissionToDelete;
51 } 51 }
52 52
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
74 } 74 }
75 } 75 }
76 76
77 public void AddUploadedInventoryItem(LLUUID agentID, InventoryItemBase item) 77 public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item)
78 { 78 {
79 IMoneyModule money=RequestModuleInterface<IMoneyModule>(); 79 IMoneyModule money=RequestModuleInterface<IMoneyModule>();
80 if (money != null) 80 if (money != null)
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Scenes
85 AddInventoryItem(agentID, item); 85 AddInventoryItem(agentID, item);
86 } 86 }
87 87
88 public bool AddInventoryItemReturned(LLUUID AgentId, InventoryItemBase item) 88 public bool AddInventoryItemReturned(UUID AgentId, InventoryItemBase item)
89 { 89 {
90 CachedUserInfo userInfo 90 CachedUserInfo userInfo
91 = CommsManager.UserProfileCacheService.GetUserDetails(AgentId); 91 = CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Scenes
103 } 103 }
104 } 104 }
105 105
106 public void AddInventoryItem(LLUUID AgentID, InventoryItemBase item) 106 public void AddInventoryItem(UUID AgentID, InventoryItemBase item)
107 { 107 {
108 CachedUserInfo userInfo 108 CachedUserInfo userInfo
109 = CommsManager.UserProfileCacheService.GetUserDetails(AgentID); 109 = CommsManager.UserProfileCacheService.GetUserDetails(AgentID);
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes
160 /// <param name="itemID"></param> 160 /// <param name="itemID"></param>
161 /// <param name="data"></param> 161 /// <param name="data"></param>
162 /// <returns></returns> 162 /// <returns></returns>
163 public LLUUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID itemID, byte[] data) 163 public UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
164 { 164 {
165 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 165 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
166 if (userInfo != null) 166 if (userInfo != null)
@@ -192,13 +192,13 @@ namespace OpenSim.Region.Environment.Scenes
192 } 192 }
193 } 193 }
194 } 194 }
195 return LLUUID.Zero; 195 return UUID.Zero;
196 } 196 }
197 197
198 /// <summary> 198 /// <summary>
199 /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, LLUUID, byte[])</see> 199 /// <see>CapsUpdatedInventoryItemAsset(IClientAPI, UUID, byte[])</see>
200 /// </summary> 200 /// </summary>
201 private LLUUID CapsUpdateInventoryItemAsset(LLUUID avatarId, LLUUID itemID, byte[] data) 201 private UUID CapsUpdateInventoryItemAsset(UUID avatarId, UUID itemID, byte[] data)
202 { 202 {
203 ScenePresence avatar; 203 ScenePresence avatar;
204 204
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Scenes
214 avatarId); 214 avatarId);
215 } 215 }
216 216
217 return LLUUID.Zero; 217 return UUID.Zero;
218 } 218 }
219 219
220 /// <summary> 220 /// <summary>
@@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Scenes
225 /// <param name="primID">The prim which contains the item to update</param> 225 /// <param name="primID">The prim which contains the item to update</param>
226 /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param> 226 /// <param name="isScriptRunning">Indicates whether the script to update is currently running</param>
227 /// <param name="data"></param> 227 /// <param name="data"></param>
228 public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, LLUUID itemId, 228 public void CapsUpdateTaskInventoryScriptAsset(IClientAPI remoteClient, UUID itemId,
229 LLUUID primId, bool isScriptRunning, byte[] data) 229 UUID primId, bool isScriptRunning, byte[] data)
230 { 230 {
231 // Retrieve group 231 // Retrieve group
232 SceneObjectPart part = GetSceneObjectPart(primId); 232 SceneObjectPart part = GetSceneObjectPart(primId);
@@ -274,10 +274,10 @@ namespace OpenSim.Region.Environment.Scenes
274 } 274 }
275 275
276 /// <summary> 276 /// <summary>
277 /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, LLUUID, LLUUID, bool, byte[])</see> 277 /// <see>CapsUpdateTaskInventoryScriptAsset(IClientAPI, UUID, UUID, bool, byte[])</see>
278 /// </summary> 278 /// </summary>
279 private void CapsUpdateTaskInventoryScriptAsset(LLUUID avatarId, LLUUID itemId, 279 private void CapsUpdateTaskInventoryScriptAsset(UUID avatarId, UUID itemId,
280 LLUUID primId, bool isScriptRunning, byte[] data) 280 UUID primId, bool isScriptRunning, byte[] data)
281 { 281 {
282 ScenePresence avatar; 282 ScenePresence avatar;
283 283
@@ -300,17 +300,17 @@ namespace OpenSim.Region.Environment.Scenes
300 /// a transaction 300 /// a transaction
301 /// </summary> 301 /// </summary>
302 /// <param name="remoteClient"></param> 302 /// <param name="remoteClient"></param>
303 /// <param name="transactionID">The transaction ID. If this is LLUUID.Zero we will 303 /// <param name="transactionID">The transaction ID. If this is UUID.Zero we will
304 /// assume that we are not in a transaction</param> 304 /// assume that we are not in a transaction</param>
305 /// <param name="itemID">The ID of the updated item</param> 305 /// <param name="itemID">The ID of the updated item</param>
306 /// <param name="name">The name of the updated item</param> 306 /// <param name="name">The name of the updated item</param>
307 /// <param name="description">The description of the updated item</param> 307 /// <param name="description">The description of the updated item</param>
308 /// <param name="nextOwnerMask">The permissions of the updated item</param> 308 /// <param name="nextOwnerMask">The permissions of the updated item</param>
309/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, 309/* public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
310 LLUUID itemID, string name, string description, 310 UUID itemID, string name, string description,
311 uint nextOwnerMask)*/ 311 uint nextOwnerMask)*/
312 public void UpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID transactionID, 312 public void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
313 LLUUID itemID, InventoryItemBase itemUpd) 313 UUID itemID, InventoryItemBase itemUpd)
314 { 314 {
315 CachedUserInfo userInfo 315 CachedUserInfo userInfo
316 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 316 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Scenes
321 321
322 if (item != null) 322 if (item != null)
323 { 323 {
324 if (LLUUID.Zero == transactionID) 324 if (UUID.Zero == transactionID)
325 { 325 {
326 item.Name = itemUpd.Name; 326 item.Name = itemUpd.Name;
327 item.Description = itemUpd.Description; 327 item.Description = itemUpd.Description;
@@ -378,7 +378,7 @@ namespace OpenSim.Region.Environment.Scenes
378 /// <param name="recipientClient"></param> 378 /// <param name="recipientClient"></param>
379 /// <param name="senderId">ID of the sender of the item</param> 379 /// <param name="senderId">ID of the sender of the item</param>
380 /// <param name="itemId"></param> 380 /// <param name="itemId"></param>
381 public void GiveInventoryItem(IClientAPI recipientClient, LLUUID senderId, LLUUID itemId) 381 public void GiveInventoryItem(IClientAPI recipientClient, UUID senderId, UUID itemId)
382 { 382 {
383 // Retrieve the item from the sender 383 // Retrieve the item from the sender
384 CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId); 384 CachedUserInfo senderUserInfo = CommsManager.UserProfileCacheService.GetUserDetails(senderId);
@@ -413,13 +413,13 @@ namespace OpenSim.Region.Environment.Scenes
413 InventoryItemBase itemCopy = new InventoryItemBase(); 413 InventoryItemBase itemCopy = new InventoryItemBase();
414 itemCopy.Owner = recipientClient.AgentId; 414 itemCopy.Owner = recipientClient.AgentId;
415 itemCopy.Creator = senderId; 415 itemCopy.Creator = senderId;
416 itemCopy.ID = LLUUID.Random(); 416 itemCopy.ID = UUID.Random();
417 itemCopy.AssetID = item.AssetID; 417 itemCopy.AssetID = item.AssetID;
418 itemCopy.Description = item.Description; 418 itemCopy.Description = item.Description;
419 itemCopy.Name = item.Name; 419 itemCopy.Name = item.Name;
420 itemCopy.AssetType = item.AssetType; 420 itemCopy.AssetType = item.AssetType;
421 itemCopy.InvType = item.InvType; 421 itemCopy.InvType = item.InvType;
422 itemCopy.Folder = LLUUID.Zero; 422 itemCopy.Folder = UUID.Zero;
423 if (ExternalChecks.ExternalChecksPropagatePermissions()) 423 if (ExternalChecks.ExternalChecksPropagatePermissions())
424 { 424 {
425 if (item.InvType == 6) 425 if (item.InvType == 6)
@@ -493,8 +493,8 @@ namespace OpenSim.Region.Environment.Scenes
493 } 493 }
494 } 494 }
495 495
496 public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, 496 public void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID,
497 LLUUID newFolderID, string newName) 497 UUID newFolderID, string newName)
498 { 498 {
499 m_log.DebugFormat( 499 m_log.DebugFormat(
500 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}", 500 "[AGENT INVENTORY]: CopyInventoryItem received by {0} with oldAgentID {1}, oldItemID {2}, new FolderID {3}, newName {4}",
@@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes
579 asset.Name = name; 579 asset.Name = name;
580 asset.Description = description; 580 asset.Description = description;
581 asset.Type = assetType; 581 asset.Type = assetType;
582 asset.FullID = LLUUID.Random(); 582 asset.FullID = UUID.Random();
583 asset.Data = (data == null) ? new byte[1] : data; 583 asset.Data = (data == null) ? new byte[1] : data;
584 584
585 return asset; 585 return asset;
@@ -593,7 +593,7 @@ namespace OpenSim.Region.Environment.Scenes
593 /// <param name="itemID"></param> 593 /// <param name="itemID"></param>
594 /// <param name="length"></param> 594 /// <param name="length"></param>
595 /// <param name="newName"></param> 595 /// <param name="newName"></param>
596 public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, 596 public void MoveInventoryItem(IClientAPI remoteClient, UUID folderID, UUID itemID, int length,
597 string newName) 597 string newName)
598 { 598 {
599 m_log.DebugFormat( 599 m_log.DebugFormat(
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Environment.Scenes
648 /// <param name="asset"></param> 648 /// <param name="asset"></param>
649 /// <param name="invType"></param> 649 /// <param name="invType"></param>
650 /// <param name="nextOwnerMask"></param> 650 /// <param name="nextOwnerMask"></param>
651 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, 651 private void CreateNewInventoryItem(IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID,
652 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) 652 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
653 { 653 {
654 CreateNewInventoryItem( 654 CreateNewInventoryItem(
@@ -667,7 +667,7 @@ namespace OpenSim.Region.Environment.Scenes
667 /// <param name="nextOwnerMask"></param> 667 /// <param name="nextOwnerMask"></param>
668 /// <param name="creationDate"></param> 668 /// <param name="creationDate"></param>
669 private void CreateNewInventoryItem( 669 private void CreateNewInventoryItem(
670 IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 670 IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
671 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate) 671 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate)
672 { 672 {
673 CachedUserInfo userInfo 673 CachedUserInfo userInfo
@@ -678,7 +678,7 @@ namespace OpenSim.Region.Environment.Scenes
678 InventoryItemBase item = new InventoryItemBase(); 678 InventoryItemBase item = new InventoryItemBase();
679 item.Owner = remoteClient.AgentId; 679 item.Owner = remoteClient.AgentId;
680 item.Creator = remoteClient.AgentId; 680 item.Creator = remoteClient.AgentId;
681 item.ID = LLUUID.Random(); 681 item.ID = UUID.Random();
682 item.AssetID = asset.FullID; 682 item.AssetID = asset.FullID;
683 item.Description = asset.Description; 683 item.Description = asset.Description;
684 item.Name = name; 684 item.Name = name;
@@ -717,14 +717,14 @@ namespace OpenSim.Region.Environment.Scenes
717 /// <param name="type"></param> 717 /// <param name="type"></param>
718 /// <param name="wearableType"></param> 718 /// <param name="wearableType"></param>
719 /// <param name="nextOwnerMask"></param> 719 /// <param name="nextOwnerMask"></param>
720 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 720 public void CreateNewInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
721 uint callbackID, string description, string name, sbyte invType, 721 uint callbackID, string description, string name, sbyte invType,
722 sbyte assetType, 722 sbyte assetType,
723 byte wearableType, uint nextOwnerMask, int creationDate) 723 byte wearableType, uint nextOwnerMask, int creationDate)
724 { 724 {
725// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); 725// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
726 726
727 if (transactionID == LLUUID.Zero) 727 if (transactionID == UUID.Zero)
728 { 728 {
729 CachedUserInfo userInfo 729 CachedUserInfo userInfo
730 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 730 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Scenes
734 ScenePresence presence; 734 ScenePresence presence;
735 TryGetAvatar(remoteClient.AgentId, out presence); 735 TryGetAvatar(remoteClient.AgentId, out presence);
736 byte[] data = null; 736 byte[] data = null;
737 if (invType == 3 && presence != null) // libsecondlife.asset.assettype.landmark = 3 - needs to be turned into an enum 737 if (invType == 3 && presence != null) // OpenMetaverse.asset.assettype.landmark = 3 - needs to be turned into an enum
738 { 738 {
739 LLVector3 pos=presence.AbsolutePosition; 739 Vector3 pos=presence.AbsolutePosition;
740 string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", 740 string strdata=String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",
741 presence.Scene.RegionInfo.RegionID, 741 presence.Scene.RegionInfo.RegionID,
742 pos.X, pos.Y, pos.Z, 742 pos.X, pos.Y, pos.Z,
@@ -775,7 +775,7 @@ namespace OpenSim.Region.Environment.Scenes
775 /// </summary> 775 /// </summary>
776 /// <param name="remoteClient"></param> 776 /// <param name="remoteClient"></param>
777 /// <param name="itemID"></param> 777 /// <param name="itemID"></param>
778 private void RemoveInventoryItem(IClientAPI remoteClient, LLUUID itemID) 778 private void RemoveInventoryItem(IClientAPI remoteClient, UUID itemID)
779 { 779 {
780 CachedUserInfo userInfo 780 CachedUserInfo userInfo
781 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 781 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -798,7 +798,7 @@ namespace OpenSim.Region.Environment.Scenes
798 /// </summary> 798 /// </summary>
799 /// <param name="remoteClient"></param> 799 /// <param name="remoteClient"></param>
800 /// <param name="folderID"></param> 800 /// <param name="folderID"></param>
801 private void RemoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID) 801 private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID)
802 { 802 {
803 CachedUserInfo userInfo 803 CachedUserInfo userInfo
804 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 804 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -873,7 +873,7 @@ namespace OpenSim.Region.Environment.Scenes
873 /// be necessary for a permissions check at some stage.</param> 873 /// be necessary for a permissions check at some stage.</param>
874 /// <param name="itemID"></param> 874 /// <param name="itemID"></param>
875 /// <param name="localID"></param> 875 /// <param name="localID"></param>
876 public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID) 876 public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
877 { 877 {
878 SceneObjectPart part = GetSceneObjectPart(localID); 878 SceneObjectPart part = GetSceneObjectPart(localID);
879 SceneObjectGroup group = part.ParentGroup; 879 SceneObjectGroup group = part.ParentGroup;
@@ -896,7 +896,7 @@ namespace OpenSim.Region.Environment.Scenes
896 } 896 }
897 } 897 }
898 898
899 private InventoryItemBase CreateAgentInventoryItemFromTask(LLUUID destAgent, SceneObjectPart part, LLUUID itemId) 899 private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
900 { 900 {
901 TaskInventoryItem taskItem = part.GetInventoryItem(itemId); 901 TaskInventoryItem taskItem = part.GetInventoryItem(itemId);
902 902
@@ -913,7 +913,7 @@ namespace OpenSim.Region.Environment.Scenes
913 913
914 InventoryItemBase agentItem = new InventoryItemBase(); 914 InventoryItemBase agentItem = new InventoryItemBase();
915 915
916 agentItem.ID = LLUUID.Random(); 916 agentItem.ID = UUID.Random();
917 agentItem.Creator = taskItem.CreatorID; 917 agentItem.Creator = taskItem.CreatorID;
918 agentItem.Owner = destAgent; 918 agentItem.Owner = destAgent;
919 agentItem.AssetID = taskItem.AssetID; 919 agentItem.AssetID = taskItem.AssetID;
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Environment.Scenes
954 /// <param name="folderID"></param> 954 /// <param name="folderID"></param>
955 /// <param name="part"></param> 955 /// <param name="part"></param>
956 /// <param name="itemID"></param> 956 /// <param name="itemID"></param>
957 public void MoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, SceneObjectPart part, LLUUID itemId) 957 public void MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId)
958 { 958 {
959 959
960 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId); 960 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId);
@@ -970,7 +970,7 @@ namespace OpenSim.Region.Environment.Scenes
970 /// <param name="folderID"></param> 970 /// <param name="folderID"></param>
971 /// <param name="primLocalID"></param> 971 /// <param name="primLocalID"></param>
972 /// <param name="itemID"></param> 972 /// <param name="itemID"></param>
973 public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, LLUUID folderId, uint primLocalId, LLUUID itemId) 973 public void ClientMoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId)
974 { 974 {
975 SceneObjectPart part = GetSceneObjectPart(primLocalId); 975 SceneObjectPart part = GetSceneObjectPart(primLocalId);
976 976
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes
1009 /// <param name="folderID"></param> 1009 /// <param name="folderID"></param>
1010 /// <param name="part"></param> 1010 /// <param name="part"></param>
1011 /// <param name="itemID"></param> 1011 /// <param name="itemID"></param>
1012 public void MoveTaskInventoryItem(LLUUID avatarId, LLUUID folderId, SceneObjectPart part, LLUUID itemId) 1012 public void MoveTaskInventoryItem(UUID avatarId, UUID folderId, SceneObjectPart part, UUID itemId)
1013 { 1013 {
1014 ScenePresence avatar; 1014 ScenePresence avatar;
1015 1015
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 /// <param name="destId"></param> 1040 /// <param name="destId"></param>
1041 /// <param name="part"></param> 1041 /// <param name="part"></param>
1042 /// <param name="itemId"></param> 1042 /// <param name="itemId"></param>
1043 public void MoveTaskInventoryItem(LLUUID destId, SceneObjectPart part, LLUUID itemId) 1043 public void MoveTaskInventoryItem(UUID destId, SceneObjectPart part, UUID itemId)
1044 { 1044 {
1045 TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId); 1045 TaskInventoryItem srcTaskItem = part.GetInventoryItem(itemId);
1046 1046
@@ -1065,7 +1065,7 @@ namespace OpenSim.Region.Environment.Scenes
1065 return; 1065 return;
1066 } 1066 }
1067 1067
1068 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) 1068 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) == 0)
1069 { 1069 {
1070 // object cannot copy items to an object owned by a different owner 1070 // object cannot copy items to an object owned by a different owner
1071 // unless llAllowInventoryDrop has been called 1071 // unless llAllowInventoryDrop has been called
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.Environment.Scenes
1081 1081
1082 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1082 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1083 1083
1084 destTaskItem.ItemID = LLUUID.Random(); 1084 destTaskItem.ItemID = UUID.Random();
1085 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1085 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1086 destTaskItem.AssetID = srcTaskItem.AssetID; 1086 destTaskItem.AssetID = srcTaskItem.AssetID;
1087 destTaskItem.GroupID = destPart.GroupID; 1087 destTaskItem.GroupID = destPart.GroupID;
@@ -1130,7 +1130,7 @@ namespace OpenSim.Region.Environment.Scenes
1130 } 1130 }
1131 } 1131 }
1132 1132
1133 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) 1133 public void MoveTaskInventoryItems(UUID destID, string category, SceneObjectPart host, List<UUID> items)
1134 { 1134 {
1135 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1135 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1136 if (profile == null || profile.RootFolder == null) 1136 if (profile == null || profile.RootFolder == null)
@@ -1142,11 +1142,11 @@ namespace OpenSim.Region.Environment.Scenes
1142 return; 1142 return;
1143 } 1143 }
1144 1144
1145 LLUUID newFolderID = LLUUID.Random(); 1145 UUID newFolderID = UUID.Random();
1146 1146
1147 profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID); 1147 profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID);
1148 1148
1149 foreach (LLUUID itemID in items) 1149 foreach (UUID itemID in items)
1150 { 1150 {
1151 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(destID, host, itemID); 1151 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(destID, host, itemID);
1152 agentItem.Folder = newFolderID; 1152 agentItem.Folder = newFolderID;
@@ -1167,16 +1167,16 @@ namespace OpenSim.Region.Environment.Scenes
1167 1167
1168 /// <summary> 1168 /// <summary>
1169 /// Update an item in a prim (task) inventory. 1169 /// Update an item in a prim (task) inventory.
1170 /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> 1170 /// This method does not handle scripts, <see>RezScript(IClientAPI, UUID, unit)</see>
1171 /// </summary> 1171 /// </summary>
1172 /// <param name="remoteClient"></param> 1172 /// <param name="remoteClient"></param>
1173 /// <param name="transactionID"></param> 1173 /// <param name="transactionID"></param>
1174 /// <param name="itemInfo"></param> 1174 /// <param name="itemInfo"></param>
1175 /// <param name="primLocalID"></param> 1175 /// <param name="primLocalID"></param>
1176 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo, 1176 public void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo,
1177 uint primLocalID) 1177 uint primLocalID)
1178 { 1178 {
1179 LLUUID itemID = itemInfo.ItemID; 1179 UUID itemID = itemInfo.ItemID;
1180 1180
1181 // Find the prim we're dealing with 1181 // Find the prim we're dealing with
1182 SceneObjectPart part = GetSceneObjectPart(primLocalID); 1182 SceneObjectPart part = GetSceneObjectPart(primLocalID);
@@ -1193,8 +1193,8 @@ namespace OpenSim.Region.Environment.Scenes
1193 1193
1194 if (currentItem == null) 1194 if (currentItem == null)
1195 { 1195 {
1196 LLUUID copyID = LLUUID.Random(); 1196 UUID copyID = UUID.Random();
1197 if (itemID != LLUUID.Zero) 1197 if (itemID != UUID.Zero)
1198 { 1198 {
1199 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 1199 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
1200 1200
@@ -1254,12 +1254,12 @@ namespace OpenSim.Region.Environment.Scenes
1254 /// <param name="remoteClient"></param> 1254 /// <param name="remoteClient"></param>
1255 /// <param name="itemID"> </param> 1255 /// <param name="itemID"> </param>
1256 /// <param name="localID"></param> 1256 /// <param name="localID"></param>
1257 public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, LLUUID transactionID, uint localID) 1257 public void RezScript(IClientAPI remoteClient, InventoryItemBase itemBase, UUID transactionID, uint localID)
1258 { 1258 {
1259 LLUUID itemID=itemBase.ID; 1259 UUID itemID=itemBase.ID;
1260 LLUUID copyID = LLUUID.Random(); 1260 UUID copyID = UUID.Random();
1261 1261
1262 if (itemID != LLUUID.Zero) 1262 if (itemID != UUID.Zero)
1263 { 1263 {
1264 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 1264 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
1265 1265
@@ -1344,7 +1344,7 @@ namespace OpenSim.Region.Environment.Scenes
1344 taskItem.GroupID = itemBase.GroupID; 1344 taskItem.GroupID = itemBase.GroupID;
1345 taskItem.GroupPermissions = 0; 1345 taskItem.GroupPermissions = 0;
1346 taskItem.Flags = itemBase.Flags; 1346 taskItem.Flags = itemBase.Flags;
1347 taskItem.PermsGranter = LLUUID.Zero; 1347 taskItem.PermsGranter = UUID.Zero;
1348 taskItem.PermsMask = 0; 1348 taskItem.PermsMask = 0;
1349 taskItem.AssetID = asset.ID; 1349 taskItem.AssetID = asset.ID;
1350 1350
@@ -1361,7 +1361,7 @@ namespace OpenSim.Region.Environment.Scenes
1361 /// <param name="remoteClient"></param> 1361 /// <param name="remoteClient"></param>
1362 /// <param name="itemID"> </param> 1362 /// <param name="itemID"> </param>
1363 /// <param name="localID"></param> 1363 /// <param name="localID"></param>
1364 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) 1364 public void RezScript(UUID srcId, SceneObjectPart srcPart, UUID destId, int pin, int running, int start_param)
1365 { 1365 {
1366 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); 1366 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
1367 1367
@@ -1407,7 +1407,7 @@ namespace OpenSim.Region.Environment.Scenes
1407 1407
1408 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1408 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1409 1409
1410 destTaskItem.ItemID = LLUUID.Random(); 1410 destTaskItem.ItemID = UUID.Random();
1411 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1411 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1412 destTaskItem.AssetID = srcTaskItem.AssetID; 1412 destTaskItem.AssetID = srcTaskItem.AssetID;
1413 destTaskItem.GroupID = destPart.GroupID; 1413 destTaskItem.GroupID = destPart.GroupID;
@@ -1467,7 +1467,7 @@ namespace OpenSim.Region.Environment.Scenes
1467 { 1467 {
1468 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet; 1468 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
1469 1469
1470 LLUUID folderID = LLUUID.Zero; 1470 UUID folderID = UUID.Zero;
1471 1471
1472 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) 1472 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
1473 { 1473 {
@@ -1598,7 +1598,7 @@ namespace OpenSim.Region.Environment.Scenes
1598 return false; 1598 return false;
1599 } 1599 }
1600 1600
1601 private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, LLUUID folderID, bool permissionToDelete) 1601 private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, UUID folderID, bool permissionToDelete)
1602 { 1602 {
1603 string sceneObjectXml = objectGroup.ToXmlString(); 1603 string sceneObjectXml = objectGroup.ToXmlString();
1604 1604
@@ -1616,7 +1616,7 @@ namespace OpenSim.Region.Environment.Scenes
1616 // If we're deleting someone else's item, it goes back to their deleted items folder 1616 // If we're deleting someone else's item, it goes back to their deleted items folder
1617 // If we're returning someone's item, it goes back to the owner's Lost And Found folder. 1617 // If we're returning someone's item, it goes back to the owner's Lost And Found folder.
1618 1618
1619 if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero || (DeRezPacket.AgentBlock.Destination == 6 && objectGroup.OwnerID != remoteClient.AgentId)) 1619 if (DeRezPacket.AgentBlock.DestinationID == UUID.Zero || (DeRezPacket.AgentBlock.Destination == 6 && objectGroup.OwnerID != remoteClient.AgentId))
1620 { 1620 {
1621 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders(); 1621 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
1622 foreach (InventoryFolderBase flder in subrootfolders) 1622 foreach (InventoryFolderBase flder in subrootfolders)
@@ -1628,7 +1628,7 @@ namespace OpenSim.Region.Environment.Scenes
1628 } 1628 }
1629 } 1629 }
1630 1630
1631 if (folderID == LLUUID.Zero) 1631 if (folderID == UUID.Zero)
1632 { 1632 {
1633 folderID = userInfo.RootFolder.ID; 1633 folderID = userInfo.RootFolder.ID;
1634 } 1634 }
@@ -1643,7 +1643,7 @@ namespace OpenSim.Region.Environment.Scenes
1643 ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), 1643 ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId),
1644 ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), 1644 ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId),
1645 (sbyte)AssetType.Object, 1645 (sbyte)AssetType.Object,
1646 Helpers.StringToField(sceneObjectXml)); 1646 Utils.StringToBytes(sceneObjectXml));
1647 AssetCache.AddAsset(asset); 1647 AssetCache.AddAsset(asset);
1648 1648
1649 InventoryItemBase item = new InventoryItemBase(); 1649 InventoryItemBase item = new InventoryItemBase();
@@ -1654,7 +1654,7 @@ namespace OpenSim.Region.Environment.Scenes
1654 else // Delete / Return 1654 else // Delete / Return
1655 item.Owner = objectGroup.OwnerID; 1655 item.Owner = objectGroup.OwnerID;
1656 1656
1657 item.ID = LLUUID.Random(); 1657 item.ID = UUID.Random();
1658 item.AssetID = asset.FullID; 1658 item.AssetID = asset.FullID;
1659 item.Description = asset.Description; 1659 item.Description = asset.Description;
1660 item.Name = asset.Name; 1660 item.Name = asset.Name;
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Environment.Scenes
1709 DeleteSceneObject(objectGroup); 1709 DeleteSceneObject(objectGroup);
1710 } 1710 }
1711 1711
1712 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID) 1712 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, UUID assetID, UUID agentID)
1713 { 1713 {
1714 SceneObjectGroup objectGroup = grp; 1714 SceneObjectGroup objectGroup = grp;
1715 if (objectGroup != null) 1715 if (objectGroup != null)
@@ -1723,7 +1723,7 @@ namespace OpenSim.Region.Environment.Scenes
1723 Queue<InventoryFolderImpl> searchfolders = new Queue<InventoryFolderImpl>(); 1723 Queue<InventoryFolderImpl> searchfolders = new Queue<InventoryFolderImpl>();
1724 searchfolders.Enqueue(userInfo.RootFolder); 1724 searchfolders.Enqueue(userInfo.RootFolder);
1725 1725
1726 LLUUID foundFolder = userInfo.RootFolder.ID; 1726 UUID foundFolder = userInfo.RootFolder.ID;
1727 1727
1728 // search through folders to find the asset. 1728 // search through folders to find the asset.
1729 while (searchfolders.Count > 0) 1729 while (searchfolders.Count > 0)
@@ -1754,7 +1754,7 @@ namespace OpenSim.Region.Environment.Scenes
1754 objectGroup.GetPartName(objectGroup.LocalId), 1754 objectGroup.GetPartName(objectGroup.LocalId),
1755 objectGroup.GetPartDescription(objectGroup.LocalId), 1755 objectGroup.GetPartDescription(objectGroup.LocalId),
1756 (sbyte)AssetType.Object, 1756 (sbyte)AssetType.Object,
1757 Helpers.StringToField(sceneObjectXml)); 1757 Utils.StringToBytes(sceneObjectXml));
1758 AssetCache.AddAsset(asset); 1758 AssetCache.AddAsset(asset);
1759 1759
1760 InventoryItemBase item = new InventoryItemBase(); 1760 InventoryItemBase item = new InventoryItemBase();
@@ -1797,7 +1797,7 @@ namespace OpenSim.Region.Environment.Scenes
1797 } 1797 }
1798 } 1798 }
1799 1799
1800 public LLUUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID AgentId) 1800 public UUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, UUID AgentId)
1801 { 1801 {
1802 SceneObjectGroup objectGroup = grp; 1802 SceneObjectGroup objectGroup = grp;
1803 if (objectGroup != null) 1803 if (objectGroup != null)
@@ -1812,13 +1812,13 @@ namespace OpenSim.Region.Environment.Scenes
1812 objectGroup.GetPartName(objectGroup.LocalId), 1812 objectGroup.GetPartName(objectGroup.LocalId),
1813 objectGroup.GetPartDescription(objectGroup.LocalId), 1813 objectGroup.GetPartDescription(objectGroup.LocalId),
1814 (sbyte)AssetType.Object, 1814 (sbyte)AssetType.Object,
1815 Helpers.StringToField(sceneObjectXml)); 1815 Utils.StringToBytes(sceneObjectXml));
1816 AssetCache.AddAsset(asset); 1816 AssetCache.AddAsset(asset);
1817 1817
1818 InventoryItemBase item = new InventoryItemBase(); 1818 InventoryItemBase item = new InventoryItemBase();
1819 item.Creator = objectGroup.RootPart.CreatorID; 1819 item.Creator = objectGroup.RootPart.CreatorID;
1820 item.Owner = remoteClient.AgentId; 1820 item.Owner = remoteClient.AgentId;
1821 item.ID = LLUUID.Random(); 1821 item.ID = UUID.Random();
1822 item.AssetID = asset.FullID; 1822 item.AssetID = asset.FullID;
1823 item.Description = asset.Description; 1823 item.Description = asset.Description;
1824 item.Name = asset.Name; 1824 item.Name = asset.Name;
@@ -1848,9 +1848,9 @@ namespace OpenSim.Region.Environment.Scenes
1848 remoteClient.SendInventoryItemCreateUpdate(item); 1848 remoteClient.SendInventoryItemCreateUpdate(item);
1849 return item.AssetID; 1849 return item.AssetID;
1850 } 1850 }
1851 return LLUUID.Zero; 1851 return UUID.Zero;
1852 } 1852 }
1853 return LLUUID.Zero; 1853 return UUID.Zero;
1854 1854
1855 } 1855 }
1856 1856
@@ -1872,10 +1872,10 @@ namespace OpenSim.Region.Environment.Scenes
1872 /// <param name="RezSelected"></param> 1872 /// <param name="RezSelected"></param>
1873 /// <param name="RemoveItem"></param> 1873 /// <param name="RemoveItem"></param>
1874 /// <param name="fromTaskID"></param> 1874 /// <param name="fromTaskID"></param>
1875 public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 1875 public virtual void RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
1876 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 1876 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
1877 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 1877 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
1878 bool RezSelected, bool RemoveItem, LLUUID fromTaskID) 1878 bool RezSelected, bool RemoveItem, UUID fromTaskID)
1879 { 1879 {
1880 RezObject( 1880 RezObject(
1881 remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 1881 remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
@@ -1901,10 +1901,10 @@ namespace OpenSim.Region.Environment.Scenes
1901 /// <param name="fromTaskID"></param> 1901 /// <param name="fromTaskID"></param>
1902 /// <param name="difference"></param> 1902 /// <param name="difference"></param>
1903 /// <returns></returns> 1903 /// <returns></returns>
1904 public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 1904 public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
1905 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 1905 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
1906 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 1906 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
1907 bool RezSelected, bool RemoveItem, LLUUID fromTaskID, bool attachment) 1907 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
1908 { 1908 {
1909 // Work out position details 1909 // Work out position details
1910 byte bRayEndIsIntersection = (byte)0; 1910 byte bRayEndIsIntersection = (byte)0;
@@ -1918,11 +1918,11 @@ namespace OpenSim.Region.Environment.Scenes
1918 bRayEndIsIntersection = (byte)0; 1918 bRayEndIsIntersection = (byte)0;
1919 } 1919 }
1920 1920
1921 LLVector3 scale = new LLVector3(0.5f, 0.5f, 0.5f); 1921 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
1922 1922
1923 1923
1924 LLVector3 pos = GetNewRezLocation( 1924 Vector3 pos = GetNewRezLocation(
1925 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), 1925 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
1926 BypassRayCast, bRayEndIsIntersection,true,scale, false); 1926 BypassRayCast, bRayEndIsIntersection,true,scale, false);
1927 1927
1928 // Rez object 1928 // Rez object
@@ -1939,7 +1939,7 @@ namespace OpenSim.Region.Environment.Scenes
1939 1939
1940 if (rezAsset != null) 1940 if (rezAsset != null)
1941 { 1941 {
1942 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1942 string xmlData = Utils.BytesToString(rezAsset.Data);
1943 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1943 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1944 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, remoteClient.AgentId, pos) && !attachment) 1944 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, remoteClient.AgentId, pos) && !attachment)
1945 { 1945 {
@@ -1955,7 +1955,7 @@ namespace OpenSim.Region.Environment.Scenes
1955 if (!attachment) 1955 if (!attachment)
1956 { 1956 {
1957 pos = GetNewRezLocation( 1957 pos = GetNewRezLocation(
1958 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), 1958 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
1959 BypassRayCast, bRayEndIsIntersection, true, group.GroupScale(), false); 1959 BypassRayCast, bRayEndIsIntersection, true, group.GroupScale(), false);
1960 group.AbsolutePosition = pos; 1960 group.AbsolutePosition = pos;
1961 } 1961 }
@@ -2066,18 +2066,18 @@ namespace OpenSim.Region.Environment.Scenes
2066 /// <returns></returns> 2066 /// <returns></returns>
2067 public virtual SceneObjectGroup RezObject( 2067 public virtual SceneObjectGroup RezObject(
2068 SceneObjectPart sourcePart, TaskInventoryItem item, 2068 SceneObjectPart sourcePart, TaskInventoryItem item,
2069 LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param) 2069 Vector3 pos, Quaternion rot, Vector3 vel, int param)
2070 { 2070 {
2071 // Rez object 2071 // Rez object
2072 if (item != null) 2072 if (item != null)
2073 { 2073 {
2074 LLUUID ownerID = item.OwnerID; 2074 UUID ownerID = item.OwnerID;
2075 2075
2076 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); 2076 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
2077 2077
2078 if (rezAsset != null) 2078 if (rezAsset != null)
2079 { 2079 {
2080 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 2080 string xmlData = Utils.BytesToString(rezAsset.Data);
2081 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 2081 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
2082 2082
2083 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos)) 2083 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos))
@@ -2154,7 +2154,7 @@ namespace OpenSim.Region.Environment.Scenes
2154 return null; 2154 return null;
2155 } 2155 }
2156 2156
2157 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) 2157 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, UUID AgentId)
2158 { 2158 {
2159 string message = ""; 2159 string message = "";
2160 if (returnobjects.Length <= 0) 2160 if (returnobjects.Length <= 0)
@@ -2186,7 +2186,7 @@ namespace OpenSim.Region.Environment.Scenes
2186 { 2186 {
2187 if (userInfo.HasReceivedInventory) 2187 if (userInfo.HasReceivedInventory)
2188 { 2188 {
2189 LLUUID folderID = LLUUID.Zero; 2189 UUID folderID = UUID.Zero;
2190 2190
2191 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders(); 2191 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
2192 foreach (InventoryFolderBase flder in subrootfolders) 2192 foreach (InventoryFolderBase flder in subrootfolders)
@@ -2198,7 +2198,7 @@ namespace OpenSim.Region.Environment.Scenes
2198 } 2198 }
2199 } 2199 }
2200 2200
2201 if (folderID == LLUUID.Zero) 2201 if (folderID == UUID.Zero)
2202 { 2202 {
2203 folderID = userInfo.RootFolder.ID; 2203 folderID = userInfo.RootFolder.ID;
2204 } 2204 }
@@ -2213,13 +2213,13 @@ namespace OpenSim.Region.Environment.Scenes
2213 returnobjects[i].GetPartName(returnobjects[i].LocalId), 2213 returnobjects[i].GetPartName(returnobjects[i].LocalId),
2214 returnobjects[i].GetPartDescription(returnobjects[i].LocalId), 2214 returnobjects[i].GetPartDescription(returnobjects[i].LocalId),
2215 (sbyte)AssetType.Object, 2215 (sbyte)AssetType.Object,
2216 Helpers.StringToField(sceneObjectXml)); 2216 Utils.StringToBytes(sceneObjectXml));
2217 AssetCache.AddAsset(asset); 2217 AssetCache.AddAsset(asset);
2218 2218
2219 InventoryItemBase item = new InventoryItemBase(); 2219 InventoryItemBase item = new InventoryItemBase();
2220 item.Creator = returnobjects[i].RootPart.CreatorID; 2220 item.Creator = returnobjects[i].RootPart.CreatorID;
2221 item.Owner = returnobjects[i].OwnerID; 2221 item.Owner = returnobjects[i].OwnerID;
2222 item.ID = LLUUID.Random(); 2222 item.ID = UUID.Random();
2223 item.AssetID = asset.FullID; 2223 item.AssetID = asset.FullID;
2224 item.Description = asset.Description; 2224 item.Description = asset.Description;
2225 item.Name = asset.Name; 2225 item.Name = asset.Name;
@@ -2295,7 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes
2295 2295
2296 } 2296 }
2297 2297
2298 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) 2298 public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
2299 { 2299 {
2300 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); 2300 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
2301 if (scriptModule == null) 2301 if (scriptModule == null)
@@ -2305,7 +2305,7 @@ namespace OpenSim.Region.Environment.Scenes
2305 scriptModule.GetScriptRunning(objectID, itemID)); 2305 scriptModule.GetScriptRunning(objectID, itemID));
2306 } 2306 }
2307 2307
2308 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) 2308 public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running)
2309 { 2309 {
2310 SceneObjectPart part = GetSceneObjectPart(objectID); 2310 SceneObjectPart part = GetSceneObjectPart(objectID);
2311 if (part == null) 2311 if (part == null)
@@ -2317,7 +2317,7 @@ namespace OpenSim.Region.Environment.Scenes
2317 EventManager.TriggerStopScript(part.LocalId, itemID); 2317 EventManager.TriggerStopScript(part.LocalId, itemID);
2318 } 2318 }
2319 2319
2320 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, 2320 public void RezSingleAttachment(IClientAPI remoteClient, UUID itemID,
2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask) 2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask)
2322 { 2322 {
2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask); 2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask);
@@ -2333,7 +2333,7 @@ namespace OpenSim.Region.Environment.Scenes
2333 } 2333 }
2334 2334
2335 public void RezSingleAttachment(SceneObjectGroup att, 2335 public void RezSingleAttachment(SceneObjectGroup att,
2336 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt, 2336 IClientAPI remoteClient, UUID itemID, uint AttachmentPt,
2337 uint ItemFlags, uint NextOwnerMask) 2337 uint ItemFlags, uint NextOwnerMask)
2338 { 2338 {
2339 if (att.RootPart != null) 2339 if (att.RootPart != null)
@@ -2352,12 +2352,12 @@ namespace OpenSim.Region.Environment.Scenes
2352 } 2352 }
2353 } 2353 }
2354 2354
2355 public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, LLQuaternion rot, LLVector3 pos) 2355 public void AttachObject(IClientAPI controllingClient, uint localID, uint attachPoint, Quaternion rot, Vector3 pos)
2356 { 2356 {
2357 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos); 2357 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos);
2358 } 2358 }
2359 2359
2360 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) 2360 public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
2361 { 2361 {
2362 ScenePresence presence; 2362 ScenePresence presence;
2363 if (TryGetAvatar(remoteClient.AgentId, out presence)) 2363 if (TryGetAvatar(remoteClient.AgentId, out presence))
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 14d6826..38f4029 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -26,20 +26,20 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using OpenSim.Framework; 31using OpenSim.Framework;
32 32
33namespace OpenSim.Region.Environment.Scenes 33namespace OpenSim.Region.Environment.Scenes
34{ 34{
35 public partial class Scene 35 public partial class Scene
36 { 36 {
37 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName, 37 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
38 LLUUID fromID, bool fromAgent, bool broadcast) 38 UUID fromID, bool fromAgent, bool broadcast)
39 { 39 {
40 OSChatMessage args = new OSChatMessage(); 40 OSChatMessage args = new OSChatMessage();
41 41
42 args.Message = Helpers.FieldToUTF8String(message); 42 args.Message = Utils.BytesToString(message);
43 args.Channel = channel; 43 args.Channel = channel;
44 args.Type = type; 44 args.Type = type;
45 args.Position = fromPos; 45 args.Position = fromPos;
@@ -75,8 +75,8 @@ namespace OpenSim.Region.Environment.Scenes
75 /// <param name="fromPos"></param> 75 /// <param name="fromPos"></param>
76 /// <param name="fromName"></param> 76 /// <param name="fromName"></param>
77 /// <param name="fromAgentID"></param> 77 /// <param name="fromAgentID"></param>
78 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName, 78 public void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
79 LLUUID fromID, bool fromAgent) 79 UUID fromID, bool fromAgent)
80 { 80 {
81 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false); 81 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
82 } 82 }
@@ -89,8 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
89 /// <param name="fromPos"></param> 89 /// <param name="fromPos"></param>
90 /// <param name="fromName"></param> 90 /// <param name="fromName"></param>
91 /// <param name="fromAgentID"></param> 91 /// <param name="fromAgentID"></param>
92 public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName, 92 public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
93 LLUUID fromID, bool fromAgent) 93 UUID fromID, bool fromAgent)
94 { 94 {
95 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true); 95 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
96 } 96 }
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Scenes
125 // We also need to check the children of this prim as they 125 // We also need to check the children of this prim as they
126 // can be selected as well and send property information 126 // can be selected as well and send property information
127 bool foundPrim = false; 127 bool foundPrim = false;
128 foreach (KeyValuePair<LLUUID, SceneObjectPart> child in ((SceneObjectGroup) ent).Children) 128 foreach (KeyValuePair<UUID, SceneObjectPart> child in ((SceneObjectGroup) ent).Children)
129 { 129 {
130 if (child.Value.LocalId == primLocalID) 130 if (child.Value.LocalId == primLocalID)
131 { 131 {
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes
196 } 196 }
197 } 197 }
198 198
199 public virtual void ProcessMoneyTransferRequest(LLUUID source, LLUUID destination, int amount, 199 public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount,
200 int transactiontype, string description) 200 int transactiontype, string description)
201 { 201 {
202 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount, 202 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount,
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Scenes
205 EventManager.TriggerMoneyTransfer(this, args); 205 EventManager.TriggerMoneyTransfer(this, args);
206 } 206 }
207 207
208 public virtual void ProcessParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, 208 public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
209 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) 209 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
210 { 210 {
211 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned, 211 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned,
@@ -219,7 +219,7 @@ namespace OpenSim.Region.Environment.Scenes
219 m_eventManager.TriggerLandBuy(this, args); 219 m_eventManager.TriggerLandBuy(this, args);
220 } 220 }
221 221
222 public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 222 public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient)
223 { 223 {
224 224
225 List<EntityBase> EntityList = GetEntities(); 225 List<EntityBase> EntityList = GetEntities();
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Scenes
286 } 286 }
287 } 287 }
288 288
289 public void ProcessAvatarPickerRequest(IClientAPI client, LLUUID avatarID, LLUUID RequestID, string query) 289 public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
290 { 290 {
291 //EventManager.TriggerAvatarPickerRequest(); 291 //EventManager.TriggerAvatarPickerRequest();
292 292
@@ -308,11 +308,11 @@ namespace OpenSim.Region.Environment.Scenes
308 int i = 0; 308 int i = 0;
309 foreach (AvatarPickerAvatar item in AvatarResponses) 309 foreach (AvatarPickerAvatar item in AvatarResponses)
310 { 310 {
311 LLUUID translatedIDtem = item.AvatarID; 311 UUID translatedIDtem = item.AvatarID;
312 searchData[i] = new AvatarPickerReplyPacket.DataBlock(); 312 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
313 searchData[i].AvatarID = translatedIDtem; 313 searchData[i].AvatarID = translatedIDtem;
314 searchData[i].FirstName = Helpers.StringToField((string) item.firstName); 314 searchData[i].FirstName = Utils.StringToBytes((string) item.firstName);
315 searchData[i].LastName = Helpers.StringToField((string) item.lastName); 315 searchData[i].LastName = Utils.StringToBytes((string) item.lastName);
316 i++; 316 i++;
317 } 317 }
318 if (AvatarResponses.Count == 0) 318 if (AvatarResponses.Count == 0)
@@ -337,8 +337,8 @@ namespace OpenSim.Region.Environment.Scenes
337 client.SendAvatarPickerReply(agent_data, data_args); 337 client.SendAvatarPickerReply(agent_data, data_args);
338 } 338 }
339 339
340 public void ProcessScriptReset(IClientAPI remoteClient, LLUUID objectID, 340 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,
341 LLUUID itemID) 341 UUID itemID)
342 { 342 {
343 SceneObjectPart part=GetSceneObjectPart(objectID); 343 SceneObjectPart part=GetSceneObjectPart(objectID);
344 if (part == null) 344 if (part == null)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index becd7dc..9e784d6 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -32,10 +32,9 @@ using System.Drawing.Imaging;
32using System.IO; 32using System.IO;
33using System.Threading; 33using System.Threading;
34using System.Timers; 34using System.Timers;
35using Axiom.Math; 35using OpenMetaverse;
36using libsecondlife; 36using OpenMetaverse.Imaging;
37using libsecondlife.Packets; 37using OpenMetaverse.Packets;
38using OpenJPEGNet;
39using OpenSim.Framework; 38using OpenSim.Framework;
40using OpenSim.Framework.Communications; 39using OpenSim.Framework.Communications;
41using OpenSim.Framework.Communications.Cache; 40using OpenSim.Framework.Communications.Cache;
@@ -116,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes
116 /// <summary> 115 /// <summary>
117 /// Each agent has its own capabilities handler. 116 /// Each agent has its own capabilities handler.
118 /// </summary> 117 /// </summary>
119 protected Dictionary<LLUUID, Caps> m_capsHandlers = new Dictionary<LLUUID, Caps>(); 118 protected Dictionary<UUID, Caps> m_capsHandlers = new Dictionary<UUID, Caps>();
120 119
121 protected BaseHttpServer m_httpListener; 120 protected BaseHttpServer m_httpListener;
122 121
@@ -201,19 +200,19 @@ namespace OpenSim.Region.Environment.Scenes
201 } 200 }
202 201
203 // Local reference to the objects in the scene (which are held in innerScene) 202 // Local reference to the objects in the scene (which are held in innerScene)
204 // public Dictionary<LLUUID, SceneObjectGroup> Objects 203 // public Dictionary<UUID, SceneObjectGroup> Objects
205 // { 204 // {
206 // get { return m_innerScene.SceneObjects; } 205 // get { return m_innerScene.SceneObjects; }
207 // } 206 // }
208 207
209 // Reference to all of the agents in the scene (root and child) 208 // Reference to all of the agents in the scene (root and child)
210 protected Dictionary<LLUUID, ScenePresence> m_scenePresences 209 protected Dictionary<UUID, ScenePresence> m_scenePresences
211 { 210 {
212 get { return m_innerScene.ScenePresences; } 211 get { return m_innerScene.ScenePresences; }
213 set { m_innerScene.ScenePresences = value; } 212 set { m_innerScene.ScenePresences = value; }
214 } 213 }
215 214
216 // protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects 215 // protected Dictionary<UUID, SceneObjectGroup> m_sceneObjects
217 // { 216 // {
218 // get { return m_innerScene.SceneObjects; } 217 // get { return m_innerScene.SceneObjects; }
219 // set { m_innerScene.SceneObjects = value; } 218 // set { m_innerScene.SceneObjects = value; }
@@ -227,13 +226,13 @@ namespace OpenSim.Region.Environment.Scenes
227 /// If you want a list of entities where the list itself is guaranteed not to change, please use 226 /// If you want a list of entities where the list itself is guaranteed not to change, please use
228 /// GetEntities() 227 /// GetEntities()
229 /// </summary> 228 /// </summary>
230 public Dictionary<LLUUID, EntityBase> Entities 229 public Dictionary<UUID, EntityBase> Entities
231 { 230 {
232 get { return m_innerScene.Entities; } 231 get { return m_innerScene.Entities; }
233 set { m_innerScene.Entities = value; } 232 set { m_innerScene.Entities = value; }
234 } 233 }
235 234
236 public Dictionary<LLUUID, ScenePresence> m_restorePresences 235 public Dictionary<UUID, ScenePresence> m_restorePresences
237 { 236 {
238 get { return m_innerScene.RestorePresences; } 237 get { return m_innerScene.RestorePresences; }
239 set { m_innerScene.RestorePresences = value; } 238 set { m_innerScene.RestorePresences = value; }
@@ -466,7 +465,7 @@ namespace OpenSim.Region.Environment.Scenes
466 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 465 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
467 m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 466 m_log.Error("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
468 m_restartTimer.Start(); 467 m_restartTimer.Start();
469 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); 468 SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
470 //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); 469 //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
471 } 470 }
472 } 471 }
@@ -481,7 +480,7 @@ namespace OpenSim.Region.Environment.Scenes
481 if (m_RestartTimerCounter <= m_incrementsof15seconds) 480 if (m_RestartTimerCounter <= m_incrementsof15seconds)
482 { 481 {
483 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) 482 if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
484 SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + 483 SendRegionMessageFromEstateTools(UUID.Random(), UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
485 ((8 - m_RestartTimerCounter) * 15) + " seconds"); 484 ((8 - m_RestartTimerCounter) * 15) + " seconds");
486 485
487 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + 486 // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
@@ -923,8 +922,11 @@ namespace OpenSim.Region.Environment.Scenes
923 922
924 foreach (AssetBase asset in textures) 923 foreach (AssetBase asset in textures)
925 { 924 {
926 Image image = OpenJPEG.DecodeToImage(asset.Data); 925 ManagedImage managedImage;
927 bitImages.Add(image); 926 Image image;
927
928 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
929 bitImages.Add(image);
928 } 930 }
929 931
930 Bitmap mapTexture = new Bitmap(2560, 2560); 932 Bitmap mapTexture = new Bitmap(2560, 2560);
@@ -1025,9 +1027,9 @@ namespace OpenSim.Region.Environment.Scenes
1025 double[,] hm = Heightmap.GetDoubles(); 1027 double[,] hm = Heightmap.GetDoubles();
1026 bool ShadowDebugContinue = true; 1028 bool ShadowDebugContinue = true;
1027 //Color prim = Color.FromArgb(120, 120, 120); 1029 //Color prim = Color.FromArgb(120, 120, 120);
1028 //LLVector3 RayEnd = new LLVector3(0, 0, 0); 1030 //Vector3 RayEnd = new Vector3(0, 0, 0);
1029 //LLVector3 RayStart = new LLVector3(0, 0, 0); 1031 //Vector3 RayStart = new Vector3(0, 0, 0);
1030 //LLVector3 direction = new LLVector3(0, 0, -1); 1032 //Vector3 direction = new Vector3(0, 0, -1);
1031 //Vector3 AXOrigin = new Vector3(); 1033 //Vector3 AXOrigin = new Vector3();
1032 //Vector3 AXdirection = new Vector3(); 1034 //Vector3 AXdirection = new Vector3();
1033 //Ray testRay = new Ray(); 1035 //Ray testRay = new Ray();
@@ -1061,10 +1063,10 @@ namespace OpenSim.Region.Environment.Scenes
1061 //int tc = System.Environment.TickCount; 1063 //int tc = System.Environment.TickCount;
1062 for (int y = 0; y < 256; y++) 1064 for (int y = 0; y < 256; y++)
1063 { 1065 {
1064 //RayEnd = new LLVector3(x, y, 0); 1066 //RayEnd = new Vector3(x, y, 0);
1065 //RayStart = new LLVector3(x, y, 255); 1067 //RayStart = new Vector3(x, y, 255);
1066 1068
1067 //direction = LLVector3.Norm(RayEnd - RayStart); 1069 //direction = Vector3.Norm(RayEnd - RayStart);
1068 //AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); 1070 //AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z);
1069 //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); 1071 //AXdirection = new Vector3(direction.X, direction.Y, direction.Z);
1070 1072
@@ -1272,7 +1274,7 @@ namespace OpenSim.Region.Environment.Scenes
1272 if (part.Shape.Textures.DefaultTexture == null) 1274 if (part.Shape.Textures.DefaultTexture == null)
1273 continue; 1275 continue;
1274 1276
1275 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; 1277 Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA;
1276 1278
1277 // Not sure why some of these are null, oh well. 1279 // Not sure why some of these are null, oh well.
1278 1280
@@ -1285,7 +1287,7 @@ namespace OpenSim.Region.Environment.Scenes
1285 //Try to set the map spot color 1287 //Try to set the map spot color
1286 try 1288 try
1287 { 1289 {
1288 // If the color gets goofy somehow, skip it *shakes fist at LLColor 1290 // If the color gets goofy somehow, skip it *shakes fist at Color4
1289 mapdotspot = Color.FromArgb(colorr, colorg, colorb); 1291 mapdotspot = Color.FromArgb(colorr, colorg, colorb);
1290 } 1292 }
1291 catch (ArgumentException) 1293 catch (ArgumentException)
@@ -1302,7 +1304,7 @@ namespace OpenSim.Region.Environment.Scenes
1302 // Mono Array 1304 // Mono Array
1303 } 1305 }
1304 1306
1305 LLVector3 pos = part.GetWorldPosition(); 1307 Vector3 pos = part.GetWorldPosition();
1306 1308
1307 // skip prim outside of retion 1309 // skip prim outside of retion
1308 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) 1310 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f)
@@ -1327,21 +1329,20 @@ namespace OpenSim.Region.Environment.Scenes
1327 if (isBelow256AboveTerrain) 1329 if (isBelow256AboveTerrain)
1328 { 1330 {
1329 // Translate scale by rotation so scale is represented properly when object is rotated 1331 // Translate scale by rotation so scale is represented properly when object is rotated
1330 Vector3 scale = new Vector3(part.Shape.Scale.X, part.Shape.Scale.Y, part.Shape.Scale.Z); 1332 Vector3 scale = part.Shape.Scale;
1331 LLQuaternion llrot = part.GetWorldRotation(); 1333 Quaternion rot = part.GetWorldRotation();
1332 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); 1334 scale *= rot;
1333 scale = rot * scale;
1334 1335
1335 // negative scales don't work in this situation 1336 // negative scales don't work in this situation
1336 scale.x = Math.Abs(scale.x); 1337 scale.X = Math.Abs(scale.X);
1337 scale.y = Math.Abs(scale.y); 1338 scale.Y = Math.Abs(scale.Y);
1338 scale.z = Math.Abs(scale.z); 1339 scale.Z = Math.Abs(scale.Z);
1339 1340
1340 // This scaling isn't very accurate and doesn't take into account the face rotation :P 1341 // This scaling isn't very accurate and doesn't take into account the face rotation :P
1341 int mapdrawstartX = (int)(pos.X - scale.x); 1342 int mapdrawstartX = (int)(pos.X - scale.X);
1342 int mapdrawstartY = (int)(pos.Y - scale.y); 1343 int mapdrawstartY = (int)(pos.Y - scale.Y);
1343 int mapdrawendX = (int)(pos.X + scale.x); 1344 int mapdrawendX = (int)(pos.X + scale.X);
1344 int mapdrawendY = (int)(pos.Y + scale.y); 1345 int mapdrawendY = (int)(pos.Y + scale.Y);
1345 1346
1346 // If object is beyond the edge of the map, don't draw it to avoid errors 1347 // If object is beyond the edge of the map, don't draw it to avoid errors
1347 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 1348 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255
@@ -1420,7 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes
1420 // map tile while protecting the (grid) asset database from bloat caused by a new asset each 1421 // map tile while protecting the (grid) asset database from bloat caused by a new asset each
1421 // time a mapimage is generated! 1422 // time a mapimage is generated!
1422 1423
1423 LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; 1424 UUID lastMapRegionUUID = m_regInfo.lastMapUUID;
1424 1425
1425 int lastMapRefresh = 0; 1426 int lastMapRefresh = 0;
1426 int twoDays = 172800; 1427 int twoDays = 172800;
@@ -1440,21 +1441,21 @@ namespace OpenSim.Region.Environment.Scenes
1440 { 1441 {
1441 } 1442 }
1442 1443
1443 LLUUID TerrainImageLLUUID = LLUUID.Random(); 1444 UUID TerrainImageUUID = UUID.Random();
1444 1445
1445 if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) 1446 if (lastMapRegionUUID == UUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch())
1446 { 1447 {
1447 m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); 1448 m_regInfo.SaveLastMapUUID(TerrainImageUUID);
1448 1449
1449 m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE"); 1450 m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE");
1450 } 1451 }
1451 else 1452 else
1452 { 1453 {
1453 TerrainImageLLUUID = lastMapRegionUUID; 1454 TerrainImageUUID = lastMapRegionUUID;
1454 m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); 1455 m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID");
1455 } 1456 }
1456 1457
1457 m_regInfo.RegionSettings.TerrainImageID = TerrainImageLLUUID; 1458 m_regInfo.RegionSettings.TerrainImageID = TerrainImageUUID;
1458 1459
1459 AssetBase asset = new AssetBase(); 1460 AssetBase asset = new AssetBase();
1460 asset.FullID = m_regInfo.RegionSettings.TerrainImageID; 1461 asset.FullID = m_regInfo.RegionSettings.TerrainImageID;
@@ -1471,7 +1472,7 @@ namespace OpenSim.Region.Environment.Scenes
1471 1472
1472 #region Load Land 1473 #region Load Land
1473 1474
1474 public void loadAllLandObjectsFromStorage(LLUUID regionID) 1475 public void loadAllLandObjectsFromStorage(UUID regionID)
1475 { 1476 {
1476 m_log.Info("[SCENE]: Loading land objects from storage"); 1477 m_log.Info("[SCENE]: Loading land objects from storage");
1477 List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(regionID); 1478 List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(regionID);
@@ -1500,7 +1501,7 @@ namespace OpenSim.Region.Environment.Scenes
1500 /// <summary> 1501 /// <summary>
1501 /// Loads the World's objects 1502 /// Loads the World's objects
1502 /// </summary> 1503 /// </summary>
1503 public virtual void LoadPrimsFromStorage(LLUUID regionID) 1504 public virtual void LoadPrimsFromStorage(UUID regionID)
1504 { 1505 {
1505 m_log.Info("[SCENE]: Loading objects from datastore"); 1506 m_log.Info("[SCENE]: Loading objects from datastore");
1506 1507
@@ -1509,7 +1510,7 @@ namespace OpenSim.Region.Environment.Scenes
1509 { 1510 {
1510 AddRestoredSceneObject(group, true, true); 1511 AddRestoredSceneObject(group, true, true);
1511 SceneObjectPart rootPart = group.GetChildPart(group.UUID); 1512 SceneObjectPart rootPart = group.GetChildPart(group.UUID);
1512 rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; 1513 rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted;
1513 rootPart.TrimPermissions(); 1514 rootPart.TrimPermissions();
1514 group.CheckSculptAndLoad(); 1515 group.CheckSculptAndLoad();
1515 //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 1516 //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
@@ -1533,20 +1534,20 @@ namespace OpenSim.Region.Environment.Scenes
1533 return myID; 1534 return myID;
1534 } 1535 }
1535 1536
1536 public LLVector3 GetNewRezLocation(LLVector3 RayStart, LLVector3 RayEnd, LLUUID RayTargetID, LLQuaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, LLVector3 scale, bool FaceCenter) 1537 public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter)
1537 { 1538 {
1538 LLVector3 pos = LLVector3.Zero; 1539 Vector3 pos = Vector3.Zero;
1539 if (RayEndIsIntersection == (byte)1) 1540 if (RayEndIsIntersection == (byte)1)
1540 { 1541 {
1541 pos = RayEnd; 1542 pos = RayEnd;
1542 return pos; 1543 return pos;
1543 } 1544 }
1544 1545
1545 if (RayTargetID != LLUUID.Zero) 1546 if (RayTargetID != UUID.Zero)
1546 { 1547 {
1547 SceneObjectPart target = GetSceneObjectPart(RayTargetID); 1548 SceneObjectPart target = GetSceneObjectPart(RayTargetID);
1548 1549
1549 LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); 1550 Vector3 direction = Vector3.Normalize(RayEnd - RayStart);
1550 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); 1551 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z);
1551 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); 1552 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z);
1552 1553
@@ -1561,7 +1562,7 @@ namespace OpenSim.Region.Environment.Scenes
1561 Ray NewRay = new Ray(AXOrigin, AXdirection); 1562 Ray NewRay = new Ray(AXOrigin, AXdirection);
1562 1563
1563 // Ray Trace against target here 1564 // Ray Trace against target here
1564 EntityIntersection ei = target.TestIntersectionOBB(NewRay, new Quaternion(1,0,0,0), frontFacesOnly, FaceCenter); 1565 EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter);
1565 1566
1566 // Un-comment out the following line to Get Raytrace results printed to the console. 1567 // Un-comment out the following line to Get Raytrace results printed to the console.
1567 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); 1568 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
@@ -1570,15 +1571,15 @@ namespace OpenSim.Region.Environment.Scenes
1570 // If we hit something 1571 // If we hit something
1571 if (ei.HitTF) 1572 if (ei.HitTF)
1572 { 1573 {
1573 LLVector3 scaleComponent = new LLVector3(ei.AAfaceNormal.x, ei.AAfaceNormal.y, ei.AAfaceNormal.z); 1574 Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z);
1574 if (scaleComponent.X != 0) ScaleOffset = scale.X; 1575 if (scaleComponent.X != 0) ScaleOffset = scale.X;
1575 if (scaleComponent.Y != 0) ScaleOffset = scale.Y; 1576 if (scaleComponent.Y != 0) ScaleOffset = scale.Y;
1576 if (scaleComponent.Z != 0) ScaleOffset = scale.Z; 1577 if (scaleComponent.Z != 0) ScaleOffset = scale.Z;
1577 ScaleOffset = Math.Abs(ScaleOffset); 1578 ScaleOffset = Math.Abs(ScaleOffset);
1578 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 1579 Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z);
1579 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); 1580 Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z);
1580 // Set the position to the intersection point 1581 // Set the position to the intersection point
1581 LLVector3 offset = (normal * (ScaleOffset / 2f)); 1582 Vector3 offset = (normal * (ScaleOffset / 2f));
1582 pos = (intersectionpoint + offset); 1583 pos = (intersectionpoint + offset);
1583 1584
1584 // Un-offset the prim (it gets offset later by the consumer method) 1585 // Un-offset the prim (it gets offset later by the consumer method)
@@ -1598,7 +1599,7 @@ namespace OpenSim.Region.Environment.Scenes
1598 1599
1599 if (ei.HitTF) 1600 if (ei.HitTF)
1600 { 1601 {
1601 pos = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 1602 pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z);
1602 } 1603 }
1603 1604
1604 return pos; 1605 return pos;
@@ -1612,11 +1613,11 @@ namespace OpenSim.Region.Environment.Scenes
1612 } 1613 }
1613 } 1614 }
1614 1615
1615 public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, 1616 public virtual void AddNewPrim(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape,
1616 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 1617 byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
1617 byte RayEndIsIntersection) 1618 byte RayEndIsIntersection)
1618 { 1619 {
1619 LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new LLVector3(0.5f, 0.5f, 0.5f), false); 1620 Vector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection, true, new Vector3(0.5f, 0.5f, 0.5f), false);
1620 1621
1621 if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos)) 1622 if (ExternalChecks.ExternalChecksCanRezObject(1, ownerID, pos))
1622 { 1623 {
@@ -1627,7 +1628,7 @@ namespace OpenSim.Region.Environment.Scenes
1627 } 1628 }
1628 } 1629 }
1629 1630
1630 public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) 1631 public virtual SceneObjectGroup AddNewPrim(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
1631 { 1632 {
1632 //m_log.DebugFormat( 1633 //m_log.DebugFormat(
1633 // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); 1634 // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName);
@@ -1640,8 +1641,8 @@ namespace OpenSim.Region.Environment.Scenes
1640 //rootPart.TrimPermissions(); 1641 //rootPart.TrimPermissions();
1641 if ((rootPart.Shape.PCode == (byte)PCode.Grass) || (rootPart.Shape.PCode == (byte)PCode.Tree) || (rootPart.Shape.PCode == (byte)PCode.NewTree)) 1642 if ((rootPart.Shape.PCode == (byte)PCode.Grass) || (rootPart.Shape.PCode == (byte)PCode.Tree) || (rootPart.Shape.PCode == (byte)PCode.NewTree))
1642 { 1643 {
1643 rootPart.AddFlag(LLObject.ObjectFlags.Phantom); 1644 rootPart.AddFlag(PrimFlags.Phantom);
1644 //rootPart.ObjectFlags += (uint)LLObject.ObjectFlags.Phantom; 1645 //rootPart.ObjectFlags += (uint)PrimFlags.Phantom;
1645 if (rootPart.Shape.PCode != (byte)PCode.Grass) 1646 if (rootPart.Shape.PCode != (byte)PCode.Grass)
1646 AdaptTree(ref shape); 1647 AdaptTree(ref shape);
1647 } 1648 }
@@ -1658,20 +1659,20 @@ namespace OpenSim.Region.Environment.Scenes
1658 { 1659 {
1659 case Tree.Cypress1: 1660 case Tree.Cypress1:
1660 case Tree.Cypress2: 1661 case Tree.Cypress2:
1661 tree.Scale = new LLVector3(4, 4, 10); 1662 tree.Scale = new Vector3(4, 4, 10);
1662 break; 1663 break;
1663 1664
1664 // case... other tree types 1665 // case... other tree types
1665 // tree.Scale = new LLVector3(?, ?, ?); 1666 // tree.Scale = new Vector3(?, ?, ?);
1666 // break; 1667 // break;
1667 1668
1668 default: 1669 default:
1669 tree.Scale = new LLVector3(4, 4, 4); 1670 tree.Scale = new Vector3(4, 4, 4);
1670 break; 1671 break;
1671 } 1672 }
1672 } 1673 }
1673 1674
1674 public SceneObjectGroup AddTree(LLUUID uuid, LLVector3 scale, LLQuaternion rotation, LLVector3 position, 1675 public SceneObjectGroup AddTree(UUID uuid, Vector3 scale, Quaternion rotation, Vector3 position,
1675 Tree treeType, bool newTree) 1676 Tree treeType, bool newTree)
1676 { 1677 {
1677 PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); 1678 PrimitiveBaseShape treeShape = new PrimitiveBaseShape();
@@ -1771,7 +1772,7 @@ namespace OpenSim.Region.Environment.Scenes
1771 /// </summary> 1772 /// </summary>
1772 /// <param name="uuid"></param> 1773 /// <param name="uuid"></param>
1773 /// <returns>true if the object was in the scene, false if it was not</returns> 1774 /// <returns>true if the object was in the scene, false if it was not</returns>
1774 public bool UnlinkSceneObject(LLUUID uuid, bool resultOfLinkingObjects) 1775 public bool UnlinkSceneObject(UUID uuid, bool resultOfLinkingObjects)
1775 { 1776 {
1776 if (m_innerScene.DeleteSceneObject(uuid,resultOfLinkingObjects)) 1777 if (m_innerScene.DeleteSceneObject(uuid,resultOfLinkingObjects))
1777 { 1778 {
@@ -1783,7 +1784,7 @@ namespace OpenSim.Region.Environment.Scenes
1783 return false; 1784 return false;
1784 } 1785 }
1785 1786
1786 public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) 1787 public void LoadPrimsFromXml(string fileName, bool newIdsFlag, Vector3 loadOffset)
1787 { 1788 {
1788 m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); 1789 m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName);
1789 1790
@@ -1818,7 +1819,7 @@ namespace OpenSim.Region.Environment.Scenes
1818 m_serialiser.SavePrimsToXml2(this, fileName); 1819 m_serialiser.SavePrimsToXml2(this, fileName);
1819 } 1820 }
1820 1821
1821 public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max) 1822 public void SavePrimsToXml2(TextWriter stream, Vector3 min, Vector3 max)
1822 { 1823 {
1823 m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); 1824 m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName);
1824 1825
@@ -1876,7 +1877,7 @@ namespace OpenSim.Region.Environment.Scenes
1876 /// <param name="position">current position of Group</param> 1877 /// <param name="position">current position of Group</param>
1877 /// <param name="grp">Scene Object Group that we're crossing</param> 1878 /// <param name="grp">Scene Object Group that we're crossing</param>
1878 1879
1879 public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) 1880 public void CrossPrimGroupIntoNewRegion(Vector3 position, SceneObjectGroup grp)
1880 { 1881 {
1881 if (grp == null) 1882 if (grp == null)
1882 return; 1883 return;
@@ -1897,12 +1898,12 @@ namespace OpenSim.Region.Environment.Scenes
1897 return; 1898 return;
1898 } 1899 }
1899 1900
1900 m_log.Warn("Prim crossing: " + grp.UUID.ToString()); 1901 m_log.Warn("Prim crossing: " + grp.ToString());
1901 int thisx = (int)RegionInfo.RegionLocX; 1902 int thisx = (int)RegionInfo.RegionLocX;
1902 int thisy = (int)RegionInfo.RegionLocY; 1903 int thisy = (int)RegionInfo.RegionLocY;
1903 1904
1904 ulong newRegionHandle = 0; 1905 ulong newRegionHandle = 0;
1905 LLVector3 pos = position; 1906 Vector3 pos = position;
1906 1907
1907 if (position.X > Constants.RegionSize + 0.1f) 1908 if (position.X > Constants.RegionSize + 0.1f)
1908 { 1909 {
@@ -1973,7 +1974,7 @@ namespace OpenSim.Region.Environment.Scenes
1973 } 1974 }
1974 } 1975 }
1975 1976
1976 public bool IncomingInterRegionPrimGroup(ulong regionHandle, LLUUID primID, string objXMLData, int XMLMethod) 1977 public bool IncomingInterRegionPrimGroup(ulong regionHandle, UUID primID, string objXMLData, int XMLMethod)
1977 { 1978 {
1978 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); 1979 m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor");
1979 if (XMLMethod == 0) 1980 if (XMLMethod == 0)
@@ -2160,7 +2161,7 @@ namespace OpenSim.Region.Environment.Scenes
2160 } 2161 }
2161 2162
2162 // Gesture 2163 // Gesture
2163 public virtual void ActivateGesture(IClientAPI client, LLUUID assetId, LLUUID gestureId) 2164 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId)
2164 { 2165 {
2165 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); 2166 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID);
2166 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); 2167 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId);
@@ -2180,7 +2181,7 @@ namespace OpenSim.Region.Environment.Scenes
2180 m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString()); 2181 m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString());
2181 } 2182 }
2182 2183
2183 public virtual void DeactivateGesture(IClientAPI client, LLUUID gestureId) 2184 public virtual void DeactivateGesture(IClientAPI client, UUID gestureId)
2184 { 2185 {
2185 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); 2186 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID);
2186 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); 2187 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId);
@@ -2200,14 +2201,14 @@ namespace OpenSim.Region.Environment.Scenes
2200 m_log.DebugFormat("gesture : {0} ", gestureId.ToString()); 2201 m_log.DebugFormat("gesture : {0} ", gestureId.ToString());
2201 } 2202 }
2202 2203
2203 public virtual void TeleportClientHome(LLUUID agentId, IClientAPI client) 2204 public virtual void TeleportClientHome(UUID agentId, IClientAPI client)
2204 { 2205 {
2205 UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); 2206 UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId);
2206 if (UserProfile != null) 2207 if (UserProfile != null)
2207 { 2208 {
2208 LLUUID homeRegionID = UserProfile.HomeRegionID; 2209 UUID homeRegionID = UserProfile.HomeRegionID;
2209 ulong homeRegionHandle = UserProfile.HomeRegion; 2210 ulong homeRegionHandle = UserProfile.HomeRegion;
2210 if (homeRegionID == LLUUID.Zero) 2211 if (homeRegionID == UUID.Zero)
2211 { 2212 {
2212 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); 2213 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion);
2213 if (info == null) 2214 if (info == null)
@@ -2234,11 +2235,11 @@ namespace OpenSim.Region.Environment.Scenes
2234 } 2235 }
2235 } 2236 }
2236 2237
2237 public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 2238 public void doObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
2238 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 2239 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
2239 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) 2240 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates)
2240 { 2241 {
2241 LLVector3 pos; 2242 Vector3 pos;
2242 const bool frontFacesOnly = true; 2243 const bool frontFacesOnly = true;
2243 //m_log.Info("HITTARGET: " + RayTargetObj.ToString() + ", COPYTARGET: " + localID.ToString()); 2244 //m_log.Info("HITTARGET: " + RayTargetObj.ToString() + ", COPYTARGET: " + localID.ToString());
2244 SceneObjectPart target = GetSceneObjectPart(localID); 2245 SceneObjectPart target = GetSceneObjectPart(localID);
@@ -2246,7 +2247,7 @@ namespace OpenSim.Region.Environment.Scenes
2246 2247
2247 if (target != null && target2 != null) 2248 if (target != null && target2 != null)
2248 { 2249 {
2249 LLVector3 direction = LLVector3.Norm(RayEnd - RayStart); 2250 Vector3 direction = Vector3.Normalize(RayEnd - RayStart);
2250 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); 2251 Vector3 AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z);
2251 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z); 2252 Vector3 AXdirection = new Vector3(direction.X, direction.Y, direction.Z);
2252 2253
@@ -2261,7 +2262,7 @@ namespace OpenSim.Region.Environment.Scenes
2261 Ray NewRay = new Ray(AXOrigin, AXdirection); 2262 Ray NewRay = new Ray(AXOrigin, AXdirection);
2262 2263
2263 // Ray Trace against target here 2264 // Ray Trace against target here
2264 EntityIntersection ei = target2.TestIntersectionOBB(NewRay, new Quaternion(1, 0, 0, 0), frontFacesOnly, CopyCenters); 2265 EntityIntersection ei = target2.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, CopyCenters);
2265 2266
2266 // Un-comment out the following line to Get Raytrace results printed to the console. 2267 // Un-comment out the following line to Get Raytrace results printed to the console.
2267 //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); 2268 //m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
@@ -2270,26 +2271,26 @@ namespace OpenSim.Region.Environment.Scenes
2270 // If we hit something 2271 // If we hit something
2271 if (ei.HitTF) 2272 if (ei.HitTF)
2272 { 2273 {
2273 LLVector3 scale = target.Scale; 2274 Vector3 scale = target.Scale;
2274 LLVector3 scaleComponent = new LLVector3(ei.AAfaceNormal.x, ei.AAfaceNormal.y, ei.AAfaceNormal.z); 2275 Vector3 scaleComponent = new Vector3(ei.AAfaceNormal.X, ei.AAfaceNormal.Y, ei.AAfaceNormal.Z);
2275 if (scaleComponent.X != 0) ScaleOffset = scale.X; 2276 if (scaleComponent.X != 0) ScaleOffset = scale.X;
2276 if (scaleComponent.Y != 0) ScaleOffset = scale.Y; 2277 if (scaleComponent.Y != 0) ScaleOffset = scale.Y;
2277 if (scaleComponent.Z != 0) ScaleOffset = scale.Z; 2278 if (scaleComponent.Z != 0) ScaleOffset = scale.Z;
2278 ScaleOffset = Math.Abs(ScaleOffset); 2279 ScaleOffset = Math.Abs(ScaleOffset);
2279 LLVector3 intersectionpoint = new LLVector3(ei.ipoint.x, ei.ipoint.y, ei.ipoint.z); 2280 Vector3 intersectionpoint = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z);
2280 LLVector3 normal = new LLVector3(ei.normal.x, ei.normal.y, ei.normal.z); 2281 Vector3 normal = new Vector3(ei.normal.X, ei.normal.Y, ei.normal.Z);
2281 LLVector3 offset = normal * (ScaleOffset / 2f); 2282 Vector3 offset = normal * (ScaleOffset / 2f);
2282 pos = intersectionpoint + offset; 2283 pos = intersectionpoint + offset;
2283 2284
2284 // stick in offset format from the original prim 2285 // stick in offset format from the original prim
2285 pos = pos - target.ParentGroup.AbsolutePosition; 2286 pos = pos - target.ParentGroup.AbsolutePosition;
2286 if (CopyRotates) 2287 if (CopyRotates)
2287 { 2288 {
2288 LLQuaternion worldRot = target2.GetWorldRotation(); 2289 Quaternion worldRot = target2.GetWorldRotation();
2289 2290
2290 // SceneObjectGroup obj = m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, new Quaternion(worldRot.W,worldRot.X,worldRot.Y,worldRot.Z)); 2291 // SceneObjectGroup obj = m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
2291 m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, new Quaternion(worldRot.W,worldRot.X,worldRot.Y,worldRot.Z)); 2292 m_innerScene.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot);
2292 //obj.Rotation = new Quaternion(worldRot.W, worldRot.X, worldRot.Y, worldRot.Z); 2293 //obj.Rotation = worldRot;
2293 //obj.UpdateGroupRotation(worldRot); 2294 //obj.UpdateGroupRotation(worldRot);
2294 } 2295 }
2295 else 2296 else
@@ -2305,7 +2306,7 @@ namespace OpenSim.Region.Environment.Scenes
2305 } 2306 }
2306 } 2307 }
2307 2308
2308 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags) 2309 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
2309 { 2310 {
2310 UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId); 2311 UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(remoteClient.AgentId);
2311 if (UserProfile != null) 2312 if (UserProfile != null)
@@ -2369,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes
2369 /// Remove the given client from the scene. 2370 /// Remove the given client from the scene.
2370 /// </summary> 2371 /// </summary>
2371 /// <param name="agentID"></param> 2372 /// <param name="agentID"></param>
2372 public override void RemoveClient(LLUUID agentID) 2373 public override void RemoveClient(UUID agentID)
2373 { 2374 {
2374 bool childagentYN = false; 2375 bool childagentYN = false;
2375 ScenePresence avatar = GetScenePresence(agentID); 2376 ScenePresence avatar = GetScenePresence(agentID);
@@ -2420,7 +2421,7 @@ namespace OpenSim.Region.Environment.Scenes
2420 { 2421 {
2421 try 2422 try
2422 { 2423 {
2423 client.SendKillObject(avatar.RegionHandle, avatar.LocalId); 2424 client.SendKiPrimitive(avatar.RegionHandle, avatar.LocalId);
2424 } 2425 }
2425 catch (NullReferenceException) 2426 catch (NullReferenceException)
2426 { 2427 {
@@ -2462,7 +2463,7 @@ namespace OpenSim.Region.Environment.Scenes
2462 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); 2463 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
2463 } 2464 }
2464 2465
2465 public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst) 2466 public void HandleRemoveKnownRegionsFromAvatar(UUID avatarID, List<ulong> regionslst)
2466 { 2467 {
2467 ScenePresence av = GetScenePresence(avatarID); 2468 ScenePresence av = GetScenePresence(avatarID);
2468 if (av != null) 2469 if (av != null)
@@ -2493,7 +2494,7 @@ namespace OpenSim.Region.Environment.Scenes
2493 2494
2494 #region Entities 2495 #region Entities
2495 2496
2496 public void SendKillObject(uint localID) 2497 public void SendKiPrimitive(uint localID)
2497 { 2498 {
2498 SceneObjectPart part = GetSceneObjectPart(localID); 2499 SceneObjectPart part = GetSceneObjectPart(localID);
2499 if (part != null) // It is a prim 2500 if (part != null) // It is a prim
@@ -2504,7 +2505,7 @@ namespace OpenSim.Region.Environment.Scenes
2504 return; 2505 return;
2505 } 2506 }
2506 } 2507 }
2507 Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); 2508 Broadcast(delegate(IClientAPI client) { client.SendKiPrimitive(m_regionHandle, localID); });
2508 } 2509 }
2509 2510
2510 #endregion 2511 #endregion
@@ -2524,7 +2525,7 @@ namespace OpenSim.Region.Environment.Scenes
2524 m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; 2525 m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup;
2525 m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar; 2526 m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
2526 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid; 2527 m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
2527 m_sceneGridService.KillObject += SendKillObject; 2528 m_sceneGridService.KiPrimitive += SendKiPrimitive;
2528 m_sceneGridService.OnGetLandData += GetLandData; 2529 m_sceneGridService.OnGetLandData += GetLandData;
2529 } 2530 }
2530 2531
@@ -2533,7 +2534,7 @@ namespace OpenSim.Region.Environment.Scenes
2533 /// </summary> 2534 /// </summary>
2534 public void UnRegisterReginWithComms() 2535 public void UnRegisterReginWithComms()
2535 { 2536 {
2536 m_sceneGridService.KillObject -= SendKillObject; 2537 m_sceneGridService.KiPrimitive -= SendKiPrimitive;
2537 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid; 2538 m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
2538 m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar; 2539 m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
2539 m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; 2540 m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup;
@@ -2574,7 +2575,7 @@ namespace OpenSim.Region.Environment.Scenes
2574 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 2575 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
2575 if (land != null) 2576 if (land != null)
2576 { 2577 {
2577 if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != LLVector3.Zero) 2578 if (land.landData.LandingType == (byte)1 && land.landData.UserLocation != Vector3.Zero)
2578 { 2579 {
2579 agent.startpos = land.landData.UserLocation; 2580 agent.startpos = land.landData.UserLocation;
2580 } 2581 }
@@ -2608,7 +2609,7 @@ namespace OpenSim.Region.Environment.Scenes
2608 return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); 2609 return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc);
2609 } 2610 }
2610 2611
2611 protected void HandleLogOffUserFromGrid(ulong regionHandle, LLUUID AvatarID, LLUUID RegionSecret, string message) 2612 protected void HandleLogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message)
2612 { 2613 {
2613 if (RegionInfo.RegionHandle == regionHandle) 2614 if (RegionInfo.RegionHandle == regionHandle)
2614 { 2615 {
@@ -2645,7 +2646,7 @@ namespace OpenSim.Region.Environment.Scenes
2645 /// </summary> 2646 /// </summary>
2646 /// <param name="agentId"></param> 2647 /// <param name="agentId"></param>
2647 /// <param name="capsObjectPath"></param> 2648 /// <param name="capsObjectPath"></param>
2648 public void AddCapsHandler(LLUUID agentId) 2649 public void AddCapsHandler(UUID agentId)
2649 { 2650 {
2650 if (RegionInfo.EstateSettings.IsBanned(agentId)) 2651 if (RegionInfo.EstateSettings.IsBanned(agentId))
2651 return; 2652 return;
@@ -2670,7 +2671,7 @@ namespace OpenSim.Region.Environment.Scenes
2670 m_capsHandlers[agentId] = cap; 2671 m_capsHandlers[agentId] = cap;
2671 } 2672 }
2672 2673
2673 public Caps GetCapsHandlerForUser(LLUUID agentId) 2674 public Caps GetCapsHandlerForUser(UUID agentId)
2674 { 2675 {
2675 lock (m_capsHandlers) 2676 lock (m_capsHandlers)
2676 { 2677 {
@@ -2686,7 +2687,7 @@ namespace OpenSim.Region.Environment.Scenes
2686 /// Remove the caps handler for a given agent. 2687 /// Remove the caps handler for a given agent.
2687 /// </summary> 2688 /// </summary>
2688 /// <param name="agentId"></param> 2689 /// <param name="agentId"></param>
2689 public void RemoveCapsHandler(LLUUID agentId) 2690 public void RemoveCapsHandler(UUID agentId)
2690 { 2691 {
2691 lock (m_capsHandlers) 2692 lock (m_capsHandlers)
2692 { 2693 {
@@ -2717,7 +2718,7 @@ namespace OpenSim.Region.Environment.Scenes
2717 /// <param name="agentID"></param> 2718 /// <param name="agentID"></param>
2718 /// <param name="position"></param> 2719 /// <param name="position"></param>
2719 /// <param name="isFlying"></param> 2720 /// <param name="isFlying"></param>
2720 public virtual void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 2721 public virtual void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
2721 { 2722 {
2722 if (regionHandle == m_regInfo.RegionHandle) 2723 if (regionHandle == m_regInfo.RegionHandle)
2723 { 2724 {
@@ -2742,7 +2743,7 @@ namespace OpenSim.Region.Environment.Scenes
2742 2743
2743 public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) 2744 public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
2744 { 2745 {
2745 ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); 2746 ScenePresence childAgentUpdate = GetScenePresence(new UUID(cAgentData.AgentID));
2746 if (childAgentUpdate != null) 2747 if (childAgentUpdate != null)
2747 { 2748 {
2748 // I can't imagine *yet* why we would get an update if the agent is a root agent.. 2749 // I can't imagine *yet* why we would get an update if the agent is a root agent..
@@ -2768,7 +2769,7 @@ namespace OpenSim.Region.Environment.Scenes
2768 /// </summary> 2769 /// </summary>
2769 /// <param name="regionHandle"></param> 2770 /// <param name="regionHandle"></param>
2770 /// <param name="agentID"></param> 2771 /// <param name="agentID"></param>
2771 public bool CloseConnection(ulong regionHandle, LLUUID agentID) 2772 public bool CloseConnection(ulong regionHandle, UUID agentID)
2772 { 2773 {
2773 if (regionHandle == m_regionHandle) 2774 if (regionHandle == m_regionHandle)
2774 { 2775 {
@@ -2850,8 +2851,8 @@ namespace OpenSim.Region.Environment.Scenes
2850 /// <param name="position"></param> 2851 /// <param name="position"></param>
2851 /// <param name="lookAt"></param> 2852 /// <param name="lookAt"></param>
2852 /// <param name="flags"></param> 2853 /// <param name="flags"></param>
2853 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, LLVector3 position, 2854 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position,
2854 LLVector3 lookat, uint flags) 2855 Vector3 lookat, uint flags)
2855 { 2856 {
2856 RegionInfo regionInfo = m_sceneGridService.RequestClosestRegion(regionName); 2857 RegionInfo regionInfo = m_sceneGridService.RequestClosestRegion(regionName);
2857 if (regionInfo == null) 2858 if (regionInfo == null)
@@ -2871,8 +2872,8 @@ namespace OpenSim.Region.Environment.Scenes
2871 /// <param name="position"></param> 2872 /// <param name="position"></param>
2872 /// <param name="lookAt"></param> 2873 /// <param name="lookAt"></param>
2873 /// <param name="flags"></param> 2874 /// <param name="flags"></param>
2874 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, 2875 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, Vector3 position,
2875 LLVector3 lookAt, uint flags) 2876 Vector3 lookAt, uint flags)
2876 { 2877 {
2877 lock (m_scenePresences) 2878 lock (m_scenePresences)
2878 { 2879 {
@@ -2890,7 +2891,7 @@ namespace OpenSim.Region.Environment.Scenes
2890 /// <param name="remoteClient"></param> 2891 /// <param name="remoteClient"></param>
2891 /// <param name="regionHandle"></param> 2892 /// <param name="regionHandle"></param>
2892 /// <param name="position"></param> 2893 /// <param name="position"></param>
2893 public void RequestTeleportLandmark(IClientAPI remoteClient, LLUUID regionID, LLVector3 position) 2894 public void RequestTeleportLandmark(IClientAPI remoteClient, UUID regionID, Vector3 position)
2894 { 2895 {
2895 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID); 2896 RegionInfo info = CommsManager.GridService.RequestNeighbourInfo(regionID);
2896 2897
@@ -2906,7 +2907,7 @@ namespace OpenSim.Region.Environment.Scenes
2906 if (m_scenePresences.ContainsKey(remoteClient.AgentId)) 2907 if (m_scenePresences.ContainsKey(remoteClient.AgentId))
2907 { 2908 {
2908 m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], info.RegionHandle, 2909 m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], info.RegionHandle,
2909 position, LLVector3.Zero, 0); 2910 position, Vector3.Zero, 0);
2910 } 2911 }
2911 } 2912 }
2912 } 2913 }
@@ -2919,7 +2920,7 @@ namespace OpenSim.Region.Environment.Scenes
2919 /// <param name="position"></param> 2920 /// <param name="position"></param>
2920 /// <param name="isFlying"></param> 2921 /// <param name="isFlying"></param>
2921 /// <returns></returns> 2922 /// <returns></returns>
2922 public bool InformNeighbourOfCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 2923 public bool InformNeighbourOfCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
2923 { 2924 {
2924 return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying); 2925 return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying);
2925 } 2926 }
@@ -3006,7 +3007,7 @@ namespace OpenSim.Region.Environment.Scenes
3006 objectCapacity = objects; 3007 objectCapacity = objects;
3007 } 3008 }
3008 3009
3009 public List<FriendListItem> GetFriendList(LLUUID avatarID) 3010 public List<FriendListItem> GetFriendList(UUID avatarID)
3010 { 3011 {
3011 return CommsManager.GetUserFriendList(avatarID); 3012 return CommsManager.GetUserFriendList(avatarID);
3012 } 3013 }
@@ -3035,7 +3036,7 @@ namespace OpenSim.Region.Environment.Scenes
3035 /// <param name="groupOwned"></param> 3036 /// <param name="groupOwned"></param>
3036 /// <param name="message"></param> 3037 /// <param name="message"></param>
3037 /// <param name="url"></param> 3038 /// <param name="url"></param>
3038 public void SendUrlToUser(LLUUID avatarID, string objectName, LLUUID objectID, LLUUID ownerID, bool groupOwned, 3039 public void SendUrlToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned,
3039 string message, string url) 3040 string message, string url)
3040 { 3041 {
3041 lock (m_scenePresences) 3042 lock (m_scenePresences)
@@ -3048,7 +3049,7 @@ namespace OpenSim.Region.Environment.Scenes
3048 } 3049 }
3049 } 3050 }
3050 3051
3051 public void SendDialogToUser(LLUUID avatarID, string objectName, LLUUID objectID, LLUUID ownerID, string message, LLUUID TextureID, int ch, string[] buttonlabels) 3052 public void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, UUID ownerID, string message, UUID TextureID, int ch, string[] buttonlabels)
3052 { 3053 {
3053 lock (m_scenePresences) 3054 lock (m_scenePresences)
3054 { 3055 {
@@ -3067,13 +3068,13 @@ namespace OpenSim.Region.Environment.Scenes
3067 /// <param name="type"></param> 3068 /// <param name="type"></param>
3068 /// <param name="body"></param> 3069 /// <param name="body"></param>
3069 /// <returns></returns> 3070 /// <returns></returns>
3070 public LLUUID MakeHttpRequest(string url, string type, string body) 3071 public UUID MakeHttpRequest(string url, string type, string body)
3071 { 3072 {
3072 if (m_httpRequestModule != null) 3073 if (m_httpRequestModule != null)
3073 { 3074 {
3074 return m_httpRequestModule.MakeHttpRequest(url, type, body); 3075 return m_httpRequestModule.MakeHttpRequest(url, type, body);
3075 } 3076 }
3076 return LLUUID.Zero; 3077 return UUID.Zero;
3077 } 3078 }
3078 3079
3079 /// <summary> 3080 /// <summary>
@@ -3091,25 +3092,25 @@ namespace OpenSim.Region.Environment.Scenes
3091 m_eventManager.TriggerGridInstantMessage(message, options); 3092 m_eventManager.TriggerGridInstantMessage(message, options);
3092 } 3093 }
3093 3094
3094 public virtual void StoreAddFriendship(LLUUID ownerID, LLUUID friendID, uint perms) 3095 public virtual void StoreAddFriendship(UUID ownerID, UUID friendID, uint perms)
3095 { 3096 {
3096 // TODO: m_sceneGridService.DoStuff; 3097 // TODO: m_sceneGridService.DoStuff;
3097 m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms); 3098 m_sceneGridService.AddNewUserFriend(ownerID, friendID, perms);
3098 } 3099 }
3099 3100
3100 public virtual void StoreUpdateFriendship(LLUUID ownerID, LLUUID friendID, uint perms) 3101 public virtual void StoreUpdateFriendship(UUID ownerID, UUID friendID, uint perms)
3101 { 3102 {
3102 // TODO: m_sceneGridService.DoStuff; 3103 // TODO: m_sceneGridService.DoStuff;
3103 m_sceneGridService.UpdateUserFriendPerms(ownerID, friendID, perms); 3104 m_sceneGridService.UpdateUserFriendPerms(ownerID, friendID, perms);
3104 } 3105 }
3105 3106
3106 public virtual void StoreRemoveFriendship(LLUUID ownerID, LLUUID ExfriendID) 3107 public virtual void StoreRemoveFriendship(UUID ownerID, UUID ExfriendID)
3107 { 3108 {
3108 // TODO: m_sceneGridService.DoStuff; 3109 // TODO: m_sceneGridService.DoStuff;
3109 m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); 3110 m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
3110 } 3111 }
3111 3112
3112 public virtual List<FriendListItem> StoreGetFriendsForUser(LLUUID ownerID) 3113 public virtual List<FriendListItem> StoreGetFriendsForUser(UUID ownerID)
3113 { 3114 {
3114 // TODO: m_sceneGridService.DoStuff; 3115 // TODO: m_sceneGridService.DoStuff;
3115 return m_sceneGridService.GetUserFriendList(ownerID); 3116 return m_sceneGridService.GetUserFriendList(ownerID);
@@ -3144,7 +3145,7 @@ namespace OpenSim.Region.Environment.Scenes
3144 3145
3145 #region Alert Methods 3146 #region Alert Methods
3146 3147
3147 private void SendPermissionAlert(LLUUID user, string reason) 3148 private void SendPermissionAlert(UUID user, string reason)
3148 { 3149 {
3149 SendAlertToUser(user, reason, false); 3150 SendAlertToUser(user, reason, false);
3150 } 3151 }
@@ -3170,7 +3171,7 @@ namespace OpenSim.Region.Environment.Scenes
3170 /// <param name="agentID"></param> 3171 /// <param name="agentID"></param>
3171 /// <param name="message"></param> 3172 /// <param name="message"></param>
3172 /// <param name="modal"></param> 3173 /// <param name="modal"></param>
3173 public void SendAlertToUser(LLUUID agentID, string message, bool modal) 3174 public void SendAlertToUser(UUID agentID, string message, bool modal)
3174 { 3175 {
3175 lock (m_scenePresences) 3176 lock (m_scenePresences)
3176 { 3177 {
@@ -3188,7 +3189,7 @@ namespace OpenSim.Region.Environment.Scenes
3188 /// <param name="sessionID"></param> 3189 /// <param name="sessionID"></param>
3189 /// <param name="token"></param> 3190 /// <param name="token"></param>
3190 /// <param name="controllingClient"></param> 3191 /// <param name="controllingClient"></param>
3191 public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godLike, 3192 public void handleRequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike,
3192 IClientAPI controllingClient) 3193 IClientAPI controllingClient)
3193 { 3194 {
3194 lock (m_scenePresences) 3195 lock (m_scenePresences)
@@ -3200,7 +3201,7 @@ namespace OpenSim.Region.Environment.Scenes
3200 if (ExternalChecks.ExternalChecksCanBeGodLike(agentID)) 3201 if (ExternalChecks.ExternalChecksCanBeGodLike(agentID))
3201 { 3202 {
3202 // Next we check for spoofing..... 3203 // Next we check for spoofing.....
3203 LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId; 3204 UUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId;
3204 if (sessionID == testSessionID) 3205 if (sessionID == testSessionID)
3205 { 3206 {
3206 if (sessionID == controllingClient.SessionId) 3207 if (sessionID == controllingClient.SessionId)
@@ -3226,7 +3227,7 @@ namespace OpenSim.Region.Environment.Scenes
3226 /// <param name="fromSessionID">The session of the person sending the message</param> 3227 /// <param name="fromSessionID">The session of the person sending the message</param>
3227 /// <param name="FromAvatarName">The name of the person doing the sending</param> 3228 /// <param name="FromAvatarName">The name of the person doing the sending</param>
3228 /// <param name="Message">The Message being sent to the user</param> 3229 /// <param name="Message">The Message being sent to the user</param>
3229 public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 3230 public void SendRegionMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
3230 { 3231 {
3231 List<ScenePresence> presenceList = GetScenePresences(); 3232 List<ScenePresence> presenceList = GetScenePresences();
3232 3233
@@ -3245,7 +3246,7 @@ namespace OpenSim.Region.Environment.Scenes
3245 /// <param name="fromSessionID">The session of the person sending the message</param> 3246 /// <param name="fromSessionID">The session of the person sending the message</param>
3246 /// <param name="FromAvatarName">The name of the person doing the sending</param> 3247 /// <param name="FromAvatarName">The name of the person doing the sending</param>
3247 /// <param name="Message">The Message being sent to the user</param> 3248 /// <param name="Message">The Message being sent to the user</param>
3248 public void SendEstateMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 3249 public void SendEstateMessageFromEstateTools(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
3249 { 3250 {
3250 3251
3251 ClientManager.ForEachClient(delegate(IClientAPI controller) 3252 ClientManager.ForEachClient(delegate(IClientAPI controller)
@@ -3266,10 +3267,10 @@ namespace OpenSim.Region.Environment.Scenes
3266 /// <param name="agentID">the person that is being kicked</param> 3267 /// <param name="agentID">the person that is being kicked</param>
3267 /// <param name="kickflags">This isn't used apparently</param> 3268 /// <param name="kickflags">This isn't used apparently</param>
3268 /// <param name="reason">The message to send to the user after it's been turned into a field</param> 3269 /// <param name="reason">The message to send to the user after it's been turned into a field</param>
3269 public void HandleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) 3270 public void HandleGodlikeKickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason)
3270 { 3271 {
3271 // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. 3272 // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know.
3272 LLUUID kickUserID = new LLUUID("44e87126e7944ded05b37c42da3d5cdb"); 3273 UUID kickUserID = new UUID("44e87126e7944ded05b37c42da3d5cdb");
3273 lock (m_scenePresences) 3274 lock (m_scenePresences)
3274 { 3275 {
3275 if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID) 3276 if (m_scenePresences.ContainsKey(agentID) || agentID == kickUserID)
@@ -3281,7 +3282,7 @@ namespace OpenSim.Region.Environment.Scenes
3281 ClientManager.ForEachClient(delegate(IClientAPI controller) 3282 ClientManager.ForEachClient(delegate(IClientAPI controller)
3282 { 3283 {
3283 if (controller.AgentId != godID) 3284 if (controller.AgentId != godID)
3284 controller.Kick(Helpers.FieldToUTF8String(reason)); 3285 controller.Kick(Utils.BytesToString(reason));
3285 } 3286 }
3286 ); 3287 );
3287 3288
@@ -3304,7 +3305,7 @@ namespace OpenSim.Region.Environment.Scenes
3304 { 3305 {
3305 m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent); 3306 m_innerScene.removeUserCount(!m_scenePresences[agentID].IsChildAgent);
3306 3307
3307 m_scenePresences[agentID].ControllingClient.Kick(Helpers.FieldToUTF8String(reason)); 3308 m_scenePresences[agentID].ControllingClient.Kick(Utils.BytesToString(reason));
3308 m_scenePresences[agentID].ControllingClient.Close(true); 3309 m_scenePresences[agentID].ControllingClient.Close(true);
3309 } 3310 }
3310 } 3311 }
@@ -3317,7 +3318,7 @@ namespace OpenSim.Region.Environment.Scenes
3317 } 3318 }
3318 } 3319 }
3319 3320
3320 public void HandleObjectPermissionsUpdate(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set) 3321 public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set)
3321 { 3322 {
3322 // Check for spoofing.. since this is permissions we're talking about here! 3323 // Check for spoofing.. since this is permissions we're talking about here!
3323 if ((controller.SessionId == sessionID) && (controller.AgentId == agentID)) 3324 if ((controller.SessionId == sessionID) && (controller.AgentId == agentID))
@@ -3423,7 +3424,7 @@ namespace OpenSim.Region.Environment.Scenes
3423 if (part.Name == cmdparams[0]) 3424 if (part.Name == cmdparams[0])
3424 { 3425 {
3425 part.Resize( 3426 part.Resize(
3426 new LLVector3(Convert.ToSingle(cmdparams[1]), Convert.ToSingle(cmdparams[2]), 3427 new Vector3(Convert.ToSingle(cmdparams[1]), Convert.ToSingle(cmdparams[2]),
3427 Convert.ToSingle(cmdparams[3]))); 3428 Convert.ToSingle(cmdparams[3])));
3428 3429
3429 Console.WriteLine("Edited scale of Primitive: " + part.Name); 3430 Console.WriteLine("Edited scale of Primitive: " + part.Name);
@@ -3489,12 +3490,12 @@ namespace OpenSim.Region.Environment.Scenes
3489 return Heightmap[x, y]; 3490 return Heightmap[x, y];
3490 } 3491 }
3491 3492
3492 public LLUUID GetLandOwner(float x, float y) 3493 public UUID GetLandOwner(float x, float y)
3493 { 3494 {
3494 ILandObject land = LandChannel.GetLandObject(x, y); 3495 ILandObject land = LandChannel.GetLandObject(x, y);
3495 if (land == null) 3496 if (land == null)
3496 { 3497 {
3497 return LLUUID.Zero; 3498 return UUID.Zero;
3498 } 3499 }
3499 else 3500 else
3500 { 3501 {
@@ -3570,7 +3571,7 @@ namespace OpenSim.Region.Environment.Scenes
3570 m_eventManager.TriggerOnScriptChangedEvent(localID, change); 3571 m_eventManager.TriggerOnScriptChangedEvent(localID, change);
3571 } 3572 }
3572 3573
3573 public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) 3574 public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
3574 { 3575 {
3575 m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos); 3576 m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos);
3576 } 3577 }
@@ -3580,7 +3581,7 @@ namespace OpenSim.Region.Environment.Scenes
3580 m_eventManager.TriggerNotAtTargetEvent(localID); 3581 m_eventManager.TriggerNotAtTargetEvent(localID);
3581 } 3582 }
3582 3583
3583 private bool scriptDanger(SceneObjectPart part,LLVector3 pos) 3584 private bool scriptDanger(SceneObjectPart part,Vector3 pos)
3584 { 3585 {
3585 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y); 3586 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
3586 if (part != null) 3587 if (part != null)
@@ -3636,7 +3637,7 @@ namespace OpenSim.Region.Environment.Scenes
3636 } 3637 }
3637 } 3638 }
3638 3639
3639 public bool scriptDanger(uint localID, LLVector3 pos) 3640 public bool scriptDanger(uint localID, Vector3 pos)
3640 { 3641 {
3641 SceneObjectPart part = GetSceneObjectPart(localID); 3642 SceneObjectPart part = GetSceneObjectPart(localID);
3642 if (part != null) 3643 if (part != null)
@@ -3678,7 +3679,7 @@ namespace OpenSim.Region.Environment.Scenes
3678 /// </summary> 3679 /// </summary>
3679 /// <param name="localID"></param> 3680 /// <param name="localID"></param>
3680 /// <returns></returns> 3681 /// <returns></returns>
3681 public LLUUID ConvertLocalIDToFullID(uint localID) 3682 public UUID ConvertLocalIDToFullID(uint localID)
3682 { 3683 {
3683 return m_innerScene.ConvertLocalIDToFullID(localID); 3684 return m_innerScene.ConvertLocalIDToFullID(localID);
3684 } 3685 }
@@ -3737,7 +3738,7 @@ namespace OpenSim.Region.Environment.Scenes
3737 /// </summary> 3738 /// </summary>
3738 /// <param name="avatarID"></param> 3739 /// <param name="avatarID"></param>
3739 /// <returns></returns> 3740 /// <returns></returns>
3740 public ScenePresence GetScenePresence(LLUUID avatarID) 3741 public ScenePresence GetScenePresence(UUID avatarID)
3741 { 3742 {
3742 return m_innerScene.GetScenePresence(avatarID); 3743 return m_innerScene.GetScenePresence(avatarID);
3743 } 3744 }
@@ -3747,7 +3748,7 @@ namespace OpenSim.Region.Environment.Scenes
3747 /// </summary> 3748 /// </summary>
3748 /// <param name="avatarID">AvatarID to lookup</param> 3749 /// <param name="avatarID">AvatarID to lookup</param>
3749 /// <returns></returns> 3750 /// <returns></returns>
3750 public override bool PresenceChildStatus(LLUUID avatarID) 3751 public override bool PresenceChildStatus(UUID avatarID)
3751 { 3752 {
3752 ScenePresence cp = GetScenePresence(avatarID); 3753 ScenePresence cp = GetScenePresence(avatarID);
3753 return cp.IsChildAgent; 3754 return cp.IsChildAgent;
@@ -3811,12 +3812,12 @@ namespace OpenSim.Region.Environment.Scenes
3811 /// </summary> 3812 /// </summary>
3812 /// <param name="fullID"></param> 3813 /// <param name="fullID"></param>
3813 /// <returns></returns> 3814 /// <returns></returns>
3814 public SceneObjectPart GetSceneObjectPart(LLUUID fullID) 3815 public SceneObjectPart GetSceneObjectPart(UUID fullID)
3815 { 3816 {
3816 return m_innerScene.GetSceneObjectPart(fullID); 3817 return m_innerScene.GetSceneObjectPart(fullID);
3817 } 3818 }
3818 3819
3819 internal bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar) 3820 internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
3820 { 3821 {
3821 return m_innerScene.TryGetAvatar(avatarId, out avatar); 3822 return m_innerScene.TryGetAvatar(avatarId, out avatar);
3822 } 3823 }
@@ -3921,7 +3922,7 @@ namespace OpenSim.Region.Environment.Scenes
3921// }); 3922// });
3922 } 3923 }
3923 3924
3924 public void RegionHandleRequest(IClientAPI client, LLUUID regionID) 3925 public void RegionHandleRequest(IClientAPI client, UUID regionID)
3925 { 3926 {
3926 RegionInfo info; 3927 RegionInfo info;
3927 if (regionID == RegionInfo.RegionID) 3928 if (regionID == RegionInfo.RegionID)
@@ -3939,7 +3940,7 @@ namespace OpenSim.Region.Environment.Scenes
3939 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); 3940 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
3940 } 3941 }
3941 3942
3942 public void SetRootAgentScene(LLUUID agentID) 3943 public void SetRootAgentScene(UUID agentID)
3943 { 3944 {
3944 IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); 3945 IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
3945 if (inv == null) 3946 if (inv == null)
@@ -3948,7 +3949,7 @@ namespace OpenSim.Region.Environment.Scenes
3948 inv.SetRootAgentScene(agentID, this); 3949 inv.SetRootAgentScene(agentID, this);
3949 } 3950 }
3950 3951
3951 public bool NeedSceneCacheClear(LLUUID agentID) 3952 public bool NeedSceneCacheClear(UUID agentID)
3952 { 3953 {
3953 IInventoryModule inv = RequestModuleInterface<IInventoryModule>(); 3954 IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
3954 if (inv == null) 3955 if (inv == null)
@@ -3957,7 +3958,7 @@ namespace OpenSim.Region.Environment.Scenes
3957 return inv.NeedSceneCacheClear(agentID, this); 3958 return inv.NeedSceneCacheClear(agentID, this);
3958 } 3959 }
3959 3960
3960 public void ObjectSaleInfo(IClientAPI client, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice) 3961 public void ObjectSaleInfo(IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
3961 { 3962 {
3962 SceneObjectPart part = GetSceneObjectPart(localID); 3963 SceneObjectPart part = GetSceneObjectPart(localID);
3963 if (part == null || part.ParentGroup == null) 3964 if (part == null || part.ParentGroup == null)
@@ -3976,7 +3977,7 @@ namespace OpenSim.Region.Environment.Scenes
3976 part.GetProperties(client); 3977 part.GetProperties(client);
3977 } 3978 }
3978 3979
3979 public void PerformObjectBuy(IClientAPI remoteClient, LLUUID categoryID, 3980 public void PerformObjectBuy(IClientAPI remoteClient, UUID categoryID,
3980 uint localID, byte saleType) 3981 uint localID, byte saleType)
3981 { 3982 {
3982 SceneObjectPart part = GetSceneObjectPart(localID); 3983 SceneObjectPart part = GetSceneObjectPart(localID);
@@ -4031,13 +4032,13 @@ namespace OpenSim.Region.Environment.Scenes
4031 group.GetPartName(localID), 4032 group.GetPartName(localID),
4032 group.GetPartDescription(localID), 4033 group.GetPartDescription(localID),
4033 (sbyte)AssetType.Object, 4034 (sbyte)AssetType.Object,
4034 Helpers.StringToField(sceneObjectXml)); 4035 Utils.StringToBytes(sceneObjectXml));
4035 AssetCache.AddAsset(asset); 4036 AssetCache.AddAsset(asset);
4036 4037
4037 InventoryItemBase item = new InventoryItemBase(); 4038 InventoryItemBase item = new InventoryItemBase();
4038 item.Creator = part.CreatorID; 4039 item.Creator = part.CreatorID;
4039 4040
4040 item.ID = LLUUID.Random(); 4041 item.ID = UUID.Random();
4041 item.Owner = remoteClient.AgentId; 4042 item.Owner = remoteClient.AgentId;
4042 item.AssetID = asset.FullID; 4043 item.AssetID = asset.FullID;
4043 item.Description = asset.Description; 4044 item.Description = asset.Description;
@@ -4069,7 +4070,7 @@ namespace OpenSim.Region.Environment.Scenes
4069 break; 4070 break;
4070 4071
4071 case 3: // Sell contents 4072 case 3: // Sell contents
4072 List<LLUUID> invList = part.GetInventoryList(); 4073 List<UUID> invList = part.GetInventoryList();
4073 4074
4074 if (invList.Count > 0) 4075 if (invList.Count > 0)
4075 MoveTaskInventoryItems(remoteClient.AgentId, part.Name, 4076 MoveTaskInventoryItems(remoteClient.AgentId, part.Name,
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index c624a41..51909ad 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes
141 /// 141 ///
142 /// </summary> 142 /// </summary>
143 /// <param name="agentID"></param> 143 /// <param name="agentID"></param>
144 public abstract void RemoveClient(LLUUID agentID); 144 public abstract void RemoveClient(UUID agentID);
145 145
146 public abstract void CloseAllAgents(uint circuitcode); 146 public abstract void CloseAllAgents(uint circuitcode);
147 147
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Scenes
175 handlerPhysicsCrash(RegionInfo); 175 handlerPhysicsCrash(RegionInfo);
176 } 176 }
177 177
178 public virtual bool PresenceChildStatus(LLUUID avatarID) 178 public virtual bool PresenceChildStatus(UUID avatarID)
179 { 179 {
180 return false; 180 return false;
181 } 181 }
@@ -210,8 +210,8 @@ namespace OpenSim.Region.Environment.Scenes
210 /// <summary> 210 /// <summary>
211 /// XXX These two methods are very temporary 211 /// XXX These two methods are very temporary
212 /// </summary> 212 /// </summary>
213 protected Dictionary<LLUUID, string> capsPaths = new Dictionary<LLUUID, string>(); 213 protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>();
214 public string GetCapsPath(LLUUID agentId) 214 public string GetCapsPath(UUID agentId)
215 { 215 {
216 if (capsPaths.ContainsKey(agentId)) 216 if (capsPaths.ContainsKey(agentId))
217 { 217 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index f8c5814..9ff35c0 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -30,16 +30,16 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37 37
38namespace OpenSim.Region.Environment.Scenes 38namespace OpenSim.Region.Environment.Scenes
39{ 39{
40 public delegate void KillObjectDelegate(uint localID); 40 public delegate void KiPrimitiveDelegate(uint localID);
41 41
42 public delegate void RemoveKnownRegionsFromAvatarList(LLUUID avatarID, List<ulong> regionlst); 42 public delegate void RemoveKnownRegionsFromAvatarList(UUID avatarID, List<ulong> regionlst);
43 43
44 public class SceneCommunicationService //one instance per region 44 public class SceneCommunicationService //one instance per region
45 { 45 {
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes
72 private LogOffUser handlerLogOffUser = null; 72 private LogOffUser handlerLogOffUser = null;
73 private GetLandData handlerGetLandData = null; // OnGetLandData 73 private GetLandData handlerGetLandData = null; // OnGetLandData
74 74
75 public KillObjectDelegate KillObject; 75 public KiPrimitiveDelegate KiPrimitive;
76 public string _debugRegionName = String.Empty; 76 public string _debugRegionName = String.Empty;
77 77
78 public string debugRegionName 78 public string debugRegionName
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Environment.Scenes
158 } 158 }
159 } 159 }
160 160
161 protected void GridLogOffUser(ulong regionHandle, LLUUID AgentID, LLUUID RegionSecret, string message) 161 protected void GridLogOffUser(ulong regionHandle, UUID AgentID, UUID RegionSecret, string message)
162 { 162 {
163 handlerLogOffUser = OnLogOffUser; 163 handlerLogOffUser = OnLogOffUser;
164 if (handlerLogOffUser != null) 164 if (handlerLogOffUser != null)
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Scenes
188 return true; 188 return true;
189 } 189 }
190 190
191 protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 191 protected void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
192 { 192 {
193 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion; 193 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
194 if (handlerAvatarCrossingIntoRegion != null) 194 if (handlerAvatarCrossingIntoRegion != null)
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Scenes
197 } 197 }
198 } 198 }
199 199
200 protected bool IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData, int XMLMethod) 200 protected bool IncomingPrimCrossing(ulong regionHandle, UUID primID, String objXMLData, int XMLMethod)
201 { 201 {
202 handlerExpectPrim = OnExpectPrim; 202 handlerExpectPrim = OnExpectPrim;
203 if (handlerExpectPrim != null) 203 if (handlerExpectPrim != null)
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Scenes
211 211
212 } 212 }
213 213
214 protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) 214 protected void PrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
215 { 215 {
216 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; 216 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion;
217 if (handlerPrimCrossingIntoRegion != null) 217 if (handlerPrimCrossingIntoRegion != null)
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Scenes
220 } 220 }
221 } 221 }
222 222
223 protected bool CloseConnection(ulong regionHandle, LLUUID agentID) 223 protected bool CloseConnection(ulong regionHandle, UUID agentID)
224 { 224 {
225 m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); 225 m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString());
226 handlerCloseAgentConnection = OnCloseAgentConnection; 226 handlerCloseAgentConnection = OnCloseAgentConnection;
@@ -315,9 +315,9 @@ namespace OpenSim.Region.Environment.Scenes
315 for (int i = 0; i < neighbours.Count; i++) 315 for (int i = 0; i < neighbours.Count; i++)
316 { 316 {
317 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 317 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
318 agent.BaseFolder = LLUUID.Zero; 318 agent.BaseFolder = UUID.Zero;
319 agent.InventoryFolder = LLUUID.Zero; 319 agent.InventoryFolder = UUID.Zero;
320 agent.startpos = new LLVector3(128, 128, 70); 320 agent.startpos = new Vector3(128, 128, 70);
321 agent.child = true; 321 agent.child = true;
322 322
323 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 323 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
@@ -356,9 +356,9 @@ namespace OpenSim.Region.Environment.Scenes
356 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region, List<RegionInfo> neighbours) 356 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region, List<RegionInfo> neighbours)
357 { 357 {
358 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 358 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
359 agent.BaseFolder = LLUUID.Zero; 359 agent.BaseFolder = UUID.Zero;
360 agent.InventoryFolder = LLUUID.Zero; 360 agent.InventoryFolder = UUID.Zero;
361 agent.startpos = new LLVector3(128, 128, 70); 361 agent.startpos = new Vector3(128, 128, 70);
362 agent.child = true; 362 agent.child = true;
363 363
364 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 364 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
@@ -484,13 +484,13 @@ namespace OpenSim.Region.Environment.Scenes
484 d); 484 d);
485 } 485 }
486 486
487 public delegate void SendCloseChildAgentDelegate(LLUUID agentID, List<ulong> regionlst); 487 public delegate void SendCloseChildAgentDelegate(UUID agentID, List<ulong> regionlst);
488 488
489 /// <summary> 489 /// <summary>
490 /// This Closes child agents on neighboring regions 490 /// This Closes child agents on neighboring regions
491 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 491 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
492 /// </summary> 492 /// </summary>
493 private void SendCloseChildAgentAsync(LLUUID agentID, List<ulong> regionlst) 493 private void SendCloseChildAgentAsync(UUID agentID, List<ulong> regionlst)
494 { 494 {
495 495
496 foreach (ulong regionHandle in regionlst) 496 foreach (ulong regionHandle in regionlst)
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Scenes
525 icon.EndInvoke(iar); 525 icon.EndInvoke(iar);
526 } 526 }
527 527
528 public void SendCloseChildAgentConnections(LLUUID agentID, List<ulong> regionslst) 528 public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
529 { 529 {
530 // This assumes that we know what our neighbors are. 530 // This assumes that we know what our neighbors are.
531 SendCloseChildAgentDelegate d = SendCloseChildAgentAsync; 531 SendCloseChildAgentDelegate d = SendCloseChildAgentAsync;
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Scenes
550 /// </summary> 550 /// </summary>
551 /// <param name="regionID"></param> 551 /// <param name="regionID"></param>
552 /// <returns></returns> 552 /// <returns></returns>
553 public virtual RegionInfo RequestNeighbouringRegionInfo(LLUUID regionID) 553 public virtual RegionInfo RequestNeighbouringRegionInfo(UUID regionID)
554 { 554 {
555 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionID); 555 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionID);
556 return m_commsProvider.GridService.RequestNeighbourInfo(regionID); 556 return m_commsProvider.GridService.RequestNeighbourInfo(regionID);
@@ -578,8 +578,8 @@ namespace OpenSim.Region.Environment.Scenes
578 /// <param name="position"></param> 578 /// <param name="position"></param>
579 /// <param name="lookAt"></param> 579 /// <param name="lookAt"></param>
580 /// <param name="flags"></param> 580 /// <param name="flags"></param>
581 public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, LLVector3 position, 581 public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position,
582 LLVector3 lookAt, uint flags) 582 Vector3 lookAt, uint flags)
583 { 583 {
584 bool destRegionUp = false; 584 bool destRegionUp = false;
585 585
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Environment.Scenes
588 // Teleport within the same region 588 // Teleport within the same region
589 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0) 589 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0)
590 { 590 {
591 LLVector3 emergencyPos = new LLVector3(128, 128, 128); 591 Vector3 emergencyPos = new Vector3(128, 128, 128);
592 592
593 m_log.WarnFormat( 593 m_log.WarnFormat(
594 "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", 594 "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
@@ -614,8 +614,8 @@ namespace OpenSim.Region.Environment.Scenes
614 { 614 {
615 avatar.ControllingClient.SendTeleportLocationStart(); 615 avatar.ControllingClient.SendTeleportLocationStart();
616 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 616 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
617 agent.BaseFolder = LLUUID.Zero; 617 agent.BaseFolder = UUID.Zero;
618 agent.InventoryFolder = LLUUID.Zero; 618 agent.InventoryFolder = UUID.Zero;
619 agent.startpos = position; 619 agent.startpos = position;
620 agent.child = true; 620 agent.child = true;
621 621
@@ -667,9 +667,9 @@ namespace OpenSim.Region.Environment.Scenes
667 avatar.MakeChildAgent(); 667 avatar.MakeChildAgent();
668 Thread.Sleep(5000); 668 Thread.Sleep(5000);
669 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle); 669 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle);
670 if (KillObject != null) 670 if (KiPrimitive != null)
671 { 671 {
672 KillObject(avatar.LocalId); 672 KiPrimitive(avatar.LocalId);
673 } 673 }
674 uint newRegionX = (uint)(reg.RegionHandle >> 40); 674 uint newRegionX = (uint)(reg.RegionHandle >> 40);
675 uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); 675 uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
@@ -700,12 +700,12 @@ namespace OpenSim.Region.Environment.Scenes
700 /// <param name="regionhandle"></param> 700 /// <param name="regionhandle"></param>
701 /// <param name="agentID"></param> 701 /// <param name="agentID"></param>
702 /// <param name="position"></param> 702 /// <param name="position"></param>
703 public bool CrossToNeighbouringRegion(ulong regionhandle, LLUUID agentID, LLVector3 position, bool isFlying) 703 public bool CrossToNeighbouringRegion(ulong regionhandle, UUID agentID, Vector3 position, bool isFlying)
704 { 704 {
705 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); 705 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
706 } 706 }
707 707
708 public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, string objData, int XMLMethod) 708 public bool PrimCrossToNeighboringRegion(ulong regionhandle, UUID primID, string objData, int XMLMethod)
709 { 709 {
710 return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod); 710 return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod);
711 } 711 }
@@ -716,32 +716,32 @@ namespace OpenSim.Region.Environment.Scenes
716 return m_commsProvider.GridService.GetGridSettings(); 716 return m_commsProvider.GridService.GetGridSettings();
717 } 717 }
718 718
719 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 719 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
720 { 720 {
721 m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); 721 m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
722 } 722 }
723 723
724 public void ClearUserAgent(LLUUID avatarID) 724 public void ClearUserAgent(UUID avatarID)
725 { 725 {
726 m_commsProvider.UserService.ClearUserAgent(avatarID); 726 m_commsProvider.UserService.ClearUserAgent(avatarID);
727 } 727 }
728 728
729 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 729 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
730 { 730 {
731 m_commsProvider.AddNewUserFriend(friendlistowner, friend, perms); 731 m_commsProvider.AddNewUserFriend(friendlistowner, friend, perms);
732 } 732 }
733 733
734 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 734 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
735 { 735 {
736 m_commsProvider.UpdateUserFriendPerms(friendlistowner, friend, perms); 736 m_commsProvider.UpdateUserFriendPerms(friendlistowner, friend, perms);
737 } 737 }
738 738
739 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 739 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
740 { 740 {
741 m_commsProvider.RemoveUserFriend(friendlistowner, friend); 741 m_commsProvider.RemoveUserFriend(friendlistowner, friend);
742 } 742 }
743 743
744 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 744 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
745 { 745 {
746 return m_commsProvider.GetUserFriendList(friendlistowner); 746 return m_commsProvider.GetUserFriendList(friendlistowner);
747 } 747 }
@@ -751,7 +751,7 @@ namespace OpenSim.Region.Environment.Scenes
751 return m_commsProvider.GridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); 751 return m_commsProvider.GridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
752 } 752 }
753 753
754 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 754 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
755 { 755 {
756 return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); 756 return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query);
757 } 757 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
index a0e0a37..a2a4b2d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
34 34
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Scenes
45 45
46 #region Object Permission Checks 46 #region Object Permission Checks
47 47
48 public delegate uint GenerateClientFlags(LLUUID userID, LLUUID objectIDID); 48 public delegate uint GenerateClientFlags(UUID userID, UUID objectIDID);
49 private List<GenerateClientFlags> GenerateClientFlagsCheckFunctions = new List<GenerateClientFlags>(); 49 private List<GenerateClientFlags> GenerateClientFlagsCheckFunctions = new List<GenerateClientFlags>();
50 50
51 public void addGenerateClientFlags(GenerateClientFlags delegateFunc) 51 public void addGenerateClientFlags(GenerateClientFlags delegateFunc)
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes
60 GenerateClientFlagsCheckFunctions.Remove(delegateFunc); 60 GenerateClientFlagsCheckFunctions.Remove(delegateFunc);
61 } 61 }
62 62
63 public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) 63 public uint ExternalChecksGenerateClientFlags(UUID userID, UUID objectID)
64 { 64 {
65 SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); 65 SceneObjectPart part=m_scene.GetSceneObjectPart(objectID);
66 66
@@ -68,14 +68,14 @@ namespace OpenSim.Region.Environment.Scenes
68 return 0; 68 return 0;
69 69
70 uint perms=part.GetEffectiveObjectFlags() | 70 uint perms=part.GetEffectiveObjectFlags() |
71 (uint)LLObject.ObjectFlags.ObjectModify | 71 (uint)PrimFlags.ObjectModify |
72 (uint)LLObject.ObjectFlags.ObjectCopy | 72 (uint)PrimFlags.ObjectCopy |
73 (uint)LLObject.ObjectFlags.ObjectMove | 73 (uint)PrimFlags.ObjectMove |
74 (uint)LLObject.ObjectFlags.ObjectTransfer | 74 (uint)PrimFlags.ObjectTransfer |
75 (uint)LLObject.ObjectFlags.ObjectYouOwner | 75 (uint)PrimFlags.ObjectYouOwner |
76 (uint)LLObject.ObjectFlags.ObjectAnyOwner | 76 (uint)PrimFlags.ObjectAnyOwner |
77 (uint)LLObject.ObjectFlags.ObjectOwnerModify | 77 (uint)PrimFlags.ObjectOwnerModify |
78 (uint)LLObject.ObjectFlags.ObjectYouOfficer; 78 (uint)PrimFlags.ObjectYouOfficer;
79 79
80 foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) 80 foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions)
81 { 81 {
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Environment.Scenes
162 } 162 }
163 163
164 #region REZ OBJECT 164 #region REZ OBJECT
165 public delegate bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene); 165 public delegate bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene);
166 private List<CanRezObject> CanRezObjectCheckFunctions = new List<CanRezObject>(); 166 private List<CanRezObject> CanRezObjectCheckFunctions = new List<CanRezObject>();
167 167
168 public void addCheckRezObject(CanRezObject delegateFunc) 168 public void addCheckRezObject(CanRezObject delegateFunc)
@@ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Scenes
177 CanRezObjectCheckFunctions.Remove(delegateFunc); 177 CanRezObjectCheckFunctions.Remove(delegateFunc);
178 } 178 }
179 179
180 public bool ExternalChecksCanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition) 180 public bool ExternalChecksCanRezObject(int objectCount, UUID owner, Vector3 objectPosition)
181 { 181 {
182 foreach (CanRezObject check in CanRezObjectCheckFunctions) 182 foreach (CanRezObject check in CanRezObjectCheckFunctions)
183 { 183 {
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Scenes
192 #endregion 192 #endregion
193 193
194 #region DELETE OBJECT 194 #region DELETE OBJECT
195 public delegate bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene); 195 public delegate bool CanDeleteObject(UUID objectID, UUID deleter, Scene scene);
196 private List<CanDeleteObject> CanDeleteObjectCheckFunctions = new List<CanDeleteObject>(); 196 private List<CanDeleteObject> CanDeleteObjectCheckFunctions = new List<CanDeleteObject>();
197 197
198 public void addCheckDeleteObject(CanDeleteObject delegateFunc) 198 public void addCheckDeleteObject(CanDeleteObject delegateFunc)
@@ -207,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
207 CanDeleteObjectCheckFunctions.Remove(delegateFunc); 207 CanDeleteObjectCheckFunctions.Remove(delegateFunc);
208 } 208 }
209 209
210 public bool ExternalChecksCanDeleteObject(LLUUID objectID, LLUUID deleter) 210 public bool ExternalChecksCanDeleteObject(UUID objectID, UUID deleter)
211 { 211 {
212 foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions) 212 foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions)
213 { 213 {
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes
222 #endregion 222 #endregion
223 223
224 #region TAKE OBJECT 224 #region TAKE OBJECT
225 public delegate bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene); 225 public delegate bool CanTakeObject(UUID objectID, UUID stealer, Scene scene);
226 private List<CanTakeObject> CanTakeObjectCheckFunctions = new List<CanTakeObject>(); 226 private List<CanTakeObject> CanTakeObjectCheckFunctions = new List<CanTakeObject>();
227 227
228 public void addCheckTakeObject(CanTakeObject delegateFunc) 228 public void addCheckTakeObject(CanTakeObject delegateFunc)
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Scenes
237 CanTakeObjectCheckFunctions.Remove(delegateFunc); 237 CanTakeObjectCheckFunctions.Remove(delegateFunc);
238 } 238 }
239 239
240 public bool ExternalChecksCanTakeObject(LLUUID objectID, LLUUID AvatarTakingUUID) 240 public bool ExternalChecksCanTakeObject(UUID objectID, UUID AvatarTakingUUID)
241 { 241 {
242 foreach (CanTakeObject check in CanTakeObjectCheckFunctions) 242 foreach (CanTakeObject check in CanTakeObjectCheckFunctions)
243 { 243 {
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Scenes
252 #endregion 252 #endregion
253 253
254 #region TAKE COPY OBJECT 254 #region TAKE COPY OBJECT
255 public delegate bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene); 255 public delegate bool CanTakeCopyObject(UUID objectID, UUID userID, Scene inScene);
256 private List<CanTakeCopyObject> CanTakeCopyObjectCheckFunctions = new List<CanTakeCopyObject>(); 256 private List<CanTakeCopyObject> CanTakeCopyObjectCheckFunctions = new List<CanTakeCopyObject>();
257 257
258 public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc) 258 public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc)
@@ -267,7 +267,7 @@ namespace OpenSim.Region.Environment.Scenes
267 CanTakeCopyObjectCheckFunctions.Remove(delegateFunc); 267 CanTakeCopyObjectCheckFunctions.Remove(delegateFunc);
268 } 268 }
269 269
270 public bool ExternalChecksCanTakeCopyObject(LLUUID objectID, LLUUID userID) 270 public bool ExternalChecksCanTakeCopyObject(UUID objectID, UUID userID)
271 { 271 {
272 foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions) 272 foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions)
273 { 273 {
@@ -282,7 +282,7 @@ namespace OpenSim.Region.Environment.Scenes
282 #endregion 282 #endregion
283 283
284 #region DUPLICATE OBJECT 284 #region DUPLICATE OBJECT
285 public delegate bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition); 285 public delegate bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition);
286 private List<CanDuplicateObject> CanDuplicateObjectCheckFunctions = new List<CanDuplicateObject>(); 286 private List<CanDuplicateObject> CanDuplicateObjectCheckFunctions = new List<CanDuplicateObject>();
287 287
288 public void addCheckDuplicateObject(CanDuplicateObject delegateFunc) 288 public void addCheckDuplicateObject(CanDuplicateObject delegateFunc)
@@ -297,7 +297,7 @@ namespace OpenSim.Region.Environment.Scenes
297 CanDuplicateObjectCheckFunctions.Remove(delegateFunc); 297 CanDuplicateObjectCheckFunctions.Remove(delegateFunc);
298 } 298 }
299 299
300 public bool ExternalChecksCanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, LLVector3 objectPosition) 300 public bool ExternalChecksCanDuplicateObject(int objectCount, UUID objectID, UUID owner, Vector3 objectPosition)
301 { 301 {
302 foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions) 302 foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions)
303 { 303 {
@@ -312,7 +312,7 @@ namespace OpenSim.Region.Environment.Scenes
312 #endregion 312 #endregion
313 313
314 #region EDIT OBJECT 314 #region EDIT OBJECT
315 public delegate bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene); 315 public delegate bool CanEditObject(UUID objectID, UUID editorID, Scene scene);
316 private List<CanEditObject> CanEditObjectCheckFunctions = new List<CanEditObject>(); 316 private List<CanEditObject> CanEditObjectCheckFunctions = new List<CanEditObject>();
317 317
318 public void addCheckEditObject(CanEditObject delegateFunc) 318 public void addCheckEditObject(CanEditObject delegateFunc)
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Environment.Scenes
327 CanEditObjectCheckFunctions.Remove(delegateFunc); 327 CanEditObjectCheckFunctions.Remove(delegateFunc);
328 } 328 }
329 329
330 public bool ExternalChecksCanEditObject(LLUUID objectID, LLUUID editorID) 330 public bool ExternalChecksCanEditObject(UUID objectID, UUID editorID)
331 { 331 {
332 foreach (CanEditObject check in CanEditObjectCheckFunctions) 332 foreach (CanEditObject check in CanEditObjectCheckFunctions)
333 { 333 {
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Environment.Scenes
342 #endregion 342 #endregion
343 343
344 #region MOVE OBJECT 344 #region MOVE OBJECT
345 public delegate bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene); 345 public delegate bool CanMoveObject(UUID objectID, UUID moverID, Scene scene);
346 private List<CanMoveObject> CanMoveObjectCheckFunctions = new List<CanMoveObject>(); 346 private List<CanMoveObject> CanMoveObjectCheckFunctions = new List<CanMoveObject>();
347 347
348 public void addCheckMoveObject(CanMoveObject delegateFunc) 348 public void addCheckMoveObject(CanMoveObject delegateFunc)
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Scenes
357 CanMoveObjectCheckFunctions.Remove(delegateFunc); 357 CanMoveObjectCheckFunctions.Remove(delegateFunc);
358 } 358 }
359 359
360 public bool ExternalChecksCanMoveObject(LLUUID objectID, LLUUID moverID) 360 public bool ExternalChecksCanMoveObject(UUID objectID, UUID moverID)
361 { 361 {
362 foreach (CanMoveObject check in CanMoveObjectCheckFunctions) 362 foreach (CanMoveObject check in CanMoveObjectCheckFunctions)
363 { 363 {
@@ -372,7 +372,7 @@ namespace OpenSim.Region.Environment.Scenes
372 #endregion 372 #endregion
373 373
374 #region OBJECT ENTRY 374 #region OBJECT ENTRY
375 public delegate bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene); 375 public delegate bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene);
376 private List<CanObjectEntry> CanObjectEntryCheckFunctions = new List<CanObjectEntry>(); 376 private List<CanObjectEntry> CanObjectEntryCheckFunctions = new List<CanObjectEntry>();
377 377
378 public void addCheckObjectEntry(CanObjectEntry delegateFunc) 378 public void addCheckObjectEntry(CanObjectEntry delegateFunc)
@@ -387,7 +387,7 @@ namespace OpenSim.Region.Environment.Scenes
387 CanObjectEntryCheckFunctions.Remove(delegateFunc); 387 CanObjectEntryCheckFunctions.Remove(delegateFunc);
388 } 388 }
389 389
390 public bool ExternalChecksCanObjectEntry(LLUUID objectID, LLVector3 newPoint) 390 public bool ExternalChecksCanObjectEntry(UUID objectID, Vector3 newPoint)
391 { 391 {
392 foreach (CanObjectEntry check in CanObjectEntryCheckFunctions) 392 foreach (CanObjectEntry check in CanObjectEntryCheckFunctions)
393 { 393 {
@@ -402,7 +402,7 @@ namespace OpenSim.Region.Environment.Scenes
402 #endregion 402 #endregion
403 403
404 #region RETURN OBJECT 404 #region RETURN OBJECT
405 public delegate bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene); 405 public delegate bool CanReturnObject(UUID objectID, UUID returnerID, Scene scene);
406 private List<CanReturnObject> CanReturnObjectCheckFunctions = new List<CanReturnObject>(); 406 private List<CanReturnObject> CanReturnObjectCheckFunctions = new List<CanReturnObject>();
407 407
408 public void addCheckReturnObject(CanReturnObject delegateFunc) 408 public void addCheckReturnObject(CanReturnObject delegateFunc)
@@ -417,7 +417,7 @@ namespace OpenSim.Region.Environment.Scenes
417 CanReturnObjectCheckFunctions.Remove(delegateFunc); 417 CanReturnObjectCheckFunctions.Remove(delegateFunc);
418 } 418 }
419 419
420 public bool ExternalChecksCanReturnObject(LLUUID objectID, LLUUID returnerID) 420 public bool ExternalChecksCanReturnObject(UUID objectID, UUID returnerID)
421 { 421 {
422 foreach (CanReturnObject check in CanReturnObjectCheckFunctions) 422 foreach (CanReturnObject check in CanReturnObjectCheckFunctions)
423 { 423 {
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes
432 #endregion 432 #endregion
433 433
434 #region INSTANT MESSAGE 434 #region INSTANT MESSAGE
435 public delegate bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene); 435 public delegate bool CanInstantMessage(UUID user, UUID target, Scene startScene);
436 private List<CanInstantMessage> CanInstantMessageCheckFunctions = new List<CanInstantMessage>(); 436 private List<CanInstantMessage> CanInstantMessageCheckFunctions = new List<CanInstantMessage>();
437 437
438 public void addCheckInstantMessage(CanInstantMessage delegateFunc) 438 public void addCheckInstantMessage(CanInstantMessage delegateFunc)
@@ -447,7 +447,7 @@ namespace OpenSim.Region.Environment.Scenes
447 CanInstantMessageCheckFunctions.Remove(delegateFunc); 447 CanInstantMessageCheckFunctions.Remove(delegateFunc);
448 } 448 }
449 449
450 public bool ExternalChecksCanInstantMessage(LLUUID user, LLUUID target) 450 public bool ExternalChecksCanInstantMessage(UUID user, UUID target)
451 { 451 {
452 foreach (CanInstantMessage check in CanInstantMessageCheckFunctions) 452 foreach (CanInstantMessage check in CanInstantMessageCheckFunctions)
453 { 453 {
@@ -462,7 +462,7 @@ namespace OpenSim.Region.Environment.Scenes
462 #endregion 462 #endregion
463 463
464 #region INVENTORY TRANSFER 464 #region INVENTORY TRANSFER
465 public delegate bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene); 465 public delegate bool CanInventoryTransfer(UUID user, UUID target, Scene startScene);
466 private List<CanInventoryTransfer> CanInventoryTransferCheckFunctions = new List<CanInventoryTransfer>(); 466 private List<CanInventoryTransfer> CanInventoryTransferCheckFunctions = new List<CanInventoryTransfer>();
467 467
468 public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc) 468 public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc)
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Environment.Scenes
477 CanInventoryTransferCheckFunctions.Remove(delegateFunc); 477 CanInventoryTransferCheckFunctions.Remove(delegateFunc);
478 } 478 }
479 479
480 public bool ExternalChecksCanInventoryTransfer(LLUUID user, LLUUID target) 480 public bool ExternalChecksCanInventoryTransfer(UUID user, UUID target)
481 { 481 {
482 foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions) 482 foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions)
483 { 483 {
@@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
492 #endregion 492 #endregion
493 493
494 #region VIEW SCRIPT 494 #region VIEW SCRIPT
495 public delegate bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); 495 public delegate bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene);
496 private List<CanViewScript> CanViewScriptCheckFunctions = new List<CanViewScript>(); 496 private List<CanViewScript> CanViewScriptCheckFunctions = new List<CanViewScript>();
497 497
498 public void addCheckViewScript(CanViewScript delegateFunc) 498 public void addCheckViewScript(CanViewScript delegateFunc)
@@ -507,7 +507,7 @@ namespace OpenSim.Region.Environment.Scenes
507 CanViewScriptCheckFunctions.Remove(delegateFunc); 507 CanViewScriptCheckFunctions.Remove(delegateFunc);
508 } 508 }
509 509
510 public bool ExternalChecksCanViewScript(LLUUID script, LLUUID objectID, LLUUID user) 510 public bool ExternalChecksCanViewScript(UUID script, UUID objectID, UUID user)
511 { 511 {
512 foreach (CanViewScript check in CanViewScriptCheckFunctions) 512 foreach (CanViewScript check in CanViewScriptCheckFunctions)
513 { 513 {
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Environment.Scenes
519 return true; 519 return true;
520 } 520 }
521 521
522 public delegate bool CanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); 522 public delegate bool CanViewNotecard(UUID script, UUID objectID, UUID user, Scene scene);
523 private List<CanViewNotecard> CanViewNotecardCheckFunctions = new List<CanViewNotecard>(); 523 private List<CanViewNotecard> CanViewNotecardCheckFunctions = new List<CanViewNotecard>();
524 524
525 public void addCheckViewNotecard(CanViewNotecard delegateFunc) 525 public void addCheckViewNotecard(CanViewNotecard delegateFunc)
@@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Scenes
534 CanViewNotecardCheckFunctions.Remove(delegateFunc); 534 CanViewNotecardCheckFunctions.Remove(delegateFunc);
535 } 535 }
536 536
537 public bool ExternalChecksCanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user) 537 public bool ExternalChecksCanViewNotecard(UUID script, UUID objectID, UUID user)
538 { 538 {
539 foreach (CanViewNotecard check in CanViewNotecardCheckFunctions) 539 foreach (CanViewNotecard check in CanViewNotecardCheckFunctions)
540 { 540 {
@@ -549,7 +549,7 @@ namespace OpenSim.Region.Environment.Scenes
549 #endregion 549 #endregion
550 550
551 #region EDIT SCRIPT 551 #region EDIT SCRIPT
552 public delegate bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); 552 public delegate bool CanEditScript(UUID script, UUID objectID, UUID user, Scene scene);
553 private List<CanEditScript> CanEditScriptCheckFunctions = new List<CanEditScript>(); 553 private List<CanEditScript> CanEditScriptCheckFunctions = new List<CanEditScript>();
554 554
555 public void addCheckEditScript(CanEditScript delegateFunc) 555 public void addCheckEditScript(CanEditScript delegateFunc)
@@ -564,7 +564,7 @@ namespace OpenSim.Region.Environment.Scenes
564 CanEditScriptCheckFunctions.Remove(delegateFunc); 564 CanEditScriptCheckFunctions.Remove(delegateFunc);
565 } 565 }
566 566
567 public bool ExternalChecksCanEditScript(LLUUID script, LLUUID objectID, LLUUID user) 567 public bool ExternalChecksCanEditScript(UUID script, UUID objectID, UUID user)
568 { 568 {
569 foreach (CanEditScript check in CanEditScriptCheckFunctions) 569 foreach (CanEditScript check in CanEditScriptCheckFunctions)
570 { 570 {
@@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Scenes
576 return true; 576 return true;
577 } 577 }
578 578
579 public delegate bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene); 579 public delegate bool CanEditNotecard(UUID notecard, UUID objectID, UUID user, Scene scene);
580 private List<CanEditNotecard> CanEditNotecardCheckFunctions = new List<CanEditNotecard>(); 580 private List<CanEditNotecard> CanEditNotecardCheckFunctions = new List<CanEditNotecard>();
581 581
582 public void addCheckEditNotecard(CanEditNotecard delegateFunc) 582 public void addCheckEditNotecard(CanEditNotecard delegateFunc)
@@ -591,7 +591,7 @@ namespace OpenSim.Region.Environment.Scenes
591 CanEditNotecardCheckFunctions.Remove(delegateFunc); 591 CanEditNotecardCheckFunctions.Remove(delegateFunc);
592 } 592 }
593 593
594 public bool ExternalChecksCanEditNotecard(LLUUID script, LLUUID objectID, LLUUID user) 594 public bool ExternalChecksCanEditNotecard(UUID script, UUID objectID, UUID user)
595 { 595 {
596 foreach (CanEditNotecard check in CanEditNotecardCheckFunctions) 596 foreach (CanEditNotecard check in CanEditNotecardCheckFunctions)
597 { 597 {
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Scenes
606 #endregion 606 #endregion
607 607
608 #region RUN SCRIPT (When Script Placed in Object) 608 #region RUN SCRIPT (When Script Placed in Object)
609 public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); 609 public delegate bool CanRunScript(UUID script, UUID objectID, UUID user, Scene scene);
610 private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>(); 610 private List<CanRunScript> CanRunScriptCheckFunctions = new List<CanRunScript>();
611 611
612 public void addCheckRunScript(CanRunScript delegateFunc) 612 public void addCheckRunScript(CanRunScript delegateFunc)
@@ -621,7 +621,7 @@ namespace OpenSim.Region.Environment.Scenes
621 CanRunScriptCheckFunctions.Remove(delegateFunc); 621 CanRunScriptCheckFunctions.Remove(delegateFunc);
622 } 622 }
623 623
624 public bool ExternalChecksCanRunScript(LLUUID script, LLUUID objectID, LLUUID user) 624 public bool ExternalChecksCanRunScript(UUID script, UUID objectID, UUID user)
625 { 625 {
626 foreach (CanRunScript check in CanRunScriptCheckFunctions) 626 foreach (CanRunScript check in CanRunScriptCheckFunctions)
627 { 627 {
@@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Scenes
636 #endregion 636 #endregion
637 637
638 #region START SCRIPT (When Script run box is Checked after placed in object) 638 #region START SCRIPT (When Script run box is Checked after placed in object)
639 public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene); 639 public delegate bool CanStartScript(UUID script, UUID user, Scene scene);
640 private List<CanStartScript> CanStartScriptCheckFunctions = new List<CanStartScript>(); 640 private List<CanStartScript> CanStartScriptCheckFunctions = new List<CanStartScript>();
641 641
642 public void addCheckStartScript(CanStartScript delegateFunc) 642 public void addCheckStartScript(CanStartScript delegateFunc)
@@ -651,7 +651,7 @@ namespace OpenSim.Region.Environment.Scenes
651 CanStartScriptCheckFunctions.Remove(delegateFunc); 651 CanStartScriptCheckFunctions.Remove(delegateFunc);
652 } 652 }
653 653
654 public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user) 654 public bool ExternalChecksCanStartScript(UUID script, UUID user)
655 { 655 {
656 foreach (CanStartScript check in CanStartScriptCheckFunctions) 656 foreach (CanStartScript check in CanStartScriptCheckFunctions)
657 { 657 {
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Environment.Scenes
666 #endregion 666 #endregion
667 667
668 #region STOP SCRIPT (When Script run box is unchecked after placed in object) 668 #region STOP SCRIPT (When Script run box is unchecked after placed in object)
669 public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene); 669 public delegate bool CanStopScript(UUID script, UUID user, Scene scene);
670 private List<CanStopScript> CanStopScriptCheckFunctions = new List<CanStopScript>(); 670 private List<CanStopScript> CanStopScriptCheckFunctions = new List<CanStopScript>();
671 671
672 public void addCheckStopScript(CanStopScript delegateFunc) 672 public void addCheckStopScript(CanStopScript delegateFunc)
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Environment.Scenes
681 CanStopScriptCheckFunctions.Remove(delegateFunc); 681 CanStopScriptCheckFunctions.Remove(delegateFunc);
682 } 682 }
683 683
684 public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user) 684 public bool ExternalChecksCanStopScript(UUID script, UUID user)
685 { 685 {
686 foreach (CanStopScript check in CanStopScriptCheckFunctions) 686 foreach (CanStopScript check in CanStopScriptCheckFunctions)
687 { 687 {
@@ -696,7 +696,7 @@ namespace OpenSim.Region.Environment.Scenes
696 #endregion 696 #endregion
697 697
698 #region RESET SCRIPT 698 #region RESET SCRIPT
699 public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene); 699 public delegate bool CanResetScript(UUID script, UUID user, Scene scene);
700 private List<CanResetScript> CanResetScriptCheckFunctions = new List<CanResetScript>(); 700 private List<CanResetScript> CanResetScriptCheckFunctions = new List<CanResetScript>();
701 701
702 public void addCheckResetScript(CanResetScript delegateFunc) 702 public void addCheckResetScript(CanResetScript delegateFunc)
@@ -711,7 +711,7 @@ namespace OpenSim.Region.Environment.Scenes
711 CanResetScriptCheckFunctions.Remove(delegateFunc); 711 CanResetScriptCheckFunctions.Remove(delegateFunc);
712 } 712 }
713 713
714 public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user) 714 public bool ExternalChecksCanResetScript(UUID script, UUID user)
715 { 715 {
716 foreach (CanResetScript check in CanResetScriptCheckFunctions) 716 foreach (CanResetScript check in CanResetScriptCheckFunctions)
717 { 717 {
@@ -726,7 +726,7 @@ namespace OpenSim.Region.Environment.Scenes
726 #endregion 726 #endregion
727 727
728 #region TERRAFORM LAND 728 #region TERRAFORM LAND
729 public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); 729 public delegate bool CanTerraformLand(UUID user, Vector3 position, Scene requestFromScene);
730 private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>(); 730 private List<CanTerraformLand> CanTerraformLandCheckFunctions = new List<CanTerraformLand>();
731 731
732 public void addCheckTerraformLand(CanTerraformLand delegateFunc) 732 public void addCheckTerraformLand(CanTerraformLand delegateFunc)
@@ -741,7 +741,7 @@ namespace OpenSim.Region.Environment.Scenes
741 CanTerraformLandCheckFunctions.Remove(delegateFunc); 741 CanTerraformLandCheckFunctions.Remove(delegateFunc);
742 } 742 }
743 743
744 public bool ExternalChecksCanTerraformLand(LLUUID user, LLVector3 pos) 744 public bool ExternalChecksCanTerraformLand(UUID user, Vector3 pos)
745 { 745 {
746 foreach (CanTerraformLand check in CanTerraformLandCheckFunctions) 746 foreach (CanTerraformLand check in CanTerraformLandCheckFunctions)
747 { 747 {
@@ -756,7 +756,7 @@ namespace OpenSim.Region.Environment.Scenes
756 #endregion 756 #endregion
757 757
758 #region RUN CONSOLE COMMAND 758 #region RUN CONSOLE COMMAND
759 public delegate bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene); 759 public delegate bool CanRunConsoleCommand(UUID user, Scene requestFromScene);
760 private List<CanRunConsoleCommand> CanRunConsoleCommandCheckFunctions = new List<CanRunConsoleCommand>(); 760 private List<CanRunConsoleCommand> CanRunConsoleCommandCheckFunctions = new List<CanRunConsoleCommand>();
761 761
762 public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) 762 public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc)
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Scenes
771 CanRunConsoleCommandCheckFunctions.Remove(delegateFunc); 771 CanRunConsoleCommandCheckFunctions.Remove(delegateFunc);
772 } 772 }
773 773
774 public bool ExternalChecksCanRunConsoleCommand(LLUUID user) 774 public bool ExternalChecksCanRunConsoleCommand(UUID user)
775 { 775 {
776 foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions) 776 foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions)
777 { 777 {
@@ -786,7 +786,7 @@ namespace OpenSim.Region.Environment.Scenes
786 #endregion 786 #endregion
787 787
788 #region CAN ISSUE ESTATE COMMAND 788 #region CAN ISSUE ESTATE COMMAND
789 public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand); 789 public delegate bool CanIssueEstateCommand(UUID user, Scene requestFromScene, bool ownerCommand);
790 private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>(); 790 private List<CanIssueEstateCommand> CanIssueEstateCommandCheckFunctions = new List<CanIssueEstateCommand>();
791 791
792 public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) 792 public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc)
@@ -801,7 +801,7 @@ namespace OpenSim.Region.Environment.Scenes
801 CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); 801 CanIssueEstateCommandCheckFunctions.Remove(delegateFunc);
802 } 802 }
803 803
804 public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand) 804 public bool ExternalChecksCanIssueEstateCommand(UUID user, bool ownerCommand)
805 { 805 {
806 foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) 806 foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions)
807 { 807 {
@@ -815,7 +815,7 @@ namespace OpenSim.Region.Environment.Scenes
815 #endregion 815 #endregion
816 816
817 #region CAN BE GODLIKE 817 #region CAN BE GODLIKE
818 public delegate bool CanBeGodLike(LLUUID user, Scene requestFromScene); 818 public delegate bool CanBeGodLike(UUID user, Scene requestFromScene);
819 private List<CanBeGodLike> CanBeGodLikeCheckFunctions = new List<CanBeGodLike>(); 819 private List<CanBeGodLike> CanBeGodLikeCheckFunctions = new List<CanBeGodLike>();
820 820
821 public void addCheckBeGodLike(CanBeGodLike delegateFunc) 821 public void addCheckBeGodLike(CanBeGodLike delegateFunc)
@@ -830,7 +830,7 @@ namespace OpenSim.Region.Environment.Scenes
830 CanBeGodLikeCheckFunctions.Remove(delegateFunc); 830 CanBeGodLikeCheckFunctions.Remove(delegateFunc);
831 } 831 }
832 832
833 public bool ExternalChecksCanBeGodLike(LLUUID user) 833 public bool ExternalChecksCanBeGodLike(UUID user)
834 { 834 {
835 foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions) 835 foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions)
836 { 836 {
@@ -844,7 +844,7 @@ namespace OpenSim.Region.Environment.Scenes
844 #endregion 844 #endregion
845 845
846 #region EDIT PARCEL 846 #region EDIT PARCEL
847 public delegate bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene); 847 public delegate bool CanEditParcel(UUID user, ILandObject parcel, Scene scene);
848 private List<CanEditParcel> CanEditParcelCheckFunctions = new List<CanEditParcel>(); 848 private List<CanEditParcel> CanEditParcelCheckFunctions = new List<CanEditParcel>();
849 849
850 public void addCheckEditParcel(CanEditParcel delegateFunc) 850 public void addCheckEditParcel(CanEditParcel delegateFunc)
@@ -859,7 +859,7 @@ namespace OpenSim.Region.Environment.Scenes
859 CanEditParcelCheckFunctions.Remove(delegateFunc); 859 CanEditParcelCheckFunctions.Remove(delegateFunc);
860 } 860 }
861 861
862 public bool ExternalChecksCanEditParcel(LLUUID user, ILandObject parcel) 862 public bool ExternalChecksCanEditParcel(UUID user, ILandObject parcel)
863 { 863 {
864 foreach (CanEditParcel check in CanEditParcelCheckFunctions) 864 foreach (CanEditParcel check in CanEditParcelCheckFunctions)
865 { 865 {
@@ -873,7 +873,7 @@ namespace OpenSim.Region.Environment.Scenes
873 #endregion 873 #endregion
874 874
875 #region SELL PARCEL 875 #region SELL PARCEL
876 public delegate bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene); 876 public delegate bool CanSellParcel(UUID user, ILandObject parcel, Scene scene);
877 private List<CanSellParcel> CanSellParcelCheckFunctions = new List<CanSellParcel>(); 877 private List<CanSellParcel> CanSellParcelCheckFunctions = new List<CanSellParcel>();
878 878
879 public void addCheckSellParcel(CanSellParcel delegateFunc) 879 public void addCheckSellParcel(CanSellParcel delegateFunc)
@@ -888,7 +888,7 @@ namespace OpenSim.Region.Environment.Scenes
888 CanSellParcelCheckFunctions.Remove(delegateFunc); 888 CanSellParcelCheckFunctions.Remove(delegateFunc);
889 } 889 }
890 890
891 public bool ExternalChecksCanSellParcel(LLUUID user, ILandObject parcel) 891 public bool ExternalChecksCanSellParcel(UUID user, ILandObject parcel)
892 { 892 {
893 foreach (CanSellParcel check in CanSellParcelCheckFunctions) 893 foreach (CanSellParcel check in CanSellParcelCheckFunctions)
894 { 894 {
@@ -902,7 +902,7 @@ namespace OpenSim.Region.Environment.Scenes
902 #endregion 902 #endregion
903 903
904 #region ABANDON PARCEL 904 #region ABANDON PARCEL
905 public delegate bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene); 905 public delegate bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene);
906 private List<CanAbandonParcel> CanAbandonParcelCheckFunctions = new List<CanAbandonParcel>(); 906 private List<CanAbandonParcel> CanAbandonParcelCheckFunctions = new List<CanAbandonParcel>();
907 907
908 public void addCheckAbandonParcel(CanAbandonParcel delegateFunc) 908 public void addCheckAbandonParcel(CanAbandonParcel delegateFunc)
@@ -917,7 +917,7 @@ namespace OpenSim.Region.Environment.Scenes
917 CanAbandonParcelCheckFunctions.Remove(delegateFunc); 917 CanAbandonParcelCheckFunctions.Remove(delegateFunc);
918 } 918 }
919 919
920 public bool ExternalChecksCanAbandonParcel(LLUUID user, ILandObject parcel) 920 public bool ExternalChecksCanAbandonParcel(UUID user, ILandObject parcel)
921 { 921 {
922 foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions) 922 foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions)
923 { 923 {
@@ -930,7 +930,7 @@ namespace OpenSim.Region.Environment.Scenes
930 } 930 }
931 #endregion 931 #endregion
932 932
933 public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene); 933 public delegate bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene);
934 private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>(); 934 private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>();
935 935
936 public void addCheckReclaimParcel(CanReclaimParcel delegateFunc) 936 public void addCheckReclaimParcel(CanReclaimParcel delegateFunc)
@@ -945,7 +945,7 @@ namespace OpenSim.Region.Environment.Scenes
945 CanReclaimParcelCheckFunctions.Remove(delegateFunc); 945 CanReclaimParcelCheckFunctions.Remove(delegateFunc);
946 } 946 }
947 947
948 public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel) 948 public bool ExternalChecksCanReclaimParcel(UUID user, ILandObject parcel)
949 { 949 {
950 foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions) 950 foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions)
951 { 951 {
@@ -956,7 +956,7 @@ namespace OpenSim.Region.Environment.Scenes
956 } 956 }
957 return true; 957 return true;
958 } 958 }
959 public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); 959 public delegate bool CanBuyLand(UUID user, ILandObject parcel, Scene scene);
960 private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>(); 960 private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>();
961 961
962 public void addCheckCanBuyLand(CanBuyLand delegateFunc) 962 public void addCheckCanBuyLand(CanBuyLand delegateFunc)
@@ -971,7 +971,7 @@ namespace OpenSim.Region.Environment.Scenes
971 CanBuyLandCheckFunctions.Remove(delegateFunc); 971 CanBuyLandCheckFunctions.Remove(delegateFunc);
972 } 972 }
973 973
974 public bool ExternalChecksCanBuyLand(LLUUID user, ILandObject parcel) 974 public bool ExternalChecksCanBuyLand(UUID user, ILandObject parcel)
975 { 975 {
976 foreach (CanBuyLand check in CanBuyLandCheckFunctions) 976 foreach (CanBuyLand check in CanBuyLandCheckFunctions)
977 { 977 {
@@ -983,7 +983,7 @@ namespace OpenSim.Region.Environment.Scenes
983 return true; 983 return true;
984 } 984 }
985 985
986 public delegate bool CanLinkObject(LLUUID user, LLUUID objectID); 986 public delegate bool CanLinkObject(UUID user, UUID objectID);
987 private List<CanLinkObject> CanLinkObjectCheckFunctions = new List<CanLinkObject>(); 987 private List<CanLinkObject> CanLinkObjectCheckFunctions = new List<CanLinkObject>();
988 988
989 public void addCheckCanLinkObject(CanLinkObject delegateFunc) 989 public void addCheckCanLinkObject(CanLinkObject delegateFunc)
@@ -998,7 +998,7 @@ namespace OpenSim.Region.Environment.Scenes
998 CanLinkObjectCheckFunctions.Remove(delegateFunc); 998 CanLinkObjectCheckFunctions.Remove(delegateFunc);
999 } 999 }
1000 1000
1001 public bool ExternalChecksCanLinkObject(LLUUID user, LLUUID objectID) 1001 public bool ExternalChecksCanLinkObject(UUID user, UUID objectID)
1002 { 1002 {
1003 foreach (CanLinkObject check in CanLinkObjectCheckFunctions) 1003 foreach (CanLinkObject check in CanLinkObjectCheckFunctions)
1004 { 1004 {
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.Environment.Scenes
1010 return true; 1010 return true;
1011 } 1011 }
1012 1012
1013 public delegate bool CanDelinkObject(LLUUID user, LLUUID objectID); 1013 public delegate bool CanDelinkObject(UUID user, UUID objectID);
1014 private List<CanDelinkObject> CanDelinkObjectCheckFunctions = new List<CanDelinkObject>(); 1014 private List<CanDelinkObject> CanDelinkObjectCheckFunctions = new List<CanDelinkObject>();
1015 1015
1016 public void addCheckCanDelinkObject(CanDelinkObject delegateFunc) 1016 public void addCheckCanDelinkObject(CanDelinkObject delegateFunc)
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Environment.Scenes
1025 CanDelinkObjectCheckFunctions.Remove(delegateFunc); 1025 CanDelinkObjectCheckFunctions.Remove(delegateFunc);
1026 } 1026 }
1027 1027
1028 public bool ExternalChecksCanDelinkObject(LLUUID user, LLUUID objectID) 1028 public bool ExternalChecksCanDelinkObject(UUID user, UUID objectID)
1029 { 1029 {
1030 foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions) 1030 foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions)
1031 { 1031 {
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.Environment.Scenes
1039 1039
1040 #endregion 1040 #endregion
1041 1041
1042 public delegate bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID); 1042 public delegate bool CanCreateInventory(uint invType, UUID objectID, UUID userID);
1043 private List<CanCreateInventory> CanCreateInventoryCheckFunctions = new List<CanCreateInventory>(); 1043 private List<CanCreateInventory> CanCreateInventoryCheckFunctions = new List<CanCreateInventory>();
1044 1044
1045 public void addCheckCanCreateInventory(CanCreateInventory delegateFunc) 1045 public void addCheckCanCreateInventory(CanCreateInventory delegateFunc)
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.Environment.Scenes
1054 CanCreateInventoryCheckFunctions.Remove(delegateFunc); 1054 CanCreateInventoryCheckFunctions.Remove(delegateFunc);
1055 } 1055 }
1056 1056
1057 public bool ExternalChecksCanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) 1057 public bool ExternalChecksCanCreateInventory(uint invType, UUID objectID, UUID userID)
1058 { 1058 {
1059 foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions) 1059 foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions)
1060 { 1060 {
@@ -1066,7 +1066,7 @@ namespace OpenSim.Region.Environment.Scenes
1066 return true; 1066 return true;
1067 } 1067 }
1068 1068
1069 public delegate bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); 1069 public delegate bool CanCopyInventory(UUID itemID, UUID objectID, UUID userID);
1070 private List<CanCopyInventory> CanCopyInventoryCheckFunctions = new List<CanCopyInventory>(); 1070 private List<CanCopyInventory> CanCopyInventoryCheckFunctions = new List<CanCopyInventory>();
1071 1071
1072 public void addCheckCanCopyInventory(CanCopyInventory delegateFunc) 1072 public void addCheckCanCopyInventory(CanCopyInventory delegateFunc)
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.Environment.Scenes
1081 CanCopyInventoryCheckFunctions.Remove(delegateFunc); 1081 CanCopyInventoryCheckFunctions.Remove(delegateFunc);
1082 } 1082 }
1083 1083
1084 public bool ExternalChecksCanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 1084 public bool ExternalChecksCanCopyInventory(UUID itemID, UUID objectID, UUID userID)
1085 { 1085 {
1086 foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions) 1086 foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions)
1087 { 1087 {
@@ -1093,7 +1093,7 @@ namespace OpenSim.Region.Environment.Scenes
1093 return true; 1093 return true;
1094 } 1094 }
1095 1095
1096 public delegate bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); 1096 public delegate bool CanDeleteInventory(UUID itemID, UUID objectID, UUID userID);
1097 private List<CanDeleteInventory> CanDeleteInventoryCheckFunctions = new List<CanDeleteInventory>(); 1097 private List<CanDeleteInventory> CanDeleteInventoryCheckFunctions = new List<CanDeleteInventory>();
1098 1098
1099 public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc) 1099 public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc)
@@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
1108 CanDeleteInventoryCheckFunctions.Remove(delegateFunc); 1108 CanDeleteInventoryCheckFunctions.Remove(delegateFunc);
1109 } 1109 }
1110 1110
1111 public bool ExternalChecksCanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 1111 public bool ExternalChecksCanDeleteInventory(UUID itemID, UUID objectID, UUID userID)
1112 { 1112 {
1113 foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions) 1113 foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions)
1114 { 1114 {
@@ -1120,7 +1120,7 @@ namespace OpenSim.Region.Environment.Scenes
1120 return true; 1120 return true;
1121 } 1121 }
1122 1122
1123 public delegate bool CanTeleport(LLUUID userID); 1123 public delegate bool CanTeleport(UUID userID);
1124 private List<CanTeleport> CanTeleportCheckFunctions = new List<CanTeleport>(); 1124 private List<CanTeleport> CanTeleportCheckFunctions = new List<CanTeleport>();
1125 1125
1126 public void addCheckCanTeleport(CanTeleport delegateFunc) 1126 public void addCheckCanTeleport(CanTeleport delegateFunc)
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Environment.Scenes
1135 CanTeleportCheckFunctions.Remove(delegateFunc); 1135 CanTeleportCheckFunctions.Remove(delegateFunc);
1136 } 1136 }
1137 1137
1138 public bool ExternalChecksCanTeleport(LLUUID userID) 1138 public bool ExternalChecksCanTeleport(UUID userID)
1139 { 1139 {
1140 foreach (CanTeleport check in CanTeleportCheckFunctions) 1140 foreach (CanTeleport check in CanTeleportCheckFunctions)
1141 { 1141 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 5546618..472f446 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Environment.Scenes
190 /// <param name="filename"></param> 190 /// <param name="filename"></param>
191 /// <param name="generateNewIDs"></param> 191 /// <param name="generateNewIDs"></param>
192 /// <param name="loadOffset"></param> 192 /// <param name="loadOffset"></param>
193 public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, LLVector3 loadOffset) 193 public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector3 loadOffset)
194 { 194 {
195 CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset); 195 CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
196 } 196 }
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Environment.Scenes
320 } 320 }
321 } 321 }
322 322
323 public bool TrySetCurrentScene(LLUUID regionID) 323 public bool TrySetCurrentScene(UUID regionID)
324 { 324 {
325 Console.WriteLine("Searching for Region: '{0}'", regionID.ToString()); 325 Console.WriteLine("Searching for Region: '{0}'", regionID.ToString());
326 326
@@ -350,7 +350,7 @@ namespace OpenSim.Region.Environment.Scenes
350 return false; 350 return false;
351 } 351 }
352 352
353 public bool TryGetScene(LLUUID regionID, out Scene scene) 353 public bool TryGetScene(UUID regionID, out Scene scene)
354 { 354 {
355 foreach (Scene mscene in m_localScenes) 355 foreach (Scene mscene in m_localScenes)
356 { 356 {
@@ -481,7 +481,7 @@ namespace OpenSim.Region.Environment.Scenes
481 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); }); 481 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
482 } 482 }
483 483
484 public bool TryGetAvatar(LLUUID avatarId, out ScenePresence avatar) 484 public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
485 { 485 {
486 foreach (Scene scene in m_localScenes) 486 foreach (Scene scene in m_localScenes)
487 { 487 {
@@ -495,7 +495,7 @@ namespace OpenSim.Region.Environment.Scenes
495 return false; 495 return false;
496 } 496 }
497 497
498 public bool TryGetAvatarsScene(LLUUID avatarId, out Scene scene) 498 public bool TryGetAvatarsScene(UUID avatarId, out Scene scene)
499 { 499 {
500 ScenePresence avatar = null; 500 ScenePresence avatar = null;
501 foreach (Scene mScene in m_localScenes) 501 foreach (Scene mScene in m_localScenes)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 032d673..c6452f9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -133,9 +133,9 @@ namespace OpenSim.Region.Environment.Scenes
133 /// <param name="copyItemID">The item UUID that should be used by the new item.</param> 133 /// <param name="copyItemID">The item UUID that should be used by the new item.</param>
134 /// <returns></returns> 134 /// <returns></returns>
135 public bool AddInventoryItem(IClientAPI remoteClient, uint localID, 135 public bool AddInventoryItem(IClientAPI remoteClient, uint localID,
136 InventoryItemBase item, LLUUID copyItemID) 136 InventoryItemBase item, UUID copyItemID)
137 { 137 {
138 LLUUID newItemId = (copyItemID != LLUUID.Zero) ? copyItemID : item.ID; 138 UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID;
139 139
140 SceneObjectPart part = GetChildPart(localID); 140 SceneObjectPart part = GetChildPart(localID);
141 if (part != null) 141 if (part != null)
@@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Scenes
183 /// <param name="primID"></param> 183 /// <param name="primID"></param>
184 /// <param name="itemID"></param> 184 /// <param name="itemID"></param>
185 /// <returns>null if the item does not exist</returns> 185 /// <returns>null if the item does not exist</returns>
186 public TaskInventoryItem GetInventoryItem(uint primID, LLUUID itemID) 186 public TaskInventoryItem GetInventoryItem(uint primID, UUID itemID)
187 { 187 {
188 SceneObjectPart part = GetChildPart(primID); 188 SceneObjectPart part = GetChildPart(primID);
189 if (part != null) 189 if (part != null)
@@ -227,7 +227,7 @@ namespace OpenSim.Region.Environment.Scenes
227 return false; 227 return false;
228 } 228 }
229 229
230 public int RemoveInventoryItem(uint localID, LLUUID itemID) 230 public int RemoveInventoryItem(uint localID, UUID itemID)
231 { 231 {
232 SceneObjectPart part = GetChildPart(localID); 232 SceneObjectPart part = GetChildPart(localID);
233 if (part != null) 233 if (part != null)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index b04e882..d465eaa 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -31,9 +31,8 @@ using System.Drawing;
31using System.IO; 31using System.IO;
32using System.Xml; 32using System.Xml;
33using System.Xml.Serialization; 33using System.Xml.Serialization;
34using Axiom.Math; 34using OpenMetaverse;
35using libsecondlife; 35using OpenMetaverse.Packets;
36using libsecondlife.Packets;
37using OpenSim.Framework; 36using OpenSim.Framework;
38using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
39using OpenSim.Region.Physics.Manager; 38using OpenSim.Region.Physics.Manager;
@@ -75,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
75 74
76 struct scriptPosTarget 75 struct scriptPosTarget
77 { 76 {
78 public LLVector3 targetPos; 77 public Vector3 targetPos;
79 public float tolerance; 78 public float tolerance;
80 } 79 }
81 80
@@ -97,17 +96,17 @@ namespace OpenSim.Region.Environment.Scenes
97 96
98 public float scriptScore = 0f; 97 public float scriptScore = 0f;
99 98
100 private LLVector3 lastPhysGroupPos; 99 private Vector3 lastPhysGroupPos;
101 private LLQuaternion lastPhysGroupRot; 100 private Quaternion lastPhysGroupRot;
102 101
103 /// <summary> 102 /// <summary>
104 /// The constituent parts of this group 103 /// The constituent parts of this group
105 /// </summary> 104 /// </summary>
106 protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); 105 protected Dictionary<UUID, SceneObjectPart> m_parts = new Dictionary<UUID, SceneObjectPart>();
107 106
108 protected ulong m_regionHandle; 107 protected ulong m_regionHandle;
109 protected SceneObjectPart m_rootPart; 108 protected SceneObjectPart m_rootPart;
110 // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); 109 // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
111 110
112 private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); 111 private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>();
113 112
@@ -142,18 +141,18 @@ namespace OpenSim.Region.Environment.Scenes
142 get { return m_parts.Count; } 141 get { return m_parts.Count; }
143 } 142 }
144 143
145 public LLQuaternion GroupRotation 144 public Quaternion GroupRotation
146 { 145 {
147 get { return m_rootPart.RotationOffset; } 146 get { return m_rootPart.RotationOffset; }
148 } 147 }
149 148
150 public LLUUID GroupID 149 public UUID GroupID
151 { 150 {
152 get { return m_rootPart.GroupID; } 151 get { return m_rootPart.GroupID; }
153 set { m_rootPart.GroupID = value; } 152 set { m_rootPart.GroupID = value; }
154 } 153 }
155 154
156 public Dictionary<LLUUID, SceneObjectPart> Children 155 public Dictionary<UUID, SceneObjectPart> Children
157 { 156 {
158 get { return m_parts; } 157 get { return m_parts; }
159 set { m_parts = value; } 158 set { m_parts = value; }
@@ -181,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes
181 } 180 }
182 } 181 }
183 182
184 public override LLVector3 AbsolutePosition 183 public override Vector3 AbsolutePosition
185 { 184 {
186 get 185 get
187 { 186 {
@@ -195,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes
195 } 194 }
196 set 195 set
197 { 196 {
198 LLVector3 val = value; 197 Vector3 val = value;
199 if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !m_rootPart.IsAttachment) 198 if ((val.X > 257f || val.X < -1f || val.Y > 257f || val.Y < -1f) && !m_rootPart.IsAttachment)
200 { 199 {
201 m_scene.CrossPrimGroupIntoNewRegion(val, this); 200 m_scene.CrossPrimGroupIntoNewRegion(val, this);
@@ -234,18 +233,18 @@ namespace OpenSim.Region.Environment.Scenes
234 set { m_rootPart.LocalId = value; } 233 set { m_rootPart.LocalId = value; }
235 } 234 }
236 235
237 public override LLUUID UUID 236 public override UUID UUID
238 { 237 {
239 get { return m_rootPart.UUID; } 238 get { return m_rootPart.UUID; }
240 set { m_rootPart.UUID = value; } 239 set { m_rootPart.UUID = value; }
241 } 240 }
242 241
243 public LLUUID OwnerID 242 public UUID OwnerID
244 { 243 {
245 get 244 get
246 { 245 {
247 if (m_rootPart == null) 246 if (m_rootPart == null)
248 return LLUUID.Zero; 247 return UUID.Zero;
249 248
250 return m_rootPart.OwnerID; 249 return m_rootPart.OwnerID;
251 } 250 }
@@ -299,7 +298,7 @@ namespace OpenSim.Region.Environment.Scenes
299 } 298 }
300 299
301 // The UUID for the Region this Object is in. 300 // The UUID for the Region this Object is in.
302 public LLUUID RegionUUID 301 public UUID RegionUUID
303 { 302 {
304 get 303 get
305 { 304 {
@@ -307,7 +306,7 @@ namespace OpenSim.Region.Environment.Scenes
307 { 306 {
308 return m_scene.RegionInfo.RegionID; 307 return m_scene.RegionInfo.RegionID;
309 } 308 }
310 return LLUUID.Zero; 309 return UUID.Zero;
311 } 310 }
312 } 311 }
313 312
@@ -455,14 +454,14 @@ namespace OpenSim.Region.Environment.Scenes
455 /// <summary> 454 /// <summary>
456 /// 455 ///
457 /// </summary> 456 /// </summary>
458 public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, 457 public SceneObjectGroup(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos,
459 LLQuaternion rot, PrimitiveBaseShape shape) 458 Quaternion rot, PrimitiveBaseShape shape)
460 { 459 {
461 m_regionHandle = regionHandle; 460 m_regionHandle = regionHandle;
462 m_scene = scene; 461 m_scene = scene;
463 462
464 // this.Pos = pos; 463 // this.Pos = pos;
465 LLVector3 rootOffset = new LLVector3(0, 0, 0); 464 Vector3 rootOffset = new Vector3(0, 0, 0);
466 SceneObjectPart newPart = 465 SceneObjectPart newPart =
467 new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rot, rootOffset); 466 new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rot, rootOffset);
468 newPart.LinkNum = 0; 467 newPart.LinkNum = 0;
@@ -479,13 +478,13 @@ namespace OpenSim.Region.Environment.Scenes
479 /// <summary> 478 /// <summary>
480 /// 479 ///
481 /// </summary> 480 /// </summary>
482 public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, 481 public SceneObjectGroup(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos,
483 PrimitiveBaseShape shape) 482 PrimitiveBaseShape shape)
484 : this(scene, regionHandle, ownerID, localID, pos, LLQuaternion.Identity, shape) 483 : this(scene, regionHandle, ownerID, localID, pos, Quaternion.Identity, shape)
485 { 484 {
486 } 485 }
487 486
488 public void SetFromAssetID(LLUUID AssetId) 487 public void SetFromAssetID(UUID AssetId)
489 { 488 {
490 lock (m_parts) 489 lock (m_parts)
491 { 490 {
@@ -496,13 +495,13 @@ namespace OpenSim.Region.Environment.Scenes
496 } 495 }
497 } 496 }
498 497
499 public LLUUID GetFromAssetID() 498 public UUID GetFromAssetID()
500 { 499 {
501 if (m_rootPart != null) 500 if (m_rootPart != null)
502 { 501 {
503 return m_rootPart.FromAssetID; 502 return m_rootPart.FromAssetID;
504 } 503 }
505 return LLUUID.Zero; 504 return UUID.Zero;
506 } 505 }
507 506
508 /// <summary> 507 /// <summary>
@@ -519,18 +518,18 @@ namespace OpenSim.Region.Environment.Scenes
519 } 518 }
520 } 519 }
521 520
522 public LLVector3 GroupScale() 521 public Vector3 GroupScale()
523 { 522 {
524 LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize); 523 Vector3 minScale = new Vector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize);
525 LLVector3 maxScale = new LLVector3(0f,0f,0f); 524 Vector3 maxScale = new Vector3(0f,0f,0f);
526 LLVector3 finalScale = new LLVector3(0.5f, 0.5f, 0.5f); 525 Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f);
527 526
528 lock (m_parts) 527 lock (m_parts)
529 { 528 {
530 foreach (SceneObjectPart part in m_parts.Values) 529 foreach (SceneObjectPart part in m_parts.Values)
531 { 530 {
532 LLVector3 partscale = part.Scale; 531 Vector3 partscale = part.Scale;
533 LLVector3 partoffset = part.OffsetPosition; 532 Vector3 partoffset = part.OffsetPosition;
534 533
535 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X; 534 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X;
536 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.X + partoffset.Y : minScale.Y; 535 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.X + partoffset.Y : minScale.Y;
@@ -563,8 +562,7 @@ namespace OpenSim.Region.Environment.Scenes
563 // Temporary commented to stop compiler warning 562 // Temporary commented to stop compiler warning
564 //Vector3 partPosition = 563 //Vector3 partPosition =
565 // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z); 564 // new Vector3(part.AbsolutePosition.X, part.AbsolutePosition.Y, part.AbsolutePosition.Z);
566 Quaternion parentrotation = 565 Quaternion parentrotation = GroupRotation;
567 new Quaternion(GroupRotation.W, GroupRotation.X, GroupRotation.Y, GroupRotation.Z);
568 566
569 // Telling the prim to raytrace. 567 // Telling the prim to raytrace.
570 //EntityIntersection inter = part.TestIntersection(hRay, parentrotation); 568 //EntityIntersection inter = part.TestIntersection(hRay, parentrotation);
@@ -684,7 +682,7 @@ namespace OpenSim.Region.Environment.Scenes
684 /// <param name="agentID"></param> 682 /// <param name="agentID"></param>
685 /// <param name="attachmentpoint"></param> 683 /// <param name="attachmentpoint"></param>
686 /// <param name="AttachOffset"></param> 684 /// <param name="AttachOffset"></param>
687 public void AttachToAgent(LLUUID agentID, uint attachmentpoint, LLVector3 AttachOffset) 685 public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset)
688 { 686 {
689 ScenePresence avatar = m_scene.GetScenePresence(agentID); 687 ScenePresence avatar = m_scene.GetScenePresence(agentID);
690 if (avatar != null) 688 if (avatar != null)
@@ -737,14 +735,14 @@ namespace OpenSim.Region.Environment.Scenes
737 public void DetachToGround() 735 public void DetachToGround()
738 { 736 {
739 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); 737 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar);
740 LLVector3 detachedpos = new LLVector3(127f,127f,127f); 738 Vector3 detachedpos = new Vector3(127f,127f,127f);
741 if (avatar != null) 739 if (avatar != null)
742 { 740 {
743 detachedpos = avatar.AbsolutePosition; 741 detachedpos = avatar.AbsolutePosition;
744 avatar.RemoveAttachment(this); 742 avatar.RemoveAttachment(this);
745 } 743 }
746 AbsolutePosition = detachedpos; 744 AbsolutePosition = detachedpos;
747 m_rootPart.AttachedAvatar = LLUUID.Zero; 745 m_rootPart.AttachedAvatar = UUID.Zero;
748 m_rootPart.SetParentLocalId(0); 746 m_rootPart.SetParentLocalId(0);
749 m_rootPart.SetAttachmentPoint((byte)0); 747 m_rootPart.SetAttachmentPoint((byte)0);
750 m_rootPart.IsAttachment = false; 748 m_rootPart.IsAttachment = false;
@@ -758,14 +756,14 @@ namespace OpenSim.Region.Environment.Scenes
758 public void DetachToInventoryPrep() 756 public void DetachToInventoryPrep()
759 { 757 {
760 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); 758 ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar);
761 //LLVector3 detachedpos = new LLVector3(127f, 127f, 127f); 759 //Vector3 detachedpos = new Vector3(127f, 127f, 127f);
762 if (avatar != null) 760 if (avatar != null)
763 { 761 {
764 //detachedpos = avatar.AbsolutePosition; 762 //detachedpos = avatar.AbsolutePosition;
765 avatar.RemoveAttachment(this); 763 avatar.RemoveAttachment(this);
766 } 764 }
767 765
768 m_rootPart.AttachedAvatar = LLUUID.Zero; 766 m_rootPart.AttachedAvatar = UUID.Zero;
769 m_rootPart.SetParentLocalId(0); 767 m_rootPart.SetParentLocalId(0);
770 //m_rootPart.SetAttachmentPoint((byte)0); 768 //m_rootPart.SetAttachmentPoint((byte)0);
771 m_rootPart.IsAttachment = false; 769 m_rootPart.IsAttachment = false;
@@ -861,7 +859,7 @@ namespace OpenSim.Region.Environment.Scenes
861 { 859 {
862 foreach (SceneObjectPart part in m_parts.Values) 860 foreach (SceneObjectPart part in m_parts.Values)
863 { 861 {
864 part.UUID = LLUUID.Random(); 862 part.UUID = UUID.Random();
865 863
866 } 864 }
867 } 865 }
@@ -885,7 +883,7 @@ namespace OpenSim.Region.Environment.Scenes
885 //HasGroupChanged = false; 883 //HasGroupChanged = false;
886 } 884 }
887 885
888 public LLUUID GetPartsFullID(uint localID) 886 public UUID GetPartsFullID(uint localID)
889 { 887 {
890 SceneObjectPart part = GetChildPart(localID); 888 SceneObjectPart part = GetChildPart(localID);
891 if (part != null) 889 if (part != null)
@@ -895,7 +893,7 @@ namespace OpenSim.Region.Environment.Scenes
895 return null; 893 return null;
896 } 894 }
897 895
898 public void ObjectGrabHandler(uint localId, LLVector3 offsetPos, IClientAPI remoteClient) 896 public void ObjectGrabHandler(uint localId, Vector3 offsetPos, IClientAPI remoteClient)
899 { 897 {
900 if (m_rootPart.LocalId == localId) 898 if (m_rootPart.LocalId == localId)
901 { 899 {
@@ -909,14 +907,14 @@ namespace OpenSim.Region.Environment.Scenes
909 } 907 }
910 } 908 }
911 909
912 public virtual void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) 910 public virtual void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
913 { 911 {
914 part.StoreUndoState(); 912 part.StoreUndoState();
915 part.OnGrab(offsetPos, remoteClient); 913 part.OnGrab(offsetPos, remoteClient);
916 914
917 } 915 }
918 916
919 public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) 917 public virtual void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
920 { 918 {
921 m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId); 919 m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId);
922 } 920 }
@@ -949,7 +947,7 @@ namespace OpenSim.Region.Environment.Scenes
949 } 947 }
950 948
951 if (m_rootPart != null && part == m_rootPart) 949 if (m_rootPart != null && part == m_rootPart)
952 avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); 950 avatars[i].ControllingClient.SendKiPrimitive(m_regionHandle, part.LocalId);
953 } 951 }
954 } 952 }
955 953
@@ -975,7 +973,7 @@ namespace OpenSim.Region.Environment.Scenes
975 } 973 }
976 974
977 if (m_rootPart != null && part == m_rootPart) 975 if (m_rootPart != null && part == m_rootPart)
978 avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); 976 avatars[i].ControllingClient.SendKiPrimitive(m_regionHandle, part.LocalId);
979 } 977 }
980 } 978 }
981 } 979 }
@@ -1047,9 +1045,9 @@ namespace OpenSim.Region.Environment.Scenes
1047 public override void SetText(string text, Vector3 color, double alpha) 1045 public override void SetText(string text, Vector3 color, double alpha)
1048 { 1046 {
1049 Color = Color.FromArgb(0xff - (int) (alpha * 0xff), 1047 Color = Color.FromArgb(0xff - (int) (alpha * 0xff),
1050 (int) (color.x * 0xff), 1048 (int) (color.X * 0xff),
1051 (int) (color.y * 0xff), 1049 (int) (color.Y * 0xff),
1052 (int) (color.z * 0xff)); 1050 (int) (color.Z * 0xff));
1053 Text = text; 1051 Text = text;
1054 1052
1055 HasGroupChanged = true; 1053 HasGroupChanged = true;
@@ -1085,7 +1083,7 @@ namespace OpenSim.Region.Environment.Scenes
1085 } 1083 }
1086 } 1084 }
1087 1085
1088 public void SetOwnerId(LLUUID userId) 1086 public void SetOwnerId(UUID userId)
1089 { 1087 {
1090 ForEachPart(delegate(SceneObjectPart part) { part.OwnerID = userId; }); 1088 ForEachPart(delegate(SceneObjectPart part) { part.OwnerID = userId; });
1091 } 1089 }
@@ -1207,14 +1205,14 @@ namespace OpenSim.Region.Environment.Scenes
1207 /// Duplicates this object, including operations such as physics set up and attaching to the backup event. 1205 /// Duplicates this object, including operations such as physics set up and attaching to the backup event.
1208 /// </summary> 1206 /// </summary>
1209 /// <returns></returns> 1207 /// <returns></returns>
1210 public SceneObjectGroup Copy(LLUUID cAgentID, LLUUID cGroupID, bool userExposed) 1208 public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed)
1211 { 1209 {
1212 SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone(); 1210 SceneObjectGroup dupe = (SceneObjectGroup) MemberwiseClone();
1213 dupe.m_parts = new Dictionary<LLUUID, SceneObjectPart>(); 1211 dupe.m_parts = new Dictionary<UUID, SceneObjectPart>();
1214 dupe.m_parts.Clear(); 1212 dupe.m_parts.Clear();
1215 //dupe.OwnerID = AgentID; 1213 //dupe.OwnerID = AgentID;
1216 //dupe.GroupID = GroupID; 1214 //dupe.GroupID = GroupID;
1217 dupe.AbsolutePosition = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); 1215 dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
1218 dupe.m_scene = m_scene; 1216 dupe.m_scene = m_scene;
1219 dupe.m_regionHandle = m_regionHandle; 1217 dupe.m_regionHandle = m_regionHandle;
1220 1218
@@ -1231,11 +1229,9 @@ namespace OpenSim.Region.Environment.Scenes
1231 dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape( 1229 dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
1232 dupe.RootPart.Name, 1230 dupe.RootPart.Name,
1233 pbs, 1231 pbs,
1234 new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, 1232 new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z),
1235 dupe.RootPart.AbsolutePosition.Z),
1236 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), 1233 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z),
1237 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, 1234 dupe.RootPart.RotationOffset,
1238 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
1239 dupe.RootPart.PhysActor.IsPhysical); 1235 dupe.RootPart.PhysActor.IsPhysical);
1240 1236
1241 dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; 1237 dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId;
@@ -1286,7 +1282,7 @@ namespace OpenSim.Region.Environment.Scenes
1286 /// <param name="part"></param> 1282 /// <param name="part"></param>
1287 /// <param name="cAgentID"></param> 1283 /// <param name="cAgentID"></param>
1288 /// <param name="cGroupID"></param> 1284 /// <param name="cGroupID"></param>
1289 public void CopyRootPart(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID, bool userExposed) 1285 public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed)
1290 { 1286 {
1291 SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed); 1287 SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed);
1292 newPart.SetParent(this); 1288 newPart.SetParent(this);
@@ -1308,9 +1304,9 @@ namespace OpenSim.Region.Environment.Scenes
1308 foreach (SceneObjectPart part in m_parts.Values) 1304 foreach (SceneObjectPart part in m_parts.Values)
1309 { 1305 {
1310 if (UsePhysics) 1306 if (UsePhysics)
1311 part.AddFlag(LLObject.ObjectFlags.Physics); 1307 part.AddFlag(PrimFlags.Physics);
1312 else 1308 else
1313 part.RemFlag(LLObject.ObjectFlags.Physics); 1309 part.RemFlag(PrimFlags.Physics);
1314 1310
1315 part.DoPhysicsPropertyUpdate(UsePhysics, false); 1311 part.DoPhysicsPropertyUpdate(UsePhysics, false);
1316 IsSelected = false; 1312 IsSelected = false;
@@ -1327,7 +1323,7 @@ namespace OpenSim.Region.Environment.Scenes
1327 { 1323 {
1328 if (PhantomStatus) 1324 if (PhantomStatus)
1329 { 1325 {
1330 part.AddFlag(LLObject.ObjectFlags.Phantom); 1326 part.AddFlag(PrimFlags.Phantom);
1331 if (part.PhysActor != null) 1327 if (part.PhysActor != null)
1332 { 1328 {
1333 m_scene.PhysicsScene.RemovePrim(part.PhysActor); 1329 m_scene.PhysicsScene.RemovePrim(part.PhysActor);
@@ -1335,8 +1331,8 @@ namespace OpenSim.Region.Environment.Scenes
1335 } 1331 }
1336 else 1332 else
1337 { 1333 {
1338 part.RemFlag(LLObject.ObjectFlags.Phantom); 1334 part.RemFlag(PrimFlags.Phantom);
1339 if ((part.GetEffectiveObjectFlags() & (int) LLObject.ObjectFlags.Physics) != 0) 1335 if ((part.GetEffectiveObjectFlags() & (int) PrimFlags.Physics) != 0)
1340 { 1336 {
1341 part.DoPhysicsPropertyUpdate(true, false); 1337 part.DoPhysicsPropertyUpdate(true, false);
1342 } 1338 }
@@ -1372,7 +1368,7 @@ namespace OpenSim.Region.Environment.Scenes
1372 } 1368 }
1373 } 1369 }
1374 1370
1375 public void moveToTarget(LLVector3 target, float tau) 1371 public void moveToTarget(Vector3 target, float tau)
1376 { 1372 {
1377 SceneObjectPart rootpart = m_rootPart; 1373 SceneObjectPart rootpart = m_rootPart;
1378 if (rootpart != null) 1374 if (rootpart != null)
@@ -1395,7 +1391,7 @@ namespace OpenSim.Region.Environment.Scenes
1395 } 1391 }
1396 } 1392 }
1397 1393
1398 public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) 1394 public void SetRootPartOwner(SceneObjectPart part, UUID cAgentID, UUID cGroupID)
1399 { 1395 {
1400 part.LastOwnerID = part.OwnerID; 1396 part.LastOwnerID = part.OwnerID;
1401 part.OwnerID = cAgentID; 1397 part.OwnerID = cAgentID;
@@ -1417,7 +1413,7 @@ namespace OpenSim.Region.Environment.Scenes
1417 /// <param name="part"></param> 1413 /// <param name="part"></param>
1418 /// <param name="cAgentID"></param> 1414 /// <param name="cAgentID"></param>
1419 /// <param name="cGroupID"></param> 1415 /// <param name="cGroupID"></param>
1420 public void CopyPart(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID, bool userExposed) 1416 public void CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed)
1421 { 1417 {
1422 SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed); 1418 SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate(), OwnerID, GroupID, m_parts.Count, userExposed);
1423 newPart.SetParent(this); 1419 newPart.SetParent(this);
@@ -1432,7 +1428,7 @@ namespace OpenSim.Region.Environment.Scenes
1432 } 1428 }
1433 1429
1434 /// <summary> 1430 /// <summary>
1435 /// Reset the LLUUIDs for all the prims that make up this group. 1431 /// Reset the UUIDs for all the prims that make up this group.
1436 /// 1432 ///
1437 /// This is called by methods which want to add a new group to an existing scene, in order 1433 /// This is called by methods which want to add a new group to an existing scene, in order
1438 /// to ensure that there are no clashes with groups already present. 1434 /// to ensure that there are no clashes with groups already present.
@@ -1454,7 +1450,7 @@ namespace OpenSim.Region.Environment.Scenes
1454 /// 1450 ///
1455 /// </summary> 1451 /// </summary>
1456 /// <param name="part"></param> 1452 /// <param name="part"></param>
1457 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) 1453 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags)
1458 { 1454 {
1459 1455
1460 remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.ObjectOwner, RootPart.GroupID, RootPart.BaseMask, 1456 remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.ObjectOwner, RootPart.GroupID, RootPart.BaseMask,
@@ -1463,7 +1459,7 @@ namespace OpenSim.Region.Environment.Scenes
1463 RootPart.CreatorID, RootPart.Name, RootPart.Description); 1459 RootPart.CreatorID, RootPart.Name, RootPart.Description);
1464 } 1460 }
1465 1461
1466 public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) 1462 public void SetPartOwner(SceneObjectPart part, UUID cAgentID, UUID cGroupID)
1467 { 1463 {
1468 part.OwnerID = cAgentID; 1464 part.OwnerID = cAgentID;
1469 part.GroupID = cGroupID; 1465 part.GroupID = cGroupID;
@@ -1640,7 +1636,7 @@ namespace OpenSim.Region.Environment.Scenes
1640 /// </summary> 1636 /// </summary>
1641 /// <param name="primID"></param> 1637 /// <param name="primID"></param>
1642 /// <returns>null if a child part with the primID was not found</returns> 1638 /// <returns>null if a child part with the primID was not found</returns>
1643 public SceneObjectPart GetChildPart(LLUUID primID) 1639 public SceneObjectPart GetChildPart(UUID primID)
1644 { 1640 {
1645 SceneObjectPart childPart = null; 1641 SceneObjectPart childPart = null;
1646 if (m_parts.ContainsKey(primID)) 1642 if (m_parts.ContainsKey(primID))
@@ -1677,7 +1673,7 @@ namespace OpenSim.Region.Environment.Scenes
1677 /// </summary> 1673 /// </summary>
1678 /// <param name="primID"></param> 1674 /// <param name="primID"></param>
1679 /// <returns></returns> 1675 /// <returns></returns>
1680 public bool HasChildPrim(LLUUID primID) 1676 public bool HasChildPrim(UUID primID)
1681 { 1677 {
1682 if (m_parts.ContainsKey(primID)) 1678 if (m_parts.ContainsKey(primID))
1683 { 1679 {
@@ -1735,27 +1731,20 @@ namespace OpenSim.Region.Environment.Scenes
1735 1731
1736 SceneObjectPart linkPart = objectGroup.m_rootPart; 1732 SceneObjectPart linkPart = objectGroup.m_rootPart;
1737 1733
1738 Vector3 oldGroupPosition = 1734 Vector3 oldGroupPosition = linkPart.GroupPosition;
1739 new Vector3(linkPart.GroupPosition.X, linkPart.GroupPosition.Y, linkPart.GroupPosition.Z); 1735 Quaternion oldRootRotation = linkPart.RotationOffset;
1740 Quaternion oldRootRotation =
1741 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, linkPart.RotationOffset.Y,
1742 linkPart.RotationOffset.Z);
1743 1736
1744 linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; 1737 linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition;
1745 linkPart.GroupPosition = AbsolutePosition; 1738 linkPart.GroupPosition = AbsolutePosition;
1746 Vector3 axPos = new Vector3(linkPart.OffsetPosition.X, linkPart.OffsetPosition.Y, linkPart.OffsetPosition.Z); 1739 Vector3 axPos = linkPart.OffsetPosition;
1747 1740
1748 Quaternion parentRot = 1741 Quaternion parentRot = m_rootPart.RotationOffset;
1749 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, 1742 axPos *= Quaternion.Inverse(parentRot);
1750 m_rootPart.RotationOffset.Z);
1751 axPos = parentRot.Inverse() * axPos;
1752 1743
1753 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); 1744 linkPart.OffsetPosition = axPos;
1754 Quaternion oldRot = 1745 Quaternion oldRot = linkPart.RotationOffset;
1755 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, linkPart.RotationOffset.Y, 1746 Quaternion newRot = oldRot * Quaternion.Inverse(parentRot);
1756 linkPart.RotationOffset.Z); 1747 linkPart.RotationOffset = newRot;
1757 Quaternion newRot = parentRot.Inverse() * oldRot;
1758 linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
1759 1748
1760 linkPart.ParentID = m_rootPart.LocalId; 1749 linkPart.ParentID = m_rootPart.LocalId;
1761 if (m_rootPart.LinkNum == 0) 1750 if (m_rootPart.LinkNum == 0)
@@ -1769,7 +1758,7 @@ namespace OpenSim.Region.Environment.Scenes
1769 linkPart.LinkNum = m_parts.Count; 1758 linkPart.LinkNum = m_parts.Count;
1770 1759
1771 linkPart.SetParent(this); 1760 linkPart.SetParent(this);
1772 linkPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 1761 linkPart.AddFlag(PrimFlags.CreateSelected);
1773 1762
1774 //if (linkPart.PhysActor != null) 1763 //if (linkPart.PhysActor != null)
1775 //{ 1764 //{
@@ -1821,7 +1810,7 @@ namespace OpenSim.Region.Environment.Scenes
1821// "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}", 1810// "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}",
1822// linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID); 1811// linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID);
1823 1812
1824 LLQuaternion worldRot = linkPart.GetWorldRotation(); 1813 Quaternion worldRot = linkPart.GetWorldRotation();
1825 1814
1826 // Remove the part from this object 1815 // Remove the part from this object
1827 lock (m_parts) 1816 lock (m_parts)
@@ -1850,23 +1839,14 @@ namespace OpenSim.Region.Environment.Scenes
1850 1839
1851 // We need to reset the child part's position 1840 // We need to reset the child part's position
1852 // ready for life as a separate object after being a part of another object 1841 // ready for life as a separate object after being a part of another object
1853 Quaternion parentRot 1842 Quaternion parentRot = m_rootPart.RotationOffset;
1854 = new Quaternion( 1843
1855 m_rootPart.RotationOffset.W, 1844 Vector3 axPos = linkPart.OffsetPosition;
1856 m_rootPart.RotationOffset.X, 1845
1857 m_rootPart.RotationOffset.Y, 1846 axPos *= parentRot;
1858 m_rootPart.RotationOffset.Z); 1847 linkPart.OffsetPosition = new Vector3(axPos.X, axPos.Y, axPos.Z);
1859
1860 Vector3 axPos
1861 = new Vector3(
1862 linkPart.OffsetPosition.X,
1863 linkPart.OffsetPosition.Y,
1864 linkPart.OffsetPosition.Z);
1865
1866 axPos = parentRot * axPos;
1867 linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
1868 linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition; 1848 linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition;
1869 linkPart.OffsetPosition = new LLVector3(0, 0, 0); 1849 linkPart.OffsetPosition = new Vector3(0, 0, 0);
1870 1850
1871 linkPart.RotationOffset = worldRot; 1851 linkPart.RotationOffset = worldRot;
1872 1852
@@ -1909,28 +1889,23 @@ namespace OpenSim.Region.Environment.Scenes
1909 1889
1910 part.LinkNum = m_parts.Count; 1890 part.LinkNum = m_parts.Count;
1911 1891
1912 Vector3 axiomOldPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z); 1892 Vector3 oldPos = part.OffsetPosition;
1913 axiomOldPos = oldGroupRotation * axiomOldPos; 1893 oldPos *= oldGroupRotation;
1914 axiomOldPos += oldGroupPosition; 1894 oldPos += oldGroupPosition;
1915 LLVector3 oldAbsolutePosition = new LLVector3(axiomOldPos.x, axiomOldPos.y, axiomOldPos.z); 1895 Vector3 oldAbsolutePosition = oldPos;
1916 part.OffsetPosition = oldAbsolutePosition - AbsolutePosition; 1896 part.OffsetPosition = oldAbsolutePosition - AbsolutePosition;
1917 1897
1918 Quaternion axiomRootRotation = 1898 Quaternion rootRotation = m_rootPart.RotationOffset;
1919 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
1920 m_rootPart.RotationOffset.Z);
1921 1899
1922 Vector3 axiomPos = new Vector3(part.OffsetPosition.X, part.OffsetPosition.Y, part.OffsetPosition.Z); 1900 Vector3 pos = part.OffsetPosition;
1923 axiomPos = axiomRootRotation.Inverse() * axiomPos; 1901 pos *= Quaternion.Inverse(rootRotation);
1924 part.OffsetPosition = new LLVector3(axiomPos.x, axiomPos.y, axiomPos.z); 1902 part.OffsetPosition = pos;
1925 1903
1926 Quaternion axiomPartRotation = 1904 Quaternion partRotation = part.RotationOffset;
1927 new Quaternion(part.RotationOffset.W, part.RotationOffset.X, part.RotationOffset.Y,
1928 part.RotationOffset.Z);
1929 1905
1930 axiomPartRotation = oldGroupRotation * axiomPartRotation; 1906 partRotation *= oldGroupRotation;
1931 axiomPartRotation = axiomRootRotation.Inverse() * axiomPartRotation; 1907 partRotation *= Quaternion.Inverse(rootRotation);
1932 part.RotationOffset = 1908 part.RotationOffset = partRotation;
1933 new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w);
1934 } 1909 }
1935 1910
1936 /// <summary> 1911 /// <summary>
@@ -1940,7 +1915,7 @@ namespace OpenSim.Region.Environment.Scenes
1940 /// <param name="offset">Always seems to be 0,0,0, so ignoring</param> 1915 /// <param name="offset">Always seems to be 0,0,0, so ignoring</param>
1941 /// <param name="pos">New position. We do the math here to turn it into a force</param> 1916 /// <param name="pos">New position. We do the math here to turn it into a force</param>
1942 /// <param name="remoteClient"></param> 1917 /// <param name="remoteClient"></param>
1943 public void GrabMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 1918 public void GrabMovement(Vector3 offset, Vector3 pos, IClientAPI remoteClient)
1944 { 1919 {
1945 if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) 1920 if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
1946 { 1921 {
@@ -1948,7 +1923,7 @@ namespace OpenSim.Region.Environment.Scenes
1948 { 1923 {
1949 if (m_rootPart.PhysActor.IsPhysical) 1924 if (m_rootPart.PhysActor.IsPhysical)
1950 { 1925 {
1951 LLVector3 llmoveforce = pos - AbsolutePosition; 1926 Vector3 llmoveforce = pos - AbsolutePosition;
1952 PhysicsVector grabforce = new PhysicsVector(llmoveforce.X, llmoveforce.Y, llmoveforce.Z); 1927 PhysicsVector grabforce = new PhysicsVector(llmoveforce.X, llmoveforce.Y, llmoveforce.Z);
1953 grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass; 1928 grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass;
1954 m_rootPart.PhysActor.AddForce(grabforce,true); 1929 m_rootPart.PhysActor.AddForce(grabforce,true);
@@ -1966,7 +1941,7 @@ namespace OpenSim.Region.Environment.Scenes
1966 } 1941 }
1967 } 1942 }
1968 1943
1969 public void NonPhysicalGrabMovement(LLVector3 pos) 1944 public void NonPhysicalGrabMovement(Vector3 pos)
1970 { 1945 {
1971 AbsolutePosition = pos; 1946 AbsolutePosition = pos;
1972 m_rootPart.SendTerseUpdateToAllClients(); 1947 m_rootPart.SendTerseUpdateToAllClients();
@@ -2013,7 +1988,7 @@ namespace OpenSim.Region.Environment.Scenes
2013 } 1988 }
2014 } 1989 }
2015 1990
2016 public void SetPartText(string text, LLUUID partID) 1991 public void SetPartText(string text, UUID partID)
2017 { 1992 {
2018 SceneObjectPart part = GetChildPart(partID); 1993 SceneObjectPart part = GetChildPart(partID);
2019 if (part != null) 1994 if (part != null)
@@ -2109,7 +2084,7 @@ namespace OpenSim.Region.Environment.Scenes
2109 } 2084 }
2110 } 2085 }
2111 2086
2112 public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF) 2087 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
2113 { 2088 {
2114 SceneObjectPart updatePart = GetChildPart(localID); 2089 SceneObjectPart updatePart = GetChildPart(localID);
2115 updatePart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); 2090 updatePart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
@@ -2145,7 +2120,7 @@ namespace OpenSim.Region.Environment.Scenes
2145 /// </summary> 2120 /// </summary>
2146 /// <param name="scale"></param> 2121 /// <param name="scale"></param>
2147 /// <param name="localID"></param> 2122 /// <param name="localID"></param>
2148 public void Resize(LLVector3 scale, uint localID) 2123 public void Resize(Vector3 scale, uint localID)
2149 { 2124 {
2150 if (scale.X > m_scene.m_maxNonphys) 2125 if (scale.X > m_scene.m_maxNonphys)
2151 scale.X = m_scene.m_maxNonphys; 2126 scale.X = m_scene.m_maxNonphys;
@@ -2190,7 +2165,7 @@ namespace OpenSim.Region.Environment.Scenes
2190 } 2165 }
2191 } 2166 }
2192 2167
2193 public void GroupResize(LLVector3 scale, uint localID) 2168 public void GroupResize(Vector3 scale, uint localID)
2194 { 2169 {
2195 SceneObjectPart part = GetChildPart(localID); 2170 SceneObjectPart part = GetChildPart(localID);
2196 if (part != null) 2171 if (part != null)
@@ -2222,7 +2197,7 @@ namespace OpenSim.Region.Environment.Scenes
2222 { 2197 {
2223 if (obPart.UUID != m_rootPart.UUID) 2198 if (obPart.UUID != m_rootPart.UUID)
2224 { 2199 {
2225 LLVector3 oldSize = new LLVector3(obPart.Scale); 2200 Vector3 oldSize = new Vector3(obPart.Scale);
2226 2201
2227 float f = 1.0f; 2202 float f = 1.0f;
2228 float a = 1.0f; 2203 float a = 1.0f;
@@ -2286,7 +2261,7 @@ namespace OpenSim.Region.Environment.Scenes
2286 } 2261 }
2287 } 2262 }
2288 2263
2289 LLVector3 prevScale = part.Scale; 2264 Vector3 prevScale = part.Scale;
2290 prevScale.X *= x; 2265 prevScale.X *= x;
2291 prevScale.Y *= y; 2266 prevScale.Y *= y;
2292 prevScale.Z *= z; 2267 prevScale.Z *= z;
@@ -2298,11 +2273,11 @@ namespace OpenSim.Region.Environment.Scenes
2298 { 2273 {
2299 if (obPart.UUID != m_rootPart.UUID) 2274 if (obPart.UUID != m_rootPart.UUID)
2300 { 2275 {
2301 LLVector3 currentpos = new LLVector3(obPart.OffsetPosition); 2276 Vector3 currentpos = new Vector3(obPart.OffsetPosition);
2302 currentpos.X *= x; 2277 currentpos.X *= x;
2303 currentpos.Y *= y; 2278 currentpos.Y *= y;
2304 currentpos.Z *= z; 2279 currentpos.Z *= z;
2305 LLVector3 newSize = new LLVector3(obPart.Scale); 2280 Vector3 newSize = new Vector3(obPart.Scale);
2306 newSize.X *= x; 2281 newSize.X *= x;
2307 newSize.Y *= y; 2282 newSize.Y *= y;
2308 newSize.Z *= z; 2283 newSize.Z *= z;
@@ -2332,7 +2307,7 @@ namespace OpenSim.Region.Environment.Scenes
2332 /// Move this scene object 2307 /// Move this scene object
2333 /// </summary> 2308 /// </summary>
2334 /// <param name="pos"></param> 2309 /// <param name="pos"></param>
2335 public void UpdateGroupPosition(LLVector3 pos) 2310 public void UpdateGroupPosition(Vector3 pos)
2336 { 2311 {
2337 if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) 2312 if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
2338 { 2313 {
@@ -2356,7 +2331,7 @@ namespace OpenSim.Region.Environment.Scenes
2356 /// </summary> 2331 /// </summary>
2357 /// <param name="pos"></param> 2332 /// <param name="pos"></param>
2358 /// <param name="localID"></param> 2333 /// <param name="localID"></param>
2359 public void UpdateSinglePosition(LLVector3 pos, uint localID) 2334 public void UpdateSinglePosition(Vector3 pos, uint localID)
2360 { 2335 {
2361 SceneObjectPart part = GetChildPart(localID); 2336 SceneObjectPart part = GetChildPart(localID);
2362 2337
@@ -2379,22 +2354,18 @@ namespace OpenSim.Region.Environment.Scenes
2379 /// 2354 ///
2380 /// </summary> 2355 /// </summary>
2381 /// <param name="pos"></param> 2356 /// <param name="pos"></param>
2382 private void UpdateRootPosition(LLVector3 pos) 2357 private void UpdateRootPosition(Vector3 pos)
2383 { 2358 {
2384 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 2359 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
2385 LLVector3 oldPos = 2360 Vector3 oldPos =
2386 new LLVector3(AbsolutePosition.X + m_rootPart.OffsetPosition.X, 2361 new Vector3(AbsolutePosition.X + m_rootPart.OffsetPosition.X,
2387 AbsolutePosition.Y + m_rootPart.OffsetPosition.Y, 2362 AbsolutePosition.Y + m_rootPart.OffsetPosition.Y,
2388 AbsolutePosition.Z + m_rootPart.OffsetPosition.Z); 2363 AbsolutePosition.Z + m_rootPart.OffsetPosition.Z);
2389 LLVector3 diff = oldPos - newPos; 2364 Vector3 diff = oldPos - newPos;
2390 Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); 2365 Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
2391 Quaternion partRotation = 2366 Quaternion partRotation = m_rootPart.RotationOffset;
2392 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, 2367 axDiff *= Quaternion.Inverse(partRotation);
2393 m_rootPart.RotationOffset.Z); 2368 diff = axDiff;
2394 axDiff = partRotation.Inverse() * axDiff;
2395 diff.X = axDiff.x;
2396 diff.Y = axDiff.y;
2397 diff.Z = axDiff.z;
2398 2369
2399 lock (m_parts) 2370 lock (m_parts)
2400 { 2371 {
@@ -2413,7 +2384,7 @@ namespace OpenSim.Region.Environment.Scenes
2413 ScheduleGroupForTerseUpdate(); 2384 ScheduleGroupForTerseUpdate();
2414 } 2385 }
2415 2386
2416 public void OffsetForNewRegion(LLVector3 offset) 2387 public void OffsetForNewRegion(Vector3 offset)
2417 { 2388 {
2418 m_rootPart.GroupPosition = offset; 2389 m_rootPart.GroupPosition = offset;
2419 } 2390 }
@@ -2426,14 +2397,12 @@ namespace OpenSim.Region.Environment.Scenes
2426 /// 2397 ///
2427 /// </summary> 2398 /// </summary>
2428 /// <param name="rot"></param> 2399 /// <param name="rot"></param>
2429 public void UpdateGroupRotation(LLQuaternion rot) 2400 public void UpdateGroupRotation(Quaternion rot)
2430 { 2401 {
2431 m_rootPart.UpdateRotation(rot); 2402 m_rootPart.UpdateRotation(rot);
2432 if (m_rootPart.PhysActor != null) 2403 if (m_rootPart.PhysActor != null)
2433 { 2404 {
2434 m_rootPart.PhysActor.Orientation = 2405 m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset;
2435 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
2436 m_rootPart.RotationOffset.Z);
2437 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 2406 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
2438 } 2407 }
2439 2408
@@ -2446,14 +2415,12 @@ namespace OpenSim.Region.Environment.Scenes
2446 /// </summary> 2415 /// </summary>
2447 /// <param name="pos"></param> 2416 /// <param name="pos"></param>
2448 /// <param name="rot"></param> 2417 /// <param name="rot"></param>
2449 public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot) 2418 public void UpdateGroupRotation(Vector3 pos, Quaternion rot)
2450 { 2419 {
2451 m_rootPart.UpdateRotation(rot); 2420 m_rootPart.UpdateRotation(rot);
2452 if (m_rootPart.PhysActor != null) 2421 if (m_rootPart.PhysActor != null)
2453 { 2422 {
2454 m_rootPart.PhysActor.Orientation = 2423 m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset;
2455 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
2456 m_rootPart.RotationOffset.Z);
2457 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 2424 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
2458 } 2425 }
2459 AbsolutePosition = pos; 2426 AbsolutePosition = pos;
@@ -2467,7 +2434,7 @@ namespace OpenSim.Region.Environment.Scenes
2467 /// </summary> 2434 /// </summary>
2468 /// <param name="rot"></param> 2435 /// <param name="rot"></param>
2469 /// <param name="localID"></param> 2436 /// <param name="localID"></param>
2470 public void UpdateSingleRotation(LLQuaternion rot, uint localID) 2437 public void UpdateSingleRotation(Quaternion rot, uint localID)
2471 { 2438 {
2472 SceneObjectPart part = GetChildPart(localID); 2439 SceneObjectPart part = GetChildPart(localID);
2473 if (part != null) 2440 if (part != null)
@@ -2487,19 +2454,15 @@ namespace OpenSim.Region.Environment.Scenes
2487 /// 2454 ///
2488 /// </summary> 2455 /// </summary>
2489 /// <param name="rot"></param> 2456 /// <param name="rot"></param>
2490 private void UpdateRootRotation(LLQuaternion rot) 2457 private void UpdateRootRotation(Quaternion rot)
2491 { 2458 {
2492 Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); 2459 Quaternion axRot = rot;
2493 Quaternion oldParentRot = 2460 Quaternion oldParentRot = m_rootPart.RotationOffset;
2494 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
2495 m_rootPart.RotationOffset.Z);
2496 2461
2497 m_rootPart.UpdateRotation(rot); 2462 m_rootPart.UpdateRotation(rot);
2498 if (m_rootPart.PhysActor != null) 2463 if (m_rootPart.PhysActor != null)
2499 { 2464 {
2500 m_rootPart.PhysActor.Orientation = 2465 m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset;
2501 new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y,
2502 m_rootPart.RotationOffset.Z);
2503 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 2466 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
2504 } 2467 }
2505 2468
@@ -2509,16 +2472,14 @@ namespace OpenSim.Region.Environment.Scenes
2509 { 2472 {
2510 if (prim.UUID != m_rootPart.UUID) 2473 if (prim.UUID != m_rootPart.UUID)
2511 { 2474 {
2512 Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z); 2475 Vector3 axPos = prim.OffsetPosition;
2513 axPos = oldParentRot * axPos; 2476 axPos *= oldParentRot;
2514 axPos = axRot.Inverse() * axPos; 2477 axPos *= Quaternion.Inverse(axRot);
2515 prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); 2478 prim.OffsetPosition = axPos;
2516 Quaternion primsRot = 2479 Quaternion primsRot = prim.RotationOffset;
2517 new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y,
2518 prim.RotationOffset.Z);
2519 Quaternion newRot = oldParentRot * primsRot; 2480 Quaternion newRot = oldParentRot * primsRot;
2520 newRot = axRot.Inverse() * newRot; 2481 newRot *= Quaternion.Inverse(axRot);
2521 prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); 2482 prim.RotationOffset = newRot;
2522 prim.ScheduleTerseUpdate(); 2483 prim.ScheduleTerseUpdate();
2523 } 2484 }
2524 } 2485 }
@@ -2562,7 +2523,7 @@ namespace OpenSim.Region.Environment.Scenes
2562 } 2523 }
2563 } 2524 }
2564 2525
2565 public int registerTargetWaypoint(LLVector3 target, float tolerance) 2526 public int registerTargetWaypoint(Vector3 target, float tolerance)
2566 { 2527 {
2567 scriptPosTarget waypoint = new scriptPosTarget(); 2528 scriptPosTarget waypoint = new scriptPosTarget();
2568 waypoint.targetPos = target; 2529 waypoint.targetPos = target;
@@ -2590,7 +2551,7 @@ namespace OpenSim.Region.Environment.Scenes
2590 if (m_targets.Count > 0) 2551 if (m_targets.Count > 0)
2591 { 2552 {
2592 bool at_target = false; 2553 bool at_target = false;
2593 //LLVector3 targetPos; 2554 //Vector3 targetPos;
2594 //uint targetHandle; 2555 //uint targetHandle;
2595 Dictionary<uint, scriptPosTarget> atTargets = new Dictionary<uint, scriptPosTarget>(); 2556 Dictionary<uint, scriptPosTarget> atTargets = new Dictionary<uint, scriptPosTarget>();
2596 lock (m_targets) 2557 lock (m_targets)
@@ -2681,11 +2642,11 @@ namespace OpenSim.Region.Environment.Scenes
2681 { 2642 {
2682 if (RootPart != null) 2643 if (RootPart != null)
2683 { 2644 {
2684 if ((RootPart.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == 0) 2645 if ((RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == 0)
2685 { 2646 {
2686 foreach (SceneObjectPart part in m_parts.Values) 2647 foreach (SceneObjectPart part in m_parts.Values)
2687 { 2648 {
2688 if (part.Shape.SculptEntry && part.Shape.SculptTexture != LLUUID.Zero) 2649 if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero)
2689 { 2650 {
2690 m_scene.AssetCache.GetAsset(part.Shape.SculptTexture, part.SculptTextureCallback, true); 2651 m_scene.AssetCache.GetAsset(part.Shape.SculptTexture, part.SculptTextureCallback, true);
2691 } 2652 }
@@ -2700,7 +2661,7 @@ namespace OpenSim.Region.Environment.Scenes
2700 /// </summary> 2661 /// </summary>
2701 /// <param name="GroupID"></param> 2662 /// <param name="GroupID"></param>
2702 /// <param name="client"></param> 2663 /// <param name="client"></param>
2703 public void SetGroup(LLUUID GroupID, IClientAPI client) 2664 public void SetGroup(UUID GroupID, IClientAPI client)
2704 { 2665 {
2705 lock (m_parts) 2666 lock (m_parts)
2706 { 2667 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 3bfe7e9..2beb9bb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
@@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Reset LLUUIDs for all the items in the prim's inventory. This involves either generating 72 /// Reset UUIDs for all the items in the prim's inventory. This involves either generating
73 /// new ones or setting existing UUIDs to the correct parent UUIDs. 73 /// new ones or setting existing UUIDs to the correct parent UUIDs.
74 /// 74 ///
75 /// If this method is called and there are inventory items, then we regard the inventory as having changed. 75 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Scenes
99 /// Change every item in this prim's inventory to a new owner. 99 /// Change every item in this prim's inventory to a new owner.
100 /// </summary> 100 /// </summary>
101 /// <param name="ownerId"></param> 101 /// <param name="ownerId"></param>
102 public void ChangeInventoryOwner(LLUUID ownerId) 102 public void ChangeInventoryOwner(UUID ownerId)
103 { 103 {
104 lock (TaskInventory) 104 lock (TaskInventory)
105 { 105 {
@@ -172,13 +172,13 @@ namespace OpenSim.Region.Environment.Scenes
172 if (!m_parentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, UUID, item.OwnerID)) 172 if (!m_parentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, UUID, item.OwnerID))
173 return; 173 return;
174 174
175 AddFlag(LLObject.ObjectFlags.Scripted); 175 AddFlag(PrimFlags.Scripted);
176 176
177 if (!m_parentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) 177 if (!m_parentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
178 { 178 {
179 AssetCache cache = m_parentGroup.Scene.AssetCache; 179 AssetCache cache = m_parentGroup.Scene.AssetCache;
180 180
181 cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset) 181 cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset)
182 { 182 {
183 if (null == asset) 183 if (null == asset)
184 { 184 {
@@ -190,8 +190,8 @@ namespace OpenSim.Region.Environment.Scenes
190 else 190 else
191 { 191 {
192 m_taskInventory[item.ItemID].PermsMask = 0; 192 m_taskInventory[item.ItemID].PermsMask = 0;
193 m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero; 193 m_taskInventory[item.ItemID].PermsGranter = UUID.Zero;
194 string script = Helpers.FieldToUTF8String(asset.Data); 194 string script = Utils.BytesToString(asset.Data);
195 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script, 195 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script,
196 startParam, postOnRez); 196 startParam, postOnRez);
197 m_parentGroup.AddActiveScriptCount(1); 197 m_parentGroup.AddActiveScriptCount(1);
@@ -205,9 +205,9 @@ namespace OpenSim.Region.Environment.Scenes
205 /// Start a script which is in this prim's inventory. 205 /// Start a script which is in this prim's inventory.
206 /// </summary> 206 /// </summary>
207 /// <param name="itemId"> 207 /// <param name="itemId">
208 /// A <see cref="LLUUID"/> 208 /// A <see cref="UUID"/>
209 /// </param> 209 /// </param>
210 public void CreateScriptInstance(LLUUID itemId, int startParam, bool postOnRez) 210 public void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez)
211 { 211 {
212 lock (m_taskInventory) 212 lock (m_taskInventory)
213 { 213 {
@@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Scenes
229 /// Stop a script which is in this prim's inventory. 229 /// Stop a script which is in this prim's inventory.
230 /// </summary> 230 /// </summary>
231 /// <param name="itemId"></param> 231 /// <param name="itemId"></param>
232 public void RemoveScriptInstance(LLUUID itemId) 232 public void RemoveScriptInstance(UUID itemId)
233 { 233 {
234 if (m_taskInventory.ContainsKey(itemId)) 234 if (m_taskInventory.ContainsKey(itemId))
235 { 235 {
@@ -370,7 +370,7 @@ namespace OpenSim.Region.Environment.Scenes
370 /// </summary> 370 /// </summary>
371 /// <param name="itemID"></param> 371 /// <param name="itemID"></param>
372 /// <returns>null if the item does not exist</returns> 372 /// <returns>null if the item does not exist</returns>
373 public TaskInventoryItem GetInventoryItem(LLUUID itemId) 373 public TaskInventoryItem GetInventoryItem(UUID itemId)
374 { 374 {
375 TaskInventoryItem item; 375 TaskInventoryItem item;
376 m_taskInventory.TryGetValue(itemId, out item); 376 m_taskInventory.TryGetValue(itemId, out item);
@@ -426,7 +426,7 @@ namespace OpenSim.Region.Environment.Scenes
426 /// <param name="itemID"></param> 426 /// <param name="itemID"></param>
427 /// <returns>Numeric asset type of the item removed. Returns -1 if the item did not exist 427 /// <returns>Numeric asset type of the item removed. Returns -1 if the item did not exist
428 /// in this prim's inventory.</returns> 428 /// in this prim's inventory.</returns>
429 public int RemoveInventoryItem(LLUUID itemID) 429 public int RemoveInventoryItem(UUID itemID)
430 { 430 {
431 lock (m_taskInventory) 431 lock (m_taskInventory)
432 { 432 {
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Scenes
455 455
456 if (scriptcount <= 0) 456 if (scriptcount <= 0)
457 { 457 {
458 RemFlag(LLObject.ObjectFlags.Scripted); 458 RemFlag(PrimFlags.Scripted);
459 } 459 }
460 460
461 ScheduleFullUpdate(); 461 ScheduleFullUpdate();
@@ -477,10 +477,10 @@ namespace OpenSim.Region.Environment.Scenes
477 public string GetInventoryFileName() 477 public string GetInventoryFileName()
478 { 478 {
479 if (m_inventoryFileName == String.Empty) 479 if (m_inventoryFileName == String.Empty)
480 m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; 480 m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
481 if (m_inventoryFileNameSerial < m_inventorySerial) 481 if (m_inventoryFileNameSerial < m_inventorySerial)
482 { 482 {
483 m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; 483 m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp";
484 } 484 }
485 return m_inventoryFileName; 485 return m_inventoryFileName;
486 } 486 }
@@ -499,7 +499,7 @@ namespace OpenSim.Region.Environment.Scenes
499 if (m_inventorySerial > 0) 499 if (m_inventorySerial > 0)
500 { 500 {
501 client.SendTaskInventory(m_uuid, (short)m_inventorySerial, 501 client.SendTaskInventory(m_uuid, (short)m_inventorySerial,
502 Helpers.StringToField(GetInventoryFileName())); 502 Utils.StringToBytes(GetInventoryFileName()));
503 return true; 503 return true;
504 } 504 }
505 else 505 else
@@ -520,13 +520,13 @@ namespace OpenSim.Region.Environment.Scenes
520 // Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches 520 // Confusingly, the folder item has to be the object id, while the 'parent id' has to be zero. This matches
521 // what appears to happen in the Second Life protocol. If this isn't the case. then various functionality 521 // what appears to happen in the Second Life protocol. If this isn't the case. then various functionality
522 // isn't available (such as drag from prim inventory to agent inventory) 522 // isn't available (such as drag from prim inventory to agent inventory)
523 InventoryStringBuilder invString = new InventoryStringBuilder(UUID, LLUUID.Zero); 523 InventoryStringBuilder invString = new InventoryStringBuilder(UUID, UUID.Zero);
524 524
525 lock (m_taskInventory) 525 lock (m_taskInventory)
526 { 526 {
527 foreach (TaskInventoryItem item in m_taskInventory.Values) 527 foreach (TaskInventoryItem item in m_taskInventory.Values)
528 { 528 {
529 LLUUID ownerID = item.OwnerID; 529 UUID ownerID = item.OwnerID;
530 uint everyoneMask = 0; 530 uint everyoneMask = 0;
531 uint baseMask = item.BasePermissions; 531 uint baseMask = item.BasePermissions;
532 uint ownerMask = item.CurrentPermissions; 532 uint ownerMask = item.CurrentPermissions;
@@ -587,10 +587,10 @@ namespace OpenSim.Region.Environment.Scenes
587 } 587 }
588 } 588 }
589 589
590 fileData = Helpers.StringToField(invString.BuildString); 590 fileData = Utils.StringToBytes(invString.BuildString);
591 591
592 //Console.WriteLine(Helpers.FieldToUTF8String(fileData)); 592 //Console.WriteLine(Utils.BytesToString(fileData));
593 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData)); 593 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
594 594
595 if (fileData.Length > 2) 595 if (fileData.Length > 2)
596 { 596 {
@@ -619,7 +619,7 @@ namespace OpenSim.Region.Environment.Scenes
619 { 619 {
620 public string BuildString = String.Empty; 620 public string BuildString = String.Empty;
621 621
622 public InventoryStringBuilder(LLUUID folderID, LLUUID parentID) 622 public InventoryStringBuilder(UUID folderID, UUID parentID)
623 { 623 {
624 BuildString += "\tinv_object\t0\n\t{\n"; 624 BuildString += "\tinv_object\t0\n\t{\n";
625 AddNameValueLine("obj_id", folderID.ToString()); 625 AddNameValueLine("obj_id", folderID.ToString());
@@ -746,9 +746,9 @@ namespace OpenSim.Region.Environment.Scenes
746 return false; 746 return false;
747 } 747 }
748 748
749 public List<LLUUID> GetInventoryList() 749 public List<UUID> GetInventoryList()
750 { 750 {
751 List<LLUUID> ret = new List<LLUUID>(); 751 List<UUID> ret = new List<UUID>();
752 752
753 foreach (TaskInventoryItem item in m_taskInventory.Values) 753 foreach (TaskInventoryItem item in m_taskInventory.Values)
754 ret.Add(item.ItemID); 754 ret.Add(item.ItemID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 5861298..ea10fe6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -33,10 +33,8 @@ using System.Security.Permissions;
33using System.Xml; 33using System.Xml;
34using System.Xml.Serialization; 34using System.Xml.Serialization;
35 35
36using Axiom.Math; 36using OpenMetaverse;
37 37using OpenMetaverse.Packets;
38using libsecondlife;
39using libsecondlife.Packets;
40 38
41using OpenSim.Framework; 39using OpenSim.Framework;
42using OpenSim.Region.Environment.Scenes.Scripting; 40using OpenSim.Region.Environment.Scenes.Scripting;
@@ -114,7 +112,7 @@ namespace OpenSim.Region.Environment.Scenes
114 // Not a big problem as long as the script that sets it remains in the prim on startup. 112 // Not a big problem as long as the script that sets it remains in the prim on startup.
115 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) 113 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script)
116 [XmlIgnore] 114 [XmlIgnore]
117 public LLUUID Sound; 115 public UUID Sound;
118 [XmlIgnore] 116 [XmlIgnore]
119 public byte SoundFlags; 117 public byte SoundFlags;
120 [XmlIgnore] 118 [XmlIgnore]
@@ -128,15 +126,15 @@ namespace OpenSim.Region.Environment.Scenes
128 [XmlIgnore] 126 [XmlIgnore]
129 public uint TimeStampTerse = 0; 127 public uint TimeStampTerse = 0;
130 [XmlIgnore] 128 [XmlIgnore]
131 public LLUUID FromAssetID = LLUUID.Zero; 129 public UUID FromAssetID = UUID.Zero;
132 [XmlIgnore] 130 [XmlIgnore]
133 public bool IsAttachment = false; 131 public bool IsAttachment = false;
134 [XmlIgnore] 132 [XmlIgnore]
135 public scriptEvents AggregateScriptEvents = 0; 133 public scriptEvents AggregateScriptEvents = 0;
136 [XmlIgnore] 134 [XmlIgnore]
137 public LLUUID AttachedAvatar = LLUUID.Zero; 135 public UUID AttachedAvatar = UUID.Zero;
138 [XmlIgnore] 136 [XmlIgnore]
139 public LLVector3 AttachedPos = LLVector3.Zero; 137 public Vector3 AttachedPos = Vector3.Zero;
140 [XmlIgnore] 138 [XmlIgnore]
141 public uint AttachmentPoint = (byte)0; 139 public uint AttachmentPoint = (byte)0;
142 [XmlIgnore] 140 [XmlIgnore]
@@ -146,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes
146 public bool Undoing = false; 144 public bool Undoing = false;
147 145
148 [XmlIgnore] 146 [XmlIgnore]
149 private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; 147 private PrimFlags LocalFlags = 0;
150 private byte[] m_TextureAnimation; 148 private byte[] m_TextureAnimation;
151 private byte m_clickAction = 0; 149 private byte m_clickAction = 0;
152 private Color m_color = Color.Black; 150 private Color m_color = Color.Black;
@@ -157,14 +155,14 @@ namespace OpenSim.Region.Environment.Scenes
157 [XmlIgnore] 155 [XmlIgnore]
158 private int m_scriptAccessPin = 0; 156 private int m_scriptAccessPin = 0;
159 [XmlIgnore] 157 [XmlIgnore]
160 private readonly Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); 158 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
161 private string m_sitName = String.Empty; 159 private string m_sitName = String.Empty;
162 private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); 160 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
163 private Vector3 m_sitTargetPosition = new Vector3(0, 0, 0); 161 private Vector3 m_sitTargetPosition = Vector3.Zero;
164 private string m_text = String.Empty; 162 private string m_text = String.Empty;
165 private string m_touchName = String.Empty; 163 private string m_touchName = String.Empty;
166 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); 164 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
167 private LLUUID _creatorID; 165 private UUID _creatorID;
168 166
169 /// <summary> 167 /// <summary>
170 /// Only used internally to schedule client updates. 168 /// Only used internally to schedule client updates.
@@ -176,29 +174,29 @@ namespace OpenSim.Region.Environment.Scenes
176 /// </summary> 174 /// </summary>
177 private byte m_updateFlag; 175 private byte m_updateFlag;
178 176
179 protected LLVector3 m_acceleration; 177 protected Vector3 m_acceleration;
180 protected LLVector3 m_angularVelocity; 178 protected Vector3 m_angularVelocity;
181 179
182 //unkown if this will be kept, added as a way of removing the group position from the group class 180 //unkown if this will be kept, added as a way of removing the group position from the group class
183 protected LLVector3 m_groupPosition; 181 protected Vector3 m_groupPosition;
184 protected uint m_localId; 182 protected uint m_localId;
185 protected LLObject.MaterialType m_material = 0; 183 protected Material m_material = 0;
186 protected string m_name; 184 protected string m_name;
187 protected LLVector3 m_offsetPosition; 185 protected Vector3 m_offsetPosition;
188 186
189 // FIXME, TODO, ERROR: 'ParentGroup' can't be in here, move it out. 187 // FIXME, TODO, ERROR: 'ParentGroup' can't be in here, move it out.
190 protected SceneObjectGroup m_parentGroup; 188 protected SceneObjectGroup m_parentGroup;
191 protected byte[] m_particleSystem = new byte[0]; 189 protected byte[] m_particleSystem = new byte[0];
192 protected ulong m_regionHandle; 190 protected ulong m_regionHandle;
193 protected LLQuaternion m_rotationOffset; 191 protected Quaternion m_rotationOffset;
194 protected PrimitiveBaseShape m_shape = null; 192 protected PrimitiveBaseShape m_shape = null;
195 protected LLUUID m_uuid; 193 protected UUID m_uuid;
196 protected LLVector3 m_velocity; 194 protected Vector3 m_velocity;
197 195
198 // TODO: Those have to be changed into persistent properties at some later point, 196 // TODO: Those have to be changed into persistent properties at some later point,
199 // or sit-camera on vehicles will break on sim-crossing. 197 // or sit-camera on vehicles will break on sim-crossing.
200 private LLVector3 m_cameraEyeOffset = new LLVector3(0.0f, 0.0f, 0.0f); 198 private Vector3 m_cameraEyeOffset = new Vector3(0.0f, 0.0f, 0.0f);
201 private LLVector3 m_cameraAtOffset = new LLVector3(0.0f, 0.0f, 0.0f); 199 private Vector3 m_cameraAtOffset = new Vector3(0.0f, 0.0f, 0.0f);
202 private bool m_forceMouselook = false; 200 private bool m_forceMouselook = false;
203 201
204 #endregion Fields 202 #endregion Fields
@@ -214,9 +212,9 @@ namespace OpenSim.Region.Environment.Scenes
214 m_TextureAnimation = new byte[0]; 212 m_TextureAnimation = new byte[0];
215 } 213 }
216 214
217 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, 215 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID,
218 PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition) 216 PrimitiveBaseShape shape, Vector3 groupPosition, Vector3 offsetPosition)
219 : this(regionHandle, parent, ownerID, localID, shape, groupPosition, LLQuaternion.Identity, offsetPosition) 217 : this(regionHandle, parent, ownerID, localID, shape, groupPosition, Quaternion.Identity, offsetPosition)
220 { 218 {
221 } 219 }
222 220
@@ -229,9 +227,9 @@ namespace OpenSim.Region.Environment.Scenes
229 /// <param name="localID"></param> 227 /// <param name="localID"></param>
230 /// <param name="shape"></param> 228 /// <param name="shape"></param>
231 /// <param name="position"></param> 229 /// <param name="position"></param>
232 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, 230 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID,
233 PrimitiveBaseShape shape, LLVector3 groupPosition, LLQuaternion rotationOffset, 231 PrimitiveBaseShape shape, Vector3 groupPosition, Quaternion rotationOffset,
234 LLVector3 offsetPosition) 232 Vector3 offsetPosition)
235 { 233 {
236 m_name = "Primitive"; 234 m_name = "Primitive";
237 m_regionHandle = regionHandle; 235 m_regionHandle = regionHandle;
@@ -240,8 +238,8 @@ namespace OpenSim.Region.Environment.Scenes
240 _creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 238 _creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
241 _ownerID = ownerID; 239 _ownerID = ownerID;
242 _creatorID = _ownerID; 240 _creatorID = _ownerID;
243 _lastOwnerID = LLUUID.Zero; 241 _lastOwnerID = UUID.Zero;
244 UUID = LLUUID.Random(); 242 UUID = UUID.Random();
245 LocalId = (uint) (localID); 243 LocalId = (uint) (localID);
246 Shape = shape; 244 Shape = shape;
247 // Todo: Add More Object Parameter from above! 245 // Todo: Add More Object Parameter from above!
@@ -254,9 +252,9 @@ namespace OpenSim.Region.Environment.Scenes
254 GroupPosition = groupPosition; 252 GroupPosition = groupPosition;
255 OffsetPosition = offsetPosition; 253 OffsetPosition = offsetPosition;
256 RotationOffset = rotationOffset; 254 RotationOffset = rotationOffset;
257 Velocity = new LLVector3(0, 0, 0); 255 Velocity = new Vector3(0, 0, 0);
258 AngularVelocity = new LLVector3(0, 0, 0); 256 AngularVelocity = new Vector3(0, 0, 0);
259 Acceleration = new LLVector3(0, 0, 0); 257 Acceleration = new Vector3(0, 0, 0);
260 m_TextureAnimation = new byte[0]; 258 m_TextureAnimation = new byte[0];
261 259
262 // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, 260 // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
@@ -264,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes
264 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log 262 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
265 263
266 _flags = 0; 264 _flags = 0;
267 _flags |= LLObject.ObjectFlags.CreateSelected; 265 _flags |= PrimFlags.CreateSelected;
268 266
269 TrimPermissions(); 267 TrimPermissions();
270 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); 268 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
@@ -282,9 +280,9 @@ namespace OpenSim.Region.Environment.Scenes
282 /// <param name="localID"></param> 280 /// <param name="localID"></param>
283 /// <param name="shape"></param> 281 /// <param name="shape"></param>
284 /// <param name="position"></param> 282 /// <param name="position"></param>
285 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, int creationDate, LLUUID ownerID, 283 public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, int creationDate, UUID ownerID,
286 LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, 284 UUID creatorID, UUID lastOwnerID, uint localID, PrimitiveBaseShape shape,
287 LLVector3 position, LLQuaternion rotation, uint flags) 285 Vector3 position, Quaternion rotation, uint flags)
288 { 286 {
289 m_regionHandle = regionHandle; 287 m_regionHandle = regionHandle;
290 m_parentGroup = parent; 288 m_parentGroup = parent;
@@ -293,7 +291,7 @@ namespace OpenSim.Region.Environment.Scenes
293 _ownerID = ownerID; 291 _ownerID = ownerID;
294 _creatorID = creatorID; 292 _creatorID = creatorID;
295 _lastOwnerID = lastOwnerID; 293 _lastOwnerID = lastOwnerID;
296 UUID = LLUUID.Random(); 294 UUID = UUID.Random();
297 LocalId = (uint) (localID); 295 LocalId = (uint) (localID);
298 Shape = shape; 296 Shape = shape;
299 _ownershipCost = 0; 297 _ownershipCost = 0;
@@ -307,7 +305,7 @@ namespace OpenSim.Region.Environment.Scenes
307 305
308 // Since we don't store script state, this is only a 'temporary' objectflag now 306 // Since we don't store script state, this is only a 'temporary' objectflag now
309 // If the object is scripted, the script will get loaded and this will be set again 307 // If the object is scripted, the script will get loaded and this will be set again
310 ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch); 308 ObjectFlags &= ~(uint)(PrimFlags.Scripted | PrimFlags.Touch);
311 309
312 TrimPermissions(); 310 TrimPermissions();
313 // ApplyPhysics(); 311 // ApplyPhysics();
@@ -326,7 +324,7 @@ namespace OpenSim.Region.Environment.Scenes
326 324
327 /* 325 /*
328 m_queue = (Queue<SceneObjectPart>)info.GetValue("m_queue", typeof(Queue<SceneObjectPart>)); 326 m_queue = (Queue<SceneObjectPart>)info.GetValue("m_queue", typeof(Queue<SceneObjectPart>));
329 m_ids = (List<LLUUID>)info.GetValue("m_ids", typeof(List<LLUUID>)); 327 m_ids = (List<UUID>)info.GetValue("m_ids", typeof(List<UUID>));
330 */ 328 */
331 329
332 //System.Console.WriteLine("SceneObjectPart Deserialize END"); 330 //System.Console.WriteLine("SceneObjectPart Deserialize END");
@@ -336,24 +334,24 @@ namespace OpenSim.Region.Environment.Scenes
336 334
337 #region XML Schema 335 #region XML Schema
338 336
339 private LLUUID _lastOwnerID; 337 private UUID _lastOwnerID;
340 private LLUUID _ownerID; 338 private UUID _ownerID;
341 private LLUUID _groupID; 339 private UUID _groupID;
342 private int _ownershipCost; 340 private int _ownershipCost;
343 private byte _objectSaleType; 341 private byte _objectSaleType;
344 private int _salePrice; 342 private int _salePrice;
345 private uint _category; 343 private uint _category;
346 private Int32 _creationDate; 344 private Int32 _creationDate;
347 private uint _parentID = 0; 345 private uint _parentID = 0;
348 private LLUUID m_sitTargetAvatar = LLUUID.Zero; 346 private UUID m_sitTargetAvatar = UUID.Zero;
349 private uint _baseMask = (uint)PermissionMask.All; 347 private uint _baseMask = (uint)PermissionMask.All;
350 private uint _ownerMask = (uint)PermissionMask.All; 348 private uint _ownerMask = (uint)PermissionMask.All;
351 private uint _groupMask = (uint)PermissionMask.None; 349 private uint _groupMask = (uint)PermissionMask.None;
352 private uint _everyoneMask = (uint)PermissionMask.None; 350 private uint _everyoneMask = (uint)PermissionMask.None;
353 private uint _nextOwnerMask = (uint)PermissionMask.All; 351 private uint _nextOwnerMask = (uint)PermissionMask.All;
354 private LLObject.ObjectFlags _flags = LLObject.ObjectFlags.None; 352 private PrimFlags _flags = 0;
355 353
356 public LLUUID CreatorID { 354 public UUID CreatorID {
357 get 355 get
358 { 356 {
359 return _creatorID; 357 return _creatorID;
@@ -368,7 +366,7 @@ namespace OpenSim.Region.Environment.Scenes
368 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see 366 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see
369 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. 367 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim.
370 /// </summary> 368 /// </summary>
371 public LLUUID FolderID 369 public UUID FolderID
372 { 370 {
373 get { return UUID; } 371 get { return UUID; }
374 set { } // Don't allow assignment, or legacy prims wil b0rk 372 set { } // Don't allow assignment, or legacy prims wil b0rk
@@ -389,10 +387,10 @@ namespace OpenSim.Region.Environment.Scenes
389 public uint ObjectFlags 387 public uint ObjectFlags
390 { 388 {
391 get { return (uint)_flags; } 389 get { return (uint)_flags; }
392 set { _flags = (LLObject.ObjectFlags)value; } 390 set { _flags = (PrimFlags)value; }
393 } 391 }
394 392
395 public LLUUID UUID 393 public UUID UUID
396 { 394 {
397 get { return m_uuid; } 395 get { return m_uuid; }
398 set { m_uuid = value; } 396 set { m_uuid = value; }
@@ -413,7 +411,7 @@ namespace OpenSim.Region.Environment.Scenes
413 public byte Material 411 public byte Material
414 { 412 {
415 get { return (byte) m_material; } 413 get { return (byte) m_material; }
416 set { m_material = (LLObject.MaterialType) value; } 414 set { m_material = (Material)value; }
417 } 415 }
418 416
419 public ulong RegionHandle 417 public ulong RegionHandle
@@ -435,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes
435 set { m_TextureAnimation = value; } 433 set { m_TextureAnimation = value; }
436 } 434 }
437 435
438 public LLVector3 GroupPosition 436 public Vector3 GroupPosition
439 { 437 {
440 get 438 get
441 { 439 {
@@ -479,10 +477,10 @@ namespace OpenSim.Region.Environment.Scenes
479 477
480 // To move the child prim in respect to the group position and rotation we have to calculate 478 // To move the child prim in respect to the group position and rotation we have to calculate
481 479
482 LLVector3 resultingposition = GetWorldPosition(); 480 Vector3 resultingposition = GetWorldPosition();
483 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 481 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z);
484 LLQuaternion resultingrot = GetWorldRotation(); 482 Quaternion resultingrot = GetWorldRotation();
485 PhysActor.Orientation = new Quaternion(resultingrot.W, resultingrot.X, resultingrot.Y, resultingrot.Z); 483 PhysActor.Orientation = resultingrot;
486 } 484 }
487 485
488 // Tell the physics engines that this prim changed. 486 // Tell the physics engines that this prim changed.
@@ -497,7 +495,7 @@ namespace OpenSim.Region.Environment.Scenes
497 } 495 }
498 } 496 }
499 497
500 public LLVector3 OffsetPosition 498 public Vector3 OffsetPosition
501 { 499 {
502 get { return m_offsetPosition; } 500 get { return m_offsetPosition; }
503 set 501 set
@@ -518,20 +516,17 @@ namespace OpenSim.Region.Environment.Scenes
518 } 516 }
519 } 517 }
520 518
521 public LLQuaternion RotationOffset 519 public Quaternion RotationOffset
522 { 520 {
523 get 521 get
524 { 522 {
525 // We don't want the physics engine mucking up the rotations in a linkset 523 // We don't want the physics engine mucking up the rotations in a linkset
526 if (PhysActor != null && _parentID == 0) 524 if (PhysActor != null && _parentID == 0)
527 { 525 {
528 if (PhysActor.Orientation.x != 0 || PhysActor.Orientation.y != 0 526 if (PhysActor.Orientation.X != 0 || PhysActor.Orientation.Y != 0
529 || PhysActor.Orientation.z != 0 || PhysActor.Orientation.w != 0) 527 || PhysActor.Orientation.Z != 0 || PhysActor.Orientation.W != 0)
530 { 528 {
531 m_rotationOffset.X = PhysActor.Orientation.x; 529 m_rotationOffset = PhysActor.Orientation;
532 m_rotationOffset.Y = PhysActor.Orientation.y;
533 m_rotationOffset.Z = PhysActor.Orientation.z;
534 m_rotationOffset.W = PhysActor.Orientation.w;
535 } 530 }
536 } 531 }
537 return m_rotationOffset; 532 return m_rotationOffset;
@@ -548,14 +543,14 @@ namespace OpenSim.Region.Environment.Scenes
548 // Root prim gets value directly 543 // Root prim gets value directly
549 if (_parentID == 0) 544 if (_parentID == 0)
550 { 545 {
551 PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); 546 PhysActor.Orientation = value;
552 //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString()); 547 //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString());
553 } 548 }
554 else 549 else
555 { 550 {
556 // Child prim we have to calculate it's world rotationwel 551 // Child prim we have to calculate it's world rotationwel
557 LLQuaternion resultingrotation = GetWorldRotation(); 552 Quaternion resultingrotation = GetWorldRotation();
558 PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); 553 PhysActor.Orientation = resultingrotation;
559 //m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString()); 554 //m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString());
560 } 555 }
561 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 556 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
@@ -571,12 +566,12 @@ namespace OpenSim.Region.Environment.Scenes
571 } 566 }
572 567
573 /// <summary></summary> 568 /// <summary></summary>
574 public LLVector3 Velocity 569 public Vector3 Velocity
575 { 570 {
576 get 571 get
577 { 572 {
578 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0 573 //if (PhysActor.Velocity.X != 0 || PhysActor.Velocity.Y != 0
579 //|| PhysActor.Velocity.z != 0) 574 //|| PhysActor.Velocity.Z != 0)
580 //{ 575 //{
581 if (PhysActor != null) 576 if (PhysActor != null)
582 { 577 {
@@ -605,14 +600,14 @@ namespace OpenSim.Region.Environment.Scenes
605 } 600 }
606 } 601 }
607 602
608 public LLVector3 RotationalVelocity 603 public Vector3 RotationalVelocity
609 { 604 {
610 get { return AngularVelocity; } 605 get { return AngularVelocity; }
611 set { AngularVelocity = value; } 606 set { AngularVelocity = value; }
612 } 607 }
613 608
614 /// <summary></summary> 609 /// <summary></summary>
615 public LLVector3 AngularVelocity 610 public Vector3 AngularVelocity
616 { 611 {
617 get 612 get
618 { 613 {
@@ -626,7 +621,7 @@ namespace OpenSim.Region.Environment.Scenes
626 } 621 }
627 622
628 /// <summary></summary> 623 /// <summary></summary>
629 public LLVector3 Acceleration 624 public Vector3 Acceleration
630 { 625 {
631 get { return m_acceleration; } 626 get { return m_acceleration; }
632 set { m_acceleration = value; } 627 set { m_acceleration = value; }
@@ -718,7 +713,7 @@ namespace OpenSim.Region.Environment.Scenes
718 TriggerScriptChangedEvent(Changed.SHAPE); 713 TriggerScriptChangedEvent(Changed.SHAPE);
719 } 714 }
720 } 715 }
721 public LLVector3 Scale 716 public Vector3 Scale
722 { 717 {
723 get { return m_shape.Scale; } 718 get { return m_shape.Scale; }
724 set 719 set
@@ -754,7 +749,7 @@ namespace OpenSim.Region.Environment.Scenes
754 #region Public Properties with only Get 749 #region Public Properties with only Get
755 750
756 751
757 public LLVector3 AbsolutePosition 752 public Vector3 AbsolutePosition
758 { 753 {
759 get { 754 get {
760 if (IsAttachment) 755 if (IsAttachment)
@@ -763,12 +758,12 @@ namespace OpenSim.Region.Environment.Scenes
763 return m_offsetPosition + m_groupPosition; } 758 return m_offsetPosition + m_groupPosition; }
764 } 759 }
765 760
766 public LLUUID ObjectCreator 761 public UUID ObjectCreator
767 { 762 {
768 get { return _creatorID; } 763 get { return _creatorID; }
769 } 764 }
770 765
771 public LLUUID ObjectOwner 766 public UUID ObjectOwner
772 { 767 {
773 get { return _ownerID; } 768 get { return _ownerID; }
774 } 769 }
@@ -801,29 +796,27 @@ namespace OpenSim.Region.Environment.Scenes
801 796
802 // This sort of sucks, but I'm adding these in to make some of 797 // This sort of sucks, but I'm adding these in to make some of
803 // the mappings more consistant. 798 // the mappings more consistant.
804 public LLVector3 SitTargetPositionLL 799 public Vector3 SitTargetPositionLL
805 { 800 {
806 get { return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y,m_sitTargetPosition.z); } 801 get { return new Vector3(m_sitTargetPosition.X, m_sitTargetPosition.Y,m_sitTargetPosition.Z); }
807 set { m_sitTargetPosition = new Vector3(value.X, value.Y, value.Z); } 802 set { m_sitTargetPosition = value; }
808 } 803 }
809 804
810 public LLQuaternion SitTargetOrientationLL 805 public Quaternion SitTargetOrientationLL
811 { 806 {
812 get 807 get
813 { 808 {
814 return new LLQuaternion( 809 return new Quaternion(
815 m_sitTargetOrientation.x, 810 m_sitTargetOrientation.X,
816 m_sitTargetOrientation.y, 811 m_sitTargetOrientation.Y,
817 m_sitTargetOrientation.z, 812 m_sitTargetOrientation.Z,
818 m_sitTargetOrientation.w 813 m_sitTargetOrientation.W
819 ); 814 );
820 } 815 }
821 816
822 set { m_sitTargetOrientation = new Quaternion(value.W, value.X, value.Y, value.Z); } 817 set { m_sitTargetOrientation = new Quaternion(value.W, value.X, value.Y, value.Z); }
823 } 818 }
824 819
825
826
827 public bool Stopped 820 public bool Stopped
828 { 821 {
829 get { 822 get {
@@ -873,19 +866,19 @@ namespace OpenSim.Region.Environment.Scenes
873 set { _ownershipCost = value; } 866 set { _ownershipCost = value; }
874 } 867 }
875 868
876 public LLUUID GroupID 869 public UUID GroupID
877 { 870 {
878 get { return _groupID; } 871 get { return _groupID; }
879 set { _groupID = value; } 872 set { _groupID = value; }
880 } 873 }
881 874
882 public LLUUID OwnerID 875 public UUID OwnerID
883 { 876 {
884 get { return _ownerID; } 877 get { return _ownerID; }
885 set { _ownerID = value; } 878 set { _ownerID = value; }
886 } 879 }
887 880
888 public LLUUID LastOwnerID 881 public UUID LastOwnerID
889 { 882 {
890 get { return _lastOwnerID; } 883 get { return _lastOwnerID; }
891 set { _lastOwnerID = value; } 884 set { _lastOwnerID = value; }
@@ -921,34 +914,34 @@ namespace OpenSim.Region.Environment.Scenes
921 set { _nextOwnerMask = value; } 914 set { _nextOwnerMask = value; }
922 } 915 }
923 916
924 public libsecondlife.LLObject.ObjectFlags Flags 917 public PrimFlags Flags
925 { 918 {
926 get { return _flags; } 919 get { return _flags; }
927 set { _flags = value; } 920 set { _flags = value; }
928 } 921 }
929 922
930 public LLUUID SitTargetAvatar 923 public UUID SitTargetAvatar
931 { 924 {
932 get { return m_sitTargetAvatar; } 925 get { return m_sitTargetAvatar; }
933 set { m_sitTargetAvatar = value; } 926 set { m_sitTargetAvatar = value; }
934 } 927 }
935 928
936 [XmlIgnore] 929 [XmlIgnore]
937 public virtual LLUUID RegionID 930 public virtual UUID RegionID
938 { 931 {
939 get 932 get
940 { 933 {
941 if (ParentGroup != null && ParentGroup.Scene != null) 934 if (ParentGroup != null && ParentGroup.Scene != null)
942 return ParentGroup.Scene.RegionInfo.RegionID; 935 return ParentGroup.Scene.RegionInfo.RegionID;
943 else 936 else
944 return LLUUID.Zero; 937 return UUID.Zero;
945 } 938 }
946 set {} // read only 939 set {} // read only
947 } 940 }
948 941
949 private LLUUID _parentUUID = LLUUID.Zero; 942 private UUID _parentUUID = UUID.Zero;
950 [XmlIgnore] 943 [XmlIgnore]
951 public LLUUID ParentUUID 944 public UUID ParentUUID
952 { 945 {
953 get 946 get
954 { 947 {
@@ -985,7 +978,7 @@ namespace OpenSim.Region.Environment.Scenes
985 m_updateFlag = 0; 978 m_updateFlag = 0;
986 } 979 }
987 980
988 private void SendObjectPropertiesToClient(LLUUID AgentID) 981 private void SendObjectPropertiesToClient(UUID AgentID)
989 { 982 {
990 List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); 983 List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
991 for (int i = 0; i < avatars.Count; i++) 984 for (int i = 0; i < avatars.Count; i++)
@@ -1027,13 +1020,13 @@ namespace OpenSim.Region.Environment.Scenes
1027 1020
1028 #region Public Methods 1021 #region Public Methods
1029 1022
1030 public void AddFlag(LLObject.ObjectFlags flag) 1023 public void AddFlag(PrimFlags flag)
1031 { 1024 {
1032 // LLObject.ObjectFlags prevflag = Flags; 1025 // PrimFlags prevflag = Flags;
1033 //uint objflags = Flags; 1026 //uint objflags = Flags;
1034 if ((ObjectFlags & (uint) flag) == 0) 1027 if ((ObjectFlags & (uint) flag) == 0)
1035 { 1028 {
1036 //Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString()); 1029 //Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString());
1037 _flags |= flag; 1030 _flags |= flag;
1038 } 1031 }
1039 //uint currflag = (uint)Flags; 1032 //uint currflag = (uint)Flags;
@@ -1091,7 +1084,7 @@ namespace OpenSim.Region.Environment.Scenes
1091 // The flags don't like conversion from uint to byte, so we have to do 1084 // The flags don't like conversion from uint to byte, so we have to do
1092 // it the crappy way. See the above function :( 1085 // it the crappy way. See the above function :(
1093 1086
1094 data[pos] = ConvertScriptUintToByte(pTexAnim.Flags); pos++; 1087 data[pos] = ConvertScriptUintToByte((uint)pTexAnim.Flags); pos++;
1095 data[pos] = (byte)pTexAnim.Face; pos++; 1088 data[pos] = (byte)pTexAnim.Face; pos++;
1096 data[pos] = (byte)pTexAnim.SizeX; pos++; 1089 data[pos] = (byte)pTexAnim.SizeX; pos++;
1097 data[pos] = (byte)pTexAnim.SizeY; pos++; 1090 data[pos] = (byte)pTexAnim.SizeY; pos++;
@@ -1124,19 +1117,17 @@ namespace OpenSim.Region.Environment.Scenes
1124 /// </summary> 1117 /// </summary>
1125 /// <param name="impulsei">Vector force</param> 1118 /// <param name="impulsei">Vector force</param>
1126 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1119 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1127 public void ApplyImpulse(LLVector3 impulsei, bool localGlobalTF) 1120 public void ApplyImpulse(Vector3 impulsei, bool localGlobalTF)
1128 { 1121 {
1129 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1122 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z);
1130 1123
1131 if (localGlobalTF) 1124 if (localGlobalTF)
1132 { 1125 {
1133 1126 Quaternion grot = GetWorldRotation();
1134 LLQuaternion grot = GetWorldRotation(); 1127 Quaternion AXgrot = grot;
1135 Quaternion AXgrot = new Quaternion(grot.W,grot.X,grot.Y,grot.Z); 1128 Vector3 AXimpulsei = impulsei;
1136 Vector3 AXimpulsei = new Vector3(impulsei.X, impulsei.Y, impulsei.Z); 1129 Vector3 newimpulse = AXimpulsei * AXgrot;
1137 Vector3 newimpulse = AXgrot * AXimpulsei; 1130 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z);
1138 impulse = new PhysicsVector(newimpulse.x, newimpulse.y, newimpulse.z);
1139
1140 } 1131 }
1141 else 1132 else
1142 { 1133 {
@@ -1155,8 +1146,8 @@ namespace OpenSim.Region.Environment.Scenes
1155 /// <param name="m_physicalPrim"></param> 1146 /// <param name="m_physicalPrim"></param>
1156 public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) 1147 public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim)
1157 { 1148 {
1158 bool isPhysical = (((rootObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0) && m_physicalPrim); 1149 bool isPhysical = (((rootObjectFlags & (uint) PrimFlags.Physics) != 0) && m_physicalPrim);
1159 bool isPhantom = ((rootObjectFlags & (uint) LLObject.ObjectFlags.Phantom) != 0); 1150 bool isPhantom = ((rootObjectFlags & (uint) PrimFlags.Phantom) != 0);
1160 1151
1161 // Added clarification.. since A rigid body is an object that you can kick around, etc. 1152 // Added clarification.. since A rigid body is an object that you can kick around, etc.
1162 bool RigidBody = isPhysical && !isPhantom; 1153 bool RigidBody = isPhysical && !isPhantom;
@@ -1167,11 +1158,10 @@ namespace OpenSim.Region.Environment.Scenes
1167 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1158 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1168 Name, 1159 Name,
1169 Shape, 1160 Shape,
1170 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, 1161 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z),
1171 AbsolutePosition.Z),
1172 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 1162 new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
1173 new Quaternion(RotationOffset.W, RotationOffset.X, 1163 RotationOffset,
1174 RotationOffset.Y, RotationOffset.Z), RigidBody); 1164 RigidBody);
1175 1165
1176 // Basic Physics returns null.. joy joy joy. 1166 // Basic Physics returns null.. joy joy joy.
1177 if (PhysActor != null) 1167 if (PhysActor != null)
@@ -1208,24 +1198,23 @@ namespace OpenSim.Region.Environment.Scenes
1208 /// Duplicates this part. 1198 /// Duplicates this part.
1209 /// </summary> 1199 /// </summary>
1210 /// <returns></returns> 1200 /// <returns></returns>
1211 public SceneObjectPart Copy(uint localID, LLUUID AgentID, LLUUID GroupID, int linkNum, bool userExposed) 1201 public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed)
1212 { 1202 {
1213 SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone(); 1203 SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone();
1214 dupe.m_shape = m_shape.Copy(); 1204 dupe.m_shape = m_shape.Copy();
1215 dupe.m_regionHandle = m_regionHandle; 1205 dupe.m_regionHandle = m_regionHandle;
1216 if (userExposed) 1206 if (userExposed)
1217 dupe.UUID = LLUUID.Random(); 1207 dupe.UUID = UUID.Random();
1218 1208
1219 dupe.LocalId = localID; 1209 dupe.LocalId = localID;
1220 dupe._ownerID = AgentID; 1210 dupe._ownerID = AgentID;
1221 dupe._groupID = GroupID; 1211 dupe._groupID = GroupID;
1222 dupe.GroupPosition = new LLVector3(GroupPosition.X, GroupPosition.Y, GroupPosition.Z); 1212 dupe.GroupPosition = GroupPosition;
1223 dupe.OffsetPosition = new LLVector3(OffsetPosition.X, OffsetPosition.Y, OffsetPosition.Z); 1213 dupe.OffsetPosition = OffsetPosition;
1224 dupe.RotationOffset = 1214 dupe.RotationOffset = RotationOffset;
1225 new LLQuaternion(RotationOffset.X, RotationOffset.Y, RotationOffset.Z, RotationOffset.W); 1215 dupe.Velocity = Vector3.Zero;
1226 dupe.Velocity = new LLVector3(0, 0, 0); 1216 dupe.Acceleration = Vector3.Zero;
1227 dupe.Acceleration = new LLVector3(0, 0, 0); 1217 dupe.AngularVelocity = Vector3.Zero;
1228 dupe.AngularVelocity = new LLVector3(0, 0, 0);
1229 dupe.ObjectFlags = ObjectFlags; 1218 dupe.ObjectFlags = ObjectFlags;
1230 1219
1231 dupe._ownershipCost = _ownershipCost; 1220 dupe._ownershipCost = _ownershipCost;
@@ -1247,11 +1236,11 @@ namespace OpenSim.Region.Environment.Scenes
1247 1236
1248 if (userExposed) 1237 if (userExposed)
1249 { 1238 {
1250 if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != LLUUID.Zero) 1239 if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero)
1251 { 1240 {
1252 m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); 1241 m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true);
1253 } 1242 }
1254 bool UsePhysics = ((dupe.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); 1243 bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0);
1255 dupe.DoPhysicsPropertyUpdate(UsePhysics, true); 1244 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
1256 } 1245 }
1257 return dupe; 1246 return dupe;
@@ -1260,13 +1249,13 @@ namespace OpenSim.Region.Environment.Scenes
1260 public static SceneObjectPart Create() 1249 public static SceneObjectPart Create()
1261 { 1250 {
1262 SceneObjectPart part = new SceneObjectPart(); 1251 SceneObjectPart part = new SceneObjectPart();
1263 part.UUID = LLUUID.Random(); 1252 part.UUID = UUID.Random();
1264 1253
1265 PrimitiveBaseShape shape = PrimitiveBaseShape.Create(); 1254 PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
1266 part.Shape = shape; 1255 part.Shape = shape;
1267 1256
1268 part.Name = "Primitive"; 1257 part.Name = "Primitive";
1269 part._ownerID = LLUUID.Random(); 1258 part._ownerID = UUID.Random();
1270 1259
1271 return part; 1260 return part;
1272 } 1261 }
@@ -1295,16 +1284,8 @@ namespace OpenSim.Region.Environment.Scenes
1295 /// that's not wholesome. Had to make Scene public 1284 /// that's not wholesome. Had to make Scene public
1296 //PhysActor = null; 1285 //PhysActor = null;
1297 1286
1298 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) 1287 if ((ObjectFlags & (uint) PrimFlags.Phantom) == 0)
1299 { 1288 {
1300 //PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1301 //Name,
1302 //Shape,
1303 //new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
1304 //AbsolutePosition.Z),
1305 //new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
1306 //new Quaternion(RotationOffset.W, RotationOffset.X,
1307 //RotationOffset.Y, RotationOffset.Z), UsePhysics);
1308 if (UsePhysics) 1289 if (UsePhysics)
1309 { 1290 {
1310 ParentGroup.Scene.AddPhysicalPrim(1); 1291 ParentGroup.Scene.AddPhysicalPrim(1);
@@ -1339,7 +1320,7 @@ namespace OpenSim.Region.Environment.Scenes
1339 return newobject; 1320 return newobject;
1340 } 1321 }
1341 1322
1342 public LLUUID GetAvatarOnSitTarget() 1323 public UUID GetAvatarOnSitTarget()
1343 { 1324 {
1344 return m_sitTargetAvatar; 1325 return m_sitTargetAvatar;
1345 } 1326 }
@@ -1356,30 +1337,30 @@ namespace OpenSim.Region.Environment.Scenes
1356 1337
1357 public double GetDistanceTo(Vector3 a, Vector3 b) 1338 public double GetDistanceTo(Vector3 a, Vector3 b)
1358 { 1339 {
1359 float dx = a.x - b.x; 1340 float dx = a.X - b.X;
1360 float dy = a.y - b.y; 1341 float dy = a.Y - b.Y;
1361 float dz = a.z - b.z; 1342 float dz = a.Z - b.Z;
1362 return Math.Sqrt(dx * dx + dy * dy + dz * dz); 1343 return Math.Sqrt(dx * dx + dy * dy + dz * dz);
1363 } 1344 }
1364 1345
1365 public uint GetEffectiveObjectFlags() 1346 public uint GetEffectiveObjectFlags()
1366 { 1347 {
1367 LLObject.ObjectFlags f = _flags; 1348 PrimFlags f = _flags;
1368 if (m_parentGroup == null || m_parentGroup.RootPart == this) 1349 if (m_parentGroup == null || m_parentGroup.RootPart == this)
1369 f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money); 1350 f &= ~(PrimFlags.Touch | PrimFlags.Money);
1370 1351
1371 return (uint)_flags | (uint)LocalFlags; 1352 return (uint)_flags | (uint)LocalFlags;
1372 } 1353 }
1373 1354
1374 public LLVector3 GetGeometricCenter() 1355 public Vector3 GetGeometricCenter()
1375 { 1356 {
1376 if (PhysActor != null) 1357 if (PhysActor != null)
1377 { 1358 {
1378 return new LLVector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z); 1359 return new Vector3(PhysActor.CenterOfMass.X, PhysActor.CenterOfMass.Y, PhysActor.CenterOfMass.Z);
1379 } 1360 }
1380 else 1361 else
1381 { 1362 {
1382 return new LLVector3(0, 0, 0); 1363 return new Vector3(0, 0, 0);
1383 } 1364 }
1384 } 1365 }
1385 1366
@@ -1419,16 +1400,16 @@ namespace OpenSim.Region.Environment.Scenes
1419 1400
1420 Dictionary<Guid, TaskInventoryItem> TaskInventory_work = new Dictionary<Guid, TaskInventoryItem>(); 1401 Dictionary<Guid, TaskInventoryItem> TaskInventory_work = new Dictionary<Guid, TaskInventoryItem>();
1421 1402
1422 foreach (LLUUID id in TaskInventory.Keys) 1403 foreach (UUID id in TaskInventory.Keys)
1423 { 1404 {
1424 TaskInventory_work.Add(id.UUID, TaskInventory[id]); 1405 TaskInventory_work.Add(id.Guid, TaskInventory[id]);
1425 } 1406 }
1426 1407
1427 info.AddValue("TaskInventory", TaskInventory_work); 1408 info.AddValue("TaskInventory", TaskInventory_work);
1428 1409
1429 info.AddValue("LastOwnerID", _lastOwnerID.UUID); 1410 info.AddValue("LastOwnerID", _lastOwnerID.Guid);
1430 info.AddValue("OwnerID", _ownerID.UUID); 1411 info.AddValue("OwnerID", _ownerID.Guid);
1431 info.AddValue("GroupID", _groupID.UUID); 1412 info.AddValue("GroupID", _groupID.Guid);
1432 1413
1433 info.AddValue("OwnershipCost", _ownershipCost); 1414 info.AddValue("OwnershipCost", _ownershipCost);
1434 info.AddValue("ObjectSaleType", _objectSaleType); 1415 info.AddValue("ObjectSaleType", _objectSaleType);
@@ -1451,10 +1432,10 @@ namespace OpenSim.Region.Environment.Scenes
1451 info.AddValue("TimeStampLastActivity", TimeStampLastActivity); 1432 info.AddValue("TimeStampLastActivity", TimeStampLastActivity);
1452 1433
1453 info.AddValue("m_updateFlag", m_updateFlag); 1434 info.AddValue("m_updateFlag", m_updateFlag);
1454 info.AddValue("CreatorID", _creatorID.UUID); 1435 info.AddValue("CreatorID", _creatorID.Guid);
1455 1436
1456 info.AddValue("m_inventorySerial", m_inventorySerial); 1437 info.AddValue("m_inventorySerial", m_inventorySerial);
1457 info.AddValue("m_uuid", m_uuid.UUID); 1438 info.AddValue("m_uuid", m_uuid.Guid);
1458 info.AddValue("m_localID", m_localId); 1439 info.AddValue("m_localID", m_localId);
1459 info.AddValue("m_name", m_name); 1440 info.AddValue("m_name", m_name);
1460 info.AddValue("m_flags", _flags); 1441 info.AddValue("m_flags", _flags);
@@ -1503,7 +1484,7 @@ namespace OpenSim.Region.Environment.Scenes
1503 1484
1504 public void GetProperties(IClientAPI client) 1485 public void GetProperties(IClientAPI client)
1505 { 1486 {
1506 client.SendObjectPropertiesReply(LLUUID.Zero, (ulong)_creationDate, _creatorID, LLUUID.Zero, LLUUID.Zero, 1487 client.SendObjectPropertiesReply(UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero,
1507 _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, 1488 _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
1508 ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, 1489 ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
1509 ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, 1490 ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask,
@@ -1512,13 +1493,13 @@ namespace OpenSim.Region.Environment.Scenes
1512 ParentGroup.RootPart.SalePrice); 1493 ParentGroup.RootPart.SalePrice);
1513 } 1494 }
1514 1495
1515 public LLUUID GetRootPartUUID() 1496 public UUID GetRootPartUUID()
1516 { 1497 {
1517 if (m_parentGroup != null) 1498 if (m_parentGroup != null)
1518 { 1499 {
1519 return m_parentGroup.UUID; 1500 return m_parentGroup.UUID;
1520 } 1501 }
1521 return LLUUID.Zero; 1502 return UUID.Zero;
1522 } 1503 }
1523 1504
1524 /// <summary> 1505 /// <summary>
@@ -1526,63 +1507,40 @@ namespace OpenSim.Region.Environment.Scenes
1526 /// Remember, the Group Position simply gives the position of the group itself 1507 /// Remember, the Group Position simply gives the position of the group itself
1527 /// </summary> 1508 /// </summary>
1528 /// <returns>A Linked Child Prim objects position in world</returns> 1509 /// <returns>A Linked Child Prim objects position in world</returns>
1529 public LLVector3 GetWorldPosition() 1510 public Vector3 GetWorldPosition()
1530 { 1511 {
1531 Quaternion parentRot = new Quaternion( 1512 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
1532 ParentGroup.RootPart.RotationOffset.W, 1513
1533 ParentGroup.RootPart.RotationOffset.X, 1514 Vector3 axPos = OffsetPosition;
1534 ParentGroup.RootPart.RotationOffset.Y,
1535 ParentGroup.RootPart.RotationOffset.Z);
1536
1537 Vector3 axPos
1538 = new Vector3(
1539 OffsetPosition.X,
1540 OffsetPosition.Y,
1541 OffsetPosition.Z);
1542
1543 axPos = parentRot * axPos;
1544 LLVector3 translationOffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
1545 return GroupPosition + translationOffsetPosition;
1546 1515
1547 //return (new LLVector3(axiomPos.x, axiomPos.y, axiomPos.z) + AbsolutePosition); 1516 axPos *= parentRot;
1517 Vector3 translationOffsetPosition = axPos;
1518 return GroupPosition + translationOffsetPosition;
1548 } 1519 }
1549 1520
1550 /// <summary> 1521 /// <summary>
1551 /// Gets the rotation of this prim offset by the group rotation 1522 /// Gets the rotation of this prim offset by the group rotation
1552 /// </summary> 1523 /// </summary>
1553 /// <returns></returns> 1524 /// <returns></returns>
1554 public LLQuaternion GetWorldRotation() 1525 public Quaternion GetWorldRotation()
1555 { 1526 {
1556 Quaternion newRot; 1527 Quaternion newRot;
1557 1528
1558 if (this.LinkNum == 0) 1529 if (this.LinkNum == 0)
1559 { 1530 {
1560 newRot = new Quaternion(RotationOffset.W,RotationOffset.X,RotationOffset.Y,RotationOffset.Z); 1531 newRot = RotationOffset;
1561
1562 } 1532 }
1563 else 1533 else
1564 { 1534 {
1565 Quaternion parentRot = new Quaternion( 1535 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
1566 ParentGroup.RootPart.RotationOffset.W, 1536 Quaternion oldRot = RotationOffset;
1567 ParentGroup.RootPart.RotationOffset.X,
1568 ParentGroup.RootPart.RotationOffset.Y,
1569 ParentGroup.RootPart.RotationOffset.Z);
1570
1571 Quaternion oldRot
1572 = new Quaternion(
1573 RotationOffset.W,
1574 RotationOffset.X,
1575 RotationOffset.Y,
1576 RotationOffset.Z);
1577
1578 newRot = parentRot * oldRot; 1537 newRot = parentRot * oldRot;
1579 } 1538 }
1580 return new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
1581 1539
1582 //return new LLQuaternion(axiomPartRotation.x, axiomPartRotation.y, axiomPartRotation.z, axiomPartRotation.w); 1540 return newRot;
1583 } 1541 }
1584 1542
1585 public void MoveToTarget(LLVector3 target, float tau) 1543 public void MoveToTarget(Vector3 target, float tau)
1586 { 1544 {
1587 if (tau > 0) 1545 if (tau > 0)
1588 { 1546 {
@@ -1594,7 +1552,7 @@ namespace OpenSim.Region.Environment.Scenes
1594 } 1552 }
1595 } 1553 }
1596 1554
1597 public virtual void OnGrab(LLVector3 offsetPos, IClientAPI remoteClient) 1555 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient)
1598 { 1556 {
1599 } 1557 }
1600 1558
@@ -1694,7 +1652,7 @@ namespace OpenSim.Region.Environment.Scenes
1694 detobj.nameStr = av.ControllingClient.Name; 1652 detobj.nameStr = av.ControllingClient.Name;
1695 detobj.ownerUUID = av.UUID; 1653 detobj.ownerUUID = av.UUID;
1696 detobj.posVector = av.AbsolutePosition; 1654 detobj.posVector = av.AbsolutePosition;
1697 detobj.rotQuat = new LLQuaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); 1655 detobj.rotQuat = av.Rotation;
1698 detobj.velVector = av.Velocity; 1656 detobj.velVector = av.Velocity;
1699 detobj.colliderType = 0; 1657 detobj.colliderType = 0;
1700 detobj.groupUUID = av.ControllingClient.ActiveGroupId; 1658 detobj.groupUUID = av.ControllingClient.ActiveGroupId;
@@ -1760,7 +1718,7 @@ namespace OpenSim.Region.Environment.Scenes
1760 detobj.nameStr = av.Name; 1718 detobj.nameStr = av.Name;
1761 detobj.ownerUUID = av.UUID; 1719 detobj.ownerUUID = av.UUID;
1762 detobj.posVector = av.AbsolutePosition; 1720 detobj.posVector = av.AbsolutePosition;
1763 detobj.rotQuat = new LLQuaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); 1721 detobj.rotQuat = av.Rotation;
1764 detobj.velVector = av.Velocity; 1722 detobj.velVector = av.Velocity;
1765 detobj.colliderType = 0; 1723 detobj.colliderType = 0;
1766 detobj.groupUUID = av.ControllingClient.ActiveGroupId; 1724 detobj.groupUUID = av.ControllingClient.ActiveGroupId;
@@ -1828,7 +1786,7 @@ namespace OpenSim.Region.Environment.Scenes
1828 detobj.nameStr = av.Name; 1786 detobj.nameStr = av.Name;
1829 detobj.ownerUUID = av.UUID; 1787 detobj.ownerUUID = av.UUID;
1830 detobj.posVector = av.AbsolutePosition; 1788 detobj.posVector = av.AbsolutePosition;
1831 detobj.rotQuat = new LLQuaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); 1789 detobj.rotQuat = av.Rotation;
1832 detobj.velVector = av.Velocity; 1790 detobj.velVector = av.Velocity;
1833 detobj.colliderType = 0; 1791 detobj.colliderType = 0;
1834 detobj.groupUUID = av.ControllingClient.ActiveGroupId; 1792 detobj.groupUUID = av.ControllingClient.ActiveGroupId;
@@ -1857,7 +1815,7 @@ namespace OpenSim.Region.Environment.Scenes
1857 public void PhysicsOutOfBounds(PhysicsVector pos) 1815 public void PhysicsOutOfBounds(PhysicsVector pos)
1858 { 1816 {
1859 m_log.Info("[PHYSICS]: Physical Object went out of bounds."); 1817 m_log.Info("[PHYSICS]: Physical Object went out of bounds.");
1860 RemFlag(LLObject.ObjectFlags.Physics); 1818 RemFlag(PrimFlags.Physics);
1861 DoPhysicsPropertyUpdate(false, true); 1819 DoPhysicsPropertyUpdate(false, true);
1862 //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 1820 //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
1863 } 1821 }
@@ -1866,7 +1824,7 @@ namespace OpenSim.Region.Environment.Scenes
1866 { 1824 {
1867 if (PhysActor != null) 1825 if (PhysActor != null)
1868 { 1826 {
1869 LLVector3 newpos = new LLVector3(PhysActor.Position.GetBytes(), 0); 1827 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
1870 if (newpos.X > 257f || newpos.X < -1f || newpos.Y > 257f || newpos.Y < -1f) 1828 if (newpos.X > 257f || newpos.X < -1f || newpos.Y > 257f || newpos.Y < -1f)
1871 { 1829 {
1872 m_parentGroup.AbsolutePosition = newpos; 1830 m_parentGroup.AbsolutePosition = newpos;
@@ -1880,16 +1838,16 @@ namespace OpenSim.Region.Environment.Scenes
1880 1838
1881 public void PreloadSound(string sound) 1839 public void PreloadSound(string sound)
1882 { 1840 {
1883 // LLUUID ownerID = OwnerID; 1841 // UUID ownerID = OwnerID;
1884 LLUUID objectID = UUID; 1842 UUID objectID = UUID;
1885 LLUUID soundID = LLUUID.Zero; 1843 UUID soundID = UUID.Zero;
1886 1844
1887 if (!LLUUID.TryParse(sound, out soundID)) 1845 if (!UUID.TryParse(sound, out soundID))
1888 { 1846 {
1889 //Trys to fetch sound id from prim's inventory. 1847 //Trys to fetch sound id from prim's inventory.
1890 //Prim's inventory doesn't support non script items yet 1848 //Prim's inventory doesn't support non script items yet
1891 SceneObjectPart op = this; 1849 SceneObjectPart op = this;
1892 foreach (KeyValuePair<LLUUID, TaskInventoryItem> item in op.TaskInventory) 1850 foreach (KeyValuePair<UUID, TaskInventoryItem> item in op.TaskInventory)
1893 { 1851 {
1894 if (item.Value.Name == sound) 1852 if (item.Value.Name == sound)
1895 { 1853 {
@@ -1908,19 +1866,19 @@ namespace OpenSim.Region.Environment.Scenes
1908 } 1866 }
1909 } 1867 }
1910 1868
1911 public void RemFlag(LLObject.ObjectFlags flag) 1869 public void RemFlag(PrimFlags flag)
1912 { 1870 {
1913 // LLObject.ObjectFlags prevflag = Flags; 1871 // PrimFlags prevflag = Flags;
1914 if ((ObjectFlags & (uint) flag) != 0) 1872 if ((ObjectFlags & (uint) flag) != 0)
1915 { 1873 {
1916 //Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString()); 1874 //Console.WriteLine("Removing flag: " + ((PrimFlags)flag).ToString());
1917 _flags &= ~flag; 1875 _flags &= ~flag;
1918 } 1876 }
1919 //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 1877 //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
1920 //ScheduleFullUpdate(); 1878 //ScheduleFullUpdate();
1921 } 1879 }
1922 1880
1923 public void RemoveScriptEvents(LLUUID scriptid) 1881 public void RemoveScriptEvents(UUID scriptid)
1924 { 1882 {
1925 lock (m_scriptEvents) 1883 lock (m_scriptEvents)
1926 { 1884 {
@@ -1938,13 +1896,13 @@ namespace OpenSim.Region.Environment.Scenes
1938 } 1896 }
1939 1897
1940 /// <summary> 1898 /// <summary>
1941 /// Reset LLUUIDs for this part. This involves generate this part's own LLUUID and 1899 /// Reset UUIDs for this part. This involves generate this part's own UUID and
1942 /// generating new LLUUIDs for all the items in the inventory. 1900 /// generating new UUIDs for all the items in the inventory.
1943 /// </summary> 1901 /// </summary>
1944 /// <param name="linkNum">Link number for the part</param> 1902 /// <param name="linkNum">Link number for the part</param>
1945 public void ResetIDs(int linkNum) 1903 public void ResetIDs(int linkNum)
1946 { 1904 {
1947 UUID = LLUUID.Random(); 1905 UUID = UUID.Random();
1948 LinkNum = linkNum; 1906 LinkNum = linkNum;
1949 1907
1950 ResetInventoryIDs(); 1908 ResetInventoryIDs();
@@ -1954,7 +1912,7 @@ namespace OpenSim.Region.Environment.Scenes
1954 /// Resize this part. 1912 /// Resize this part.
1955 /// </summary> 1913 /// </summary>
1956 /// <param name="scale"></param> 1914 /// <param name="scale"></param>
1957 public void Resize(LLVector3 scale) 1915 public void Resize(Vector3 scale)
1958 { 1916 {
1959 StoreUndoState(); 1917 StoreUndoState();
1960 m_shape.Scale = scale; 1918 m_shape.Scale = scale;
@@ -2032,7 +1990,7 @@ namespace OpenSim.Region.Environment.Scenes
2032 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics); 1990 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics);
2033 } 1991 }
2034 1992
2035 public void SculptTextureCallback(LLUUID textureID, AssetBase texture) 1993 public void SculptTextureCallback(UUID textureID, AssetBase texture)
2036 { 1994 {
2037 if (m_shape.SculptEntry) 1995 if (m_shape.SculptEntry)
2038 { 1996 {
@@ -2073,7 +2031,7 @@ namespace OpenSim.Region.Environment.Scenes
2073 } 2031 }
2074 } 2032 }
2075 2033
2076 public void SendFullUpdateToAllClientsExcept(LLUUID agentID) 2034 public void SendFullUpdateToAllClientsExcept(UUID agentID)
2077 { 2035 {
2078 List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences(); 2036 List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
2079 for (int i = 0; i < avatars.Count; i++) 2037 for (int i = 0; i < avatars.Count; i++)
@@ -2094,7 +2052,7 @@ namespace OpenSim.Region.Environment.Scenes
2094 /// <param name="clientFlags"></param> 2052 /// <param name="clientFlags"></param>
2095 public void SendFullUpdateToClient(IClientAPI remoteClient, uint clientflags) 2053 public void SendFullUpdateToClient(IClientAPI remoteClient, uint clientflags)
2096 { 2054 {
2097 LLVector3 lPos; 2055 Vector3 lPos;
2098 lPos = OffsetPosition; 2056 lPos = OffsetPosition;
2099 SendFullUpdateToClient(remoteClient, lPos, clientflags); 2057 SendFullUpdateToClient(remoteClient, lPos, clientflags);
2100 } 2058 }
@@ -2105,16 +2063,16 @@ namespace OpenSim.Region.Environment.Scenes
2105 /// <param name="remoteClient"></param> 2063 /// <param name="remoteClient"></param>
2106 /// <param name="lPos"></param> 2064 /// <param name="lPos"></param>
2107 /// <param name="clientFlags"></param> 2065 /// <param name="clientFlags"></param>
2108 public void SendFullUpdateToClient(IClientAPI remoteClient, LLVector3 lPos, uint clientFlags) 2066 public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags)
2109 { 2067 {
2110 clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected; 2068 clientFlags &= ~(uint) PrimFlags.CreateSelected;
2111 2069
2112 if (remoteClient.AgentId == _ownerID) 2070 if (remoteClient.AgentId == _ownerID)
2113 { 2071 {
2114 if ((uint) (_flags & LLObject.ObjectFlags.CreateSelected) != 0) 2072 if ((uint) (_flags & PrimFlags.CreateSelected) != 0)
2115 { 2073 {
2116 clientFlags |= (uint) LLObject.ObjectFlags.CreateSelected; 2074 clientFlags |= (uint) PrimFlags.CreateSelected;
2117 _flags &= ~LLObject.ObjectFlags.CreateSelected; 2075 _flags &= ~PrimFlags.CreateSelected;
2118 } 2076 }
2119 } 2077 }
2120 //bool isattachment = IsAttachment; 2078 //bool isattachment = IsAttachment;
@@ -2140,7 +2098,7 @@ namespace OpenSim.Region.Environment.Scenes
2140 2098
2141 // This causes the Scene to 'poll' physical objects every couple of frames 2099 // This causes the Scene to 'poll' physical objects every couple of frames
2142 // bad, so it's been replaced by an event driven method. 2100 // bad, so it's been replaced by an event driven method.
2143 //if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0) 2101 //if ((ObjectFlags & (uint)PrimFlags.Physics) != 0)
2144 //{ 2102 //{
2145 // Only send the constant terse updates on physical objects! 2103 // Only send the constant terse updates on physical objects!
2146 //ScheduleTerseUpdate(); 2104 //ScheduleTerseUpdate();
@@ -2163,20 +2121,20 @@ namespace OpenSim.Region.Environment.Scenes
2163 if (volume < 0) 2121 if (volume < 0)
2164 volume = 0; 2122 volume = 0;
2165 2123
2166 LLUUID ownerID = _ownerID; 2124 UUID ownerID = _ownerID;
2167 LLUUID objectID = UUID; 2125 UUID objectID = UUID;
2168 LLUUID parentID = GetRootPartUUID(); 2126 UUID parentID = GetRootPartUUID();
2169 LLUUID soundID = LLUUID.Zero; 2127 UUID soundID = UUID.Zero;
2170 LLVector3 position = AbsolutePosition; // region local 2128 Vector3 position = AbsolutePosition; // region local
2171 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; 2129 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle;
2172 2130
2173 //byte flags = 0; 2131 //byte flags = 0;
2174 2132
2175 if (!LLUUID.TryParse(sound, out soundID)) 2133 if (!UUID.TryParse(sound, out soundID))
2176 { 2134 {
2177 // search sound file from inventory 2135 // search sound file from inventory
2178 SceneObjectPart op = this; 2136 SceneObjectPart op = this;
2179 foreach (KeyValuePair<LLUUID, TaskInventoryItem> item in op.TaskInventory) 2137 foreach (KeyValuePair<UUID, TaskInventoryItem> item in op.TaskInventory)
2180 { 2138 {
2181 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound) 2139 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
2182 { 2140 {
@@ -2186,7 +2144,7 @@ namespace OpenSim.Region.Environment.Scenes
2186 } 2144 }
2187 } 2145 }
2188 2146
2189 if (soundID == LLUUID.Zero) 2147 if (soundID == UUID.Zero)
2190 return; 2148 return;
2191 2149
2192 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); 2150 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars();
@@ -2233,11 +2191,11 @@ namespace OpenSim.Region.Environment.Scenes
2233 2191
2234 public void SendTerseUpdateToClient(IClientAPI remoteClient) 2192 public void SendTerseUpdateToClient(IClientAPI remoteClient)
2235 { 2193 {
2236 LLVector3 lPos; 2194 Vector3 lPos;
2237 lPos = OffsetPosition; 2195 lPos = OffsetPosition;
2238 LLQuaternion mRot = RotationOffset; 2196 Quaternion mRot = RotationOffset;
2239 // TODO: I have no idea why we are making this check. This should be sorted out 2197 // TODO: I have no idea why we are making this check. This should be sorted out
2240 if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) 2198 if ((ObjectFlags & (uint) PrimFlags.Physics) == 0)
2241 { 2199 {
2242 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, FromAssetID); 2200 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, FromAssetID);
2243 } 2201 }
@@ -2249,9 +2207,9 @@ namespace OpenSim.Region.Environment.Scenes
2249 } 2207 }
2250 } 2208 }
2251 2209
2252 public void SendTerseUpdateToClient(IClientAPI remoteClient, LLVector3 lPos) 2210 public void SendTerseUpdateToClient(IClientAPI remoteClient, Vector3 lPos)
2253 { 2211 {
2254 LLQuaternion mRot = RotationOffset; 2212 Quaternion mRot = RotationOffset;
2255 //bool isattachment = IsAttachment; 2213 //bool isattachment = IsAttachment;
2256 //if (LocalId != ParentGroup.RootPart.LocalId) 2214 //if (LocalId != ParentGroup.RootPart.LocalId)
2257 //isattachment = ParentGroup.RootPart.IsAttachment; 2215 //isattachment = ParentGroup.RootPart.IsAttachment;
@@ -2263,7 +2221,7 @@ namespace OpenSim.Region.Environment.Scenes
2263 } 2221 }
2264 else 2222 else
2265 { 2223 {
2266 if ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) == 0) 2224 if ((ObjectFlags & (uint)PrimFlags.Physics) == 0)
2267 { 2225 {
2268 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, FromAssetID); 2226 remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Velocity, RotationalVelocity, Shape.State, FromAssetID);
2269 } 2227 }
@@ -2296,7 +2254,7 @@ namespace OpenSim.Region.Environment.Scenes
2296 //} 2254 //}
2297 } 2255 }
2298 2256
2299 public void SetAvatarOnSitTarget(LLUUID avatarID) 2257 public void SetAvatarOnSitTarget(UUID avatarID)
2300 { 2258 {
2301 m_sitTargetAvatar = avatarID; 2259 m_sitTargetAvatar = avatarID;
2302 if (ParentGroup != null) 2260 if (ParentGroup != null)
@@ -2352,7 +2310,7 @@ namespace OpenSim.Region.Environment.Scenes
2352 } 2310 }
2353 } 2311 }
2354 2312
2355 public void SetGroup(LLUUID groupID, IClientAPI client) 2313 public void SetGroup(UUID groupID, IClientAPI client)
2356 { 2314 {
2357 _groupID = groupID; 2315 _groupID = groupID;
2358 GetProperties(client); 2316 GetProperties(client);
@@ -2379,7 +2337,7 @@ namespace OpenSim.Region.Environment.Scenes
2379 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 2337 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
2380 } 2338 }
2381 2339
2382 public void SetScriptEvents(LLUUID scriptid, int events) 2340 public void SetScriptEvents(UUID scriptid, int events)
2383 { 2341 {
2384 // scriptEvents oldparts; 2342 // scriptEvents oldparts;
2385 lock (m_scriptEvents) 2343 lock (m_scriptEvents)
@@ -2399,24 +2357,6 @@ namespace OpenSim.Region.Environment.Scenes
2399 aggregateScriptEvents(); 2357 aggregateScriptEvents();
2400 } 2358 }
2401 2359
2402 // public void SetSitTarget(Vector3 offset, Quaternion orientation)
2403 // {
2404 // m_sitTargetPosition = offset;
2405 // m_sitTargetOrientation = orientation;
2406 // }
2407
2408 // // Utility function so the databases don't have to reference axiom.math
2409 // public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation)
2410 // {
2411 // if (
2412 // !(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) &&
2413 // orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0))
2414 // {
2415 // m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z);
2416 // m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z);
2417 // }
2418 // }
2419
2420 /// <summary> 2360 /// <summary>
2421 /// Set the text displayed for this part. 2361 /// Set the text displayed for this part.
2422 /// </summary> 2362 /// </summary>
@@ -2438,9 +2378,9 @@ namespace OpenSim.Region.Environment.Scenes
2438 public void SetText(string text, Vector3 color, double alpha) 2378 public void SetText(string text, Vector3 color, double alpha)
2439 { 2379 {
2440 Color = Color.FromArgb(0xff - (int) (alpha*0xff), 2380 Color = Color.FromArgb(0xff - (int) (alpha*0xff),
2441 (int) (color.x*0xff), 2381 (int) (color.X*0xff),
2442 (int) (color.y*0xff), 2382 (int) (color.Y*0xff),
2443 (int) (color.z*0xff)); 2383 (int) (color.Z*0xff));
2444 SetText(text); 2384 SetText(text);
2445 } 2385 }
2446 2386
@@ -2491,33 +2431,22 @@ namespace OpenSim.Region.Environment.Scenes
2491 2431
2492 2432
2493 EntityIntersection returnresult = new EntityIntersection(); 2433 EntityIntersection returnresult = new EntityIntersection();
2494 Vector3 vAbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); 2434 Vector3 vAbsolutePosition = AbsolutePosition;
2495 2435 Vector3 vScale = Scale;
2496 Vector3 vScale = new Vector3(Scale.X, Scale.Y, Scale.Z);
2497 // Quaternion qRotation =
2498 // new Quaternion(RotationOffset.W, RotationOffset.X, RotationOffset.Y, RotationOffset.Z);
2499
2500
2501 //Quaternion worldRotation = (qRotation*parentrot);
2502 //Matrix3 worldRotM = worldRotation.ToRotationMatrix();
2503
2504
2505 Vector3 rOrigin = iray.Origin; 2436 Vector3 rOrigin = iray.Origin;
2506 Vector3 rDirection = iray.Direction; 2437 Vector3 rDirection = iray.Direction;
2507 2438
2508
2509
2510 //rDirection = rDirection.Normalize(); 2439 //rDirection = rDirection.Normalize();
2511 // Buidling the first part of the Quadratic equation 2440 // Buidling the first part of the Quadratic equation
2512 Vector3 r2ndDirection = rDirection*rDirection; 2441 Vector3 r2ndDirection = rDirection*rDirection;
2513 float itestPart1 = r2ndDirection.x + r2ndDirection.y + r2ndDirection.z; 2442 float itestPart1 = r2ndDirection.X + r2ndDirection.Y + r2ndDirection.Z;
2514 2443
2515 // Buidling the second part of the Quadratic equation 2444 // Buidling the second part of the Quadratic equation
2516 Vector3 tmVal2 = rOrigin - vAbsolutePosition; 2445 Vector3 tmVal2 = rOrigin - vAbsolutePosition;
2517 Vector3 r2Direction = rDirection*2.0f; 2446 Vector3 r2Direction = rDirection*2.0f;
2518 Vector3 tmVal3 = r2Direction*tmVal2; 2447 Vector3 tmVal3 = r2Direction*tmVal2;
2519 2448
2520 float itestPart2 = tmVal3.x + tmVal3.y + tmVal3.z; 2449 float itestPart2 = tmVal3.X + tmVal3.Y + tmVal3.Z;
2521 2450
2522 // Buidling the third part of the Quadratic equation 2451 // Buidling the third part of the Quadratic equation
2523 Vector3 tmVal4 = rOrigin*rOrigin; 2452 Vector3 tmVal4 = rOrigin*rOrigin;
@@ -2528,12 +2457,12 @@ namespace OpenSim.Region.Environment.Scenes
2528 2457
2529 // Set Radius to the largest dimention of the prim 2458 // Set Radius to the largest dimention of the prim
2530 float radius = 0f; 2459 float radius = 0f;
2531 if (vScale.x > radius) 2460 if (vScale.X > radius)
2532 radius = vScale.x; 2461 radius = vScale.X;
2533 if (vScale.y > radius) 2462 if (vScale.Y > radius)
2534 radius = vScale.y; 2463 radius = vScale.Y;
2535 if (vScale.z > radius) 2464 if (vScale.Z > radius)
2536 radius = vScale.z; 2465 radius = vScale.Z;
2537 2466
2538 // the second part of this is the default prim size 2467 // the second part of this is the default prim size
2539 // once we factor in the aabb of the prim we're adding we can 2468 // once we factor in the aabb of the prim we're adding we can
@@ -2544,8 +2473,8 @@ namespace OpenSim.Region.Environment.Scenes
2544 2473
2545 //radius = radius; 2474 //radius = radius;
2546 2475
2547 float itestPart3 = tmVal4.x + tmVal4.y + tmVal4.z + tmVal5.x + tmVal5.y + tmVal5.z - 2476 float itestPart3 = tmVal4.X + tmVal4.Y + tmVal4.Z + tmVal5.X + tmVal5.Y + tmVal5.Z -
2548 (2.0f*(tmVal6.x + tmVal6.y + tmVal6.z + (radius*radius))); 2477 (2.0f*(tmVal6.X + tmVal6.Y + tmVal6.Z + (radius*radius)));
2549 2478
2550 // Yuk Quadradrics.. Solve first 2479 // Yuk Quadradrics.. Solve first
2551 float rootsqr = (itestPart2*itestPart2) - (4.0f*itestPart1*itestPart3); 2480 float rootsqr = (itestPart2*itestPart2) - (4.0f*itestPart1*itestPart3);
@@ -2572,21 +2501,21 @@ namespace OpenSim.Region.Environment.Scenes
2572 // We got an intersection. putting together an EntityIntersection object with the 2501 // We got an intersection. putting together an EntityIntersection object with the
2573 // intersection information 2502 // intersection information
2574 Vector3 ipoint = 2503 Vector3 ipoint =
2575 new Vector3(iray.Origin.x + (iray.Direction.x*root), iray.Origin.y + (iray.Direction.y*root), 2504 new Vector3(iray.Origin.X + (iray.Direction.X*root), iray.Origin.Y + (iray.Direction.Y*root),
2576 iray.Origin.z + (iray.Direction.z*root)); 2505 iray.Origin.Z + (iray.Direction.Z*root));
2577 2506
2578 returnresult.HitTF = true; 2507 returnresult.HitTF = true;
2579 returnresult.ipoint = ipoint; 2508 returnresult.ipoint = ipoint;
2580 2509
2581 // Normal is calculated by the difference and then normalizing the result 2510 // Normal is calculated by the difference and then normalizing the result
2582 Vector3 normalpart = ipoint - vAbsolutePosition; 2511 Vector3 normalpart = ipoint - vAbsolutePosition;
2583 returnresult.normal = normalpart / normalpart.Length; 2512 returnresult.normal = normalpart / normalpart.Length();
2584 2513
2585 // It's funny how the LLVector3 object has a Distance function, but the Axiom.Math object doesn't. 2514 // It's funny how the Vector3 object has a Distance function, but the Axiom.Math object doesn't.
2586 // I can write a function to do it.. but I like the fact that this one is Static. 2515 // I can write a function to do it.. but I like the fact that this one is Static.
2587 2516
2588 LLVector3 distanceConvert1 = new LLVector3(iray.Origin.x, iray.Origin.y, iray.Origin.z); 2517 Vector3 distanceConvert1 = new Vector3(iray.Origin.X, iray.Origin.Y, iray.Origin.Z);
2589 LLVector3 distanceConvert2 = new LLVector3(ipoint.x, ipoint.y, ipoint.z); 2518 Vector3 distanceConvert2 = new Vector3(ipoint.X, ipoint.Y, ipoint.Z);
2590 float distance = (float) Util.GetDistanceTo(distanceConvert1, distanceConvert2); 2519 float distance = (float) Util.GetDistanceTo(distanceConvert1, distanceConvert2);
2591 2520
2592 returnresult.distance = distance; 2521 returnresult.distance = distance;
@@ -2621,21 +2550,21 @@ namespace OpenSim.Region.Environment.Scenes
2621 Vector3 AmBb = new Vector3(0, 0, 0); // Vertex B - Vertex C 2550 Vector3 AmBb = new Vector3(0, 0, 0); // Vertex B - Vertex C
2622 Vector3 cross = new Vector3(); 2551 Vector3 cross = new Vector3();
2623 2552
2624 LLVector3 pos = GetWorldPosition(); 2553 Vector3 pos = GetWorldPosition();
2625 LLQuaternion rot = GetWorldRotation(); 2554 Quaternion rot = GetWorldRotation();
2626 2555
2627 // Variables prefixed with AX are Axiom.Math copies of the LL variety. 2556 // Variables prefixed with AX are Axiom.Math copies of the LL variety.
2628 2557
2629 Quaternion AXrot = new Quaternion(rot.W,rot.X,rot.Y,rot.Z); 2558 Quaternion AXrot = rot;
2630 AXrot.Normalize(); 2559 AXrot.Normalize();
2631 2560
2632 Vector3 AXpos = new Vector3(pos.X, pos.Y, pos.Z); 2561 Vector3 AXpos = pos;
2633 2562
2634 // tScale is the offset to derive the vertex based on the scale. 2563 // tScale is the offset to derive the vertex based on the scale.
2635 // it's different for each vertex because we've got to rotate it 2564 // it's different for each vertex because we've got to rotate it
2636 // to get the world position of the vertex to produce the Oriented Bounding Box 2565 // to get the world position of the vertex to produce the Oriented Bounding Box
2637 2566
2638 Vector3 tScale = new Vector3(); 2567 Vector3 tScale = Vector3.Zero;
2639 2568
2640 Vector3 AXscale = new Vector3(m_shape.Scale.X * 0.5f, m_shape.Scale.Y * 0.5f, m_shape.Scale.Z * 0.5f); 2569 Vector3 AXscale = new Vector3(m_shape.Scale.X * 0.5f, m_shape.Scale.Y * 0.5f, m_shape.Scale.Z * 0.5f);
2641 2570
@@ -2680,97 +2609,97 @@ namespace OpenSim.Region.Environment.Scenes
2680 #endregion 2609 #endregion
2681 2610
2682 #region Plane Decomposition of Oriented Bounding Box 2611 #region Plane Decomposition of Oriented Bounding Box
2683 tScale = new Vector3(AXscale.x, -AXscale.y, AXscale.z); 2612 tScale = new Vector3(AXscale.X, -AXscale.Y, AXscale.Z);
2684 rScale = ((AXrot * tScale)); 2613 rScale = tScale * AXrot;
2685 vertexes[0] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2614 vertexes[0] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2686 // vertexes[0].x = pos.X + vertexes[0].x; 2615 // vertexes[0].X = pos.X + vertexes[0].X;
2687 //vertexes[0].y = pos.Y + vertexes[0].y; 2616 //vertexes[0].Y = pos.Y + vertexes[0].Y;
2688 //vertexes[0].z = pos.Z + vertexes[0].z; 2617 //vertexes[0].Z = pos.Z + vertexes[0].Z;
2689 2618
2690 FaceA[0] = vertexes[0]; 2619 FaceA[0] = vertexes[0];
2691 FaceB[3] = vertexes[0]; 2620 FaceB[3] = vertexes[0];
2692 FaceA[4] = vertexes[0]; 2621 FaceA[4] = vertexes[0];
2693 2622
2694 tScale = AXscale; 2623 tScale = AXscale;
2695 rScale = ((AXrot * tScale)); 2624 rScale = tScale * AXrot;
2696 vertexes[1] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2625 vertexes[1] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2697 2626
2698 // vertexes[1].x = pos.X + vertexes[1].x; 2627 // vertexes[1].X = pos.X + vertexes[1].X;
2699 // vertexes[1].y = pos.Y + vertexes[1].y; 2628 // vertexes[1].Y = pos.Y + vertexes[1].Y;
2700 //vertexes[1].z = pos.Z + vertexes[1].z; 2629 //vertexes[1].Z = pos.Z + vertexes[1].Z;
2701 2630
2702 FaceB[0] = vertexes[1]; 2631 FaceB[0] = vertexes[1];
2703 FaceA[1] = vertexes[1]; 2632 FaceA[1] = vertexes[1];
2704 FaceC[4] = vertexes[1]; 2633 FaceC[4] = vertexes[1];
2705 2634
2706 tScale = new Vector3(AXscale.x, -AXscale.y, -AXscale.z); 2635 tScale = new Vector3(AXscale.X, -AXscale.Y, -AXscale.Z);
2707 rScale = ((AXrot * tScale)); 2636 rScale = tScale * AXrot;
2708 2637
2709 vertexes[2] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2638 vertexes[2] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2710 2639
2711 //vertexes[2].x = pos.X + vertexes[2].x; 2640 //vertexes[2].X = pos.X + vertexes[2].X;
2712 //vertexes[2].y = pos.Y + vertexes[2].y; 2641 //vertexes[2].Y = pos.Y + vertexes[2].Y;
2713 //vertexes[2].z = pos.Z + vertexes[2].z; 2642 //vertexes[2].Z = pos.Z + vertexes[2].Z;
2714 2643
2715 FaceC[0] = vertexes[2]; 2644 FaceC[0] = vertexes[2];
2716 FaceD[3] = vertexes[2]; 2645 FaceD[3] = vertexes[2];
2717 FaceC[5] = vertexes[2]; 2646 FaceC[5] = vertexes[2];
2718 2647
2719 tScale = new Vector3(AXscale.x, AXscale.y, -AXscale.z); 2648 tScale = new Vector3(AXscale.X, AXscale.Y, -AXscale.Z);
2720 rScale = ((AXrot * tScale)); 2649 rScale = tScale * AXrot;
2721 vertexes[3] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2650 vertexes[3] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2722 2651
2723 //vertexes[3].x = pos.X + vertexes[3].x; 2652 //vertexes[3].X = pos.X + vertexes[3].X;
2724 // vertexes[3].y = pos.Y + vertexes[3].y; 2653 // vertexes[3].Y = pos.Y + vertexes[3].Y;
2725 // vertexes[3].z = pos.Z + vertexes[3].z; 2654 // vertexes[3].Z = pos.Z + vertexes[3].Z;
2726 2655
2727 FaceD[0] = vertexes[3]; 2656 FaceD[0] = vertexes[3];
2728 FaceC[1] = vertexes[3]; 2657 FaceC[1] = vertexes[3];
2729 FaceA[5] = vertexes[3]; 2658 FaceA[5] = vertexes[3];
2730 2659
2731 tScale = new Vector3(-AXscale.x, AXscale.y, AXscale.z); 2660 tScale = new Vector3(-AXscale.X, AXscale.Y, AXscale.Z);
2732 rScale = ((AXrot * tScale)); 2661 rScale = tScale * AXrot;
2733 vertexes[4] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2662 vertexes[4] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2734 2663
2735 // vertexes[4].x = pos.X + vertexes[4].x; 2664 // vertexes[4].X = pos.X + vertexes[4].X;
2736 // vertexes[4].y = pos.Y + vertexes[4].y; 2665 // vertexes[4].Y = pos.Y + vertexes[4].Y;
2737 // vertexes[4].z = pos.Z + vertexes[4].z; 2666 // vertexes[4].Z = pos.Z + vertexes[4].Z;
2738 2667
2739 FaceB[1] = vertexes[4]; 2668 FaceB[1] = vertexes[4];
2740 FaceA[2] = vertexes[4]; 2669 FaceA[2] = vertexes[4];
2741 FaceD[4] = vertexes[4]; 2670 FaceD[4] = vertexes[4];
2742 2671
2743 tScale = new Vector3(-AXscale.x, AXscale.y, -AXscale.z); 2672 tScale = new Vector3(-AXscale.X, AXscale.Y, -AXscale.Z);
2744 rScale = ((AXrot * tScale)); 2673 rScale = tScale * AXrot;
2745 vertexes[5] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2674 vertexes[5] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2746 2675
2747 // vertexes[5].x = pos.X + vertexes[5].x; 2676 // vertexes[5].X = pos.X + vertexes[5].X;
2748 // vertexes[5].y = pos.Y + vertexes[5].y; 2677 // vertexes[5].Y = pos.Y + vertexes[5].Y;
2749 // vertexes[5].z = pos.Z + vertexes[5].z; 2678 // vertexes[5].Z = pos.Z + vertexes[5].Z;
2750 2679
2751 FaceD[1] = vertexes[5]; 2680 FaceD[1] = vertexes[5];
2752 FaceC[2] = vertexes[5]; 2681 FaceC[2] = vertexes[5];
2753 FaceB[5] = vertexes[5]; 2682 FaceB[5] = vertexes[5];
2754 2683
2755 tScale = new Vector3(-AXscale.x, -AXscale.y, AXscale.z); 2684 tScale = new Vector3(-AXscale.X, -AXscale.Y, AXscale.Z);
2756 rScale = ((AXrot * tScale)); 2685 rScale = tScale * AXrot;
2757 vertexes[6] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2686 vertexes[6] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2758 2687
2759 // vertexes[6].x = pos.X + vertexes[6].x; 2688 // vertexes[6].X = pos.X + vertexes[6].X;
2760 // vertexes[6].y = pos.Y + vertexes[6].y; 2689 // vertexes[6].Y = pos.Y + vertexes[6].Y;
2761 // vertexes[6].z = pos.Z + vertexes[6].z; 2690 // vertexes[6].Z = pos.Z + vertexes[6].Z;
2762 2691
2763 FaceB[2] = vertexes[6]; 2692 FaceB[2] = vertexes[6];
2764 FaceA[3] = vertexes[6]; 2693 FaceA[3] = vertexes[6];
2765 FaceB[4] = vertexes[6]; 2694 FaceB[4] = vertexes[6];
2766 2695
2767 tScale = new Vector3(-AXscale.x, -AXscale.y, -AXscale.z); 2696 tScale = new Vector3(-AXscale.X, -AXscale.Y, -AXscale.Z);
2768 rScale = ((AXrot * tScale)); 2697 rScale = tScale * AXrot;
2769 vertexes[7] = (new Vector3((pos.X + rScale.x), (pos.Y + rScale.y), (pos.Z + rScale.z))); 2698 vertexes[7] = (new Vector3((pos.X + rScale.X), (pos.Y + rScale.Y), (pos.Z + rScale.Z)));
2770 2699
2771 // vertexes[7].x = pos.X + vertexes[7].x; 2700 // vertexes[7].X = pos.X + vertexes[7].X;
2772 // vertexes[7].y = pos.Y + vertexes[7].y; 2701 // vertexes[7].Y = pos.Y + vertexes[7].Y;
2773 // vertexes[7].z = pos.Z + vertexes[7].z; 2702 // vertexes[7].Z = pos.Z + vertexes[7].Z;
2774 2703
2775 FaceD[2] = vertexes[7]; 2704 FaceD[2] = vertexes[7];
2776 FaceC[3] = vertexes[7]; 2705 FaceC[3] = vertexes[7];
@@ -2786,13 +2715,13 @@ namespace OpenSim.Region.Environment.Scenes
2786 AmBa = FaceA[i] - FaceB[i]; 2715 AmBa = FaceA[i] - FaceB[i];
2787 AmBb = FaceB[i] - FaceC[i]; 2716 AmBb = FaceB[i] - FaceC[i];
2788 2717
2789 cross = AmBb.Cross(AmBa); 2718 cross = Vector3.Cross(AmBb, AmBa);
2790 2719
2791 // normalize the cross product to get the normal. 2720 // normalize the cross product to get the normal.
2792 normals[i] = cross / cross.Length; 2721 normals[i] = cross / cross.Length();
2793 2722
2794 //m_log.Info("[NORMALS]: normals[ " + i + "]" + normals[i].ToString()); 2723 //m_log.Info("[NORMALS]: normals[ " + i + "]" + normals[i].ToString());
2795 //distance[i] = (normals[i].x * AmBa.x + normals[i].y * AmBa.y + normals[i].z * AmBa.z) * -1; 2724 //distance[i] = (normals[i].X * AmBa.X + normals[i].Y * AmBa.Y + normals[i].Z * AmBa.Z) * -1;
2796 } 2725 }
2797 2726
2798 EntityIntersection returnresult = new EntityIntersection(); 2727 EntityIntersection returnresult = new EntityIntersection();
@@ -2862,7 +2791,7 @@ namespace OpenSim.Region.Environment.Scenes
2862 { 2791 {
2863 AmBa = FaceA[i] - FaceB[i]; 2792 AmBa = FaceA[i] - FaceB[i];
2864 AmBb = FaceB[i] - FaceC[i]; 2793 AmBb = FaceB[i] - FaceC[i];
2865 d = normals[i].Dot(FaceB[i]); 2794 d = Vector3.Dot(normals[i], FaceB[i]);
2866 2795
2867 //if (faceCenters) 2796 //if (faceCenters)
2868 //{ 2797 //{
@@ -2870,30 +2799,26 @@ namespace OpenSim.Region.Environment.Scenes
2870 //} 2799 //}
2871 //else 2800 //else
2872 //{ 2801 //{
2873 c = iray.Direction.Dot(normals[i]); 2802 c = Vector3.Dot(iray.Direction, normals[i]);
2874 //} 2803 //}
2875 if (c == 0) 2804 if (c == 0)
2876 continue; 2805 continue;
2877 2806
2878 a = (d - iray.Origin.Dot(normals[i])) / c; 2807 a = (d - Vector3.Dot(iray.Origin, normals[i])) / c;
2879 2808
2880 if (a < 0) 2809 if (a < 0)
2881 continue; 2810 continue;
2882 2811
2883 // If the normal is pointing outside the object 2812 // If the normal is pointing outside the object
2884 2813 if (Vector3.Dot(iray.Direction, normals[i]) < 0 || !frontFacesOnly)
2885
2886
2887 if (iray.Direction.Dot(normals[i]) < 0 || !frontFacesOnly)
2888 { 2814 {
2889
2890 //if (faceCenters) 2815 //if (faceCenters)
2891 //{ //(FaceA[i] + FaceB[i] + FaceC[1] + FaceD[i]) / 4f; 2816 //{ //(FaceA[i] + FaceB[i] + FaceC[1] + FaceD[i]) / 4f;
2892 // q = iray.Origin + a * normals[i]; 2817 // q = iray.Origin + a * normals[i];
2893 //} 2818 //}
2894 //else 2819 //else
2895 //{ 2820 //{
2896 q = iray.Origin + a * iray.Direction; 2821 q = iray.Origin + iray.Direction * a;
2897 //} 2822 //}
2898 2823
2899 float distance2 = (float)GetDistanceTo(q, AXpos); 2824 float distance2 = (float)GetDistanceTo(q, AXpos);
@@ -2913,13 +2838,13 @@ namespace OpenSim.Region.Environment.Scenes
2913 //m_log.Info("[DIST]: " + distance2.ToString()); 2838 //m_log.Info("[DIST]: " + distance2.ToString());
2914 if (faceCenters) 2839 if (faceCenters)
2915 { 2840 {
2916 returnresult.normal = (AXrot * AAfacenormals[i]); 2841 returnresult.normal = AAfacenormals[i] * AXrot;
2917 2842
2918 Vector3 scaleComponent = AAfacenormals[i]; 2843 Vector3 scaleComponent = AAfacenormals[i];
2919 float ScaleOffset = 0.5f; 2844 float ScaleOffset = 0.5f;
2920 if (scaleComponent.x != 0) ScaleOffset = AXscale.x; 2845 if (scaleComponent.X != 0) ScaleOffset = AXscale.X;
2921 if (scaleComponent.y != 0) ScaleOffset = AXscale.y; 2846 if (scaleComponent.Y != 0) ScaleOffset = AXscale.Y;
2922 if (scaleComponent.z != 0) ScaleOffset = AXscale.z; 2847 if (scaleComponent.Z != 0) ScaleOffset = AXscale.Z;
2923 ScaleOffset = Math.Abs(ScaleOffset); 2848 ScaleOffset = Math.Abs(ScaleOffset);
2924 Vector3 offset = returnresult.normal * ScaleOffset; 2849 Vector3 offset = returnresult.normal * ScaleOffset;
2925 returnresult.ipoint = AXpos + offset; 2850 returnresult.ipoint = AXpos + offset;
@@ -2984,7 +2909,7 @@ namespace OpenSim.Region.Environment.Scenes
2984 2909
2985 if (type == 0x30) 2910 if (type == 0x30)
2986 { 2911 {
2987 if (m_shape.SculptEntry && m_shape.SculptTexture != LLUUID.Zero) 2912 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
2988 { 2913 {
2989 //AssetBase tx = m_parentGroup.Scene.getase 2914 //AssetBase tx = m_parentGroup.Scene.getase
2990 m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true); 2915 m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true);
@@ -2995,13 +2920,13 @@ namespace OpenSim.Region.Environment.Scenes
2995 ScheduleFullUpdate(); 2920 ScheduleFullUpdate();
2996 } 2921 }
2997 2922
2998 public void UpdateGroupPosition(LLVector3 pos) 2923 public void UpdateGroupPosition(Vector3 pos)
2999 { 2924 {
3000 if ((pos.X != GroupPosition.X) || 2925 if ((pos.X != GroupPosition.X) ||
3001 (pos.Y != GroupPosition.Y) || 2926 (pos.Y != GroupPosition.Y) ||
3002 (pos.Z != GroupPosition.Z)) 2927 (pos.Z != GroupPosition.Z))
3003 { 2928 {
3004 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 2929 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
3005 GroupPosition = newPos; 2930 GroupPosition = newPos;
3006 ScheduleTerseUpdate(); 2931 ScheduleTerseUpdate();
3007 } 2932 }
@@ -3015,19 +2940,19 @@ namespace OpenSim.Region.Environment.Scenes
3015 /// 2940 ///
3016 /// </summary> 2941 /// </summary>
3017 /// <param name="pos"></param> 2942 /// <param name="pos"></param>
3018 public void UpdateOffSet(LLVector3 pos) 2943 public void UpdateOffSet(Vector3 pos)
3019 { 2944 {
3020 if ((pos.X != OffsetPosition.X) || 2945 if ((pos.X != OffsetPosition.X) ||
3021 (pos.Y != OffsetPosition.Y) || 2946 (pos.Y != OffsetPosition.Y) ||
3022 (pos.Z != OffsetPosition.Z)) 2947 (pos.Z != OffsetPosition.Z))
3023 { 2948 {
3024 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 2949 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
3025 OffsetPosition = newPos; 2950 OffsetPosition = newPos;
3026 ScheduleTerseUpdate(); 2951 ScheduleTerseUpdate();
3027 } 2952 }
3028 } 2953 }
3029 2954
3030 public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF) 2955 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
3031 { 2956 {
3032 bool set = addRemTF == 1; 2957 bool set = addRemTF == 1;
3033 2958
@@ -3069,7 +2994,7 @@ namespace OpenSim.Region.Environment.Scenes
3069 bool IsTemporary = false; 2994 bool IsTemporary = false;
3070 bool IsPhantom = false; 2995 bool IsPhantom = false;
3071 // bool castsShadows = false; 2996 // bool castsShadows = false;
3072 bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); 2997 bool wasUsingPhysics = ((ObjectFlags & (uint) PrimFlags.Physics) != 0);
3073 //bool IsLocked = false; 2998 //bool IsLocked = false;
3074 int i = 0; 2999 int i = 0;
3075 3000
@@ -3091,7 +3016,7 @@ namespace OpenSim.Region.Environment.Scenes
3091 3016
3092 if (usePhysics) 3017 if (usePhysics)
3093 { 3018 {
3094 AddFlag(LLObject.ObjectFlags.Physics); 3019 AddFlag(PrimFlags.Physics);
3095 if (!wasUsingPhysics) 3020 if (!wasUsingPhysics)
3096 { 3021 {
3097 DoPhysicsPropertyUpdate(usePhysics, false); 3022 DoPhysicsPropertyUpdate(usePhysics, false);
@@ -3109,7 +3034,7 @@ namespace OpenSim.Region.Environment.Scenes
3109 } 3034 }
3110 else 3035 else
3111 { 3036 {
3112 RemFlag(LLObject.ObjectFlags.Physics); 3037 RemFlag(PrimFlags.Physics);
3113 if (wasUsingPhysics) 3038 if (wasUsingPhysics)
3114 { 3039 {
3115 DoPhysicsPropertyUpdate(usePhysics, false); 3040 DoPhysicsPropertyUpdate(usePhysics, false);
@@ -3118,7 +3043,7 @@ namespace OpenSim.Region.Environment.Scenes
3118 3043
3119 if (IsPhantom) 3044 if (IsPhantom)
3120 { 3045 {
3121 AddFlag(LLObject.ObjectFlags.Phantom); 3046 AddFlag(PrimFlags.Phantom);
3122 if (PhysActor != null) 3047 if (PhysActor != null)
3123 { 3048 {
3124 m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); 3049 m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor);
@@ -3128,17 +3053,16 @@ namespace OpenSim.Region.Environment.Scenes
3128 } 3053 }
3129 else 3054 else
3130 { 3055 {
3131 RemFlag(LLObject.ObjectFlags.Phantom); 3056 RemFlag(PrimFlags.Phantom);
3132 if (PhysActor == null) 3057 if (PhysActor == null)
3133 { 3058 {
3134 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 3059 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
3135 Name, 3060 Name,
3136 Shape, 3061 Shape,
3137 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, 3062 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z),
3138 AbsolutePosition.Z),
3139 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 3063 new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
3140 new Quaternion(RotationOffset.W, RotationOffset.X, 3064 RotationOffset,
3141 RotationOffset.Y, RotationOffset.Z), usePhysics); 3065 usePhysics);
3142 3066
3143 if (PhysActor != null) 3067 if (PhysActor != null)
3144 { 3068 {
@@ -3175,17 +3099,17 @@ namespace OpenSim.Region.Environment.Scenes
3175 3099
3176 if (IsTemporary) 3100 if (IsTemporary)
3177 { 3101 {
3178 AddFlag(LLObject.ObjectFlags.TemporaryOnRez); 3102 AddFlag(PrimFlags.TemporaryOnRez);
3179 } 3103 }
3180 else 3104 else
3181 { 3105 {
3182 RemFlag(LLObject.ObjectFlags.TemporaryOnRez); 3106 RemFlag(PrimFlags.TemporaryOnRez);
3183 } 3107 }
3184 // System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString()); 3108 // System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
3185 ScheduleFullUpdate(); 3109 ScheduleFullUpdate();
3186 } 3110 }
3187 3111
3188 public void UpdateRotation(LLQuaternion rot) 3112 public void UpdateRotation(Quaternion rot)
3189 { 3113 {
3190 if ((rot.X != RotationOffset.X) || 3114 if ((rot.X != RotationOffset.X) ||
3191 (rot.Y != RotationOffset.Y) || 3115 (rot.Y != RotationOffset.Y) ||
@@ -3193,7 +3117,7 @@ namespace OpenSim.Region.Environment.Scenes
3193 (rot.W != RotationOffset.W)) 3117 (rot.W != RotationOffset.W))
3194 { 3118 {
3195 //StoreUndoState(); 3119 //StoreUndoState();
3196 RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); 3120 RotationOffset = rot;
3197 ParentGroup.HasGroupChanged = true; 3121 ParentGroup.HasGroupChanged = true;
3198 ScheduleTerseUpdate(); 3122 ScheduleTerseUpdate();
3199 } 3123 }
@@ -3235,9 +3159,9 @@ namespace OpenSim.Region.Environment.Scenes
3235 // Added to handle bug in libsecondlife's TextureEntry.ToBytes() 3159 // Added to handle bug in libsecondlife's TextureEntry.ToBytes()
3236 // not handling RGBA properly. Cycles through, and "fixes" the color 3160 // not handling RGBA properly. Cycles through, and "fixes" the color
3237 // info 3161 // info
3238 public void UpdateTexture(LLObject.TextureEntry tex) 3162 public void UpdateTexture(Primitive.TextureEntry tex)
3239 { 3163 {
3240 //LLColor tmpcolor; 3164 //Color4 tmpcolor;
3241 //for (uint i = 0; i < 32; i++) 3165 //for (uint i = 0; i < 32; i++)
3242 //{ 3166 //{
3243 // if (tex.FaceTextures[i] != null) 3167 // if (tex.FaceTextures[i] != null)
@@ -3291,17 +3215,17 @@ namespace OpenSim.Region.Environment.Scenes
3291 ((AggregateScriptEvents & scriptEvents.touch_start) != 0) 3215 ((AggregateScriptEvents & scriptEvents.touch_start) != 0)
3292 ) 3216 )
3293 { 3217 {
3294 objectflagupdate |= (uint) LLObject.ObjectFlags.Touch; 3218 objectflagupdate |= (uint) PrimFlags.Touch;
3295 } 3219 }
3296 3220
3297 if ((AggregateScriptEvents & scriptEvents.money) != 0) 3221 if ((AggregateScriptEvents & scriptEvents.money) != 0)
3298 { 3222 {
3299 objectflagupdate |= (uint) LLObject.ObjectFlags.Money; 3223 objectflagupdate |= (uint) PrimFlags.Money;
3300 } 3224 }
3301 3225
3302 if (AllowedDrop) 3226 if (AllowedDrop)
3303 { 3227 {
3304 objectflagupdate |= (uint) LLObject.ObjectFlags.AllowInventoryDrop; 3228 objectflagupdate |= (uint) PrimFlags.AllowInventoryDrop;
3305 } 3229 }
3306 3230
3307 if ( 3231 if (
@@ -3326,7 +3250,7 @@ namespace OpenSim.Region.Environment.Scenes
3326 PhysActor.OnCollisionUpdate -= PhysicsCollision; 3250 PhysActor.OnCollisionUpdate -= PhysicsCollision;
3327 } 3251 }
3328 } 3252 }
3329 if ((GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Scripted) != 0) 3253 if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
3330 { 3254 {
3331 m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting; 3255 m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting;
3332 } 3256 }
@@ -3335,7 +3259,7 @@ namespace OpenSim.Region.Environment.Scenes
3335 m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting; 3259 m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting;
3336 } 3260 }
3337 3261
3338 LocalFlags=(LLObject.ObjectFlags)objectflagupdate; 3262 LocalFlags=(PrimFlags)objectflagupdate;
3339 3263
3340 if (m_parentGroup != null && m_parentGroup.RootPart == this) 3264 if (m_parentGroup != null && m_parentGroup.RootPart == this)
3341 m_parentGroup.aggregateScriptEvents(); 3265 m_parentGroup.aggregateScriptEvents();
@@ -3343,7 +3267,7 @@ namespace OpenSim.Region.Environment.Scenes
3343 ScheduleFullUpdate(); 3267 ScheduleFullUpdate();
3344 } 3268 }
3345 3269
3346 public int registerTargetWaypoint(LLVector3 target, float tolerance) 3270 public int registerTargetWaypoint(Vector3 target, float tolerance)
3347 { 3271 {
3348 if (m_parentGroup != null) 3272 if (m_parentGroup != null)
3349 { 3273 {
@@ -3360,11 +3284,11 @@ namespace OpenSim.Region.Environment.Scenes
3360 } 3284 }
3361 } 3285 }
3362 3286
3363 public void SetCameraAtOffset(LLVector3 v) { 3287 public void SetCameraAtOffset(Vector3 v) {
3364 m_cameraAtOffset = v; 3288 m_cameraAtOffset = v;
3365 } 3289 }
3366 3290
3367 public void SetCameraEyeOffset(LLVector3 v) { 3291 public void SetCameraEyeOffset(Vector3 v) {
3368 m_cameraEyeOffset = v; 3292 m_cameraEyeOffset = v;
3369 } 3293 }
3370 3294
@@ -3372,11 +3296,11 @@ namespace OpenSim.Region.Environment.Scenes
3372 m_forceMouselook = force; 3296 m_forceMouselook = force;
3373 } 3297 }
3374 3298
3375 public LLVector3 GetCameraAtOffset() { 3299 public Vector3 GetCameraAtOffset() {
3376 return m_cameraAtOffset; 3300 return m_cameraAtOffset;
3377 } 3301 }
3378 3302
3379 public LLVector3 GetCameraEyeOffset() { 3303 public Vector3 GetCameraEyeOffset() {
3380 return m_cameraEyeOffset; 3304 return m_cameraEyeOffset;
3381 } 3305 }
3382 3306
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 1694613..e51f1be 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -30,9 +30,8 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Runtime.Serialization; 31using System.Runtime.Serialization;
32using System.Security.Permissions; 32using System.Security.Permissions;
33using Axiom.Math; 33using OpenMetaverse;
34using libsecondlife; 34using OpenMetaverse.Packets;
35using libsecondlife.Packets;
36using log4net; 35using log4net;
37using OpenSim.Framework; 36using OpenSim.Framework;
38using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
@@ -60,7 +59,7 @@ namespace OpenSim.Region.Environment.Scenes
60 59
61 struct ScriptControllers 60 struct ScriptControllers
62 { 61 {
63 public LLUUID itemID; 62 public UUID itemID;
64 public uint objID; 63 public uint objID;
65 public ScriptControlled ignoreControls; 64 public ScriptControlled ignoreControls;
66 public ScriptControlled eventControls; 65 public ScriptControlled eventControls;
@@ -78,9 +77,9 @@ namespace OpenSim.Region.Environment.Scenes
78 77
79 public static byte[] DefaultTexture; 78 public static byte[] DefaultTexture;
80 79
81 public LLUUID currentParcelUUID = LLUUID.Zero; 80 public UUID currentParcelUUID = UUID.Zero;
82 private AnimationSet m_animations = new AnimationSet(); 81 private AnimationSet m_animations = new AnimationSet();
83 private Dictionary<LLUUID, ScriptControllers> scriptedcontrols = new Dictionary<LLUUID, ScriptControllers>(); 82 private Dictionary<UUID, ScriptControllers> scriptedcontrols = new Dictionary<UUID, ScriptControllers>();
84 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO; 83 private ScriptControlled IgnoredControls = ScriptControlled.CONTROL_ZERO;
85 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO; 84 private ScriptControlled LastCommands = ScriptControlled.CONTROL_ZERO;
86 private SceneObjectGroup proxyObjectGroup = null; 85 private SceneObjectGroup proxyObjectGroup = null;
@@ -94,11 +93,11 @@ namespace OpenSim.Region.Environment.Scenes
94 private readonly List<NewForce> m_forcesList = new List<NewForce>(); 93 private readonly List<NewForce> m_forcesList = new List<NewForce>();
95 private short m_updateCount = 0; 94 private short m_updateCount = 0;
96 private uint m_requestedSitTargetID = 0; 95 private uint m_requestedSitTargetID = 0;
97 private LLUUID m_requestedSitTargetUUID = LLUUID.Zero; 96 private UUID m_requestedSitTargetUUID = UUID.Zero;
98 97
99 private LLVector3 m_requestedSitOffset = new LLVector3(); 98 private Vector3 m_requestedSitOffset = new Vector3();
100 99
101 private LLVector3 m_LastFinitePos = new LLVector3(); 100 private Vector3 m_LastFinitePos = new Vector3();
102 101
103 private float m_sitAvatarHeight = 2.0f; 102 private float m_sitAvatarHeight = 2.0f;
104 103
@@ -108,14 +107,14 @@ namespace OpenSim.Region.Environment.Scenes
108 // with varying parameters for sit target location, prim size, prim 107 // with varying parameters for sit target location, prim size, prim
109 // rotation, prim cut, prim twist, prim taper, and prim shear. See mantis 108 // rotation, prim cut, prim twist, prim taper, and prim shear. See mantis
110 // issue #1716 109 // issue #1716
111 private static readonly LLVector3 m_sitTargetCorrectionOffset = new LLVector3(0.1f, 0.0f, 0.3f); 110 private static readonly Vector3 m_sitTargetCorrectionOffset = new Vector3(0.1f, 0.0f, 0.3f);
112 private float m_godlevel = 0; 111 private float m_godlevel = 0;
113 112
114 private bool m_attachmentsTransported = false; 113 private bool m_attachmentsTransported = false;
115 114
116 private bool m_invulnerable = true; 115 private bool m_invulnerable = true;
117 116
118 private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); 117 private Vector3 m_LastChildAgentUpdatePosition = new Vector3();
119 118
120 private int m_perfMonMS = 0; 119 private int m_perfMonMS = 0;
121 120
@@ -132,7 +131,7 @@ namespace OpenSim.Region.Environment.Scenes
132 private bool m_newCoarseLocations = true; 131 private bool m_newCoarseLocations = true;
133 private float m_health = 100f; 132 private float m_health = 100f;
134 133
135 private LLVector3 m_lastVelocity = LLVector3.Zero; 134 private Vector3 m_lastVelocity = Vector3.Zero;
136 135
137 // Default AV Height 136 // Default AV Height
138 private float m_avHeight = 127.0f; 137 private float m_avHeight = 127.0f;
@@ -141,25 +140,25 @@ namespace OpenSim.Region.Environment.Scenes
141 protected ulong crossingFromRegion = 0; 140 protected ulong crossingFromRegion = 0;
142 141
143 private readonly Vector3[] Dir_Vectors = new Vector3[6]; 142 private readonly Vector3[] Dir_Vectors = new Vector3[6];
144 private LLVector3 lastPhysPos = new LLVector3(); 143 private Vector3 lastPhysPos = Vector3.Zero;
145 144
146 // Position of agent's camera in world (region cordinates) 145 // Position of agent's camera in world (region cordinates)
147 protected Vector3 m_CameraCenter = new Vector3(0, 0, 0); 146 protected Vector3 m_CameraCenter = Vector3.Zero;
148 147
149 // Use these three vectors to figure out what the agent is looking at 148 // Use these three vectors to figure out what the agent is looking at
150 // Convert it to a Matrix and/or Quaternion 149 // Convert it to a Matrix and/or Quaternion
151 protected Vector3 m_CameraAtAxis = new Vector3(0, 0, 0); 150 protected Vector3 m_CameraAtAxis = Vector3.Zero;
152 protected Vector3 m_CameraLeftAxis = new Vector3(0, 0, 0); 151 protected Vector3 m_CameraLeftAxis = Vector3.Zero;
153 protected Vector3 m_CameraUpAxis = new Vector3(0, 0, 0); 152 protected Vector3 m_CameraUpAxis = Vector3.Zero;
154 private uint m_AgentControlFlags = (uint) 0; 153 private uint m_AgentControlFlags = 0;
155 private LLQuaternion m_headrotation = new LLQuaternion(); 154 private Quaternion m_headrotation = Quaternion.Identity;
156 private byte m_state = (byte) 0; 155 private byte m_state = 0;
157 156
158 //Reuse the LLVector3 instead of creating a new one on the UpdateMovement method 157 //Reuse the Vector3 instead of creating a new one on the UpdateMovement method
159 private LLVector3 movementvector = new LLVector3(); 158 private Vector3 movementvector = Vector3.Zero;
160 159
161 private bool m_autopilotMoving = false; 160 private bool m_autopilotMoving = false;
162 private LLVector3 m_autoPilotTarget = LLVector3.Zero; 161 private Vector3 m_autoPilotTarget = Vector3.Zero;
163 private bool m_sitAtAutoTarget = false; 162 private bool m_sitAtAutoTarget = false;
164 163
165 // Agent's Draw distance. 164 // Agent's Draw distance.
@@ -189,12 +188,12 @@ namespace OpenSim.Region.Environment.Scenes
189 /// <summary> 188 /// <summary>
190 /// Position at which a significant movement was made 189 /// Position at which a significant movement was made
191 /// </summary> 190 /// </summary>
192 private LLVector3 posLastSignificantMove = new LLVector3(); 191 private Vector3 posLastSignificantMove = new Vector3();
193 192
194 private UpdateQueue m_partsUpdateQueue = new UpdateQueue(); 193 private UpdateQueue m_partsUpdateQueue = new UpdateQueue();
195 private Queue<SceneObjectGroup> m_pendingObjects = null; 194 private Queue<SceneObjectGroup> m_pendingObjects = null;
196 195
197 private Dictionary<LLUUID, ScenePartUpdate> m_updateTimes = new Dictionary<LLUUID, ScenePartUpdate>(); 196 private Dictionary<UUID, ScenePartUpdate> m_updateTimes = new Dictionary<UUID, ScenePartUpdate>();
198 197
199 #region Properties 198 #region Properties
200 199
@@ -282,12 +281,12 @@ namespace OpenSim.Region.Environment.Scenes
282 set { m_controllingClient = value; } 281 set { m_controllingClient = value; }
283 } 282 }
284 283
285 protected LLVector3 m_parentPosition = new LLVector3(); 284 protected Vector3 m_parentPosition = new Vector3();
286 285
287 /// <summary> 286 /// <summary>
288 /// Absolute position of this avatar in 'region cordinates' 287 /// Absolute position of this avatar in 'region cordinates'
289 /// </summary> 288 /// </summary>
290 public override LLVector3 AbsolutePosition 289 public override Vector3 AbsolutePosition
291 { 290 {
292 get 291 get
293 { 292 {
@@ -318,14 +317,14 @@ namespace OpenSim.Region.Environment.Scenes
318 } 317 }
319 318
320 m_pos = value; 319 m_pos = value;
321 m_parentPosition=new LLVector3(0, 0, 0); 320 m_parentPosition=new Vector3(0, 0, 0);
322 } 321 }
323 } 322 }
324 323
325 /// <summary> 324 /// <summary>
326 /// Current Velocity of the avatar. 325 /// Current Velocity of the avatar.
327 /// </summary> 326 /// </summary>
328 public override LLVector3 Velocity 327 public override Vector3 Velocity
329 { 328 {
330 get 329 get
331 { 330 {
@@ -486,7 +485,7 @@ namespace OpenSim.Region.Environment.Scenes
486 // } 485 // }
487 } 486 }
488 487
489 public uint GenerateClientFlags(LLUUID ObjectID) 488 public uint GenerateClientFlags(UUID ObjectID)
490 { 489 {
491 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID); 490 return m_scene.ExternalChecks.ExternalChecksGenerateClientFlags(m_uuid, ObjectID);
492 } 491 }
@@ -609,7 +608,7 @@ namespace OpenSim.Region.Environment.Scenes
609 /// This is called when an agent teleports into a region, or if an 608 /// This is called when an agent teleports into a region, or if an
610 /// agent crosses into this region from a neighbor over the border 609 /// agent crosses into this region from a neighbor over the border
611 /// </summary> 610 /// </summary>
612 public void MakeRootAgent(LLVector3 pos, bool isFlying) 611 public void MakeRootAgent(Vector3 pos, bool isFlying)
613 { 612 {
614 m_scene.SetRootAgentScene(m_uuid); 613 m_scene.SetRootAgentScene(m_uuid);
615 614
@@ -625,7 +624,7 @@ namespace OpenSim.Region.Environment.Scenes
625 624
626 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0) 625 if (pos.X < 0 || pos.X > Constants.RegionSize || pos.Y < 0 || pos.Y > Constants.RegionSize || pos.Z < 0)
627 { 626 {
628 LLVector3 emergencyPos = new LLVector3(128, 128, 128); 627 Vector3 emergencyPos = new Vector3(128, 128, 128);
629 628
630 m_log.WarnFormat( 629 m_log.WarnFormat(
631 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", 630 "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
@@ -681,12 +680,12 @@ namespace OpenSim.Region.Environment.Scenes
681// "[SCENEPRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 680// "[SCENEPRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
682// Name, UUID, m_scene.RegionInfo.RegionName); 681// Name, UUID, m_scene.RegionInfo.RegionName);
683 682
684 Velocity = new LLVector3(0, 0, 0); 683 Velocity = new Vector3(0, 0, 0);
685 m_isChildAgent = true; 684 m_isChildAgent = true;
686 m_scene.SwapRootAgentCount(true); 685 m_scene.SwapRootAgentCount(true);
687 RemoveFromPhysicalScene(); 686 RemoveFromPhysicalScene();
688 m_scene.EventManager.TriggerOnMakeChildAgent(this); 687 m_scene.EventManager.TriggerOnMakeChildAgent(this);
689 //this.Pos = new LLVector3(128, 128, 70); 688 //this.Pos = new Vector3(128, 128, 70);
690 } 689 }
691 690
692 /// <summary> 691 /// <summary>
@@ -708,10 +707,10 @@ namespace OpenSim.Region.Environment.Scenes
708 /// 707 ///
709 /// </summary> 708 /// </summary>
710 /// <param name="pos"></param> 709 /// <param name="pos"></param>
711 public void Teleport(LLVector3 pos) 710 public void Teleport(Vector3 pos)
712 { 711 {
713 RemoveFromPhysicalScene(); 712 RemoveFromPhysicalScene();
714 Velocity = new LLVector3(0, 0, 0); 713 Velocity = new Vector3(0, 0, 0);
715 AbsolutePosition = pos; 714 AbsolutePosition = pos;
716 AddToPhysicalScene(); 715 AddToPhysicalScene();
717 SendTerseUpdateToAllClients(); 716 SendTerseUpdateToAllClients();
@@ -735,11 +734,11 @@ namespace OpenSim.Region.Environment.Scenes
735 734
736 if (m_avHeight != 127.0f) 735 if (m_avHeight != 127.0f)
737 { 736 {
738 AbsolutePosition = AbsolutePosition + new LLVector3(0, 0, (m_avHeight / 6)); 737 AbsolutePosition = AbsolutePosition + new Vector3(0, 0, (m_avHeight / 6f));
739 } 738 }
740 else 739 else
741 { 740 {
742 AbsolutePosition = AbsolutePosition + new LLVector3(0, 0, (1.56f / 6)); 741 AbsolutePosition = AbsolutePosition + new Vector3(0, 0, (1.56f / 6f));
743 } 742 }
744 TrySetMovementAnimation("LAND"); 743 TrySetMovementAnimation("LAND");
745 SendFullUpdateToAllClients(); 744 SendFullUpdateToAllClients();
@@ -788,10 +787,10 @@ namespace OpenSim.Region.Environment.Scenes
788 /// </summary> 787 /// </summary>
789 public void CompleteMovement() 788 public void CompleteMovement()
790 { 789 {
791 LLVector3 look = Velocity; 790 Vector3 look = Velocity;
792 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 791 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
793 { 792 {
794 look = new LLVector3(0.99f, 0.042f, 0); 793 look = new Vector3(0.99f, 0.042f, 0);
795 } 794 }
796 795
797 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); 796 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
@@ -846,7 +845,7 @@ namespace OpenSim.Region.Environment.Scenes
846 //ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 845 //ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
847 //if (land != null) 846 //if (land != null)
848 //{ 847 //{
849 //if (land.landData.landingType == (byte)1 && land.landData.userLocation != LLVector3.Zero) 848 //if (land.landData.landingType == (byte)1 && land.landData.userLocation != Vector3.Zero)
850 //{ 849 //{
851 // agent.startpos = land.landData.userLocation; 850 // agent.startpos = land.landData.userLocation;
852 //} 851 //}
@@ -855,27 +854,17 @@ namespace OpenSim.Region.Environment.Scenes
855 m_perfMonMS = System.Environment.TickCount; 854 m_perfMonMS = System.Environment.TickCount;
856 855
857 uint flags = agentData.ControlFlags; 856 uint flags = agentData.ControlFlags;
858 LLQuaternion bodyRotation = agentData.BodyRotation; 857 Quaternion bodyRotation = agentData.BodyRotation;
859 858
860 // Camera location in world. We'll need to raytrace 859 // Camera location in world. We'll need to raytrace
861 // from this location from time to time. 860 // from this location from time to time.
862 m_CameraCenter.x = agentData.CameraCenter.X; 861 m_CameraCenter = agentData.CameraCenter;
863 m_CameraCenter.y = agentData.CameraCenter.Y;
864 m_CameraCenter.z = agentData.CameraCenter.Z;
865 862
866 // Use these three vectors to figure out what the agent is looking at 863 // Use these three vectors to figure out what the agent is looking at
867 // Convert it to a Matrix and/or Quaternion 864 // Convert it to a Matrix and/or Quaternion
868 m_CameraAtAxis.x = agentData.CameraAtAxis.X; 865 m_CameraAtAxis = agentData.CameraAtAxis;
869 m_CameraAtAxis.y = agentData.CameraAtAxis.Y; 866 m_CameraLeftAxis = agentData.CameraLeftAxis;
870 m_CameraAtAxis.z = agentData.CameraAtAxis.Z; 867 m_CameraUpAxis = agentData.CameraUpAxis;
871
872 m_CameraLeftAxis.x = agentData.CameraLeftAxis.X;
873 m_CameraLeftAxis.y = agentData.CameraLeftAxis.Y;
874 m_CameraLeftAxis.z = agentData.CameraLeftAxis.Z;
875
876 m_CameraUpAxis.x = agentData.CameraUpAxis.X;
877 m_CameraUpAxis.y = agentData.CameraUpAxis.Y;
878 m_CameraUpAxis.z = agentData.CameraUpAxis.Z;
879 868
880 // The Agent's Draw distance setting 869 // The Agent's Draw distance setting
881 m_DrawDistance = agentData.Far; 870 m_DrawDistance = agentData.Far;
@@ -923,7 +912,7 @@ namespace OpenSim.Region.Environment.Scenes
923 bool update_rotation = false; 912 bool update_rotation = false;
924 bool DCFlagKeyPressed = false; 913 bool DCFlagKeyPressed = false;
925 Vector3 agent_control_v3 = new Vector3(0, 0, 0); 914 Vector3 agent_control_v3 = new Vector3(0, 0, 0);
926 Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 915 Quaternion q = bodyRotation;
927 if (PhysicsActor != null) 916 if (PhysicsActor != null)
928 { 917 {
929 bool oldflying = PhysicsActor.Flying; 918 bool oldflying = PhysicsActor.Flying;
@@ -1005,7 +994,7 @@ namespace OpenSim.Region.Environment.Scenes
1005 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 994 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1006 } 995 }
1007 996
1008 public void DoAutoPilot(uint not_used, LLVector3 Pos, IClientAPI remote_client) 997 public void DoAutoPilot(uint not_used, Vector3 Pos, IClientAPI remote_client)
1009 { 998 {
1010 m_autopilotMoving = true; 999 m_autopilotMoving = true;
1011 m_autoPilotTarget = Pos; 1000 m_autoPilotTarget = Pos;
@@ -1014,17 +1003,17 @@ namespace OpenSim.Region.Environment.Scenes
1014 //proxy.PCode = (byte)PCode.ParticleSystem; 1003 //proxy.PCode = (byte)PCode.ParticleSystem;
1015 uint nextUUID = m_scene.NextLocalId; 1004 uint nextUUID = m_scene.NextLocalId;
1016 1005
1017 proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, new LLQuaternion(Rotation.x, Rotation.y, Rotation.z, Rotation.w), proxy); 1006 proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, Rotation, proxy);
1018 if (proxyObjectGroup != null) 1007 if (proxyObjectGroup != null)
1019 { 1008 {
1020 proxyObjectGroup.SendGroupFullUpdate(); 1009 proxyObjectGroup.SendGroupFullUpdate();
1021 remote_client.SendSitResponse(proxyObjectGroup.UUID, LLVector3.Zero, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false); 1010 remote_client.SendSitResponse(proxyObjectGroup.UUID, Vector3.Zero, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false);
1022 m_scene.DeleteSceneObject(proxyObjectGroup); 1011 m_scene.DeleteSceneObject(proxyObjectGroup);
1023 } 1012 }
1024 else 1013 else
1025 { 1014 {
1026 m_autopilotMoving = false; 1015 m_autopilotMoving = false;
1027 m_autoPilotTarget = LLVector3.Zero; 1016 m_autoPilotTarget = Vector3.Zero;
1028 ControllingClient.SendAlertMessage("Autopilot cancelled"); 1017 ControllingClient.SendAlertMessage("Autopilot cancelled");
1029 } 1018 }
1030 1019
@@ -1041,13 +1030,13 @@ namespace OpenSim.Region.Environment.Scenes
1041 if (part != null) 1030 if (part != null)
1042 { 1031 {
1043 AbsolutePosition = part.AbsolutePosition; 1032 AbsolutePosition = part.AbsolutePosition;
1044 Velocity = new LLVector3(0, 0, 0); 1033 Velocity = new Vector3(0, 0, 0);
1045 SendFullUpdateToAllClients(); 1034 SendFullUpdateToAllClients();
1046 1035
1047 //HandleAgentSit(ControllingClient, m_requestedSitTargetUUID); 1036 //HandleAgentSit(ControllingClient, m_requestedSitTargetUUID);
1048 } 1037 }
1049 //ControllingClient.SendSitResponse(m_requestedSitTargetID, m_requestedSitOffset, LLQuaternion.Identity, false, LLVector3.Zero, LLVector3.Zero, false); 1038 //ControllingClient.SendSitResponse(m_requestedSitTargetID, m_requestedSitOffset, Quaternion.Identity, false, Vector3.Zero, Vector3.Zero, false);
1050 m_requestedSitTargetUUID = LLUUID.Zero; 1039 m_requestedSitTargetUUID = UUID.Zero;
1051 } 1040 }
1052 else 1041 else
1053 { 1042 {
@@ -1057,15 +1046,15 @@ namespace OpenSim.Region.Environment.Scenes
1057 //proxy.PCode = (byte)PCode.ParticleSystem; 1046 //proxy.PCode = (byte)PCode.ParticleSystem;
1058 ////uint nextUUID = m_scene.NextLocalId; 1047 ////uint nextUUID = m_scene.NextLocalId;
1059 1048
1060 //proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, m_autoPilotTarget, LLQuaternion.Identity, proxy); 1049 //proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, m_autoPilotTarget, Quaternion.Identity, proxy);
1061 //if (proxyObjectGroup != null) 1050 //if (proxyObjectGroup != null)
1062 //{ 1051 //{
1063 //proxyObjectGroup.SendGroupFullUpdate(); 1052 //proxyObjectGroup.SendGroupFullUpdate();
1064 //ControllingClient.SendSitResponse(LLUUID.Zero, m_autoPilotTarget, LLQuaternion.Identity, true, LLVector3.Zero, LLVector3.Zero, false); 1053 //ControllingClient.SendSitResponse(UUID.Zero, m_autoPilotTarget, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false);
1065 //m_scene.DeleteSceneObject(proxyObjectGroup); 1054 //m_scene.DeleteSceneObject(proxyObjectGroup);
1066 //} 1055 //}
1067 } 1056 }
1068 m_autoPilotTarget = LLVector3.Zero; 1057 m_autoPilotTarget = Vector3.Zero;
1069 m_autopilotMoving = false; 1058 m_autopilotMoving = false;
1070 } 1059 }
1071 } 1060 }
@@ -1082,7 +1071,7 @@ namespace OpenSim.Region.Environment.Scenes
1082 { 1071 {
1083 // Reset sit target. 1072 // Reset sit target.
1084 if (part.GetAvatarOnSitTarget() == UUID) 1073 if (part.GetAvatarOnSitTarget() == UUID)
1085 part.SetAvatarOnSitTarget(LLUUID.Zero); 1074 part.SetAvatarOnSitTarget(UUID.Zero);
1086 1075
1087 m_parentPosition = part.GetWorldPosition(); 1076 m_parentPosition = part.GetWorldPosition();
1088 } 1077 }
@@ -1092,8 +1081,8 @@ namespace OpenSim.Region.Environment.Scenes
1092 AddToPhysicalScene(); 1081 AddToPhysicalScene();
1093 } 1082 }
1094 1083
1095 m_pos += m_parentPosition + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); 1084 m_pos += m_parentPosition + new Vector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight);
1096 m_parentPosition = new LLVector3(); 1085 m_parentPosition = new Vector3();
1097 1086
1098 m_parentID = 0; 1087 m_parentID = 0;
1099 SendFullUpdateToAllClients(); 1088 SendFullUpdateToAllClients();
@@ -1107,7 +1096,7 @@ namespace OpenSim.Region.Environment.Scenes
1107 TrySetMovementAnimation("STAND"); 1096 TrySetMovementAnimation("STAND");
1108 } 1097 }
1109 1098
1110 private SceneObjectPart FindNextAvailableSitTarget(LLUUID targetID) 1099 private SceneObjectPart FindNextAvailableSitTarget(UUID targetID)
1111 { 1100 {
1112 SceneObjectPart targetPart = m_scene.GetSceneObjectPart(targetID); 1101 SceneObjectPart targetPart = m_scene.GetSceneObjectPart(targetID);
1113 if (targetPart == null) 1102 if (targetPart == null)
@@ -1133,12 +1122,12 @@ namespace OpenSim.Region.Environment.Scenes
1133 // Is a sit target available? 1122 // Is a sit target available?
1134 Vector3 avSitOffSet = part.SitTargetPosition; 1123 Vector3 avSitOffSet = part.SitTargetPosition;
1135 Quaternion avSitOrientation = part.SitTargetOrientation; 1124 Quaternion avSitOrientation = part.SitTargetOrientation;
1136 LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); 1125 UUID avOnTargetAlready = part.GetAvatarOnSitTarget();
1137 1126
1138 bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); 1127 bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
1139 bool SitTargetisSet = 1128 bool SitTargetisSet =
1140 (!(avSitOffSet.x == 0 && avSitOffSet.y == 0 && avSitOffSet.z == 0 && avSitOrientation.w == 0 && 1129 (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && avSitOrientation.W == 0f &&
1141 avSitOrientation.x == 0 && avSitOrientation.y == 0 && avSitOrientation.z == 1)); 1130 avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f));
1142 1131
1143 if (SitTargetisSet && SitTargetUnOccupied) 1132 if (SitTargetisSet && SitTargetUnOccupied)
1144 { 1133 {
@@ -1151,13 +1140,13 @@ namespace OpenSim.Region.Environment.Scenes
1151 return targetPart; 1140 return targetPart;
1152 } 1141 }
1153 1142
1154 private void SendSitResponse(IClientAPI remoteClient, LLUUID targetID, LLVector3 offset) 1143 private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 offset)
1155 { 1144 {
1156 bool autopilot = true; 1145 bool autopilot = true;
1157 LLVector3 pos = new LLVector3(); 1146 Vector3 pos = new Vector3();
1158 LLQuaternion sitOrientation = new LLQuaternion(0, 0, 0, 1); 1147 Quaternion sitOrientation = Quaternion.Identity;
1159 LLVector3 cameraEyeOffset = LLVector3.Zero; 1148 Vector3 cameraEyeOffset = Vector3.Zero;
1160 LLVector3 cameraAtOffset = LLVector3.Zero; 1149 Vector3 cameraAtOffset = Vector3.Zero;
1161 bool forceMouselook = false; 1150 bool forceMouselook = false;
1162 1151
1163 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); 1152 //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID);
@@ -1170,19 +1159,18 @@ namespace OpenSim.Region.Environment.Scenes
1170 // Is a sit target available? 1159 // Is a sit target available?
1171 Vector3 avSitOffSet = part.SitTargetPosition; 1160 Vector3 avSitOffSet = part.SitTargetPosition;
1172 Quaternion avSitOrientation = part.SitTargetOrientation; 1161 Quaternion avSitOrientation = part.SitTargetOrientation;
1173 LLUUID avOnTargetAlready = part.GetAvatarOnSitTarget(); 1162 UUID avOnTargetAlready = part.GetAvatarOnSitTarget();
1174 1163
1175 bool SitTargetUnOccupied = (!(avOnTargetAlready != LLUUID.Zero)); 1164 bool SitTargetUnOccupied = (!(avOnTargetAlready != UUID.Zero));
1176 bool SitTargetisSet = 1165 bool SitTargetisSet =
1177 (!(avSitOffSet.x == 0 && avSitOffSet.y == 0 && avSitOffSet.z == 0 && avSitOrientation.w == 0 && 1166 (!(avSitOffSet.X == 0f && avSitOffSet.Y == 0f && avSitOffSet.Z == 0f && avSitOrientation.W == 0f &&
1178 avSitOrientation.x == 0 && avSitOrientation.y == 0 && avSitOrientation.z == 1)); 1167 avSitOrientation.X == 0f && avSitOrientation.Y == 0f && avSitOrientation.Z == 1f));
1179 1168
1180 if (SitTargetisSet && SitTargetUnOccupied) 1169 if (SitTargetisSet && SitTargetUnOccupied)
1181 { 1170 {
1182 part.SetAvatarOnSitTarget(UUID); 1171 part.SetAvatarOnSitTarget(UUID);
1183 offset = new LLVector3(avSitOffSet.x, avSitOffSet.y, avSitOffSet.z); 1172 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
1184 sitOrientation = 1173 sitOrientation = avSitOrientation;
1185 new LLQuaternion(avSitOrientation.x, avSitOrientation.y, avSitOrientation.z, avSitOrientation.w);
1186 autopilot = false; 1174 autopilot = false;
1187 } 1175 }
1188 1176
@@ -1205,7 +1193,7 @@ namespace OpenSim.Region.Environment.Scenes
1205 autopilot = false; 1193 autopilot = false;
1206 1194
1207 RemoveFromPhysicalScene(); 1195 RemoveFromPhysicalScene();
1208 AbsolutePosition = pos + new LLVector3(0.0f, 0.0f, m_sitAvatarHeight); 1196 AbsolutePosition = pos + new Vector3(0.0f, 0.0f, m_sitAvatarHeight);
1209 } 1197 }
1210 } 1198 }
1211 else 1199 else
@@ -1232,7 +1220,7 @@ namespace OpenSim.Region.Environment.Scenes
1232 HandleAgentSit(remoteClient, UUID); 1220 HandleAgentSit(remoteClient, UUID);
1233 } 1221 }
1234 1222
1235 public void HandleAgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset) 1223 public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset)
1236 { 1224 {
1237 if (m_parentID != 0) 1225 if (m_parentID != 0)
1238 { 1226 {
@@ -1254,7 +1242,7 @@ namespace OpenSim.Region.Environment.Scenes
1254 SendSitResponse(remoteClient, targetID, offset); 1242 SendSitResponse(remoteClient, targetID, offset);
1255 } 1243 }
1256 1244
1257 public void HandleAgentSit(IClientAPI remoteClient, LLUUID agentID) 1245 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID)
1258 { 1246 {
1259 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); 1247 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
1260 1248
@@ -1267,12 +1255,12 @@ namespace OpenSim.Region.Environment.Scenes
1267 Vector3 sitTargetPos = part.SitTargetPosition; 1255 Vector3 sitTargetPos = part.SitTargetPosition;
1268 Quaternion sitTargetOrient = part.SitTargetOrientation; 1256 Quaternion sitTargetOrient = part.SitTargetOrientation;
1269 1257
1270 //Quaternion vq = new Quaternion(sitTargetPos.x, sitTargetPos.y+0.2f, sitTargetPos.z+0.2f, 0); 1258 //Quaternion vq = new Quaternion(sitTargetPos.X, sitTargetPos.Y+0.2f, sitTargetPos.Z+0.2f, 0);
1271 //Quaternion nq = new Quaternion(sitTargetOrient.w, -sitTargetOrient.x, -sitTargetOrient.y, -sitTargetOrient.z); 1259 //Quaternion nq = new Quaternion(-sitTargetOrient.X, -sitTargetOrient.Y, -sitTargetOrient.Z, sitTargetOrient.w);
1272 1260
1273 //Quaternion result = (sitTargetOrient * vq) * nq; 1261 //Quaternion result = (sitTargetOrient * vq) * nq;
1274 1262
1275 m_pos = new LLVector3(sitTargetPos.x, sitTargetPos.y, sitTargetPos.z); 1263 m_pos = new Vector3(sitTargetPos.X, sitTargetPos.Y, sitTargetPos.Z);
1276 m_pos += m_sitTargetCorrectionOffset; 1264 m_pos += m_sitTargetCorrectionOffset;
1277 m_bodyRot = sitTargetOrient; 1265 m_bodyRot = sitTargetOrient;
1278 //Rotation = sitTargetOrient; 1266 //Rotation = sitTargetOrient;
@@ -1293,7 +1281,7 @@ namespace OpenSim.Region.Environment.Scenes
1293 } 1281 }
1294 m_parentID = m_requestedSitTargetID; 1282 m_parentID = m_requestedSitTargetID;
1295 1283
1296 Velocity = new LLVector3(0, 0, 0); 1284 Velocity = new Vector3(0, 0, 0);
1297 RemoveFromPhysicalScene(); 1285 RemoveFromPhysicalScene();
1298 1286
1299 TrySetMovementAnimation("SIT"); 1287 TrySetMovementAnimation("SIT");
@@ -1317,7 +1305,7 @@ namespace OpenSim.Region.Environment.Scenes
1317 } 1305 }
1318 } 1306 }
1319 1307
1320 public void AddAnimation(LLUUID animID) 1308 public void AddAnimation(UUID animID)
1321 { 1309 {
1322 if (m_isChildAgent) 1310 if (m_isChildAgent)
1323 return; 1311 return;
@@ -1333,14 +1321,14 @@ namespace OpenSim.Region.Environment.Scenes
1333 if (m_isChildAgent) 1321 if (m_isChildAgent)
1334 return; 1322 return;
1335 1323
1336 LLUUID animID = m_controllingClient.GetDefaultAnimation(name); 1324 UUID animID = m_controllingClient.GetDefaultAnimation(name);
1337 if (animID == LLUUID.Zero) 1325 if (animID == UUID.Zero)
1338 return; 1326 return;
1339 1327
1340 AddAnimation(animID); 1328 AddAnimation(animID);
1341 } 1329 }
1342 1330
1343 public void RemoveAnimation(LLUUID animID) 1331 public void RemoveAnimation(UUID animID)
1344 { 1332 {
1345 if (m_isChildAgent) 1333 if (m_isChildAgent)
1346 return; 1334 return;
@@ -1356,27 +1344,27 @@ namespace OpenSim.Region.Environment.Scenes
1356 if (m_isChildAgent) 1344 if (m_isChildAgent)
1357 return; 1345 return;
1358 1346
1359 LLUUID animID = m_controllingClient.GetDefaultAnimation(name); 1347 UUID animID = m_controllingClient.GetDefaultAnimation(name);
1360 if (animID == LLUUID.Zero) 1348 if (animID == UUID.Zero)
1361 return; 1349 return;
1362 1350
1363 RemoveAnimation(animID); 1351 RemoveAnimation(animID);
1364 } 1352 }
1365 1353
1366 public LLUUID[] GetAnimationArray() 1354 public UUID[] GetAnimationArray()
1367 { 1355 {
1368 LLUUID[] animIDs; 1356 UUID[] animIDs;
1369 int[] sequenceNums; 1357 int[] sequenceNums;
1370 m_animations.GetArrays( out animIDs, out sequenceNums ); 1358 m_animations.GetArrays( out animIDs, out sequenceNums );
1371 return animIDs; 1359 return animIDs;
1372 } 1360 }
1373 1361
1374 public void HandleStartAnim(IClientAPI remoteClient, LLUUID animID) 1362 public void HandleStartAnim(IClientAPI remoteClient, UUID animID)
1375 { 1363 {
1376 AddAnimation(animID); 1364 AddAnimation(animID);
1377 } 1365 }
1378 1366
1379 public void HandleStopAnim(IClientAPI remoteClient, LLUUID animID) 1367 public void HandleStopAnim(IClientAPI remoteClient, UUID animID)
1380 { 1368 {
1381 RemoveAnimation(animID); 1369 RemoveAnimation(animID);
1382 } 1370 }
@@ -1385,7 +1373,7 @@ namespace OpenSim.Region.Environment.Scenes
1385 /// The movement animation is reserved for "main" animations 1373 /// The movement animation is reserved for "main" animations
1386 /// that are mutually exclusive, e.g. flying and sitting. 1374 /// that are mutually exclusive, e.g. flying and sitting.
1387 /// </summary> 1375 /// </summary>
1388 protected void SetMovementAnimation(LLUUID animID) 1376 protected void SetMovementAnimation(UUID animID)
1389 { 1377 {
1390 if (m_animations.SetDefaultAnimation(animID, m_controllingClient.NextAnimationSequenceNumber)) 1378 if (m_animations.SetDefaultAnimation(animID, m_controllingClient.NextAnimationSequenceNumber))
1391 { 1379 {
@@ -1494,10 +1482,10 @@ namespace OpenSim.Region.Environment.Scenes
1494 1482
1495 m_rotation = rotation; 1483 m_rotation = rotation;
1496 NewForce newVelocity = new NewForce(); 1484 NewForce newVelocity = new NewForce();
1497 Vector3 direc = rotation*vec; 1485 Vector3 direc = vec * rotation;
1498 direc.Normalize(); 1486 direc.Normalize();
1499 1487
1500 direc *= 0.03f*128f; 1488 direc *= 0.03f * 128f;
1501 if (m_physicsActor.Flying) 1489 if (m_physicsActor.Flying)
1502 { 1490 {
1503 direc *= 4; 1491 direc *= 4;
@@ -1517,9 +1505,9 @@ namespace OpenSim.Region.Environment.Scenes
1517 { 1505 {
1518 if (!m_physicsActor.Flying && m_physicsActor.IsColliding) 1506 if (!m_physicsActor.Flying && m_physicsActor.IsColliding)
1519 { 1507 {
1520 if (direc.z > 2.0f) 1508 if (direc.Z > 2.0f)
1521 { 1509 {
1522 direc.z *= 3; 1510 direc.Z *= 3;
1523 1511
1524 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored. 1512 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored.
1525 TrySetMovementAnimation("PREJUMP"); 1513 TrySetMovementAnimation("PREJUMP");
@@ -1528,9 +1516,9 @@ namespace OpenSim.Region.Environment.Scenes
1528 } 1516 }
1529 } 1517 }
1530 1518
1531 newVelocity.X = direc.x; 1519 newVelocity.X = direc.X;
1532 newVelocity.Y = direc.y; 1520 newVelocity.Y = direc.Y;
1533 newVelocity.Z = direc.z; 1521 newVelocity.Z = direc.Z;
1534 m_forcesList.Add(newVelocity); 1522 m_forcesList.Add(newVelocity);
1535 1523
1536 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1524 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
@@ -1595,11 +1583,11 @@ namespace OpenSim.Region.Environment.Scenes
1595 { 1583 {
1596 m_perfMonMS = System.Environment.TickCount; 1584 m_perfMonMS = System.Environment.TickCount;
1597 1585
1598 LLVector3 pos = m_pos; 1586 Vector3 pos = m_pos;
1599 LLVector3 vel = Velocity; 1587 Vector3 vel = Velocity;
1600 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1588 Quaternion rot = m_bodyRot;
1601 remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new LLVector3(pos.X, pos.Y, pos.Z), 1589 remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
1602 new LLVector3(vel.X, vel.Y, vel.Z), rot); 1590 new Vector3(vel.X, vel.Y, vel.Z), rot);
1603 1591
1604 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1592 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1605 m_scene.AddAgentUpdates(1); 1593 m_scene.AddAgentUpdates(1);
@@ -1625,7 +1613,7 @@ namespace OpenSim.Region.Environment.Scenes
1625 { 1613 {
1626 m_perfMonMS = System.Environment.TickCount; 1614 m_perfMonMS = System.Environment.TickCount;
1627 1615
1628 List<LLVector3> CoarseLocations = new List<LLVector3>(); 1616 List<Vector3> CoarseLocations = new List<Vector3>();
1629 List<ScenePresence> avatars = m_scene.GetAvatars(); 1617 List<ScenePresence> avatars = m_scene.GetAvatars();
1630 for (int i = 0; i < avatars.Count; i++) 1618 for (int i = 0; i < avatars.Count; i++)
1631 { 1619 {
@@ -1660,8 +1648,8 @@ namespace OpenSim.Region.Environment.Scenes
1660 if (m_appearance.Texture == null) 1648 if (m_appearance.Texture == null)
1661 return; 1649 return;
1662 1650
1663 // Note: because LLQuaternion is a struct, it can't be null 1651 // Note: because Quaternion is a struct, it can't be null
1664 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1652 Quaternion rot = m_bodyRot;
1665 1653
1666 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1654 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,
1667 LocalId, m_pos, m_appearance.Texture.ToBytes(), 1655 LocalId, m_pos, m_appearance.Texture.ToBytes(),
@@ -1723,8 +1711,8 @@ namespace OpenSim.Region.Environment.Scenes
1723 // Needed for standalone 1711 // Needed for standalone
1724 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); 1712 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
1725 1713
1726 // Note: because LLQuaternion is a struct, it can't be null 1714 // Note: because Quaternion is a struct, it can't be null
1727 LLQuaternion rot = new LLQuaternion(m_bodyRot.x, m_bodyRot.y, m_bodyRot.z, m_bodyRot.w); 1715 Quaternion rot = m_bodyRot;
1728 1716
1729 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, 1717 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId,
1730 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot); 1718 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
@@ -1813,7 +1801,7 @@ namespace OpenSim.Region.Environment.Scenes
1813 /// </summary> 1801 /// </summary>
1814 /// <param name="animations"></param> 1802 /// <param name="animations"></param>
1815 /// <param name="seqs"></param> 1803 /// <param name="seqs"></param>
1816 public void SendAnimPack(LLUUID[] animations, int[] seqs) 1804 public void SendAnimPack(UUID[] animations, int[] seqs)
1817 { 1805 {
1818 if (m_isChildAgent) 1806 if (m_isChildAgent)
1819 return; 1807 return;
@@ -1826,7 +1814,7 @@ namespace OpenSim.Region.Environment.Scenes
1826 { 1814 {
1827 if (m_isChildAgent) 1815 if (m_isChildAgent)
1828 return; 1816 return;
1829 LLUUID[] animIDs; 1817 UUID[] animIDs;
1830 int[] sequenceNums; 1818 int[] sequenceNums;
1831 1819
1832 m_animations.GetArrays(out animIDs, out sequenceNums); 1820 m_animations.GetArrays(out animIDs, out sequenceNums);
@@ -1842,7 +1830,7 @@ namespace OpenSim.Region.Environment.Scenes
1842 if (m_isChildAgent) 1830 if (m_isChildAgent)
1843 return; 1831 return;
1844 1832
1845 LLUUID[] animIDs; 1833 UUID[] animIDs;
1846 int[] sequenceNums; 1834 int[] sequenceNums;
1847 1835
1848 m_animations.GetArrays(out animIDs, out sequenceNums); 1836 m_animations.GetArrays(out animIDs, out sequenceNums);
@@ -1870,16 +1858,16 @@ namespace OpenSim.Region.Environment.Scenes
1870 if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32) 1858 if (Util.GetDistanceTo(AbsolutePosition,m_LastChildAgentUpdatePosition) > 32)
1871 { 1859 {
1872 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); 1860 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate();
1873 cadu.ActiveGroupID=LLUUID.Zero.UUID; 1861 cadu.ActiveGroupID = UUID.Zero.Guid;
1874 cadu.AgentID = UUID.UUID; 1862 cadu.AgentID = UUID.Guid;
1875 cadu.alwaysrun = m_setAlwaysRun; 1863 cadu.alwaysrun = m_setAlwaysRun;
1876 cadu.AVHeight = m_avHeight; 1864 cadu.AVHeight = m_avHeight;
1877 LLVector3 tempCameraCenter = new LLVector3(m_CameraCenter.x, m_CameraCenter.y, m_CameraCenter.z); 1865 Vector3 tempCameraCenter = new Vector3(m_CameraCenter.X, m_CameraCenter.Y, m_CameraCenter.Z);
1878 cadu.cameraPosition = new sLLVector3(tempCameraCenter); 1866 cadu.cameraPosition = tempCameraCenter;
1879 cadu.drawdistance = m_DrawDistance; 1867 cadu.drawdistance = m_DrawDistance;
1880 cadu.godlevel = m_godlevel; 1868 cadu.godlevel = m_godlevel;
1881 cadu.GroupAccess = 0; 1869 cadu.GroupAccess = 0;
1882 cadu.Position = new sLLVector3(AbsolutePosition); 1870 cadu.Position = AbsolutePosition;
1883 cadu.regionHandle = m_scene.RegionInfo.RegionHandle; 1871 cadu.regionHandle = m_scene.RegionInfo.RegionHandle;
1884 float multiplier = 1; 1872 float multiplier = 1;
1885 int innacurateNeighbors = m_scene.GetInaccurateNeighborCount(); 1873 int innacurateNeighbors = m_scene.GetInaccurateNeighborCount();
@@ -1899,7 +1887,7 @@ namespace OpenSim.Region.Environment.Scenes
1899 1887
1900 1888
1901 1889
1902 cadu.Velocity = new sLLVector3(Velocity); 1890 cadu.Velocity = Velocity;
1903 m_scene.SendOutChildAgentUpdates(cadu,this); 1891 m_scene.SendOutChildAgentUpdates(cadu,this);
1904 m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; 1892 m_LastChildAgentUpdatePosition.X = AbsolutePosition.X;
1905 m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; 1893 m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y;
@@ -1919,8 +1907,8 @@ namespace OpenSim.Region.Environment.Scenes
1919 if (IsChildAgent) 1907 if (IsChildAgent)
1920 return; 1908 return;
1921 1909
1922 LLVector3 pos2 = AbsolutePosition; 1910 Vector3 pos2 = AbsolutePosition;
1923 LLVector3 vel = Velocity; 1911 Vector3 vel = Velocity;
1924 1912
1925 float timeStep = 0.1f; 1913 float timeStep = 0.1f;
1926 pos2.X = pos2.X + (vel.X*timeStep); 1914 pos2.X = pos2.X + (vel.X*timeStep);
@@ -1946,8 +1934,8 @@ namespace OpenSim.Region.Environment.Scenes
1946 /// </summary> 1934 /// </summary>
1947 protected void CrossToNewRegion() 1935 protected void CrossToNewRegion()
1948 { 1936 {
1949 LLVector3 pos = AbsolutePosition; 1937 Vector3 pos = AbsolutePosition;
1950 LLVector3 newpos = new LLVector3(pos.X, pos.Y, pos.Z); 1938 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
1951 uint neighbourx = m_regionInfo.RegionLocX; 1939 uint neighbourx = m_regionInfo.RegionLocX;
1952 uint neighboury = m_regionInfo.RegionLocY; 1940 uint neighboury = m_regionInfo.RegionLocY;
1953 1941
@@ -1979,7 +1967,7 @@ namespace OpenSim.Region.Environment.Scenes
1979 newpos.Y = enterDistance; 1967 newpos.Y = enterDistance;
1980 } 1968 }
1981 1969
1982 LLVector3 vel = m_velocity; 1970 Vector3 vel = m_velocity;
1983 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 1971 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
1984 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); 1972 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
1985 if (neighbourRegion != null && ValidateAttachments()) 1973 if (neighbourRegion != null && ValidateAttachments())
@@ -2023,7 +2011,7 @@ namespace OpenSim.Region.Environment.Scenes
2023 2011
2024 CrossAttachmentsIntoNewRegion(neighbourHandle); 2012 CrossAttachmentsIntoNewRegion(neighbourHandle);
2025 2013
2026 m_scene.SendKillObject(m_localId); 2014 m_scene.SendKiPrimitive(m_localId);
2027 2015
2028 m_scene.NotifyMyCoarseLocationChange(); 2016 m_scene.NotifyMyCoarseLocationChange();
2029 // the user may change their profile information in other region, 2017 // the user may change their profile information in other region,
@@ -2047,7 +2035,7 @@ namespace OpenSim.Region.Environment.Scenes
2047 /// This allows the Sim owner the abiility to kick users from their sim currently. 2035 /// This allows the Sim owner the abiility to kick users from their sim currently.
2048 /// It tells the client that the agent has permission to do so. 2036 /// It tells the client that the agent has permission to do so.
2049 /// </summary> 2037 /// </summary>
2050 public void GrantGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, bool godStatus) 2038 public void GrantGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godStatus)
2051 { 2039 {
2052 if (godStatus) 2040 if (godStatus)
2053 { 2041 {
@@ -2082,11 +2070,11 @@ namespace OpenSim.Region.Environment.Scenes
2082 int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; 2070 int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize;
2083 2071
2084 m_DrawDistance = cAgentData.drawdistance; 2072 m_DrawDistance = cAgentData.drawdistance;
2085 m_pos = new LLVector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); 2073 m_pos = new Vector3(cAgentData.Position.X + shiftx, cAgentData.Position.Y + shifty, cAgentData.Position.Z);
2086 2074
2087 // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region 2075 // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region
2088 m_CameraCenter = 2076 m_CameraCenter =
2089 new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); 2077 new Vector3(cAgentData.cameraPosition.X, cAgentData.cameraPosition.Y, cAgentData.cameraPosition.Z);
2090 2078
2091 2079
2092 m_godlevel = cAgentData.godlevel; 2080 m_godlevel = cAgentData.godlevel;
@@ -2147,7 +2135,7 @@ namespace OpenSim.Region.Environment.Scenes
2147 static ScenePresence() 2135 static ScenePresence()
2148 { 2136 {
2149 2137
2150 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2138 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2151 DefaultTexture = textu.ToBytes(); 2139 DefaultTexture = textu.ToBytes();
2152 } 2140 }
2153 2141
@@ -2166,13 +2154,13 @@ namespace OpenSim.Region.Environment.Scenes
2166 [Serializable] 2154 [Serializable]
2167 public class ScenePartUpdate : ISerializable 2155 public class ScenePartUpdate : ISerializable
2168 { 2156 {
2169 public LLUUID FullID; 2157 public UUID FullID;
2170 public uint LastFullUpdateTime; 2158 public uint LastFullUpdateTime;
2171 public uint LastTerseUpdateTime; 2159 public uint LastTerseUpdateTime;
2172 2160
2173 public ScenePartUpdate() 2161 public ScenePartUpdate()
2174 { 2162 {
2175 FullID = LLUUID.Zero; 2163 FullID = UUID.Zero;
2176 LastFullUpdateTime = 0; 2164 LastFullUpdateTime = 0;
2177 LastTerseUpdateTime = 0; 2165 LastTerseUpdateTime = 0;
2178 } 2166 }
@@ -2186,7 +2174,7 @@ namespace OpenSim.Region.Environment.Scenes
2186 throw new ArgumentNullException("info"); 2174 throw new ArgumentNullException("info");
2187 } 2175 }
2188 2176
2189 FullID = new LLUUID((Guid)info.GetValue("FullID", typeof(Guid))); 2177 FullID = new UUID((Guid)info.GetValue("FullID", typeof(Guid)));
2190 LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint)); 2178 LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint));
2191 LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint)); 2179 LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint));
2192 2180
@@ -2203,7 +2191,7 @@ namespace OpenSim.Region.Environment.Scenes
2203 throw new ArgumentNullException("info"); 2191 throw new ArgumentNullException("info");
2204 } 2192 }
2205 2193
2206 info.AddValue("FullID", FullID.UUID); 2194 info.AddValue("FullID", FullID.Guid);
2207 info.AddValue("LastFullUpdateTime", LastFullUpdateTime); 2195 info.AddValue("LastFullUpdateTime", LastFullUpdateTime);
2208 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime); 2196 info.AddValue("LastTerseUpdateTime", LastTerseUpdateTime);
2209 } 2197 }
@@ -2333,7 +2321,7 @@ namespace OpenSim.Region.Environment.Scenes
2333*/ 2321*/
2334 if (DefaultTexture == null) 2322 if (DefaultTexture == null)
2335 { 2323 {
2336 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2324 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2337 DefaultTexture = textu.ToBytes(); 2325 DefaultTexture = textu.ToBytes();
2338 } 2326 }
2339 } 2327 }
@@ -2421,8 +2409,8 @@ namespace OpenSim.Region.Environment.Scenes
2421 Animations = new AvatarAnimations(); 2409 Animations = new AvatarAnimations();
2422 Animations.LoadAnims(); 2410 Animations.LoadAnims();
2423 2411
2424 m_animations = new List<LLUUID>(); 2412 m_animations = new List<UUID>();
2425 m_animations.Add(Animations.AnimsLLUUID["STAND"]); 2413 m_animations.Add(Animations.AnimsUUID["STAND"]);
2426 m_animationSeqs.Add(m_controllingClient.NextAnimationSequenceNumber); 2414 m_animationSeqs.Add(m_controllingClient.NextAnimationSequenceNumber);
2427 2415
2428 SetDirectionVectors(); 2416 SetDirectionVectors();
@@ -2447,7 +2435,7 @@ namespace OpenSim.Region.Environment.Scenes
2447*/ 2435*/
2448 if (DefaultTexture == null) 2436 if (DefaultTexture == null)
2449 { 2437 {
2450 LLObject.TextureEntry textu = AvatarAppearance.GetDefaultTexture(); 2438 Primitive.TextureEntry textu = AvatarAppearance.GetDefaultTexture();
2451 DefaultTexture = textu.ToBytes(); 2439 DefaultTexture = textu.ToBytes();
2452 } 2440 }
2453 2441
@@ -2459,7 +2447,7 @@ namespace OpenSim.Region.Environment.Scenes
2459 m_requestedSitTargetID = (uint)info.GetValue("m_requestedSitTargetID", typeof(uint)); 2447 m_requestedSitTargetID = (uint)info.GetValue("m_requestedSitTargetID", typeof(uint));
2460 2448
2461 m_requestedSitOffset 2449 m_requestedSitOffset
2462 = new LLVector3( 2450 = new Vector3(
2463 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)), 2451 (float)info.GetValue("m_requestedSitOffset.X", typeof(float)),
2464 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)), 2452 (float)info.GetValue("m_requestedSitOffset.Y", typeof(float)),
2465 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float))); 2453 (float)info.GetValue("m_requestedSitOffset.Z", typeof(float)));
@@ -2470,10 +2458,10 @@ namespace OpenSim.Region.Environment.Scenes
2470 2458
2471 m_bodyRot 2459 m_bodyRot
2472 = new Quaternion( 2460 = new Quaternion(
2473 (float)info.GetValue("m_bodyRot.w", typeof(float)), 2461 (float)info.GetValue("m_bodyRot.X", typeof(float)),
2474 (float)info.GetValue("m_bodyRot.x", typeof(float)), 2462 (float)info.GetValue("m_bodyRot.Y", typeof(float)),
2475 (float)info.GetValue("m_bodyRot.y", typeof(float)), 2463 (float)info.GetValue("m_bodyRot.Z", typeof(float)),
2476 (float)info.GetValue("m_bodyRot.z", typeof(float))); 2464 (float)info.GetValue("m_bodyRot.W", typeof(float)));
2477 2465
2478 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool)); 2466 IsRestrictedToRegion = (bool)info.GetValue("IsRestrictedToRegion", typeof(bool));
2479 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool)); 2467 m_newForce = (bool)info.GetValue("m_newForce", typeof(bool));
@@ -2493,7 +2481,7 @@ namespace OpenSim.Region.Environment.Scenes
2493 Dir_Vectors = Dir_Vectors_work2.ToArray(); 2481 Dir_Vectors = Dir_Vectors_work2.ToArray();
2494 2482
2495 lastPhysPos 2483 lastPhysPos
2496 = new LLVector3( 2484 = new Vector3(
2497 (float)info.GetValue("lastPhysPos.X", typeof(float)), 2485 (float)info.GetValue("lastPhysPos.X", typeof(float)),
2498 (float)info.GetValue("lastPhysPos.Y", typeof(float)), 2486 (float)info.GetValue("lastPhysPos.Y", typeof(float)),
2499 (float)info.GetValue("lastPhysPos.Z", typeof(float))); 2487 (float)info.GetValue("lastPhysPos.Z", typeof(float)));
@@ -2527,7 +2515,7 @@ namespace OpenSim.Region.Environment.Scenes
2527 m_knownChildRegions = (List<ulong>)info.GetValue("m_knownChildRegions", typeof(List<ulong>)); 2515 m_knownChildRegions = (List<ulong>)info.GetValue("m_knownChildRegions", typeof(List<ulong>));
2528 2516
2529 posLastSignificantMove 2517 posLastSignificantMove
2530 = new LLVector3( 2518 = new Vector3(
2531 (float)info.GetValue("posLastSignificantMove.X", typeof(float)), 2519 (float)info.GetValue("posLastSignificantMove.X", typeof(float)),
2532 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)), 2520 (float)info.GetValue("posLastSignificantMove.Y", typeof(float)),
2533 (float)info.GetValue("posLastSignificantMove.Z", typeof(float))); 2521 (float)info.GetValue("posLastSignificantMove.Z", typeof(float)));
@@ -2540,14 +2528,14 @@ namespace OpenSim.Region.Environment.Scenes
2540 2528
2541 foreach (Guid id in updateTimes_work.Keys) 2529 foreach (Guid id in updateTimes_work.Keys)
2542 { 2530 {
2543 m_updateTimes.Add(new LLUUID(id), updateTimes_work[id]); 2531 m_updateTimes.Add(new UUID(id), updateTimes_work[id]);
2544 } 2532 }
2545 */ 2533 */
2546 m_regionHandle = (ulong)info.GetValue("m_regionHandle", typeof(ulong)); 2534 m_regionHandle = (ulong)info.GetValue("m_regionHandle", typeof(ulong));
2547 m_firstname = (string)info.GetValue("m_firstname", typeof(string)); 2535 m_firstname = (string)info.GetValue("m_firstname", typeof(string));
2548 m_lastname = (string)info.GetValue("m_lastname", typeof(string)); 2536 m_lastname = (string)info.GetValue("m_lastname", typeof(string));
2549 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool)); 2537 m_allowMovement = (bool)info.GetValue("m_allowMovement", typeof(bool));
2550 m_parentPosition = new LLVector3((float)info.GetValue("m_parentPosition.X", typeof(float)), 2538 m_parentPosition = new Vector3((float)info.GetValue("m_parentPosition.X", typeof(float)),
2551 (float)info.GetValue("m_parentPosition.Y", typeof(float)), 2539 (float)info.GetValue("m_parentPosition.Y", typeof(float)),
2552 (float)info.GetValue("m_parentPosition.Z", typeof(float))); 2540 (float)info.GetValue("m_parentPosition.Z", typeof(float)));
2553 2541
@@ -2555,7 +2543,7 @@ namespace OpenSim.Region.Environment.Scenes
2555 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint)); 2543 m_parentID = (uint)info.GetValue("m_parentID", typeof(uint));
2556 2544
2557// for OpenSim_v0.5 2545// for OpenSim_v0.5
2558 currentParcelUUID = new LLUUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid))); 2546 currentParcelUUID = new UUID((Guid)info.GetValue("currentParcelUUID", typeof(Guid)));
2559 2547
2560 lastKnownAllowedPosition 2548 lastKnownAllowedPosition
2561 = new Vector3( 2549 = new Vector3(
@@ -2566,7 +2554,7 @@ namespace OpenSim.Region.Environment.Scenes
2566 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool)); 2554 sentMessageAboutRestrictedParcelFlyingDown = (bool)info.GetValue("sentMessageAboutRestrictedParcelFlyingDown", typeof(bool));
2567 2555
2568 m_LastChildAgentUpdatePosition 2556 m_LastChildAgentUpdatePosition
2569 = new LLVector3( 2557 = new Vector3(
2570 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)), 2558 (float)info.GetValue("m_LastChildAgentUpdatePosition.X", typeof(float)),
2571 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)), 2559 (float)info.GetValue("m_LastChildAgentUpdatePosition.Y", typeof(float)),
2572 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float))); 2560 (float)info.GetValue("m_LastChildAgentUpdatePosition.Z", typeof(float)));
@@ -2575,11 +2563,11 @@ namespace OpenSim.Region.Environment.Scenes
2575 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint)); 2563 m_AgentControlFlags = (uint)info.GetValue("m_AgentControlFlags", typeof(uint));
2576 2564
2577 m_headrotation 2565 m_headrotation
2578 = new LLQuaternion( 2566 = new Quaternion(
2579 (float)info.GetValue("m_headrotation.W", typeof(float)),
2580 (float)info.GetValue("m_headrotation.X", typeof(float)), 2567 (float)info.GetValue("m_headrotation.X", typeof(float)),
2581 (float)info.GetValue("m_headrotation.Y", typeof(float)), 2568 (float)info.GetValue("m_headrotation.Y", typeof(float)),
2582 (float)info.GetValue("m_headrotation.Z", typeof(float))); 2569 (float)info.GetValue("m_headrotation.Z", typeof(float)),
2570 (float)info.GetValue("m_headrotation.W", typeof(float)));
2583 2571
2584 m_state = (byte)info.GetValue("m_state", typeof(byte)); 2572 m_state = (byte)info.GetValue("m_state", typeof(byte));
2585 2573
@@ -2605,7 +2593,7 @@ namespace OpenSim.Region.Environment.Scenes
2605 info.AddValue("m_updateCount", m_updateCount); 2593 info.AddValue("m_updateCount", m_updateCount);
2606 info.AddValue("m_requestedSitTargetID", m_requestedSitTargetID); 2594 info.AddValue("m_requestedSitTargetID", m_requestedSitTargetID);
2607 2595
2608 // LLVector3 2596 // Vector3
2609 info.AddValue("m_requestedSitOffset.X", m_requestedSitOffset.X); 2597 info.AddValue("m_requestedSitOffset.X", m_requestedSitOffset.X);
2610 info.AddValue("m_requestedSitOffset.Y", m_requestedSitOffset.Y); 2598 info.AddValue("m_requestedSitOffset.Y", m_requestedSitOffset.Y);
2611 info.AddValue("m_requestedSitOffset.Z", m_requestedSitOffset.Z); 2599 info.AddValue("m_requestedSitOffset.Z", m_requestedSitOffset.Z);
@@ -2615,16 +2603,16 @@ namespace OpenSim.Region.Environment.Scenes
2615 info.AddValue("m_setAlwaysRun", m_setAlwaysRun); 2603 info.AddValue("m_setAlwaysRun", m_setAlwaysRun);
2616 2604
2617 // Quaternion 2605 // Quaternion
2618 info.AddValue("m_bodyRot.w", m_bodyRot.w); 2606 info.AddValue("m_bodyRot.X", m_bodyRot.X);
2619 info.AddValue("m_bodyRot.x", m_bodyRot.x); 2607 info.AddValue("m_bodyRot.Y", m_bodyRot.Y);
2620 info.AddValue("m_bodyRot.y", m_bodyRot.y); 2608 info.AddValue("m_bodyRot.Z", m_bodyRot.Z);
2621 info.AddValue("m_bodyRot.z", m_bodyRot.z); 2609 info.AddValue("m_bodyRot.W", m_bodyRot.W);
2622 2610
2623 info.AddValue("IsRestrictedToRegion", IsRestrictedToRegion); 2611 info.AddValue("IsRestrictedToRegion", IsRestrictedToRegion);
2624 info.AddValue("m_newForce", m_newForce); 2612 info.AddValue("m_newForce", m_newForce);
2625 //info.AddValue("m_newAvatar", m_newAvatar); 2613 //info.AddValue("m_newAvatar", m_newAvatar);
2626 info.AddValue("m_newCoarseLocations", m_newCoarseLocations); 2614 info.AddValue("m_newCoarseLocations", m_newCoarseLocations);
2627 info.AddValue("m_gotAllObjectsInScene", false); 2615 info.AddValue("m_gotAPrimitivesInScene", false);
2628 info.AddValue("m_avHeight", m_avHeight); 2616 info.AddValue("m_avHeight", m_avHeight);
2629 2617
2630 // info.AddValue("m_regionInfo", m_regionInfo); 2618 // info.AddValue("m_regionInfo", m_regionInfo);
@@ -2635,41 +2623,41 @@ namespace OpenSim.Region.Environment.Scenes
2635 2623
2636 foreach (Vector3 v3 in Dir_Vectors) 2624 foreach (Vector3 v3 in Dir_Vectors)
2637 { 2625 {
2638 Dir_Vectors_work.Add(new float[] { v3.x, v3.y, v3.z }); 2626 Dir_Vectors_work.Add(new float[] { v3.X, v3.Y, v3.Z });
2639 } 2627 }
2640 2628
2641 info.AddValue("Dir_Vectors", Dir_Vectors_work); 2629 info.AddValue("Dir_Vectors", Dir_Vectors_work);
2642 2630
2643 // LLVector3 2631 // Vector3
2644 info.AddValue("lastPhysPos.X", lastPhysPos.X); 2632 info.AddValue("lastPhysPos.X", lastPhysPos.X);
2645 info.AddValue("lastPhysPos.Y", lastPhysPos.Y); 2633 info.AddValue("lastPhysPos.Y", lastPhysPos.Y);
2646 info.AddValue("lastPhysPos.Z", lastPhysPos.Z); 2634 info.AddValue("lastPhysPos.Z", lastPhysPos.Z);
2647 2635
2648 // Vector3 2636 // Vector3
2649 info.AddValue("m_CameraCenter.X", m_CameraCenter.x); 2637 info.AddValue("m_CameraCenter.X", m_CameraCenter.X);
2650 info.AddValue("m_CameraCenter.Y", m_CameraCenter.y); 2638 info.AddValue("m_CameraCenter.Y", m_CameraCenter.Y);
2651 info.AddValue("m_CameraCenter.Z", m_CameraCenter.z); 2639 info.AddValue("m_CameraCenter.Z", m_CameraCenter.Z);
2652 2640
2653 // Vector3 2641 // Vector3
2654 info.AddValue("m_CameraAtAxis.X", m_CameraAtAxis.x); 2642 info.AddValue("m_CameraAtAxis.X", m_CameraAtAxis.X);
2655 info.AddValue("m_CameraAtAxis.Y", m_CameraAtAxis.y); 2643 info.AddValue("m_CameraAtAxis.Y", m_CameraAtAxis.Y);
2656 info.AddValue("m_CameraAtAxis.Z", m_CameraAtAxis.z); 2644 info.AddValue("m_CameraAtAxis.Z", m_CameraAtAxis.Z);
2657 2645
2658 // Vector3 2646 // Vector3
2659 info.AddValue("m_CameraLeftAxis.X", m_CameraLeftAxis.x); 2647 info.AddValue("m_CameraLeftAxis.X", m_CameraLeftAxis.X);
2660 info.AddValue("m_CameraLeftAxis.Y", m_CameraLeftAxis.y); 2648 info.AddValue("m_CameraLeftAxis.Y", m_CameraLeftAxis.Y);
2661 info.AddValue("m_CameraLeftAxis.Z", m_CameraLeftAxis.z); 2649 info.AddValue("m_CameraLeftAxis.Z", m_CameraLeftAxis.Z);
2662 2650
2663 // Vector3 2651 // Vector3
2664 info.AddValue("m_CameraUpAxis.X", m_CameraUpAxis.x); 2652 info.AddValue("m_CameraUpAxis.X", m_CameraUpAxis.X);
2665 info.AddValue("m_CameraUpAxis.Y", m_CameraUpAxis.y); 2653 info.AddValue("m_CameraUpAxis.Y", m_CameraUpAxis.Y);
2666 info.AddValue("m_CameraUpAxis.Z", m_CameraUpAxis.z); 2654 info.AddValue("m_CameraUpAxis.Z", m_CameraUpAxis.Z);
2667 2655
2668 info.AddValue("m_DrawDistance", m_DrawDistance); 2656 info.AddValue("m_DrawDistance", m_DrawDistance);
2669 info.AddValue("m_appearance", m_appearance); 2657 info.AddValue("m_appearance", m_appearance);
2670 info.AddValue("m_knownChildRegions", m_knownChildRegions); 2658 info.AddValue("m_knownChildRegions", m_knownChildRegions);
2671 2659
2672 // LLVector3 2660 // Vector3
2673 info.AddValue("posLastSignificantMove.X", posLastSignificantMove.X); 2661 info.AddValue("posLastSignificantMove.X", posLastSignificantMove.X);
2674 info.AddValue("posLastSignificantMove.Y", posLastSignificantMove.Y); 2662 info.AddValue("posLastSignificantMove.Y", posLastSignificantMove.Y);
2675 info.AddValue("posLastSignificantMove.Z", posLastSignificantMove.Z); 2663 info.AddValue("posLastSignificantMove.Z", posLastSignificantMove.Z);
@@ -2679,7 +2667,7 @@ namespace OpenSim.Region.Environment.Scenes
2679 /* 2667 /*
2680 Dictionary<Guid, ScenePartUpdate> updateTimes_work = new Dictionary<Guid, ScenePartUpdate>(); 2668 Dictionary<Guid, ScenePartUpdate> updateTimes_work = new Dictionary<Guid, ScenePartUpdate>();
2681 2669
2682 foreach (LLUUID id in m_updateTimes.Keys) 2670 foreach (UUID id in m_updateTimes.Keys)
2683 { 2671 {
2684 updateTimes_work.Add(id.UUID, m_updateTimes[id]); 2672 updateTimes_work.Add(id.UUID, m_updateTimes[id]);
2685 } 2673 }
@@ -2699,11 +2687,11 @@ namespace OpenSim.Region.Environment.Scenes
2699 info.AddValue("m_parentID", m_parentID); 2687 info.AddValue("m_parentID", m_parentID);
2700 2688
2701// for OpenSim_v0.5 2689// for OpenSim_v0.5
2702 info.AddValue("currentParcelUUID", currentParcelUUID.UUID); 2690 info.AddValue("currentParcelUUID", currentParcelUUID.Guid);
2703 2691
2704 info.AddValue("lastKnownAllowedPosition.X", lastKnownAllowedPosition.x); 2692 info.AddValue("lastKnownAllowedPosition.X", lastKnownAllowedPosition.X);
2705 info.AddValue("lastKnownAllowedPosition.Y", lastKnownAllowedPosition.y); 2693 info.AddValue("lastKnownAllowedPosition.Y", lastKnownAllowedPosition.Y);
2706 info.AddValue("lastKnownAllowedPosition.Z", lastKnownAllowedPosition.z); 2694 info.AddValue("lastKnownAllowedPosition.Z", lastKnownAllowedPosition.Z);
2707 2695
2708 info.AddValue("sentMessageAboutRestrictedParcelFlyingDown", sentMessageAboutRestrictedParcelFlyingDown); 2696 info.AddValue("sentMessageAboutRestrictedParcelFlyingDown", sentMessageAboutRestrictedParcelFlyingDown);
2709 2697
@@ -2734,13 +2722,13 @@ namespace OpenSim.Region.Environment.Scenes
2734 } 2722 }
2735 } 2723 }
2736 2724
2737 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, LLUUID Script_item_LLUUID) 2725 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID)
2738 { 2726 {
2739 ScriptControllers obj = new ScriptControllers(); 2727 ScriptControllers obj = new ScriptControllers();
2740 obj.ignoreControls = ScriptControlled.CONTROL_ZERO; 2728 obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
2741 obj.eventControls = ScriptControlled.CONTROL_ZERO; 2729 obj.eventControls = ScriptControlled.CONTROL_ZERO;
2742 2730
2743 obj.itemID = Script_item_LLUUID; 2731 obj.itemID = Script_item_UUID;
2744 obj.objID = Obj_localID; 2732 obj.objID = Obj_localID;
2745 if (pass_on == 0 && accept == 0) 2733 if (pass_on == 0 && accept == 0)
2746 { 2734 {
@@ -2766,27 +2754,27 @@ namespace OpenSim.Region.Environment.Scenes
2766 if (pass_on == 1 && accept == 0) 2754 if (pass_on == 1 && accept == 0)
2767 { 2755 {
2768 IgnoredControls &= ~(ScriptControlled)controls; 2756 IgnoredControls &= ~(ScriptControlled)controls;
2769 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2757 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2770 scriptedcontrols.Remove(Script_item_LLUUID); 2758 scriptedcontrols.Remove(Script_item_UUID);
2771 2759
2772 } 2760 }
2773 else 2761 else
2774 { 2762 {
2775 2763
2776 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2764 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2777 { 2765 {
2778 scriptedcontrols[Script_item_LLUUID] = obj; 2766 scriptedcontrols[Script_item_UUID] = obj;
2779 } 2767 }
2780 else 2768 else
2781 { 2769 {
2782 scriptedcontrols.Add(Script_item_LLUUID, obj); 2770 scriptedcontrols.Add(Script_item_UUID, obj);
2783 } 2771 }
2784 } 2772 }
2785 } 2773 }
2786 ControllingClient.SendTakeControls(controls, pass_on == 1 ? true : false, true); 2774 ControllingClient.SendTakeControls(controls, pass_on == 1 ? true : false, true);
2787 } 2775 }
2788 2776
2789 public void HandleForceReleaseControls(IClientAPI remoteClient, LLUUID agentID) 2777 public void HandleForceReleaseControls(IClientAPI remoteClient, UUID agentID)
2790 { 2778 {
2791 IgnoredControls = ScriptControlled.CONTROL_ZERO; 2779 IgnoredControls = ScriptControlled.CONTROL_ZERO;
2792 lock (scriptedcontrols) 2780 lock (scriptedcontrols)
@@ -2796,13 +2784,13 @@ namespace OpenSim.Region.Environment.Scenes
2796 ControllingClient.SendTakeControls(int.MaxValue, false, false); 2784 ControllingClient.SendTakeControls(int.MaxValue, false, false);
2797 } 2785 }
2798 2786
2799 public void UnRegisterControlEventsToScript(uint Obj_localID, LLUUID Script_item_LLUUID) 2787 public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID)
2800 { 2788 {
2801 lock (scriptedcontrols) 2789 lock (scriptedcontrols)
2802 { 2790 {
2803 if (scriptedcontrols.ContainsKey(Script_item_LLUUID)) 2791 if (scriptedcontrols.ContainsKey(Script_item_UUID))
2804 { 2792 {
2805 scriptedcontrols.Remove(Script_item_LLUUID); 2793 scriptedcontrols.Remove(Script_item_UUID);
2806 IgnoredControls = ScriptControlled.CONTROL_ZERO; 2794 IgnoredControls = ScriptControlled.CONTROL_ZERO;
2807 foreach (ScriptControllers scData in scriptedcontrols.Values) 2795 foreach (ScriptControllers scData in scriptedcontrols.Values)
2808 { 2796 {
@@ -2864,7 +2852,7 @@ namespace OpenSim.Region.Environment.Scenes
2864 { 2852 {
2865 lock (scriptedcontrols) 2853 lock (scriptedcontrols)
2866 { 2854 {
2867 foreach (LLUUID scriptUUID in scriptedcontrols.Keys) 2855 foreach (UUID scriptUUID in scriptedcontrols.Keys)
2868 { 2856 {
2869 ScriptControllers scriptControlData = scriptedcontrols[scriptUUID]; 2857 ScriptControllers scriptControlData = scriptedcontrols[scriptUUID];
2870 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 2858 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
@@ -2916,14 +2904,14 @@ namespace OpenSim.Region.Environment.Scenes
2916 return flags; 2904 return flags;
2917 } 2905 }
2918 2906
2919 private void ItemReceived(LLUUID itemID) 2907 private void ItemReceived(UUID itemID)
2920 { 2908 {
2921 int attachpoint = m_appearance.GetAttachpoint(itemID); 2909 int attachpoint = m_appearance.GetAttachpoint(itemID);
2922 if (attachpoint == 0) 2910 if (attachpoint == 0)
2923 return; 2911 return;
2924 2912
2925 LLUUID asset = m_appearance.GetAttachedAsset(attachpoint); 2913 UUID asset = m_appearance.GetAttachedAsset(attachpoint);
2926 if (asset == LLUUID.Zero) // We have just logged in 2914 if (asset == UUID.Zero) // We have just logged in
2927 { 2915 {
2928 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}", 2916 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}",
2929 itemID.ToString()); 2917 itemID.ToString());
@@ -2947,7 +2935,7 @@ namespace OpenSim.Region.Environment.Scenes
2947 2935
2948 // Attach from world, if not already attached 2936 // Attach from world, if not already attached
2949 if (att.ParentGroup != null && !att.IsAttachment) 2937 if (att.ParentGroup != null && !att.IsAttachment)
2950 m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, (uint)0, att.ParentGroup.GroupRotation, LLVector3.Zero); 2938 m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, (uint)0, att.ParentGroup.GroupRotation, Vector3.Zero);
2951 } 2939 }
2952 } 2940 }
2953 } 2941 }
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
index dbe2516..152825f 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
@@ -25,8 +25,7 @@
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
28using Axiom.Math; 28using OpenMetaverse;
29using libsecondlife;
30 29
31namespace OpenSim.Region.Environment.Scenes.Scripting 30namespace OpenSim.Region.Environment.Scenes.Scripting
32{ 31{
@@ -35,10 +34,10 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
35 string Name { get; set; } 34 string Name { get; set; }
36 string Description { get; set; } 35 string Description { get; set; }
37 36
38 LLUUID UUID { get; } 37 UUID UUID { get; }
39 LLUUID ObjectOwner { get; } 38 UUID ObjectOwner { get; }
40 LLUUID ObjectCreator { get; } 39 UUID ObjectCreator { get; }
41 LLVector3 AbsolutePosition { get; } 40 Vector3 AbsolutePosition { get; }
42 41
43 string SitName { get; set; } 42 string SitName { get; set; }
44 string TouchName { get; set; } 43 string TouchName { get; set; }
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
index 4b1b56a..37f5d43 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
@@ -26,14 +26,13 @@
26 */ 26 */
27 27
28using System; 28using System;
29using Axiom.Math; 29using OpenMetaverse;
30using libsecondlife;
31 30
32namespace OpenSim.Region.Environment.Scenes.Scripting 31namespace OpenSim.Region.Environment.Scenes.Scripting
33{ 32{
34 public class NullScriptHost : IScriptHost 33 public class NullScriptHost : IScriptHost
35 { 34 {
36 private LLVector3 m_pos = new LLVector3(128, 128, 30); 35 private Vector3 m_pos = new Vector3(128, 128, 30);
37 36
38 public string Name 37 public string Name
39 { 38 {
@@ -59,22 +58,22 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
59 set { } 58 set { }
60 } 59 }
61 60
62 public LLUUID UUID 61 public UUID UUID
63 { 62 {
64 get { return LLUUID.Zero; } 63 get { return UUID.Zero; }
65 } 64 }
66 65
67 public LLUUID ObjectOwner 66 public UUID ObjectOwner
68 { 67 {
69 get { return LLUUID.Zero; } 68 get { return UUID.Zero; }
70 } 69 }
71 70
72 public LLUUID ObjectCreator 71 public UUID ObjectCreator
73 { 72 {
74 get { return LLUUID.Zero; } 73 get { return UUID.Zero; }
75 } 74 }
76 75
77 public LLVector3 AbsolutePosition 76 public Vector3 AbsolutePosition
78 { 77 {
79 get { return m_pos; } 78 get { return m_pos; }
80 } 79 }
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index 0e551cb..5f0f316 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Timers; 29using System.Timers;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.Statistics; 32using OpenSim.Framework.Statistics;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs
index fdbfa8c..d828d8d 100644
--- a/OpenSim/Region/Environment/Scenes/UndoState.cs
+++ b/OpenSim/Region/Environment/Scenes/UndoState.cs
@@ -25,17 +25,17 @@
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
28using libsecondlife; 28using OpenMetaverse;
29 29
30namespace OpenSim.Region.Environment.Scenes 30namespace OpenSim.Region.Environment.Scenes
31{ 31{
32 public class UndoState 32 public class UndoState
33 { 33 {
34 public LLVector3 Position = LLVector3.Zero; 34 public Vector3 Position = Vector3.Zero;
35 public LLVector3 Scale = LLVector3.Zero; 35 public Vector3 Scale = Vector3.Zero;
36 public LLQuaternion Rotation = LLQuaternion.Identity; 36 public Quaternion Rotation = Quaternion.Identity;
37 37
38 public UndoState(LLVector3 pos, LLQuaternion rot, LLVector3 scale) 38 public UndoState(Vector3 pos, Quaternion rot, Vector3 scale)
39 { 39 {
40 Position = pos; 40 Position = pos;
41 Rotation = rot; 41 Rotation = rot;
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs
index e9133ac..0c86df2 100644
--- a/OpenSim/Region/Environment/Types/UpdateQueue.cs
+++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Runtime.Serialization; 30using System.Runtime.Serialization;
31using System.Security.Permissions; 31using System.Security.Permissions;
32using libsecondlife; 32using OpenMetaverse;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34 34
35namespace OpenSim.Region.Environment.Types 35namespace OpenSim.Region.Environment.Types
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Types
39 { 39 {
40 private Queue<SceneObjectPart> m_queue; 40 private Queue<SceneObjectPart> m_queue;
41 41
42 private List<LLUUID> m_ids; 42 private List<UUID> m_ids;
43 43
44 private object m_syncObject = new object(); 44 private object m_syncObject = new object();
45 45
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Environment.Types
51 public UpdateQueue() 51 public UpdateQueue()
52 { 52 {
53 m_queue = new Queue<SceneObjectPart>(); 53 m_queue = new Queue<SceneObjectPart>();
54 m_ids = new List<LLUUID>(); 54 m_ids = new List<UUID>();
55 } 55 }
56 56
57 public void Clear() 57 public void Clear()
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Types
104 104
105 foreach (Guid guid in ids_work) 105 foreach (Guid guid in ids_work)
106 { 106 {
107 m_ids.Add(new LLUUID(guid)); 107 m_ids.Add(new UUID(guid));
108 } 108 }
109 109
110 //System.Console.WriteLine("UpdateQueue Deserialize END"); 110 //System.Console.WriteLine("UpdateQueue Deserialize END");
@@ -122,9 +122,9 @@ namespace OpenSim.Region.Environment.Types
122 122
123 List<Guid> ids_work = new List<Guid>(); 123 List<Guid> ids_work = new List<Guid>();
124 124
125 foreach (LLUUID uuid in m_ids) 125 foreach (UUID uuid in m_ids)
126 { 126 {
127 ids_work.Add(uuid.UUID); 127 ids_work.Add(uuid.Guid);
128 } 128 }
129 129
130 info.AddValue("m_queue", m_queue); 130 info.AddValue("m_queue", m_queue);
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
index 16636e0..c8c4624 100644
--- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Examples.SimpleModule
33{ 33{
34 public class ComplexObject : SceneObjectGroup 34 public class ComplexObject : SceneObjectGroup
35 { 35 {
36 private readonly LLQuaternion m_rotationDirection; 36 private readonly Quaternion m_rotationDirection;
37 37
38 protected override bool InSceneBackup 38 protected override bool InSceneBackup
39 { 39 {
@@ -45,21 +45,21 @@ namespace OpenSim.Region.Examples.SimpleModule
45 45
46 private class RotatingWheel : SceneObjectPart 46 private class RotatingWheel : SceneObjectPart
47 { 47 {
48 private readonly LLQuaternion m_rotationDirection; 48 private readonly Quaternion m_rotationDirection;
49 49
50 public RotatingWheel() 50 public RotatingWheel()
51 { 51 {
52 } 52 }
53 53
54 public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, 54 public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, UUID ownerID, uint localID,
55 LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) 55 Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection)
56 : base( 56 : base(
57 regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition 57 regionHandle, parent, ownerID, localID, PrimitiveBaseShape.Default, groupPosition, offsetPosition
58 ) 58 )
59 { 59 {
60 m_rotationDirection = rotationDirection; 60 m_rotationDirection = rotationDirection;
61 61
62 Flags |= LLObject.ObjectFlags.Touch; 62 Flags |= PrimFlags.Touch;
63 } 63 }
64 64
65 public override void UpdateMovement() 65 public override void UpdateMovement()
@@ -79,55 +79,55 @@ namespace OpenSim.Region.Examples.SimpleModule
79 { 79 {
80 } 80 }
81 81
82 public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos) 82 public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos)
83 : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) 83 : base(scene, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default)
84 { 84 {
85 m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); 85 m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f);
86 86
87 AddPart( 87 AddPart(
88 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), 88 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, 0.75f),
89 new LLQuaternion(0.05f, 0, 0))); 89 new Quaternion(0.05f, 0, 0)));
90 AddPart( 90 AddPart(
91 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), 91 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0, -0.75f),
92 new LLQuaternion(-0.05f, 0, 0))); 92 new Quaternion(-0.05f, 0, 0)));
93 93
94 AddPart( 94 AddPart(
95 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f, 0), 95 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, 0.75f, 0),
96 new LLQuaternion(0.5f, 0, 0.05f))); 96 new Quaternion(0.5f, 0, 0.05f)));
97 AddPart( 97 AddPart(
98 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f, 0), 98 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0, -0.75f, 0),
99 new LLQuaternion(-0.5f, 0, -0.05f))); 99 new Quaternion(-0.5f, 0, -0.05f)));
100 100
101 AddPart( 101 AddPart(
102 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), 102 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(0.75f, 0, 0),
103 new LLQuaternion(0, 0.5f, 0.05f))); 103 new Quaternion(0, 0.5f, 0.05f)));
104 AddPart( 104 AddPart(
105 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), 105 new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new Vector3(-0.75f, 0, 0),
106 new LLQuaternion(0, -0.5f, -0.05f))); 106 new Quaternion(0, -0.5f, -0.05f)));
107 107
108 RootPart.Flags |= LLObject.ObjectFlags.Touch; 108 RootPart.Flags |= PrimFlags.Touch;
109 109
110 UpdateParentIDs(); 110 UpdateParentIDs();
111 } 111 }
112 112
113 public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) 113 public override void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
114 { 114 {
115 m_parts.Remove(part.UUID); 115 m_parts.Remove(part.UUID);
116 116
117 remoteClient.SendKillObject(m_regionHandle, part.LocalId); 117 remoteClient.SendKiPrimitive(m_regionHandle, part.LocalId);
118 remoteClient.AddMoney(1); 118 remoteClient.AddMoney(1);
119 remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); 119 remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
120 } 120 }
121 121
122 public override void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) 122 public override void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
123 { 123 {
124 if (m_parts.Count == 1) 124 if (m_parts.Count == 1)
125 { 125 {
126 m_parts.Remove(m_rootPart.UUID); 126 m_parts.Remove(m_rootPart.UUID);
127 m_scene.DeleteSceneObject(this); 127 m_scene.DeleteSceneObject(this);
128 remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId); 128 remoteClient.SendKiPrimitive(m_regionHandle, m_rootPart.LocalId);
129 remoteClient.AddMoney(50); 129 remoteClient.AddMoney(50);
130 remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); 130 remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
131 } 131 }
132 } 132 }
133 } 133 }
diff --git a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
index e7d5db8..126ccd3 100644
--- a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Diagnostics; 29using System.Diagnostics;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33 33
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Examples.SimpleModule
45 45
46 private PerformanceCounter m_counter; 46 private PerformanceCounter m_counter;
47 47
48 public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos) 48 public CpuCounterObject(Scene world, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos)
49 : base(world, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default) 49 : base(world, regionHandle, ownerID, localID, pos, PrimitiveBaseShape.Default)
50 { 50 {
51 String objectName = "Processor"; 51 String objectName = "Processor";
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Examples.SimpleModule
58 public override void UpdateMovement() 58 public override void UpdateMovement()
59 { 59 {
60 float cpu = m_counter.NextValue()/40f; 60 float cpu = m_counter.NextValue()/40f;
61 LLVector3 size = new LLVector3(cpu, cpu, cpu); 61 Vector3 size = new Vector3(cpu, cpu, cpu);
62 62
63 RootPart.Resize(size); 63 RootPart.Resize(size);
64 64
diff --git a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
index 34ed086..3b43c7a 100644
--- a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
+++ b/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.IO; 28using System.IO;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32 32
@@ -34,8 +34,8 @@ namespace OpenSim.Region.Examples.SimpleModule
34{ 34{
35 public class FileSystemObject : SceneObjectGroup 35 public class FileSystemObject : SceneObjectGroup
36 { 36 {
37 public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) 37 public FileSystemObject(Scene world, FileInfo fileInfo, Vector3 pos)
38 : base(world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, PrimitiveBaseShape.Default) 38 : base(world, world.RegionInfo.RegionHandle, UUID.Zero, world.NextLocalId, pos, PrimitiveBaseShape.Default)
39 { 39 {
40 Text = fileInfo.Name; 40 Text = fileInfo.Name;
41 } 41 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 3ea518f..8f579bd 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35 35
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Examples.SimpleModule
39 { 39 {
40 private uint movementFlag = 0; 40 private uint movementFlag = 0;
41 private short flyState = 0; 41 private short flyState = 0;
42 private LLQuaternion bodyDirection = LLQuaternion.Identity; 42 private Quaternion bodyDirection = Quaternion.Identity;
43 private short count = 0; 43 private short count = 0;
44 private short frame = 0; 44 private short frame = 0;
45 private Scene m_scene; 45 private Scene m_scene;
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Examples.SimpleModule
117 public event UpdateVector OnUpdatePrimGroupScale; 117 public event UpdateVector OnUpdatePrimGroupScale;
118 public event StatusChange OnChildAgentStatus; 118 public event StatusChange OnChildAgentStatus;
119 public event GenericCall2 OnStopMovement; 119 public event GenericCall2 OnStopMovement;
120 public event Action<LLUUID> OnRemoveAvatar; 120 public event Action<UUID> OnRemoveAvatar;
121 121
122 public event CreateNewInventoryItem OnCreateNewInventoryItem; 122 public event CreateNewInventoryItem OnCreateNewInventoryItem;
123 public event CreateInventoryFolder OnCreateNewInventoryFolder; 123 public event CreateInventoryFolder OnCreateNewInventoryFolder;
@@ -216,37 +216,37 @@ namespace OpenSim.Region.Examples.SimpleModule
216 216
217#pragma warning restore 67 217#pragma warning restore 67
218 218
219 private LLUUID myID = LLUUID.Random(); 219 private UUID myID = UUID.Random();
220 220
221 public MyNpcCharacter(Scene scene) 221 public MyNpcCharacter(Scene scene)
222 { 222 {
223 223
224 // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2); 224 // startPos = new Vector3(128, (float)(Util.RandomClass.NextDouble()*100), 2);
225 m_scene = scene; 225 m_scene = scene;
226 m_scene.EventManager.OnFrame += Update; 226 m_scene.EventManager.OnFrame += Update;
227 } 227 }
228 228
229 private LLVector3 startPos = new LLVector3(128, 128, 2); 229 private Vector3 startPos = new Vector3(128, 128, 2);
230 230
231 public virtual LLVector3 StartPos 231 public virtual Vector3 StartPos
232 { 232 {
233 get { return startPos; } 233 get { return startPos; }
234 set { } 234 set { }
235 } 235 }
236 236
237 public virtual LLUUID AgentId 237 public virtual UUID AgentId
238 { 238 {
239 get { return myID; } 239 get { return myID; }
240 } 240 }
241 241
242 public LLUUID SessionId 242 public UUID SessionId
243 { 243 {
244 get { return LLUUID.Zero; } 244 get { return UUID.Zero; }
245 } 245 }
246 246
247 public LLUUID SecureSessionId 247 public UUID SecureSessionId
248 { 248 {
249 get { return LLUUID.Zero; } 249 get { return UUID.Zero; }
250 } 250 }
251 251
252 public virtual string FirstName 252 public virtual string FirstName
@@ -272,9 +272,9 @@ namespace OpenSim.Region.Examples.SimpleModule
272 set { } 272 set { }
273 } 273 }
274 274
275 public LLUUID ActiveGroupId 275 public UUID ActiveGroupId
276 { 276 {
277 get { return LLUUID.Zero; } 277 get { return UUID.Zero; }
278 } 278 }
279 279
280 public string ActiveGroupName 280 public string ActiveGroupName
@@ -287,10 +287,10 @@ namespace OpenSim.Region.Examples.SimpleModule
287 get { return 0; } 287 get { return 0; }
288 } 288 }
289 289
290 public ulong GetGroupPowers(LLUUID groupID) 290 public ulong GetGroupPowers(UUID groupID)
291 { 291 {
292 return 0; 292 return 0;
293 } 293 }
294 294
295 public virtual int NextAnimationSequenceNumber 295 public virtual int NextAnimationSequenceNumber
296 { 296 {
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Examples.SimpleModule
307 set { } 307 set { }
308 } 308 }
309 309
310 public virtual void ActivateGesture(LLUUID assetId, LLUUID gestureId) 310 public virtual void ActivateGesture(UUID assetId, UUID gestureId)
311 { 311 {
312 } 312 }
313 313
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Examples.SimpleModule
320 { 320 {
321 } 321 }
322 322
323 public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) 323 public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
324 { 324 {
325 } 325 }
326 326
@@ -336,12 +336,12 @@ namespace OpenSim.Region.Examples.SimpleModule
336 { 336 {
337 } 337 }
338 338
339 public virtual void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 339 public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
340 { 340 {
341 341
342 } 342 }
343 343
344 public virtual void SendKillObject(ulong regionHandle, uint localID) 344 public virtual void SendKiPrimitive(ulong regionHandle, uint localID)
345 { 345 {
346 } 346 }
347 347
@@ -354,27 +354,27 @@ namespace OpenSim.Region.Examples.SimpleModule
354 } 354 }
355 355
356 356
357 public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) 357 public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
358 { 358 {
359 } 359 }
360 360
361 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, 361 public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
362 LLUUID fromAgentID, byte source, byte audible) 362 UUID fromAgentID, byte source, byte audible)
363 { 363 {
364 } 364 }
365 365
366 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, 366 public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
367 LLUUID fromAgentID, byte source, byte audible) 367 UUID fromAgentID, byte source, byte audible)
368 { 368 {
369 } 369 }
370 370
371 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 371 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
372 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 372 UUID imSessionID, string fromName, byte dialog, uint timeStamp)
373 { 373 {
374 } 374 }
375 375
376 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 376 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
377 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 377 UUID imSessionID, string fromName, byte dialog, uint timeStamp,
378 byte[] binaryBucket) 378 byte[] binaryBucket)
379 { 379 {
380 } 380 }
@@ -390,7 +390,7 @@ namespace OpenSim.Region.Examples.SimpleModule
390 { 390 {
391 } 391 }
392 392
393 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 393 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
394 { 394 {
395 } 395 }
396 396
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Examples.SimpleModule
403 return new AgentCircuitData(); 403 return new AgentCircuitData();
404 } 404 }
405 405
406 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, 406 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
407 IPEndPoint newRegionExternalEndPoint, string capsURL) 407 IPEndPoint newRegionExternalEndPoint, string capsURL)
408 { 408 {
409 } 409 }
@@ -412,7 +412,7 @@ namespace OpenSim.Region.Examples.SimpleModule
412 { 412 {
413 } 413 }
414 414
415 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) 415 public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
416 { 416 {
417 } 417 }
418 418
@@ -429,66 +429,66 @@ namespace OpenSim.Region.Examples.SimpleModule
429 { 429 {
430 } 430 }
431 431
432 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) 432 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
433 { 433 {
434 } 434 }
435 435
436 public virtual void SendPayPrice(LLUUID objectID, int[] payPrice) 436 public virtual void SendPayPrice(UUID objectID, int[] payPrice)
437 { 437 {
438 } 438 }
439 439
440 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, 440 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
441 uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) 441 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
442 { 442 {
443 } 443 }
444 444
445 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 445 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
446 LLVector3 position, LLVector3 velocity, LLQuaternion rotation) 446 Vector3 position, Vector3 velocity, Quaternion rotation)
447 { 447 {
448 } 448 }
449 449
450 public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) 450 public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
451 { 451 {
452 } 452 }
453 453
454 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 454 public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
455 { 455 {
456 } 456 }
457 457
458 public virtual void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) 458 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
459 { 459 {
460 } 460 }
461 461
462 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 462 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
463 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 463 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
464 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 464 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
465 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 465 UUID objectID, UUID ownerID, string text, byte[] color,
466 uint parentID, 466 uint parentID,
467 byte[] particleSystem, byte clickAction) 467 byte[] particleSystem, byte clickAction)
468 { 468 {
469 } 469 }
470 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 470 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
471 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 471 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
472 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 472 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
473 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 473 UUID objectID, UUID ownerID, string text, byte[] color,
474 uint parentID, 474 uint parentID,
475 byte[] particleSystem, byte clickAction, byte[] textureanimation, 475 byte[] particleSystem, byte clickAction, byte[] textureanimation,
476 bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) 476 bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
477 { 477 {
478 } 478 }
479 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 479 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
480 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 480 Vector3 position, Quaternion rotation, Vector3 velocity,
481 LLVector3 rotationalvelocity, byte state, LLUUID AssetId) 481 Vector3 rotationalvelocity, byte state, UUID AssetId)
482 { 482 {
483 } 483 }
484 484
485 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 485 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
486 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 486 Vector3 position, Quaternion rotation, Vector3 velocity,
487 LLVector3 rotationalvelocity) 487 Vector3 rotationalvelocity)
488 { 488 {
489 } 489 }
490 490
491 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, 491 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
492 List<InventoryItemBase> items, 492 List<InventoryItemBase> items,
493 List<InventoryFolderBase> folders, 493 List<InventoryFolderBase> folders,
494 bool fetchFolders, 494 bool fetchFolders,
@@ -496,7 +496,7 @@ namespace OpenSim.Region.Examples.SimpleModule
496 { 496 {
497 } 497 }
498 498
499 public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) 499 public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
500 { 500 {
501 } 501 }
502 502
@@ -504,7 +504,7 @@ namespace OpenSim.Region.Examples.SimpleModule
504 { 504 {
505 } 505 }
506 506
507 public virtual void SendRemoveInventoryItem(LLUUID itemID) 507 public virtual void SendRemoveInventoryItem(UUID itemID)
508 { 508 {
509 } 509 }
510 510
@@ -513,16 +513,16 @@ namespace OpenSim.Region.Examples.SimpleModule
513 { 513 {
514 } 514 }
515 515
516 public LLUUID GetDefaultAnimation(string name) 516 public UUID GetDefaultAnimation(string name)
517 { 517 {
518 return LLUUID.Zero; 518 return UUID.Zero;
519 } 519 }
520 520
521 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) 521 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
522 { 522 {
523 } 523 }
524 524
525 public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) 525 public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
526 { 526 {
527 } 527 }
528 528
@@ -537,24 +537,24 @@ namespace OpenSim.Region.Examples.SimpleModule
537 { 537 {
538 538
539 } 539 }
540 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) 540 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
541 { 541 {
542 } 542 }
543 543
544 public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) 544 public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
545 { 545 {
546 } 546 }
547 547
548 public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, 548 public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
549 byte flags) 549 byte flags)
550 { 550 {
551 } 551 }
552 552
553 public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) 553 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
554 { 554 {
555 } 555 }
556 556
557 public void SendAttachedSoundGainChange(LLUUID objectID, float gain) 557 public void SendAttachedSoundGainChange(UUID objectID, float gain)
558 { 558 {
559 559
560 } 560 }
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Examples.SimpleModule
571 { 571 {
572 } 572 }
573 573
574 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, 574 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
575 string url) 575 string url)
576 { 576 {
577 } 577 }
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Examples.SimpleModule
588 OnCompleteMovementToRegion(); 588 OnCompleteMovementToRegion();
589 } 589 }
590 } 590 }
591 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) 591 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
592 { 592 {
593 } 593 }
594 594
@@ -596,11 +596,11 @@ namespace OpenSim.Region.Examples.SimpleModule
596 { 596 {
597 } 597 }
598 598
599 public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) 599 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
600 { 600 {
601 } 601 }
602 602
603 public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 603 public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
604 { 604 {
605 } 605 }
606 606
@@ -612,37 +612,37 @@ namespace OpenSim.Region.Examples.SimpleModule
612 { 612 {
613 } 613 }
614 614
615 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 615 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
616 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 616 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
617 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category, 617 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
618 LLUUID LastOwnerID, string ObjectName, string Description) 618 UUID LastOwnerID, string ObjectName, string Description)
619 { 619 {
620 } 620 }
621 621
622 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 622 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
623 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 623 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
624 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 624 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
625 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 625 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
626 uint BaseMask, byte saleType, int salePrice) 626 uint BaseMask, byte saleType, int salePrice)
627 { 627 {
628 } 628 }
629 629
630 public void SendAgentOffline(LLUUID[] agentIDs) 630 public void SendAgentOffline(UUID[] agentIDs)
631 { 631 {
632 632
633 } 633 }
634 634
635 public void SendAgentOnline(LLUUID[] agentIDs) 635 public void SendAgentOnline(UUID[] agentIDs)
636 { 636 {
637 637
638 } 638 }
639 639
640 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 640 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
641 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) 641 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
642 { 642 {
643 } 643 }
644 644
645 public void SendAdminResponse(LLUUID Token, uint AdminLevel) 645 public void SendAdminResponse(UUID Token, uint AdminLevel)
646 { 646 {
647 647
648 } 648 }
@@ -692,7 +692,7 @@ namespace OpenSim.Region.Examples.SimpleModule
692 args.Message = "Hey You! Get out of my Home. This is my Region"; 692 args.Message = "Hey You! Get out of my Home. This is my Region";
693 args.Channel = 0; 693 args.Channel = 0;
694 args.From = FirstName + " " + LastName; 694 args.From = FirstName + " " + LastName;
695 args.Position = new LLVector3(128, 128, 26); 695 args.Position = new Vector3(128, 128, 26);
696 args.Sender = this; 696 args.Sender = this;
697 args.Type = ChatTypeEnum.Shout; 697 args.Type = ChatTypeEnum.Shout;
698 698
@@ -710,7 +710,7 @@ namespace OpenSim.Region.Examples.SimpleModule
710 return false; 710 return false;
711 } 711 }
712 712
713 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong time, uint dlen, uint ylen, float phase) 713 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
714 { 714 {
715 } 715 }
716 716
@@ -718,9 +718,9 @@ namespace OpenSim.Region.Examples.SimpleModule
718 { 718 {
719 } 719 }
720 720
721 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 721 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
722 string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, 722 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
723 LLUUID partnerID) 723 UUID partnerID)
724 { 724 {
725 } 725 }
726 726
@@ -751,7 +751,7 @@ namespace OpenSim.Region.Examples.SimpleModule
751 get { return m_circuitCode; } 751 get { return m_circuitCode; }
752 set { m_circuitCode = value; } 752 set { m_circuitCode = value; }
753 } 753 }
754 public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 754 public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
755 { 755 {
756 756
757 } 757 }
@@ -772,41 +772,41 @@ namespace OpenSim.Region.Examples.SimpleModule
772 { 772 {
773 } 773 }
774 774
775 public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question) 775 public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
776 { 776 {
777 } 777 }
778 public void SendHealth(float health) 778 public void SendHealth(float health)
779 { 779 {
780 } 780 }
781 781
782 public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) 782 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
783 { 783 {
784 } 784 }
785 785
786 public void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID) 786 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
787 { 787 {
788 } 788 }
789 789
790 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 790 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
791 { 791 {
792 } 792 }
793 public void SendEstateCovenantInformation(LLUUID covenant) 793 public void SendEstateCovenantInformation(UUID covenant)
794 { 794 {
795 } 795 }
796 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) 796 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail)
797 { 797 {
798 } 798 }
799 799
800 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 800 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
801 { 801 {
802 } 802 }
803 public void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 803 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
804 { 804 {
805 } 805 }
806 public void SendForceClientSelectObjects(List<uint> objectIDs) 806 public void SendForceClientSelectObjects(List<uint> objectIDs)
807 { 807 {
808 } 808 }
809 public void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) 809 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
810 { 810 {
811 } 811 }
812 public void SendLandParcelOverlay(byte[] data, int sequence_id) 812 public void SendLandParcelOverlay(byte[] data, int sequence_id)
@@ -818,13 +818,13 @@ namespace OpenSim.Region.Examples.SimpleModule
818 818
819 } 819 }
820 820
821 public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, byte autoScale, string mediaType, 821 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType,
822 string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) 822 string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
823 { 823 {
824 824
825 } 825 }
826 826
827 public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) 827 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
828 { 828 {
829 } 829 }
830 830
@@ -832,7 +832,7 @@ namespace OpenSim.Region.Examples.SimpleModule
832 { 832 {
833 } 833 }
834 834
835 public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) 835 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
836 { 836 {
837 } 837 }
838 838
@@ -845,19 +845,19 @@ namespace OpenSim.Region.Examples.SimpleModule
845 845
846 } 846 }
847 847
848 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) 848 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
849 { 849 {
850 } 850 }
851 851
852 public void SendClearFollowCamProperties (LLUUID objectID) 852 public void SendClearFollowCamProperties (UUID objectID)
853 { 853 {
854 } 854 }
855 855
856 public void SendRegionHandle (LLUUID regoinID, ulong handle) 856 public void SendRegionHandle (UUID regoinID, ulong handle)
857 { 857 {
858 } 858 }
859 859
860 public void SendParcelInfo (RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) 860 public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
861 { 861 {
862 } 862 }
863 863
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
index 441c696..4fc0dbb 100644
--- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
+++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.IO; 29using System.IO;
30using libsecondlife; 30using OpenMetaverse;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Examples.SimpleModule
50 { 50 {
51 // RegionInfo regionInfo = m_scene.RegionInfo; 51 // RegionInfo regionInfo = m_scene.RegionInfo;
52 52
53 // LLVector3 pos = new LLVector3(110, 129, 27); 53 // Vector3 pos = new Vector3(110, 129, 27);
54 54
55 //AddCpuCounter(regionInfo, pos); 55 //AddCpuCounter(regionInfo, pos);
56 // AddComplexObjects(regionInfo, pos); 56 // AddComplexObjects(regionInfo, pos);
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Examples.SimpleModule
67 67
68 // foreach (FileInfo fileInfo in dirInfo.GetFiles()) 68 // foreach (FileInfo fileInfo in dirInfo.GetFiles())
69 // { 69 // {
70 // LLVector3 filePos = new LLVector3(100 + x, 129, 27 + z); 70 // Vector3 filePos = new Vector3(100 + x, 129, 27 + z);
71 // x = x + 2; 71 // x = x + 2;
72 // if (x > 50) 72 // if (x > 50)
73 // { 73 // {
@@ -92,29 +92,29 @@ namespace OpenSim.Region.Examples.SimpleModule
92 foreach (ScenePresence avatar in avatars) 92 foreach (ScenePresence avatar in avatars)
93 { 93 {
94 avatar.AbsolutePosition = 94 avatar.AbsolutePosition =
95 new LLVector3((float)Util.RandomClass.Next(100, 200), (float)Util.RandomClass.Next(30, 200), 2); 95 new Vector3((float)Util.RandomClass.Next(100, 200), (float)Util.RandomClass.Next(30, 200), 2);
96 } 96 }
97 } 97 }
98 98
99 // private void AddComplexObjects(RegionInfo regionInfo, LLVector3 pos) 99 // private void AddComplexObjects(RegionInfo regionInfo, Vector3 pos)
100 // { 100 // {
101 // int objs = 3; 101 // int objs = 3;
102 102
103 // for (int i = 0; i < (objs*objs*objs); i++) 103 // for (int i = 0; i < (objs*objs*objs); i++)
104 // { 104 // {
105 // LLVector3 posOffset = new LLVector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4); 105 // Vector3 posOffset = new Vector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4);
106 // ComplexObject complexObject = 106 // ComplexObject complexObject =
107 // new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), 107 // new ComplexObject(m_scene, regionInfo.RegionHandle, UUID.Zero, m_scene.PrimIDAllocate(),
108 // pos + posOffset); 108 // pos + posOffset);
109 // m_scene.AddNewSceneObject(complexObject, true); 109 // m_scene.AddNewSceneObject(complexObject, true);
110 // } 110 // }
111 // } 111 // }
112 112
113 // private void AddCpuCounter(RegionInfo regionInfo, LLVector3 pos) 113 // private void AddCpuCounter(RegionInfo regionInfo, Vector3 pos)
114 // { 114 // {
115 // SceneObjectGroup sceneObject = 115 // SceneObjectGroup sceneObject =
116 // new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(), 116 // new CpuCounterObject(m_scene, regionInfo.RegionHandle, UUID.Zero, m_scene.PrimIDAllocate(),
117 // pos + new LLVector3(1f, 1f, 1f)); 117 // pos + new Vector3(1f, 1f, 1f));
118 // m_scene.AddNewSceneObject(sceneObject, true); 118 // m_scene.AddNewSceneObject(sceneObject, true);
119 // } 119 // }
120 120
diff --git a/OpenSim/Region/Interfaces/IMoneyModule.cs b/OpenSim/Region/Interfaces/IMoneyModule.cs
index 5636857..37caa39 100644
--- a/OpenSim/Region/Interfaces/IMoneyModule.cs
+++ b/OpenSim/Region/Interfaces/IMoneyModule.cs
@@ -27,18 +27,18 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Region.Interfaces 32namespace OpenSim.Region.Interfaces
33{ 33{
34 public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); 34 public delegate void ObjectPaid(UUID objectID, UUID agentID, int amount);
35 public interface IMoneyModule 35 public interface IMoneyModule
36 { 36 {
37 bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, 37 bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID,
38 int amount); 38 int amount);
39 39
40 int GetBalance(IClientAPI client); 40 int GetBalance(IClientAPI client);
41 void ApplyUploadCharge(LLUUID agentID); 41 void ApplyUploadCharge(UUID agentID);
42 bool UploadCovered(IClientAPI client); 42 bool UploadCovered(IClientAPI client);
43 43
44 event ObjectPaid OnObjectPaid; 44 event ObjectPaid OnObjectPaid;
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
index 671b854..ab86d10 100644
--- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31 31
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using Nini.Config; 35using Nini.Config;
36using OpenSim.Data.Base; 36using OpenSim.Data.Base;
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
48 private Scene m_scene = null; 48 private Scene m_scene = null;
49 private static readonly AvatarAppearance def = new AvatarAppearance(); 49 private static readonly AvatarAppearance def = new AvatarAppearance();
50 50
51 public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) 51 public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance)
52 { 52 {
53 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(avatarId); 53 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
54 //if ((profile != null) && (profile.RootFolder != null)) 54 //if ((profile != null) && (profile.RootFolder != null))
@@ -69,7 +69,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
69 69
70 } 70 }
71 71
72 private AvatarAppearance CreateDefault(LLUUID avatarId) 72 private AvatarAppearance CreateDefault(UUID avatarId)
73 { 73 {
74 AvatarAppearance appearance = null; 74 AvatarAppearance appearance = null;
75 AvatarWearable[] wearables; 75 AvatarWearable[] wearables;
@@ -127,13 +127,13 @@ namespace OpenSim.Region.Modules.AvatarFactory
127 { 127 {
128 for (int i = 0; i < 13; i++) 128 for (int i = 0; i < 13; i++)
129 { 129 {
130 if (appearance.Wearables[i].ItemID == LLUUID.Zero) 130 if (appearance.Wearables[i].ItemID == UUID.Zero)
131 { 131 {
132 appearance.Wearables[i].AssetID = LLUUID.Zero; 132 appearance.Wearables[i].AssetID = UUID.Zero;
133 } 133 }
134 else 134 else
135 { 135 {
136 // LLUUID assetId; 136 // UUID assetId;
137 137
138 InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); 138 InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID);
139 139
@@ -201,7 +201,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
201 wearables = AvatarWearable.DefaultWearables; 201 wearables = AvatarWearable.DefaultWearables;
202 } 202 }
203 203
204 public void UpdateDatabase(LLUUID user, AvatarAppearance appearance) 204 public void UpdateDatabase(UUID user, AvatarAppearance appearance)
205 { 205 {
206 m_scene.CommsManager.AvatarService.UpdateUserAppearance(user, appearance); 206 m_scene.CommsManager.AvatarService.UpdateUserAppearance(user, appearance);
207 } 207 }
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
index a1c1b88..4bab7c9 100644
--- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
+++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
57 private string m_svnpass = "password"; 57 private string m_svnpass = "password";
58 58
59 private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0); 59 private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0);
60 private string m_svnurl = "svn://insert.your.svn/here/"; 60 private string m_svnurl = "svn://insert.Your.svn/here/";
61 private string m_svnuser = "username"; 61 private string m_svnuser = "username";
62 62
63 #region SvnModule Core 63 #region SvnModule Core
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
117 public void LoadRegion(Scene scene) 117 public void LoadRegion(Scene scene)
118 { 118 {
119 scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + 119 scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID +
120 Slash.DirectorySeparatorChar + "objects.xml"); 120 Slash.DirectorySeparatorChar + "objects.Xml");
121 scene.RequestModuleInterface<ITerrainModule>().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID + 121 scene.RequestModuleInterface<ITerrainModule>().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID +
122 Slash.DirectorySeparatorChar + "heightmap.r32"); 122 Slash.DirectorySeparatorChar + "heightmap.r32");
123 m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); 123 m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ").");
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 3bf0956..e38a12b 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -26,8 +26,8 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using Axiom.Math;
30using Nini.Config; 29using Nini.Config;
30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
33 33
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index cc55f6e..c969f9a 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -29,13 +29,15 @@
29 29
30using System; 30using System;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using OpenMetaverse;
32using MonoXnaCompactMaths; 33using MonoXnaCompactMaths;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using OpenSim.Region.Physics.Manager; 35using OpenSim.Region.Physics.Manager;
35using XnaDevRu.BulletX; 36using XnaDevRu.BulletX;
36using XnaDevRu.BulletX.Dynamics; 37using XnaDevRu.BulletX.Dynamics;
37using Nini.Config; 38using Nini.Config;
38using AxiomQuaternion = Axiom.Math.Quaternion; 39using Vector3 = MonoXnaCompactMaths.Vector3;
40using Quaternion = MonoXnaCompactMaths.Quaternion;
39 41
40#endregion 42#endregion
41 43
@@ -61,14 +63,14 @@ namespace OpenSim.Region.Physics.BulletXPlugin
61 } 63 }
62 64
63 //Quaternion 65 //Quaternion
64 public static Quaternion AxiomQuaternionToXnaQuaternion(AxiomQuaternion axiomQuaternion) 66 public static Quaternion QuaternionToXnaQuaternion(OpenMetaverse.Quaternion quaternion)
65 { 67 {
66 return new Quaternion(axiomQuaternion.x, axiomQuaternion.y, axiomQuaternion.z, axiomQuaternion.w); 68 return new Quaternion(quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
67 } 69 }
68 70
69 public static AxiomQuaternion XnaQuaternionToAxiomQuaternion(Quaternion xnaQuaternion) 71 public static OpenMetaverse.Quaternion XnaQuaternionToQuaternion(Quaternion xnaQuaternion)
70 { 72 {
71 return new AxiomQuaternion(xnaQuaternion.W, xnaQuaternion.X, xnaQuaternion.Y, xnaQuaternion.Z); 73 return new OpenMetaverse.Quaternion(xnaQuaternion.W, xnaQuaternion.X, xnaQuaternion.Y, xnaQuaternion.Z);
72 } 74 }
73 75
74 //Next methods are extracted from XnaDevRu.BulletX(See 3rd party license): 76 //Next methods are extracted from XnaDevRu.BulletX(See 3rd party license):
@@ -92,7 +94,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
92 94
93 internal static Quaternion GetRotation(Matrix m) 95 internal static Quaternion GetRotation(Matrix m)
94 { 96 {
95 Quaternion q = new Quaternion(); 97 Quaternion q;
96 98
97 float trace = m.M11 + m.M22 + m.M33; 99 float trace = m.M11 + m.M22 + m.M33;
98 100
@@ -108,6 +110,8 @@ namespace OpenSim.Region.Physics.BulletXPlugin
108 } 110 }
109 else 111 else
110 { 112 {
113 q.X = q.Y = q.Z = q.W = 0f;
114
111 int i = m.M11 < m.M22 115 int i = m.M11 < m.M22
112 ? 116 ?
113 (m.M22 < m.M33 ? 2 : 1) 117 (m.M22 < m.M33 ? 2 : 1)
@@ -601,13 +605,13 @@ namespace OpenSim.Region.Physics.BulletXPlugin
601 } 605 }
602 606
603 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 607 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
604 PhysicsVector size, AxiomQuaternion rotation) 608 PhysicsVector size, OpenMetaverse.Quaternion rotation)
605 { 609 {
606 return AddPrimShape(primName, pbs, position, size, rotation, false); 610 return AddPrimShape(primName, pbs, position, size, rotation, false);
607 } 611 }
608 612
609 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 613 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
610 PhysicsVector size, AxiomQuaternion rotation, bool isPhysical) 614 PhysicsVector size, OpenMetaverse.Quaternion rotation, bool isPhysical)
611 { 615 {
612 PhysicsActor result; 616 PhysicsActor result;
613 617
@@ -634,7 +638,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
634 return result; 638 return result;
635 } 639 }
636 640
637 public PhysicsActor AddPrim(String name, PhysicsVector position, PhysicsVector size, AxiomQuaternion rotation, 641 public PhysicsActor AddPrim(String name, PhysicsVector position, PhysicsVector size, OpenMetaverse.Quaternion rotation,
638 IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical) 642 IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical)
639 { 643 {
640 BulletXPrim newPrim = null; 644 BulletXPrim newPrim = null;
@@ -680,7 +684,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
680 //Try to remove garbage 684 //Try to remove garbage
681 RemoveForgottenRigidBodies(); 685 RemoveForgottenRigidBodies();
682 //End of remove 686 //End of remove
683 MoveAllObjects(timeStep); 687 MoveAPrimitives(timeStep);
684 688
685 689
686 fps = (timeStep*simulationSubSteps); 690 fps = (timeStep*simulationSubSteps);
@@ -694,7 +698,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
694 return fps; 698 return fps;
695 } 699 }
696 700
697 private void MoveAllObjects(float timeStep) 701 private void MoveAPrimitives(float timeStep)
698 { 702 {
699 foreach (BulletXCharacter actor in _characters.Values) 703 foreach (BulletXCharacter actor in _characters.Values)
700 { 704 {
@@ -867,7 +871,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
867 protected PhysicsVector _velocity; 871 protected PhysicsVector _velocity;
868 protected PhysicsVector _size; 872 protected PhysicsVector _size;
869 protected PhysicsVector _acceleration; 873 protected PhysicsVector _acceleration;
870 protected AxiomQuaternion _orientation; 874 protected OpenMetaverse.Quaternion _orientation;
871 protected PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; 875 protected PhysicsVector m_rotationalVelocity = PhysicsVector.Zero;
872 protected RigidBody rigidBody; 876 protected RigidBody rigidBody;
873 protected int m_PhysicsActorType; 877 protected int m_PhysicsActorType;
@@ -972,7 +976,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
972 get { return _acceleration; } 976 get { return _acceleration; }
973 } 977 }
974 978
975 public override AxiomQuaternion Orientation 979 public override OpenMetaverse.Quaternion Orientation
976 { 980 {
977 get { return _orientation; } 981 get { return _orientation; }
978 set 982 set
@@ -1148,10 +1152,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1148 ReOrient(_orientation); 1152 ReOrient(_orientation);
1149 } 1153 }
1150 1154
1151 protected internal void ReOrient(AxiomQuaternion _newOrient) 1155 protected internal void ReOrient(OpenMetaverse.Quaternion _newOrient)
1152 { 1156 {
1153 Quaternion _newOrientation; 1157 Quaternion _newOrientation;
1154 _newOrientation = BulletXMaths.AxiomQuaternionToXnaQuaternion(_newOrient); 1158 _newOrientation = BulletXMaths.QuaternionToXnaQuaternion(_newOrient);
1155 Matrix _comTransform = rigidBody.CenterOfMassTransform; 1159 Matrix _comTransform = rigidBody.CenterOfMassTransform;
1156 BulletXMaths.SetRotation(ref _comTransform, _newOrientation); 1160 BulletXMaths.SetRotation(ref _comTransform, _newOrientation);
1157 rigidBody.CenterOfMassTransform = _comTransform; 1161 rigidBody.CenterOfMassTransform = _comTransform;
@@ -1206,12 +1210,12 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1206 1210
1207 public BulletXCharacter(String avName, BulletXScene parent_scene, PhysicsVector pos) 1211 public BulletXCharacter(String avName, BulletXScene parent_scene, PhysicsVector pos)
1208 : this(avName, parent_scene, pos, new PhysicsVector(), new PhysicsVector(), new PhysicsVector(), 1212 : this(avName, parent_scene, pos, new PhysicsVector(), new PhysicsVector(), new PhysicsVector(),
1209 AxiomQuaternion.Identity) 1213 OpenMetaverse.Quaternion.Identity)
1210 { 1214 {
1211 } 1215 }
1212 1216
1213 public BulletXCharacter(String avName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector velocity, 1217 public BulletXCharacter(String avName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector velocity,
1214 PhysicsVector size, PhysicsVector acceleration, AxiomQuaternion orientation) 1218 PhysicsVector size, PhysicsVector acceleration, OpenMetaverse.Quaternion orientation)
1215 : base(avName) 1219 : base(avName)
1216 { 1220 {
1217 //This fields will be removed. They're temporal 1221 //This fields will be removed. They're temporal
@@ -1289,7 +1293,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1289 get { return base.Acceleration; } 1293 get { return base.Acceleration; }
1290 } 1294 }
1291 1295
1292 public override AxiomQuaternion Orientation 1296 public override OpenMetaverse.Quaternion Orientation
1293 { 1297 {
1294 get { return base.Orientation; } 1298 get { return base.Orientation; }
1295 set { base.Orientation = value; } 1299 set { base.Orientation = value; }
@@ -1404,7 +1408,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1404 1408
1405 1409
1406 public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector size, 1410 public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector size,
1407 AxiomQuaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical) 1411 OpenMetaverse.Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool isPhysical)
1408 : this( 1412 : this(
1409 primName, parent_scene, pos, new PhysicsVector(), size, new PhysicsVector(), rotation, mesh, pbs, 1413 primName, parent_scene, pos, new PhysicsVector(), size, new PhysicsVector(), rotation, mesh, pbs,
1410 isPhysical) 1414 isPhysical)
@@ -1413,12 +1417,14 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1413 1417
1414 public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector velocity, 1418 public BulletXPrim(String primName, BulletXScene parent_scene, PhysicsVector pos, PhysicsVector velocity,
1415 PhysicsVector size, 1419 PhysicsVector size,
1416 PhysicsVector acceleration, AxiomQuaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, 1420 PhysicsVector acceleration, OpenMetaverse.Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs,
1417 bool isPhysical) 1421 bool isPhysical)
1418 : base(primName) 1422 : base(primName)
1419 { 1423 {
1420 if ((size.X == 0) || (size.Y == 0) || (size.Z == 0)) throw new Exception("Size 0"); 1424 if ((size.X == 0) || (size.Y == 0) || (size.Z == 0))
1421 if (rotation.Norm == 0f) rotation = AxiomQuaternion.Identity; 1425 throw new Exception("Size 0");
1426 if (OpenMetaverse.Quaternion.Normalize(rotation).Length() == 0f)
1427 rotation = OpenMetaverse.Quaternion.Identity;
1422 1428
1423 _position = pos; 1429 _position = pos;
1424 _physical = isPhysical; 1430 _physical = isPhysical;
@@ -1468,7 +1474,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1468 get { return base.Acceleration; } 1474 get { return base.Acceleration; }
1469 } 1475 }
1470 1476
1471 public override AxiomQuaternion Orientation 1477 public override OpenMetaverse.Quaternion Orientation
1472 { 1478 {
1473 get { return base.Orientation; } 1479 get { return base.Orientation; }
1474 set { base.Orientation = value; } 1480 set { base.Orientation = value; }
@@ -1565,7 +1571,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1565 _position = BulletXMaths.XnaVector3ToPhysicsVector(rigidBody.CenterOfMassPosition); 1571 _position = BulletXMaths.XnaVector3ToPhysicsVector(rigidBody.CenterOfMassPosition);
1566 1572
1567 _velocity = BulletXMaths.XnaVector3ToPhysicsVector(rigidBody.LinearVelocity); 1573 _velocity = BulletXMaths.XnaVector3ToPhysicsVector(rigidBody.LinearVelocity);
1568 _orientation = BulletXMaths.XnaQuaternionToAxiomQuaternion(rigidBody.Orientation); 1574 _orientation = BulletXMaths.XnaQuaternionToQuaternion(rigidBody.Orientation);
1569 1575
1570 if ((Math.Abs(m_prev_position.X - _position.X) < 0.03) 1576 if ((Math.Abs(m_prev_position.X - _position.X) < 0.03)
1571 && (Math.Abs(m_prev_position.Y - _position.Y) < 0.03) 1577 && (Math.Abs(m_prev_position.Y - _position.Y) < 0.03)
@@ -1687,7 +1693,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1687 { 1693 {
1688 private PhysicsVector _staticPosition; 1694 private PhysicsVector _staticPosition;
1689// private PhysicsVector _staticVelocity; 1695// private PhysicsVector _staticVelocity;
1690// private AxiomQuaternion _staticOrientation; 1696// private OpenMetaverse.Quaternion _staticOrientation;
1691 private float _mass; 1697 private float _mass;
1692 // private BulletXScene _parentscene; 1698 // private BulletXScene _parentscene;
1693 internal float[] _heightField; 1699 internal float[] _heightField;
@@ -1702,7 +1708,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
1702 { 1708 {
1703 _staticPosition = new PhysicsVector(BulletXScene.MaxXY/2, BulletXScene.MaxXY/2, 0); 1709 _staticPosition = new PhysicsVector(BulletXScene.MaxXY/2, BulletXScene.MaxXY/2, 0);
1704// _staticVelocity = new PhysicsVector(); 1710// _staticVelocity = new PhysicsVector();
1705// _staticOrientation = AxiomQuaternion.Identity; 1711// _staticOrientation = OpenMetaverse.Quaternion.Identity;
1706 _mass = 0; //No active 1712 _mass = 0; //No active
1707 // _parentscene = parent_scene; 1713 // _parentscene = parent_scene;
1708 _heightField = heightField; 1714 _heightField = heightField;
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index d4af271..482b478 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -27,8 +27,8 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math;
31using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenMetaverse;
32 32
33namespace OpenSim.Region.Physics.Manager 33namespace OpenSim.Region.Physics.Manager
34{ 34{
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
index 3d9207f..db41251 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
@@ -115,43 +115,73 @@ namespace OpenSim.Region.Physics.Manager
115 // that the LoadFrom context be avoided. This can be done by installing assemblies in the 115 // that the LoadFrom context be avoided. This can be done by installing assemblies in the
116 // Global Assembly Cache or in the ApplicationBase directory and using Assembly. 116 // Global Assembly Cache or in the ApplicationBase directory and using Assembly.
117 // Load when explicitly loading assemblies. 117 // Load when explicitly loading assemblies.
118 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 118 Assembly pluginAssembly = null;
119 Type[] types = null;
119 120
120 foreach (Type pluginType in pluginAssembly.GetTypes()) 121 try
121 { 122 {
122 if (pluginType.IsPublic) 123 pluginAssembly = Assembly.LoadFrom(FileName);
123 { 124 }
124 if (!pluginType.IsAbstract) 125 catch (Exception ex)
125 { 126 {
126 Type physTypeInterface = pluginType.GetInterface("IPhysicsPlugin", true); 127 m_log.Error("Failed to load plugin from " + FileName, ex);
127 128 }
128 if (physTypeInterface != null)
129 {
130 IPhysicsPlugin plug =
131 (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
132 plug.Init();
133 if (!_PhysPlugins.ContainsKey(plug.GetName()))
134 {
135 _PhysPlugins.Add(plug.GetName(), plug);
136 m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName());
137 }
138 }
139 129
140 Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); 130 if (pluginAssembly != null)
131 {
132 try
133 {
134 types = pluginAssembly.GetTypes();
135 }
136 catch (ReflectionTypeLoadException ex)
137 {
138 m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + FileName + ": " +
139 ex.LoaderExceptions[0].Message, ex);
140 }
141 catch (Exception ex)
142 {
143 m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + FileName, ex);
144 }
141 145
142 if (meshTypeInterface != null) 146 if (types != null)
147 {
148 foreach (Type pluginType in types)
149 {
150 if (pluginType.IsPublic)
143 { 151 {
144 IMeshingPlugin plug = 152 if (!pluginType.IsAbstract)
145 (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
146 if (!_MeshPlugins.ContainsKey(plug.GetName()))
147 { 153 {
148 _MeshPlugins.Add(plug.GetName(), plug); 154 Type physTypeInterface = pluginType.GetInterface("IPhysicsPlugin", true);
149 m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName()); 155
156 if (physTypeInterface != null)
157 {
158 IPhysicsPlugin plug =
159 (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
160 plug.Init();
161 if (!_PhysPlugins.ContainsKey(plug.GetName()))
162 {
163 _PhysPlugins.Add(plug.GetName(), plug);
164 m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName());
165 }
166 }
167
168 Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true);
169
170 if (meshTypeInterface != null)
171 {
172 IMeshingPlugin plug =
173 (IMeshingPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
174 if (!_MeshPlugins.ContainsKey(plug.GetName()))
175 {
176 _MeshPlugins.Add(plug.GetName(), plug);
177 m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName());
178 }
179 }
180
181 physTypeInterface = null;
182 meshTypeInterface = null;
150 } 183 }
151 } 184 }
152
153 physTypeInterface = null;
154 meshTypeInterface = null;
155 } 185 }
156 } 186 }
157 } 187 }
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index f9d990b..3575a51 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -27,10 +27,10 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using Axiom.Math;
31using log4net; 30using log4net;
32using Nini.Config; 31using Nini.Config;
33using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenMetaverse;
34 34
35namespace OpenSim.Region.Physics.Manager 35namespace OpenSim.Region.Physics.Manager
36{ 36{
diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
index adf4715..bbd6464 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Physics.Manager
60 } 60 }
61 61
62 /// <summary> 62 /// <summary>
63 /// These routines are the easiest way to store XYZ values in an LLVector3 without requiring 3 calls. 63 /// These routines are the easiest way to store XYZ values in an Vector3 without requiring 3 calls.
64 /// </summary> 64 /// </summary>
65 /// <returns></returns> 65 /// <returns></returns>
66 public byte[] GetBytes() 66 public byte[] GetBytes()
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs
index a47b6ae..1fc65e3 100644
--- a/OpenSim/Region/Physics/Meshing/Extruder.cs
+++ b/OpenSim/Region/Physics/Meshing/Extruder.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27//#define SPAM 27//#define SPAM
28 28
29using OpenMetaverse;
29using OpenSim.Region.Physics.Manager; 30using OpenSim.Region.Physics.Manager;
30 31
31namespace OpenSim.Region.Physics.Meshing 32namespace OpenSim.Region.Physics.Meshing
@@ -72,9 +73,6 @@ namespace OpenSim.Region.Physics.Meshing
72 { 73 {
73 Mesh result = new Mesh(); 74 Mesh result = new Mesh();
74 75
75 // Quaternion tt = new Quaternion();
76 // Vertex v2 = new Vertex(0, 0, 0);
77
78 Mesh newLayer; 76 Mesh newLayer;
79 Mesh lastLayer = null; 77 Mesh lastLayer = null;
80 78
@@ -163,7 +161,7 @@ namespace OpenSim.Region.Physics.Meshing
163 161
164 // apply twist rotation to the profile layer and position the layer in the prim 162 // apply twist rotation to the profile layer and position the layer in the prim
165 163
166 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist); 164 Quaternion profileRot = Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), twist);
167 foreach (Vertex v in newLayer.vertices) 165 foreach (Vertex v in newLayer.vertices)
168 { 166 {
169 if (v != null) 167 if (v != null)
@@ -259,9 +257,6 @@ namespace OpenSim.Region.Physics.Meshing
259 { 257 {
260 Mesh result = new Mesh(); 258 Mesh result = new Mesh();
261 259
262 // Quaternion tt = new Quaternion();
263 // Vertex v2 = new Vertex(0, 0, 0);
264
265 Mesh newLayer; 260 Mesh newLayer;
266 Mesh lastLayer = null; 261 Mesh lastLayer = null;
267 262
@@ -377,7 +372,7 @@ namespace OpenSim.Region.Physics.Meshing
377 // next apply twist rotation to the profile layer 372 // next apply twist rotation to the profile layer
378 if (twistTotal != 0.0f || twistBot != 0.0f) 373 if (twistTotal != 0.0f || twistBot != 0.0f)
379 { 374 {
380 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist); 375 Quaternion profileRot = new Quaternion(new Vector3(0.0f, 0.0f, 1.0f), twist);
381 foreach (Vertex v in newLayer.vertices) 376 foreach (Vertex v in newLayer.vertices)
382 { 377 {
383 if (v != null) 378 if (v != null)
@@ -392,7 +387,7 @@ namespace OpenSim.Region.Physics.Meshing
392 387
393 // now orient the rotation of the profile layer relative to it's position on the path 388 // now orient the rotation of the profile layer relative to it's position on the path
394 // adding pushY to the angle used to generate the quat appears to approximate the viewer 389 // adding pushY to the angle used to generate the quat appears to approximate the viewer
395 Quaternion layerRot = new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), (float)angle + pushY * 0.9f); 390 Quaternion layerRot = Quaternion.CreateFromAxisAngle(new Vector3(1.0f, 0.0f, 0.0f), (float)angle + pushY * 0.9f);
396 foreach (Vertex v in newLayer.vertices) 391 foreach (Vertex v in newLayer.vertices)
397 { 392 {
398 if (v != null) 393 if (v != null)
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
index 2cb8d04..7491782 100644
--- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs
+++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
@@ -29,70 +29,10 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Diagnostics; 30using System.Diagnostics;
31using System.Globalization; 31using System.Globalization;
32using OpenMetaverse;
32using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.Physics.Manager;
33using OpenSim.Region.Physics.Meshing; 34using OpenSim.Region.Physics.Meshing;
34 35
35public class Quaternion
36{
37 public float x = 0;
38 public float y = 0;
39 public float z = 0;
40 public float w = 1;
41
42 public Quaternion()
43 {
44
45 }
46 public Quaternion(float x1, float y1, float z1, float w1)
47 {
48 x = x1; y = y1; z = z1; w = w1;
49 }
50 public Quaternion(Vertex axis, float angle)
51 {
52 // using (* 0.5) instead of (/2)
53 w = (float)Math.Cos(angle * 0.5f);
54 float sin = (float)Math.Sin(angle * 0.5f);
55 //x = axis.X * (float)Math.Sin(angle * 0.5f);
56 //y = axis.Y * (float)Math.Sin(angle * 0.5f);
57 //z = axis.Z * (float)Math.Sin(angle * 0.5f);
58 x = axis.X * sin;
59 y = axis.Y * sin;
60 z = axis.Z * sin;
61 normalize();
62 }
63 public static Quaternion operator *(Quaternion a, Quaternion b)
64 {
65 Quaternion c = new Quaternion();
66 c.x = a.w * b.x + a.x * b.w + a.y * b.z - a.z * b.y;
67 c.y = a.w * b.y + a.y * b.w + a.z * b.x - a.x * b.z;
68 c.z = a.w * b.z + a.z * b.w + a.x * b.y - a.y * b.x;
69 c.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;
70 return c;
71 }
72
73 public void normalize()
74 {
75 //float mag = length();
76
77 //w /= mag;
78 //x /= mag;
79 //y /= mag;
80 //z /= mag;
81 float iMag = 1.0f / length();
82
83 w *= iMag;
84 x *= iMag;
85 y *= iMag;
86 z *= iMag;
87 }
88 public float length()
89 {
90 return (float)Math.Sqrt(w * w + x * x + y * y + z * z);
91 }
92}
93
94
95
96public class Vertex : PhysicsVector, IComparable<Vertex> 36public class Vertex : PhysicsVector, IComparable<Vertex>
97{ 37{
98 public Vertex(float x, float y, float z) 38 public Vertex(float x, float y, float z)
@@ -129,34 +69,34 @@ public class Vertex : PhysicsVector, IComparable<Vertex>
129 69
130 Vertex v2 = new Vertex(0f, 0f, 0f); 70 Vertex v2 = new Vertex(0f, 0f, 0f);
131 71
132 v2.X = q.w * q.w * v.X + 72 v2.X = q.W * q.W * v.X +
133 2f * q.y * q.w * v.Z - 73 2f * q.Y * q.W * v.Z -
134 2f * q.z * q.w * v.Y + 74 2f * q.Z * q.W * v.Y +
135 q.x * q.x * v.X + 75 q.X * q.X * v.X +
136 2f * q.y * q.x * v.Y + 76 2f * q.Y * q.X * v.Y +
137 2f * q.z * q.x * v.Z - 77 2f * q.Z * q.X * v.Z -
138 q.z * q.z * v.X - 78 q.Z * q.Z * v.X -
139 q.y * q.y * v.X; 79 q.Y * q.Y * v.X;
140 80
141 v2.Y = 81 v2.Y =
142 2f * q.x * q.y * v.X + 82 2f * q.X * q.Y * v.X +
143 q.y * q.y * v.Y + 83 q.Y * q.Y * v.Y +
144 2f * q.z * q.y * v.Z + 84 2f * q.Z * q.Y * v.Z +
145 2f * q.w * q.z * v.X - 85 2f * q.W * q.Z * v.X -
146 q.z * q.z * v.Y + 86 q.Z * q.Z * v.Y +
147 q.w * q.w * v.Y - 87 q.W * q.W * v.Y -
148 2f * q.x * q.w * v.Z - 88 2f * q.X * q.W * v.Z -
149 q.x * q.x * v.Y; 89 q.X * q.X * v.Y;
150 90
151 v2.Z = 91 v2.Z =
152 2f * q.x * q.z * v.X + 92 2f * q.X * q.Z * v.X +
153 2f * q.y * q.z * v.Y + 93 2f * q.Y * q.Z * v.Y +
154 q.z * q.z * v.Z - 94 q.Z * q.Z * v.Z -
155 2f * q.w * q.y * v.X - 95 2f * q.W * q.Y * v.X -
156 q.y * q.y * v.Z + 96 q.Y * q.Y * v.Z +
157 2f * q.w * q.x * v.Y - 97 2f * q.W * q.X * v.Y -
158 q.x * q.x * v.Z + 98 q.X * q.X * v.Z +
159 q.w * q.w * v.Z; 99 q.W * q.W * v.Z;
160 100
161 return v2; 101 return v2;
162 } 102 }
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index ecde92a..f955c52 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -30,6 +30,7 @@ using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
33using OpenMetaverse;
33 34
34namespace OpenSim.Region.Physics.Meshing 35namespace OpenSim.Region.Physics.Meshing
35{ 36{
@@ -1559,7 +1560,7 @@ namespace OpenSim.Region.Physics.Meshing
1559 1560
1560 if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Circle) 1561 if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Circle)
1561 { 1562 {
1562 Quaternion zFlip = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), (float)Math.PI); 1563 Quaternion zFlip = Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), (float)Math.PI);
1563 Vertex vTmp = new Vertex(0.0f, 0.0f, 0.0f); 1564 Vertex vTmp = new Vertex(0.0f, 0.0f, 0.0f);
1564 foreach (Vertex v in cuttedHull.getVertices()) 1565 foreach (Vertex v in cuttedHull.getVertices())
1565 if (v != null) 1566 if (v != null)
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index 86bdabc..08b2d10 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using OpenSim.Region.Physics.Manager; 31using OpenSim.Region.Physics.Manager;
32using OpenMetaverse;
32 33
33namespace OpenSim.Region.Physics.Meshing 34namespace OpenSim.Region.Physics.Meshing
34{ 35{
@@ -783,7 +784,7 @@ angles24 = [
783 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); 784 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides);
784 785
785 if (initialProfileRot != 0.0f) 786 if (initialProfileRot != 0.0f)
786 profile.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), initialProfileRot)); 787 profile.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), initialProfileRot));
787 788
788 bool done = false; 789 bool done = false;
789 while (!done) 790 while (!done)
@@ -807,7 +808,7 @@ angles24 = [
807 808
808 float twist = twistBegin + twistTotal * percentOfPath; 809 float twist = twistBegin + twistTotal * percentOfPath;
809 if (twist != 0.0f) 810 if (twist != 0.0f)
810 newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); 811 newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), twist));
811 812
812 newLayer.AddPos(xOffset, yOffset, zOffset); 813 newLayer.AddPos(xOffset, yOffset, zOffset);
813 814
@@ -948,7 +949,7 @@ angles24 = [
948 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); 949 Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides);
949 950
950 if (initialProfileRot != 0.0f) 951 if (initialProfileRot != 0.0f)
951 profile.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), initialProfileRot)); 952 profile.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), initialProfileRot));
952 953
953 bool done = false; 954 bool done = false;
954 while (!done) // loop through the length of the path and add the layers 955 while (!done) // loop through the length of the path and add the layers
@@ -991,12 +992,12 @@ angles24 = [
991 992
992 // next apply twist rotation to the profile layer 993 // next apply twist rotation to the profile layer
993 if (twistTotal != 0.0f || twistBegin != 0.0f) 994 if (twistTotal != 0.0f || twistBegin != 0.0f)
994 newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); 995 newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), twist));
995 996
996 // now orient the rotation of the profile layer relative to it's position on the path 997 // now orient the rotation of the profile layer relative to it's position on the path
997 // adding taperY to the angle used to generate the quat appears to approximate the viewer 998 // adding taperY to the angle used to generate the quat appears to approximate the viewer
998 //newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); 999 //newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f));
999 newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY)); 1000 newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(1.0f, 0.0f, 0.0f), angle + this.topShearY));
1000 newLayer.AddPos(xOffset, yOffset, zOffset); 1001 newLayer.AddPos(xOffset, yOffset, zOffset);
1001 1002
1002 if (angle == startAngle) 1003 if (angle == startAngle)
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 360b2f7..707c0e3 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -30,14 +30,14 @@ using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using System.Text; 32using System.Text;
33using OpenJPEGNet; 33using OpenMetaverse.Imaging;
34using Image = System.Drawing.Image;
35 34
36namespace OpenSim.Region.Physics.Meshing 35namespace OpenSim.Region.Physics.Meshing
37{ 36{
38 // This functionality based on the XNA SculptPreview by John Hurliman. 37 // This functionality based on the XNA SculptPreview by John Hurliman.
39 public class SculptMesh : Mesh 38 public class SculptMesh : Mesh
40 { 39 {
40 ManagedImage managedImage;
41 Image idata = null; 41 Image idata = null;
42 Bitmap bLOD = null; 42 Bitmap bLOD = null;
43 Bitmap bBitmap = null; 43 Bitmap bBitmap = null;
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Physics.Meshing
55 55
56 try 56 try
57 { 57 {
58 idata = OpenJPEG.DecodeToImage(jpegData); 58 OpenJPEG.DecodeToImage(jpegData, out managedImage, out idata);
59 //int i = 0; 59 //int i = 0;
60 //i = i / i; 60 //i = i / i;
61 } 61 }
@@ -64,6 +64,7 @@ namespace OpenSim.Region.Physics.Meshing
64 System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!"); 64 System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
65 return; 65 return;
66 } 66 }
67
67 if (idata != null) 68 if (idata != null)
68 { 69 {
69 bBitmap = new Bitmap(idata); 70 bBitmap = new Bitmap(idata);
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 5d3e986..38d4060 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using Axiom.Math; 29using OpenMetaverse;
30using Ode.NET; 30using Ode.NET;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
@@ -587,7 +587,6 @@ namespace OpenSim.Region.Physics.OdePlugin
587 //Matrix3 or = Orientation.ToRotationMatrix(); 587 //Matrix3 or = Orientation.ToRotationMatrix();
588 //d.Matrix3 ord = new d.Matrix3(or.m00, or.m10, or.m20, or.m01, or.m11, or.m21, or.m02, or.m12, or.m22); 588 //d.Matrix3 ord = new d.Matrix3(or.m00, or.m10, or.m20, or.m01, or.m11, or.m21, or.m02, or.m12, or.m22);
589 //d.BodySetRotation(Body, ref ord); 589 //d.BodySetRotation(Body, ref ord);
590
591 } 590 }
592 } 591 }
593 592
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index eafce5a..21e514b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -30,8 +30,8 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using System.Threading; 32using System.Threading;
33using Axiom.Math;
34using log4net; 33using log4net;
34using OpenMetaverse;
35using Ode.NET; 35using Ode.NET;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
@@ -294,10 +294,10 @@ namespace OpenSim.Region.Physics.OdePlugin
294 setMass(); 294 setMass();
295 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); 295 d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
296 d.Quaternion myrot = new d.Quaternion(); 296 d.Quaternion myrot = new d.Quaternion();
297 myrot.W = _orientation.w; 297 myrot.X = _orientation.X;
298 myrot.X = _orientation.x; 298 myrot.Y = _orientation.Y;
299 myrot.Y = _orientation.y; 299 myrot.Z = _orientation.Z;
300 myrot.Z = _orientation.z; 300 myrot.W = _orientation.W;
301 d.BodySetQuaternion(Body, ref myrot); 301 d.BodySetQuaternion(Body, ref myrot);
302 d.GeomSetBody(prim_geom, Body); 302 d.GeomSetBody(prim_geom, Body);
303 m_collisionCategories |= CollisionCategories.Body; 303 m_collisionCategories |= CollisionCategories.Body;
@@ -1021,10 +1021,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1021 { 1021 {
1022 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1022 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1023 d.Quaternion myrot = new d.Quaternion(); 1023 d.Quaternion myrot = new d.Quaternion();
1024 myrot.W = _orientation.w; 1024 myrot.X = _orientation.X;
1025 myrot.X = _orientation.x; 1025 myrot.Y = _orientation.Y;
1026 myrot.Y = _orientation.y; 1026 myrot.Z = _orientation.Z;
1027 myrot.Z = _orientation.z; 1027 myrot.W = _orientation.W;
1028 d.GeomSetQuaternion(prim_geom, ref myrot); 1028 d.GeomSetQuaternion(prim_geom, ref myrot);
1029 } 1029 }
1030 1030
@@ -1220,10 +1220,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1220 public void rotate(float timestep) 1220 public void rotate(float timestep)
1221 { 1221 {
1222 d.Quaternion myrot = new d.Quaternion(); 1222 d.Quaternion myrot = new d.Quaternion();
1223 myrot.W = _orientation.w; 1223 myrot.X = _orientation.X;
1224 myrot.X = _orientation.x; 1224 myrot.Y = _orientation.Y;
1225 myrot.Y = _orientation.y; 1225 myrot.Z = _orientation.Z;
1226 myrot.Z = _orientation.z; 1226 myrot.W = _orientation.W;
1227 d.GeomSetQuaternion(prim_geom, ref myrot); 1227 d.GeomSetQuaternion(prim_geom, ref myrot);
1228 if (m_isphysical && Body != (IntPtr) 0) 1228 if (m_isphysical && Body != (IntPtr) 0)
1229 { 1229 {
@@ -1339,10 +1339,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1339 setMesh(_parent_scene, mesh); 1339 setMesh(_parent_scene, mesh);
1340 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1340 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1341 d.Quaternion myrot = new d.Quaternion(); 1341 d.Quaternion myrot = new d.Quaternion();
1342 myrot.W = _orientation.w; 1342 myrot.X = _orientation.X;
1343 myrot.X = _orientation.x; 1343 myrot.Y = _orientation.Y;
1344 myrot.Y = _orientation.y; 1344 myrot.Z = _orientation.Z;
1345 myrot.Z = _orientation.z; 1345 myrot.W = _orientation.W;
1346 d.GeomSetQuaternion(prim_geom, ref myrot); 1346 d.GeomSetQuaternion(prim_geom, ref myrot);
1347 1347
1348 //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 1348 //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
@@ -1388,10 +1388,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1388 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); 1388 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
1389 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1389 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1390 d.Quaternion myrot = new d.Quaternion(); 1390 d.Quaternion myrot = new d.Quaternion();
1391 myrot.W = _orientation.w; 1391 myrot.X = _orientation.X;
1392 myrot.X = _orientation.x; 1392 myrot.Y = _orientation.Y;
1393 myrot.Y = _orientation.y; 1393 myrot.Z = _orientation.Z;
1394 myrot.Z = _orientation.z; 1394 myrot.W = _orientation.W;
1395 d.GeomSetQuaternion(prim_geom, ref myrot); 1395 d.GeomSetQuaternion(prim_geom, ref myrot);
1396 } 1396 }
1397 } 1397 }
@@ -1452,9 +1452,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1452 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1452 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1453 // d.Quaternion myrot = new d.Quaternion(); 1453 // d.Quaternion myrot = new d.Quaternion();
1454 // myrot.W = _orientation.w; 1454 // myrot.W = _orientation.w;
1455 // myrot.X = _orientation.x; 1455 // myrot.X = _orientation.X;
1456 // myrot.Y = _orientation.y; 1456 // myrot.Y = _orientation.Y;
1457 // myrot.Z = _orientation.z; 1457 // myrot.Z = _orientation.Z;
1458 // d.GeomSetQuaternion(prim_geom, ref myrot); 1458 // d.GeomSetQuaternion(prim_geom, ref myrot);
1459 1459
1460 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 1460 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
@@ -1512,9 +1512,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1512 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1512 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1513 // d.Quaternion myrot = new d.Quaternion(); 1513 // d.Quaternion myrot = new d.Quaternion();
1514 // myrot.W = _orientation.w; 1514 // myrot.W = _orientation.w;
1515 // myrot.X = _orientation.x; 1515 // myrot.X = _orientation.X;
1516 // myrot.Y = _orientation.y; 1516 // myrot.Y = _orientation.Y;
1517 // myrot.Z = _orientation.z; 1517 // myrot.Z = _orientation.Z;
1518 // d.GeomSetQuaternion(prim_geom, ref myrot); 1518 // d.GeomSetQuaternion(prim_geom, ref myrot);
1519 // } 1519 // }
1520 // } 1520 // }
@@ -1553,9 +1553,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1553 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1553 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1554 // d.Quaternion myrot = new d.Quaternion(); 1554 // d.Quaternion myrot = new d.Quaternion();
1555 // myrot.W = _orientation.w; 1555 // myrot.W = _orientation.w;
1556 // myrot.X = _orientation.x; 1556 // myrot.X = _orientation.X;
1557 // myrot.Y = _orientation.y; 1557 // myrot.Y = _orientation.Y;
1558 // myrot.Z = _orientation.z; 1558 // myrot.Z = _orientation.Z;
1559 // d.GeomSetQuaternion(prim_geom, ref myrot); 1559 // d.GeomSetQuaternion(prim_geom, ref myrot);
1560 1560
1561 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 1561 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
@@ -1626,10 +1626,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1626 setMesh(_parent_scene, mesh); 1626 setMesh(_parent_scene, mesh);
1627 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1627 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1628 d.Quaternion myrot = new d.Quaternion(); 1628 d.Quaternion myrot = new d.Quaternion();
1629 myrot.W = _orientation.w; 1629 myrot.X = _orientation.X;
1630 myrot.X = _orientation.x; 1630 myrot.Y = _orientation.Y;
1631 myrot.Y = _orientation.y; 1631 myrot.Z = _orientation.Z;
1632 myrot.Z = _orientation.z; 1632 myrot.W = _orientation.W;
1633 d.GeomSetQuaternion(prim_geom, ref myrot); 1633 d.GeomSetQuaternion(prim_geom, ref myrot);
1634 1634
1635 //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 1635 //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
@@ -1684,10 +1684,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1684 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); 1684 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
1685 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1685 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1686 d.Quaternion myrot = new d.Quaternion(); 1686 d.Quaternion myrot = new d.Quaternion();
1687 myrot.W = _orientation.w; 1687 myrot.X = _orientation.X;
1688 myrot.X = _orientation.x; 1688 myrot.Y = _orientation.Y;
1689 myrot.Y = _orientation.y; 1689 myrot.Z = _orientation.Z;
1690 myrot.Z = _orientation.z; 1690 myrot.W = _orientation.W;
1691 d.GeomSetQuaternion(prim_geom, ref myrot); 1691 d.GeomSetQuaternion(prim_geom, ref myrot);
1692 } 1692 }
1693 } 1693 }
@@ -1726,9 +1726,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1726 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1726 // d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1727 // d.Quaternion myrot = new d.Quaternion(); 1727 // d.Quaternion myrot = new d.Quaternion();
1728 // myrot.W = _orientation.w; 1728 // myrot.W = _orientation.w;
1729 // myrot.X = _orientation.x; 1729 // myrot.X = _orientation.X;
1730 // myrot.Y = _orientation.y; 1730 // myrot.Y = _orientation.Y;
1731 // myrot.Z = _orientation.z; 1731 // myrot.Z = _orientation.Z;
1732 // d.GeomSetQuaternion(prim_geom, ref myrot); 1732 // d.GeomSetQuaternion(prim_geom, ref myrot);
1733 1733
1734 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 1734 // //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
@@ -2106,9 +2106,9 @@ namespace OpenSim.Region.Physics.OdePlugin
2106 _acceleration.Z = 0; 2106 _acceleration.Z = 0;
2107 2107
2108 //_orientation.w = 0f; 2108 //_orientation.w = 0f;
2109 //_orientation.x = 0f; 2109 //_orientation.X = 0f;
2110 //_orientation.y = 0f; 2110 //_orientation.Y = 0f;
2111 //_orientation.z = 0f; 2111 //_orientation.Z = 0f;
2112 m_rotationalVelocity.X = 0; 2112 m_rotationalVelocity.X = 0;
2113 m_rotationalVelocity.Y = 0; 2113 m_rotationalVelocity.Y = 0;
2114 m_rotationalVelocity.Z = 0; 2114 m_rotationalVelocity.Z = 0;
@@ -2154,10 +2154,10 @@ namespace OpenSim.Region.Physics.OdePlugin
2154 } 2154 }
2155 2155
2156 //System.Console.WriteLine("ODE: " + m_rotationalVelocity.ToString()); 2156 //System.Console.WriteLine("ODE: " + m_rotationalVelocity.ToString());
2157 _orientation.w = ori.W; 2157 _orientation.X = ori.X;
2158 _orientation.x = ori.X; 2158 _orientation.Y = ori.Y;
2159 _orientation.y = ori.Y; 2159 _orientation.Z = ori.Z;
2160 _orientation.z = ori.Z; 2160 _orientation.W = ori.W;
2161 m_lastUpdateSent = false; 2161 m_lastUpdateSent = false;
2162 if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate) 2162 if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate)
2163 { 2163 {
diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
index 074170a..606134a 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
@@ -26,9 +26,9 @@
26 */ 26 */
27 27
28using System; 28using System;
29using Axiom.Math;
30using Nini.Config; 29using Nini.Config;
31using NUnit.Framework; 30using NUnit.Framework;
31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.Physics.Manager;
34 34
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Physics.OdePlugin
74 PrimitiveBaseShape newcube = PrimitiveBaseShape.CreateBox(); 74 PrimitiveBaseShape newcube = PrimitiveBaseShape.CreateBox();
75 PhysicsVector position = new PhysicsVector(128, 128, 128); 75 PhysicsVector position = new PhysicsVector(128, 128, 128);
76 PhysicsVector size = new PhysicsVector(0.5f, 0.5f, 0.5f); 76 PhysicsVector size = new PhysicsVector(0.5f, 0.5f, 0.5f);
77 Quaternion rot = new Quaternion(1, 0, 0, 0); 77 Quaternion rot = Quaternion.Identity;
78 PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true); 78 PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true);
79 OdePrim oprim = (OdePrim)prim; 79 OdePrim oprim = (OdePrim)prim;
80 OdeScene pscene = (OdeScene) ps; 80 OdeScene pscene = (OdeScene) ps;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index f285911..5a501ef 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -31,13 +31,12 @@ using System.Reflection;
31using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using System.Threading; 32using System.Threading;
33using System.IO; 33using System.IO;
34using Axiom.Math;
35using log4net; 34using log4net;
36using Nini.Config; 35using Nini.Config;
37using Ode.NET; 36using Ode.NET;
38using OpenSim.Framework; 37using OpenSim.Framework;
39using OpenSim.Region.Physics.Manager; 38using OpenSim.Region.Physics.Manager;
40using libsecondlife; 39using OpenMetaverse;
41 40
42//using OpenSim.Region.Physics.OdePlugin.Meshing; 41//using OpenSim.Region.Physics.OdePlugin.Meshing;
43 42
@@ -1129,11 +1128,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1129 siz.X = size.X; 1128 siz.X = size.X;
1130 siz.Y = size.Y; 1129 siz.Y = size.Y;
1131 siz.Z = size.Z; 1130 siz.Z = size.Z;
1132 Quaternion rot = new Quaternion(); 1131 Quaternion rot = rotation;
1133 rot.w = rotation.w;
1134 rot.x = rotation.x;
1135 rot.y = rotation.y;
1136 rot.z = rotation.z;
1137 1132
1138 OdePrim newPrim; 1133 OdePrim newPrim;
1139 lock (OdeLock) 1134 lock (OdeLock)
@@ -1524,8 +1519,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1524 // but we still need to check for sculptie meshing being enabled so this is the most 1519 // but we still need to check for sculptie meshing being enabled so this is the most
1525 // convenient place to do it for now... 1520 // convenient place to do it for now...
1526 1521
1527 // //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f) 1522 // //if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle && pbs.ProfileCurve == (byte)Primitive.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
1528 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString()); 1523 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + Primitive.UnpackPathScale(pbs.PathScaleY).ToString());
1529 if (pbs.SculptEntry && !meshSculptedPrim) 1524 if (pbs.SculptEntry && !meshSculptedPrim)
1530 { 1525 {
1531 return false; 1526 return false;
@@ -1555,19 +1550,19 @@ namespace OpenSim.Region.Physics.OdePlugin
1555 // return true; 1550 // return true;
1556 1551
1557 // // test for torus 1552 // // test for torus
1558 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1553 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1559 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.Circle 1554 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.Circle
1560 // && LLObject.UnpackPathScale(pbs.PathScaleY) <= 0.75f) 1555 // && Primitive.UnpackPathScale(pbs.PathScaleY) <= 0.75f)
1561 // return true; 1556 // return true;
1562 1557
1563 // // test for tube 1558 // // test for tube
1564 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1559 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1565 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) 1560 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.EqualTriangle)
1566 // return true; 1561 // return true;
1567 1562
1568 // // test for ring 1563 // // test for ring
1569 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1564 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1570 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) 1565 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.EqualTriangle)
1571 // return true; 1566 // return true;
1572 1567
1573 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) 1568 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle)
@@ -2132,17 +2127,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2132 2127
2133 d.Matrix3 R = new d.Matrix3(); 2128 d.Matrix3 R = new d.Matrix3();
2134 2129
2135 Quaternion q1 = Quaternion.FromAngleAxis(1.5707f, new Vector3(1, 0, 0)); 2130 Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f);
2136 Quaternion q2 = Quaternion.FromAngleAxis(1.5707f, new Vector3(0, 1, 0)); 2131 Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f);
2137 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); 2132 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
2138 2133
2139 q1 = q1*q2; 2134 q1 = q1*q2;
2140 //q1 = q1 * q3; 2135 //q1 = q1 * q3;
2141 Vector3 v3 = new Vector3(); 2136 Vector3 v3;
2142 float angle = 0; 2137 float angle;
2143 q1.ToAngleAxis(ref angle, ref v3); 2138 q1.GetAxisAngle(out v3, out angle);
2144 2139
2145 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle); 2140 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
2146 d.GeomSetRotation(LandGeom, ref R); 2141 d.GeomSetRotation(LandGeom, ref R);
2147 d.GeomSetPosition(LandGeom, 128, 128, 0); 2142 d.GeomSetPosition(LandGeom, 128, 128, 0);
2148 } 2143 }
@@ -2197,17 +2192,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2197 2192
2198 d.Matrix3 R = new d.Matrix3(); 2193 d.Matrix3 R = new d.Matrix3();
2199 2194
2200 Quaternion q1 = Quaternion.FromAngleAxis(1.5707f, new Vector3(1, 0, 0)); 2195 Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f);
2201 Quaternion q2 = Quaternion.FromAngleAxis(1.5707f, new Vector3(0, 1, 0)); 2196 Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f);
2202 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); 2197 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
2203 2198
2204 q1 = q1 * q2; 2199 q1 = q1 * q2;
2205 //q1 = q1 * q3; 2200 //q1 = q1 * q3;
2206 Vector3 v3 = new Vector3(); 2201 Vector3 v3;
2207 float angle = 0; 2202 float angle;
2208 q1.ToAngleAxis(ref angle, ref v3); 2203 q1.GetAxisAngle(out v3, out angle);
2209 2204
2210 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle); 2205 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
2211 d.GeomSetRotation(WaterGeom, ref R); 2206 d.GeomSetRotation(WaterGeom, ref R);
2212 d.GeomSetPosition(WaterGeom, 128, 128, 0); 2207 d.GeomSetPosition(WaterGeom, 128, 128, 0);
2213 } 2208 }
diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
index c674d15..400280f 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs
@@ -27,8 +27,8 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math;
31using Nini.Config; 30using Nini.Config;
31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.Physics.Manager;
34 34
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index 65f10f9..c8cbcf5 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -27,7 +27,6 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math;
31using Nini.Config; 30using Nini.Config;
32using OpenSim.Framework; 31using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
index fed67dd..69cd19c 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs
@@ -27,8 +27,8 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math;
31using Nini.Config; 30using Nini.Config;
31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.Physics.Manager;
34 34
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
index a32021d..9771a62 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
@@ -27,8 +27,8 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math;
31using Nini.Config; 30using Nini.Config;
31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Physics.Manager; 33using OpenSim.Region.Physics.Manager;
34 34
@@ -109,14 +109,13 @@ namespace OpenSim.Region.Physics.POSPlugin
109 109
110 private bool isColliding(POSCharacter c, POSPrim p) 110 private bool isColliding(POSCharacter c, POSPrim p)
111 { 111 {
112 Vector3 rotatedPos = p.Orientation.Inverse() * 112 Vector3 rotatedPos = new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y,
113 new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y, 113 c.Position.Z - p.Position.Z) * Quaternion.Inverse(p.Orientation);
114 c.Position.Z - p.Position.Z); 114 Vector3 avatarSize = new Vector3(c.Size.X, c.Size.Y, c.Size.Z) * Quaternion.Inverse(p.Orientation);
115 Vector3 avatarSize = p.Orientation.Inverse()*new Vector3(c.Size.X, c.Size.Y, c.Size.Z); 115
116 116 if (Math.Abs(rotatedPos.X) >= (p.Size.X*0.5 + Math.Abs(avatarSize.X)) ||
117 if (Math.Abs(rotatedPos.x) >= (p.Size.X*0.5 + Math.Abs(avatarSize.x)) || 117 Math.Abs(rotatedPos.Y) >= (p.Size.Y*0.5 + Math.Abs(avatarSize.Y)) ||
118 Math.Abs(rotatedPos.y) >= (p.Size.Y*0.5 + Math.Abs(avatarSize.y)) || 118 Math.Abs(rotatedPos.Z) >= (p.Size.Z*0.5 + Math.Abs(avatarSize.Z)))
119 Math.Abs(rotatedPos.z) >= (p.Size.Z*0.5 + Math.Abs(avatarSize.z)))
120 { 119 {
121 return false; 120 return false;
122 } 121 }
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index 197da0a..37e2a2f 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -31,7 +31,7 @@ using Nini.Config;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
33using PhysXWrapper; 33using PhysXWrapper;
34using Quaternion=Axiom.Math.Quaternion; 34using Quaternion=OpenMetaverse.Quaternion;
35 35
36namespace OpenSim.Region.Physics.PhysXPlugin 36namespace OpenSim.Region.Physics.PhysXPlugin
37{ 37{
@@ -614,12 +614,12 @@ namespace OpenSim.Region.Physics.PhysXPlugin
614 { 614 {
615 get 615 get
616 { 616 {
617 Quaternion res = new Quaternion(); 617 Quaternion res;
618 PhysXWrapper.Quaternion quat = _prim.GetOrientation(); 618 PhysXWrapper.Quaternion quat = _prim.GetOrientation();
619 res.w = quat.W; 619 res.W = quat.W;
620 res.x = quat.X; 620 res.X = quat.X;
621 res.y = quat.Y; 621 res.Y = quat.Y;
622 res.z = quat.Z; 622 res.Z = quat.Z;
623 return res; 623 return res;
624 } 624 }
625 set { } 625 set { }
diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
index 1a50f0b..9c45ab5 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Region.Environment.Scenes; 29using OpenSim.Region.Environment.Scenes;
30 30
31namespace OpenSim.Region.ScriptEngine.Common 31namespace OpenSim.Region.ScriptEngine.Common
@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Common
36 public class BuilIn_Commands : OSSL_BuilIn_Commands 36 public class BuilIn_Commands : OSSL_BuilIn_Commands
37 { 37 {
38 public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, 38 public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID,
39 LLUUID itemID) : base(scriptEngine, host, localID, itemID) 39 UUID itemID) : base(scriptEngine, host, localID, itemID)
40 { 40 {
41 } 41 }
42 } 42 }
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index bcdff8f..0c5d60b 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -32,9 +32,8 @@ using System.Runtime.Remoting.Lifetime;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using Nini.Config; 34using Nini.Config;
35using Axiom.Math; 35using OpenMetaverse;
36using libsecondlife; 36using OpenMetaverse.Packets;
37using libsecondlife.Packets;
38using OpenSim.Framework; 37using OpenSim.Framework;
39using OpenSim.Framework.Communications.Cache; 38using OpenSim.Framework.Communications.Cache;
40using OpenSim.Region.Environment; 39using OpenSim.Region.Environment;
@@ -60,10 +59,10 @@ namespace OpenSim.Region.ScriptEngine.Common
60 internal ScriptEngineBase.ScriptEngine m_ScriptEngine; 59 internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
61 internal SceneObjectPart m_host; 60 internal SceneObjectPart m_host;
62 internal uint m_localID; 61 internal uint m_localID;
63 internal LLUUID m_itemID; 62 internal UUID m_itemID;
64 internal bool throwErrorOnNotImplemented = true; 63 internal bool throwErrorOnNotImplemented = true;
65 64
66 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 65 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
67 { 66 {
68 m_ScriptEngine = ScriptEngine; 67 m_ScriptEngine = ScriptEngine;
69 m_host = host; 68 m_host = host;
@@ -151,11 +150,11 @@ namespace OpenSim.Region.ScriptEngine.Common
151 return World.GetCommander(name); 150 return World.GetCommander(name);
152 } 151 }
153 152
154 private LLUUID InventorySelf() 153 private UUID InventorySelf()
155 { 154 {
156 LLUUID invItemID = new LLUUID(); 155 UUID invItemID = new UUID();
157 156
158 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 157 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
159 { 158 {
160 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) 159 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
161 { 160 {
@@ -167,54 +166,54 @@ namespace OpenSim.Region.ScriptEngine.Common
167 return invItemID; 166 return invItemID;
168 } 167 }
169 168
170 private LLUUID InventoryKey(string name, int type) 169 private UUID InventoryKey(string name, int type)
171 { 170 {
172 m_host.AddScriptLPS(1); 171 m_host.AddScriptLPS(1);
173 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 172 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
174 { 173 {
175 if (inv.Value.Name == name) 174 if (inv.Value.Name == name)
176 { 175 {
177 if (inv.Value.Type != type) 176 if (inv.Value.Type != type)
178 return LLUUID.Zero; 177 return UUID.Zero;
179 178
180 return inv.Value.AssetID.ToString(); 179 return inv.Value.AssetID.ToString();
181 } 180 }
182 } 181 }
183 return LLUUID.Zero; 182 return UUID.Zero;
184 } 183 }
185 184
186 private LLUUID InventoryKey(string name) 185 private UUID InventoryKey(string name)
187 { 186 {
188 m_host.AddScriptLPS(1); 187 m_host.AddScriptLPS(1);
189 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 188 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
190 { 189 {
191 if (inv.Value.Name == name) 190 if (inv.Value.Name == name)
192 { 191 {
193 return inv.Value.AssetID.ToString(); 192 return inv.Value.AssetID.ToString();
194 } 193 }
195 } 194 }
196 return LLUUID.Zero; 195 return UUID.Zero;
197 } 196 }
198 197
199 198
200 /// <summary> 199 /// <summary>
201 /// accepts a valid LLUUID, -or- a name of an inventory item. 200 /// accepts a valid UUID, -or- a name of an inventory item.
202 /// Returns a valid LLUUID or LLUUID.Zero if key invalid and item not found 201 /// Returns a valid UUID or UUID.Zero if key invalid and item not found
203 /// in prim inventory. 202 /// in prim inventory.
204 /// </summary> 203 /// </summary>
205 /// <param name="k"></param> 204 /// <param name="k"></param>
206 /// <returns></returns> 205 /// <returns></returns>
207 private LLUUID KeyOrName(string k) 206 private UUID KeyOrName(string k)
208 { 207 {
209 LLUUID key = LLUUID.Zero; 208 UUID key = UUID.Zero;
210 209
211 // if we can parse the string as a key, use it. 210 // if we can parse the string as a key, use it.
212 if (LLUUID.TryParse(k, out key)) 211 if (UUID.TryParse(k, out key))
213 { 212 {
214 return key; 213 return key;
215 } 214 }
216 // else try to locate the name in inventory of object. found returns key, 215 // else try to locate the name in inventory of object. found returns key,
217 // not found returns LLUUID.Zero which will translate to the default particle texture 216 // not found returns UUID.Zero which will translate to the default particle texture
218 else 217 else
219 { 218 {
220 return InventoryKey(k); 219 return InventoryKey(k);
@@ -573,7 +572,7 @@ namespace OpenSim.Region.ScriptEngine.Common
573 if (text.Length > 1023) 572 if (text.Length > 1023)
574 text = text.Substring(0, 1023); 573 text = text.Substring(0, 1023);
575 574
576 World.SimChat(Helpers.StringToField(text), 575 World.SimChat(Utils.StringToBytes(text),
577 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 576 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
578 577
579 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 578 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -587,7 +586,7 @@ namespace OpenSim.Region.ScriptEngine.Common
587 if (text.Length > 1023) 586 if (text.Length > 1023)
588 text = text.Substring(0, 1023); 587 text = text.Substring(0, 1023);
589 588
590 World.SimChat(Helpers.StringToField(text), 589 World.SimChat(Utils.StringToBytes(text),
591 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 590 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
592 591
593 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 592 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -601,7 +600,7 @@ namespace OpenSim.Region.ScriptEngine.Common
601 if (text.Length > 1023) 600 if (text.Length > 1023)
602 text = text.Substring(0, 1023); 601 text = text.Substring(0, 1023);
603 602
604 World.SimChat(Helpers.StringToField(text), 603 World.SimChat(Utils.StringToBytes(text),
605 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); 604 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true);
606 605
607 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 606 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -628,8 +627,8 @@ namespace OpenSim.Region.ScriptEngine.Common
628 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 627 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg)
629 { 628 {
630 m_host.AddScriptLPS(1); 629 m_host.AddScriptLPS(1);
631 LLUUID keyID; 630 UUID keyID;
632 LLUUID.TryParse(ID, out keyID); 631 UUID.TryParse(ID, out keyID);
633 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 632 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
634 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); 633 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
635 } 634 }
@@ -651,8 +650,8 @@ namespace OpenSim.Region.ScriptEngine.Common
651 public void llSensor(string name, string id, int type, double range, double arc) 650 public void llSensor(string name, string id, int type, double range, double arc)
652 { 651 {
653 m_host.AddScriptLPS(1); 652 m_host.AddScriptLPS(1);
654 LLUUID keyID = LLUUID.Zero; 653 UUID keyID = UUID.Zero;
655 LLUUID.TryParse(id, out keyID); 654 UUID.TryParse(id, out keyID);
656 655
657 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); 656 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host);
658 } 657 }
@@ -660,8 +659,8 @@ namespace OpenSim.Region.ScriptEngine.Common
660 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 659 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
661 { 660 {
662 m_host.AddScriptLPS(1); 661 m_host.AddScriptLPS(1);
663 LLUUID keyID = LLUUID.Zero; 662 UUID keyID = UUID.Zero;
664 LLUUID.TryParse(id, out keyID); 663 UUID.TryParse(id, out keyID);
665 664
666 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); 665 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host);
667 } 666 }
@@ -672,7 +671,7 @@ namespace OpenSim.Region.ScriptEngine.Common
672 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID); 671 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID);
673 } 672 }
674 673
675 public string resolveName(LLUUID objecUUID) 674 public string resolveName(UUID objecUUID)
676 { 675 {
677 // try avatar username surname 676 // try avatar username surname
678 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); 677 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
@@ -708,7 +707,7 @@ namespace OpenSim.Region.ScriptEngine.Common
708 { 707 {
709 if ((number >= 0) && (number <= SenseList.Length)) 708 if ((number >= 0) && (number <= SenseList.Length))
710 { 709 {
711 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 710 UUID SensedUUID = (UUID)SenseList.Data[number];
712 return resolveName(SensedUUID); 711 return resolveName(SensedUUID);
713 } 712 }
714 } 713 }
@@ -741,14 +740,14 @@ namespace OpenSim.Region.ScriptEngine.Common
741 return String.Empty; 740 return String.Empty;
742 } 741 }
743 742
744 public LLUUID uuidDetectedKey(int number) 743 public UUID uuidDetectedKey(int number)
745 { 744 {
746 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); 745 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
747 if (SenseList != null) 746 if (SenseList != null)
748 { 747 {
749 if ((number >= 0) && (number < SenseList.Length)) 748 if ((number >= 0) && (number < SenseList.Length))
750 { 749 {
751 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 750 UUID SensedUUID = (UUID)SenseList.Data[number];
752 return SensedUUID; 751 return SensedUUID;
753 } 752 }
754 } 753 }
@@ -768,14 +767,14 @@ namespace OpenSim.Region.ScriptEngine.Common
768 { 767 {
769 if (script.llDetectParams._key[number]) 768 if (script.llDetectParams._key[number])
770 { 769 {
771 return new LLUUID(script.llDetectParams._key[number]); 770 return new UUID(script.llDetectParams._key[number]);
772 } 771 }
773 } 772 }
774 } 773 }
775 } 774 }
776 } 775 }
777 } 776 }
778 return LLUUID.Zero; 777 return UUID.Zero;
779 } 778 }
780 779
781 public EntityBase entityDetectedKey(int number) 780 public EntityBase entityDetectedKey(int number)
@@ -785,7 +784,7 @@ namespace OpenSim.Region.ScriptEngine.Common
785 { 784 {
786 if ((number >= 0) && (number < SenseList.Length)) 785 if ((number >= 0) && (number < SenseList.Length))
787 { 786 {
788 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 787 UUID SensedUUID = (UUID)SenseList.Data[number];
789 EntityBase SensedObject = null; 788 EntityBase SensedObject = null;
790 lock (World.Entities) 789 lock (World.Entities)
791 { 790 {
@@ -810,7 +809,7 @@ namespace OpenSim.Region.ScriptEngine.Common
810 { 809 {
811 if (script.llDetectParams._key[number]) 810 if (script.llDetectParams._key[number])
812 { 811 {
813 LLUUID SensedUUID = new LLUUID(script.llDetectParams._key[number]); 812 UUID SensedUUID = new UUID(script.llDetectParams._key[number]);
814 EntityBase SensedObject = null; 813 EntityBase SensedObject = null;
815 lock (World.Entities) 814 lock (World.Entities)
816 { 815 {
@@ -830,8 +829,8 @@ namespace OpenSim.Region.ScriptEngine.Common
830 public string llDetectedKey(int number) 829 public string llDetectedKey(int number)
831 { 830 {
832 m_host.AddScriptLPS(1); 831 m_host.AddScriptLPS(1);
833 LLUUID SensedUUID = uuidDetectedKey(number); 832 UUID SensedUUID = uuidDetectedKey(number);
834 if (SensedUUID == LLUUID.Zero) 833 if (SensedUUID == UUID.Zero)
835 return String.Empty; 834 return String.Empty;
836 return SensedUUID.ToString(); 835 return SensedUUID.ToString();
837 } 836 }
@@ -843,7 +842,7 @@ namespace OpenSim.Region.ScriptEngine.Common
843 EntityBase SensedObject = entityDetectedKey(number); 842 EntityBase SensedObject = entityDetectedKey(number);
844 if (SensedObject ==null) 843 if (SensedObject ==null)
845 return String.Empty; 844 return String.Empty;
846 LLUUID SensedUUID = uuidDetectedKey(number); 845 UUID SensedUUID = uuidDetectedKey(number);
847 if (World.GetScenePresence(SensedUUID) == null) 846 if (World.GetScenePresence(SensedUUID) == null)
848 { 847 {
849 // sensed object is not an avatar 848 // sensed object is not an avatar
@@ -870,7 +869,7 @@ namespace OpenSim.Region.ScriptEngine.Common
870 return 0; 869 return 0;
871 int mask = 0; 870 int mask = 0;
872 871
873 LLUUID SensedUUID = uuidDetectedKey(number); 872 UUID SensedUUID = uuidDetectedKey(number);
874 LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0); 873 LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0);
875 874
876 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor 875 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor
@@ -888,7 +887,10 @@ namespace OpenSim.Region.ScriptEngine.Common
888 EntityBase SensedObject = entityDetectedKey(number); 887 EntityBase SensedObject = entityDetectedKey(number);
889 if (SensedObject == null) 888 if (SensedObject == null)
890 return new LSL_Types.Vector3(0, 0, 0); 889 return new LSL_Types.Vector3(0, 0, 0);
891 return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); 890 return new LSL_Types.Vector3(
891 SensedObject.AbsolutePosition.X,
892 SensedObject.AbsolutePosition.Y,
893 SensedObject.AbsolutePosition.Z);
892 } 894 }
893 895
894 public LSL_Types.Vector3 llDetectedVel(int number) 896 public LSL_Types.Vector3 llDetectedVel(int number)
@@ -897,7 +899,10 @@ namespace OpenSim.Region.ScriptEngine.Common
897 EntityBase SensedObject = entityDetectedKey(number); 899 EntityBase SensedObject = entityDetectedKey(number);
898 if (SensedObject == null) 900 if (SensedObject == null)
899 return new LSL_Types.Vector3(0, 0, 0); 901 return new LSL_Types.Vector3(0, 0, 0);
900 return new LSL_Types.Vector3(SensedObject.Velocity.X, SensedObject.Velocity.Y, SensedObject.Velocity.Z); 902 return new LSL_Types.Vector3(
903 SensedObject.Velocity.X,
904 SensedObject.Velocity.Y,
905 SensedObject.Velocity.Z);
901 } 906 }
902 907
903 public LSL_Types.Vector3 llDetectedGrab(int number) 908 public LSL_Types.Vector3 llDetectedGrab(int number)
@@ -910,7 +915,7 @@ namespace OpenSim.Region.ScriptEngine.Common
910 return new LSL_Types.Vector3( 915 return new LSL_Types.Vector3(
911 SensedObject.AbsolutePosition.X, 916 SensedObject.AbsolutePosition.X,
912 SensedObject.AbsolutePosition.Y, 917 SensedObject.AbsolutePosition.Y,
913 SensedObject.AbsolutePosition.Y); 918 SensedObject.AbsolutePosition.Z);
914 } 919 }
915 920
916 public LSL_Types.Quaternion llDetectedRot(int number) 921 public LSL_Types.Quaternion llDetectedRot(int number)
@@ -919,7 +924,11 @@ namespace OpenSim.Region.ScriptEngine.Common
919 EntityBase SensedObject = entityDetectedKey(number); 924 EntityBase SensedObject = entityDetectedKey(number);
920 if (SensedObject == null) 925 if (SensedObject == null)
921 return new LSL_Types.Quaternion(); 926 return new LSL_Types.Quaternion();
922 return new LSL_Types.Quaternion(SensedObject.Rotation.x, SensedObject.Rotation.y, SensedObject.Rotation.z, SensedObject.Rotation.w); 927 return new LSL_Types.Quaternion(
928 SensedObject.Rotation.X,
929 SensedObject.Rotation.Y,
930 SensedObject.Rotation.Z,
931 SensedObject.Rotation.W);
923 } 932 }
924 933
925 public LSL_Types.LSLInteger llDetectedGroup(int number) 934 public LSL_Types.LSLInteger llDetectedGroup(int number)
@@ -1005,7 +1014,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1005 1014
1006 if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) 1015 if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS)
1007 { 1016 {
1008 m_host.AddFlag(LLObject.ObjectFlags.CastShadows); 1017 m_host.AddFlag(PrimFlags.CastShadows);
1009 } 1018 }
1010 1019
1011 if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) 1020 if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X)
@@ -1055,25 +1064,25 @@ namespace OpenSim.Region.ScriptEngine.Common
1055 public LSL_Types.LSLInteger llGetStatus(int status) 1064 public LSL_Types.LSLInteger llGetStatus(int status)
1056 { 1065 {
1057 m_host.AddScriptLPS(1); 1066 m_host.AddScriptLPS(1);
1058 // Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 1067 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
1059 switch (status) 1068 switch (status)
1060 { 1069 {
1061 case BuiltIn_Commands_BaseClass.STATUS_PHYSICS: 1070 case BuiltIn_Commands_BaseClass.STATUS_PHYSICS:
1062 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) 1071 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics)
1063 { 1072 {
1064 return 1; 1073 return 1;
1065 } 1074 }
1066 return 0; 1075 return 0;
1067 1076
1068 case BuiltIn_Commands_BaseClass.STATUS_PHANTOM: 1077 case BuiltIn_Commands_BaseClass.STATUS_PHANTOM:
1069 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) 1078 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom)
1070 { 1079 {
1071 return 1; 1080 return 1;
1072 } 1081 }
1073 return 0; 1082 return 0;
1074 1083
1075 case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS: 1084 case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS:
1076 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) 1085 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.CastShadows) == (uint)PrimFlags.CastShadows)
1077 { 1086 {
1078 return 1; 1087 return 1;
1079 } 1088 }
@@ -1140,7 +1149,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1140 scale.y = World.m_maxNonphys; 1149 scale.y = World.m_maxNonphys;
1141 if (scale.z > World.m_maxNonphys) 1150 if (scale.z > World.m_maxNonphys)
1142 scale.z = World.m_maxNonphys; 1151 scale.z = World.m_maxNonphys;
1143 LLVector3 tmp = part.Scale; 1152 Vector3 tmp = part.Scale;
1144 tmp.X = (float)scale.x; 1153 tmp.X = (float)scale.x;
1145 tmp.Y = (float)scale.y; 1154 tmp.Y = (float)scale.y;
1146 tmp.Z = (float)scale.z; 1155 tmp.Z = (float)scale.z;
@@ -1163,8 +1172,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1163 1172
1164 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 1173 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face)
1165 { 1174 {
1166 LLObject.TextureEntry tex = part.Shape.Textures; 1175 Primitive.TextureEntry tex = part.Shape.Textures;
1167 LLColor texcolor; 1176 Color4 texcolor;
1168 if (face > -1) 1177 if (face > -1)
1169 { 1178 {
1170 texcolor = tex.CreateFace((uint)face).RGBA; 1179 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1200,7 +1209,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1200 1209
1201 public void SetGlow(SceneObjectPart part, int face, float glow) 1210 public void SetGlow(SceneObjectPart part, int face, float glow)
1202 { 1211 {
1203 LLObject.TextureEntry tex = part.Shape.Textures; 1212 Primitive.TextureEntry tex = part.Shape.Textures;
1204 if (face > -1) 1213 if (face > -1)
1205 { 1214 {
1206 tex.CreateFace((uint) face); 1215 tex.CreateFace((uint) face);
@@ -1247,7 +1256,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1247 break; 1256 break;
1248 } 1257 }
1249 1258
1250 LLObject.TextureEntry tex = part.Shape.Textures; 1259 Primitive.TextureEntry tex = part.Shape.Textures;
1251 if (face > -1) 1260 if (face > -1)
1252 { 1261 {
1253 tex.CreateFace((uint) face); 1262 tex.CreateFace((uint) face);
@@ -1275,7 +1284,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1275 1284
1276 public void SetFullBright(SceneObjectPart part, int face, bool bright) 1285 public void SetFullBright(SceneObjectPart part, int face, bool bright)
1277 { 1286 {
1278 LLObject.TextureEntry tex = part.Shape.Textures; 1287 Primitive.TextureEntry tex = part.Shape.Textures;
1279 if (face > -1) 1288 if (face > -1)
1280 { 1289 {
1281 tex.CreateFace((uint) face); 1290 tex.CreateFace((uint) face);
@@ -1301,7 +1310,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1301 public double llGetAlpha(int face) 1310 public double llGetAlpha(int face)
1302 { 1311 {
1303 m_host.AddScriptLPS(1); 1312 m_host.AddScriptLPS(1);
1304 LLObject.TextureEntry tex = m_host.Shape.Textures; 1313 Primitive.TextureEntry tex = m_host.Shape.Textures;
1305 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1314 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1306 { 1315 {
1307 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 1316 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255);
@@ -1322,8 +1331,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1322 1331
1323 private void SetAlpha(SceneObjectPart part, double alpha, int face) 1332 private void SetAlpha(SceneObjectPart part, double alpha, int face)
1324 { 1333 {
1325 LLObject.TextureEntry tex = part.Shape.Textures; 1334 Primitive.TextureEntry tex = part.Shape.Textures;
1326 LLColor texcolor; 1335 Color4 texcolor;
1327 if (face > -1) 1336 if (face > -1)
1328 { 1337 {
1329 texcolor = tex.CreateFace((uint)face).RGBA; 1338 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1450,8 +1459,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1450 public LSL_Types.Vector3 llGetColor(int face) 1459 public LSL_Types.Vector3 llGetColor(int face)
1451 { 1460 {
1452 m_host.AddScriptLPS(1); 1461 m_host.AddScriptLPS(1);
1453 LLObject.TextureEntry tex = m_host.Shape.Textures; 1462 Primitive.TextureEntry tex = m_host.Shape.Textures;
1454 LLColor texcolor; 1463 Color4 texcolor;
1455 LSL_Types.Vector3 rgb; 1464 LSL_Types.Vector3 rgb;
1456 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1465 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1457 { 1466 {
@@ -1484,21 +1493,21 @@ namespace OpenSim.Region.ScriptEngine.Common
1484 1493
1485 private void SetTexture(SceneObjectPart part, string texture, int face) 1494 private void SetTexture(SceneObjectPart part, string texture, int face)
1486 { 1495 {
1487 LLUUID textureID=new LLUUID(); 1496 UUID textureID=new UUID();
1488 1497
1489 if (!LLUUID.TryParse(texture, out textureID)) 1498 if (!UUID.TryParse(texture, out textureID))
1490 { 1499 {
1491 textureID=InventoryKey(texture, (int)AssetType.Texture); 1500 textureID=InventoryKey(texture, (int)AssetType.Texture);
1492 } 1501 }
1493 1502
1494 if (textureID == LLUUID.Zero) 1503 if (textureID == UUID.Zero)
1495 return; 1504 return;
1496 1505
1497 LLObject.TextureEntry tex = part.Shape.Textures; 1506 Primitive.TextureEntry tex = part.Shape.Textures;
1498 1507
1499 if (face > -1) 1508 if (face > -1)
1500 { 1509 {
1501 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1510 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1502 texface.TextureID = textureID; 1511 texface.TextureID = textureID;
1503 tex.FaceTextures[face] = texface; 1512 tex.FaceTextures[face] = texface;
1504 part.UpdateTexture(tex); 1513 part.UpdateTexture(tex);
@@ -1529,10 +1538,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1529 1538
1530 private void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1539 private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
1531 { 1540 {
1532 LLObject.TextureEntry tex = part.Shape.Textures; 1541 Primitive.TextureEntry tex = part.Shape.Textures;
1533 if (face > -1) 1542 if (face > -1)
1534 { 1543 {
1535 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1544 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1536 texface.RepeatU = (float)u; 1545 texface.RepeatU = (float)u;
1537 texface.RepeatV = (float)v; 1546 texface.RepeatV = (float)v;
1538 tex.FaceTextures[face] = texface; 1547 tex.FaceTextures[face] = texface;
@@ -1565,10 +1574,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1565 1574
1566 private void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1575 private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
1567 { 1576 {
1568 LLObject.TextureEntry tex = part.Shape.Textures; 1577 Primitive.TextureEntry tex = part.Shape.Textures;
1569 if (face > -1) 1578 if (face > -1)
1570 { 1579 {
1571 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1580 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1572 texface.OffsetU = (float)u; 1581 texface.OffsetU = (float)u;
1573 texface.OffsetV = (float)v; 1582 texface.OffsetV = (float)v;
1574 tex.FaceTextures[face] = texface; 1583 tex.FaceTextures[face] = texface;
@@ -1601,10 +1610,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1601 1610
1602 private void RotateTexture(SceneObjectPart part, double rotation, int face) 1611 private void RotateTexture(SceneObjectPart part, double rotation, int face)
1603 { 1612 {
1604 LLObject.TextureEntry tex = part.Shape.Textures; 1613 Primitive.TextureEntry tex = part.Shape.Textures;
1605 if (face > -1) 1614 if (face > -1)
1606 { 1615 {
1607 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1616 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1608 texface.Rotation = (float)rotation; 1617 texface.Rotation = (float)rotation;
1609 tex.FaceTextures[face] = texface; 1618 tex.FaceTextures[face] = texface;
1610 part.UpdateTexture(tex); 1619 part.UpdateTexture(tex);
@@ -1628,14 +1637,14 @@ namespace OpenSim.Region.ScriptEngine.Common
1628 public string llGetTexture(int face) 1637 public string llGetTexture(int face)
1629 { 1638 {
1630 m_host.AddScriptLPS(1); 1639 m_host.AddScriptLPS(1);
1631 LLObject.TextureEntry tex = m_host.Shape.Textures; 1640 Primitive.TextureEntry tex = m_host.Shape.Textures;
1632 if (face == -1) 1641 if (face == -1)
1633 { 1642 {
1634 face = 0; 1643 face = 0;
1635 } 1644 }
1636 if (face > -1) 1645 if (face > -1)
1637 { 1646 {
1638 LLObject.TextureEntryFace texface; 1647 Primitive.TextureEntryFace texface;
1639 texface = tex.GetFace((uint)face); 1648 texface = tex.GetFace((uint)face);
1640 return texface.TextureID.ToString(); 1649 return texface.TextureID.ToString();
1641 } 1650 }
@@ -1665,11 +1674,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1665 1674
1666 if (part.ParentID != 0) 1675 if (part.ParentID != 0)
1667 { 1676 {
1668 part.UpdateOffSet(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1677 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1669 } 1678 }
1670 else 1679 else
1671 { 1680 {
1672 part.UpdateGroupPosition(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1681 part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1673 } 1682 }
1674 } 1683 }
1675 1684
@@ -1709,7 +1718,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1709 1718
1710 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1719 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot)
1711 { 1720 {
1712 part.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1721 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1713 // Update rotation does not move the object in the physics scene if it's a linkset. 1722 // Update rotation does not move the object in the physics scene if it's a linkset.
1714 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1723 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1715 } 1724 }
@@ -1717,14 +1726,18 @@ namespace OpenSim.Region.ScriptEngine.Common
1717 public LSL_Types.Quaternion llGetRot() 1726 public LSL_Types.Quaternion llGetRot()
1718 { 1727 {
1719 m_host.AddScriptLPS(1); 1728 m_host.AddScriptLPS(1);
1720 LLQuaternion q = m_host.RotationOffset; 1729 Quaternion q = m_host.RotationOffset;
1721 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1730 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
1722 } 1731 }
1723 1732
1724 public LSL_Types.Quaternion llGetLocalRot() 1733 public LSL_Types.Quaternion llGetLocalRot()
1725 { 1734 {
1726 m_host.AddScriptLPS(1); 1735 m_host.AddScriptLPS(1);
1727 return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); 1736 return new LSL_Types.Quaternion(
1737 m_host.RotationOffset.X,
1738 m_host.RotationOffset.Y,
1739 m_host.RotationOffset.Z,
1740 m_host.RotationOffset.W);
1728 } 1741 }
1729 1742
1730 public void llSetForce(LSL_Types.Vector3 force, int local) 1743 public void llSetForce(LSL_Types.Vector3 force, int local)
@@ -1769,7 +1782,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1769 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1782 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range)
1770 { 1783 {
1771 m_host.AddScriptLPS(1); 1784 m_host.AddScriptLPS(1);
1772 return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1785 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
1773 1786
1774 } 1787 }
1775 1788
@@ -1795,7 +1808,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1795 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1808 public void llMoveToTarget(LSL_Types.Vector3 target, double tau)
1796 { 1809 {
1797 m_host.AddScriptLPS(1); 1810 m_host.AddScriptLPS(1);
1798 m_host.MoveToTarget(new LLVector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1811 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
1799 } 1812 }
1800 1813
1801 public void llStopMoveToTarget() 1814 public void llStopMoveToTarget()
@@ -1816,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1816 if (force.z > 20000) 1829 if (force.z > 20000)
1817 force.z = 20000; 1830 force.z = 20000;
1818 1831
1819 m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1832 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1820 } 1833 }
1821 1834
1822 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1835 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local)
@@ -1925,7 +1938,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1925 { 1938 {
1926 m_host.AddScriptLPS(1); 1939 m_host.AddScriptLPS(1);
1927 1940
1928 if (m_host.Sound != LLUUID.Zero) 1941 if (m_host.Sound != UUID.Zero)
1929 llStopSound(); 1942 llStopSound();
1930 1943
1931 m_host.Sound = KeyOrName(sound); 1944 m_host.Sound = KeyOrName(sound);
@@ -1967,7 +1980,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1967 { 1980 {
1968 m_host.AddScriptLPS(1); 1981 m_host.AddScriptLPS(1);
1969 1982
1970 m_host.Sound = LLUUID.Zero; 1983 m_host.Sound = UUID.Zero;
1971 m_host.SoundGain = 0; 1984 m_host.SoundGain = 0;
1972 m_host.SoundFlags = 0; 1985 m_host.SoundFlags = 0;
1973 m_host.SoundRadius = 0; 1986 m_host.SoundRadius = 0;
@@ -1975,7 +1988,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1975 m_host.ScheduleFullUpdate(); 1988 m_host.ScheduleFullUpdate();
1976 m_host.SendFullUpdateToAllClients(); 1989 m_host.SendFullUpdateToAllClients();
1977 1990
1978 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); 1991 // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
1979 } 1992 }
1980 1993
1981 public void llPreloadSound(string sound) 1994 public void llPreloadSound(string sound)
@@ -2223,13 +2236,13 @@ namespace OpenSim.Region.ScriptEngine.Common
2223 2236
2224 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2237 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount)
2225 { 2238 {
2226 LLUUID invItemID=InventorySelf(); 2239 UUID invItemID=InventorySelf();
2227 if (invItemID == LLUUID.Zero) 2240 if (invItemID == UUID.Zero)
2228 return 0; 2241 return 0;
2229 2242
2230 m_host.AddScriptLPS(1); 2243 m_host.AddScriptLPS(1);
2231 2244
2232 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2245 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2233 return 0; 2246 return 0;
2234 2247
2235 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0) 2248 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0)
@@ -2238,9 +2251,9 @@ namespace OpenSim.Region.ScriptEngine.Common
2238 return 0; 2251 return 0;
2239 } 2252 }
2240 2253
2241 LLUUID toID=new LLUUID(); 2254 UUID toID=new UUID();
2242 2255
2243 if (!LLUUID.TryParse(destination, out toID)) 2256 if (!UUID.TryParse(destination, out toID))
2244 { 2257 {
2245 LSLError("Bad key in llGiveMoney"); 2258 LSLError("Bad key in llGiveMoney");
2246 return 0; 2259 return 0;
@@ -2303,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2303 // it's possible to have two items with the same task inventory name. 2316 // it's possible to have two items with the same task inventory name.
2304 // this is an easter egg of sorts. 2317 // this is an easter egg of sorts.
2305 2318
2306 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2319 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2307 { 2320 {
2308 if (inv.Value.Name == inventory) 2321 if (inv.Value.Name == inventory)
2309 { 2322 {
@@ -2314,18 +2327,18 @@ namespace OpenSim.Region.ScriptEngine.Common
2314 continue; 2327 continue;
2315 } 2328 }
2316 2329
2317 LLVector3 llpos = new LLVector3((float)pos.x, (float)pos.y, (float)pos.z); 2330 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
2318 2331
2319 // test if we're further away then 10m 2332 // test if we're further away then 10m
2320 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) 2333 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10)
2321 return; // wiki says, if it's further away then 10m, silently fail. 2334 return; // wiki says, if it's further away then 10m, silently fail.
2322 2335
2323 LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); 2336 Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z);
2324 2337
2325 // need the magnitude later 2338 // need the magnitude later
2326 float velmag = (float)Util.GetMagnitude(llvel); 2339 float velmag = (float)Util.GetMagnitude(llvel);
2327 2340
2328 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); 2341 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
2329 2342
2330 // If either of these are null, then there was an unknown error. 2343 // If either of these are null, then there was an unknown error.
2331 if (new_group == null) 2344 if (new_group == null)
@@ -2336,7 +2349,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2336 // objects rezzed with this method are die_at_edge by default. 2349 // objects rezzed with this method are die_at_edge by default.
2337 new_group.RootPart.SetDieAtEdge(true); 2350 new_group.RootPart.SetDieAtEdge(true);
2338 2351
2339 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.UUID.ToString()) }); 2352 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.ToString()) });
2340 float groupmass = new_group.GetMass(); 2353 float groupmass = new_group.GetMass();
2341 2354
2342 //Recoil. 2355 //Recoil.
@@ -2401,7 +2414,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2401 return; 2414 return;
2402 } 2415 }
2403 2416
2404 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2417 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2405 { 2418 {
2406 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2419 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2407 2420
@@ -2428,7 +2441,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2428 return; 2441 return;
2429 } 2442 }
2430 2443
2431 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2444 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2432 { 2445 {
2433 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2446 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2434 2447
@@ -2489,14 +2502,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2489 2502
2490 // TODO: figure out values for client, fromSession, and imSessionID 2503 // TODO: figure out values for client, fromSession, and imSessionID
2491 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); 2504 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch());
2492 LLUUID friendTransactionID = LLUUID.Random(); 2505 UUID friendTransactionID = UUID.Random();
2493 2506
2494 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 2507 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
2495 2508
2496 GridInstantMessage msg = new GridInstantMessage(); 2509 GridInstantMessage msg = new GridInstantMessage();
2497 msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; 2510 msg.fromAgentID = new Guid(m_host.ToString()); // fromAgentID.Guid;
2498 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; 2511 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID;
2499 msg.toAgentID = new Guid(user); // toAgentID.UUID; 2512 msg.toAgentID = new Guid(user); // toAgentID.Guid;
2500 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here 2513 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
2501// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); 2514// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
2502// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); 2515// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
@@ -2514,8 +2527,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2514 msg.fromGroup = false;// fromGroup; 2527 msg.fromGroup = false;// fromGroup;
2515 msg.offline = (byte)0; //offline; 2528 msg.offline = (byte)0; //offline;
2516 msg.ParentEstateID = 0; //ParentEstateID; 2529 msg.ParentEstateID = 0; //ParentEstateID;
2517 msg.Position = new sLLVector3();// new sLLVector3(m_host.AbsolutePosition); 2530 msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
2518 msg.RegionID = World.RegionInfo.RegionID.UUID;//RegionID.UUID; 2531 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
2519 msg.binaryBucket = new byte[0];// binaryBucket; 2532 msg.binaryBucket = new byte[0];// binaryBucket;
2520 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2533 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2521 // ScriptSleep(2000); 2534 // ScriptSleep(2000);
@@ -2543,7 +2556,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2543 public string llGetKey() 2556 public string llGetKey()
2544 { 2557 {
2545 m_host.AddScriptLPS(1); 2558 m_host.AddScriptLPS(1);
2546 return m_host.UUID.ToString(); 2559 return m_host.ToString();
2547 } 2560 }
2548 2561
2549 public void llSetBuoyancy(double buoyancy) 2562 public void llSetBuoyancy(double buoyancy)
@@ -2607,11 +2620,11 @@ namespace OpenSim.Region.ScriptEngine.Common
2607 { 2620 {
2608 m_host.AddScriptLPS(1); 2621 m_host.AddScriptLPS(1);
2609 2622
2610 LLUUID invItemID=InventorySelf(); 2623 UUID invItemID=InventorySelf();
2611 if (invItemID == LLUUID.Zero) 2624 if (invItemID == UUID.Zero)
2612 return; 2625 return;
2613 2626
2614 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2627 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2615 return; 2628 return;
2616 2629
2617 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2630 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
@@ -2620,9 +2633,9 @@ namespace OpenSim.Region.ScriptEngine.Common
2620 2633
2621 if (presence != null) 2634 if (presence != null)
2622 { 2635 {
2623 // Do NOT try to parse LLUUID, animations cannot be triggered by ID 2636 // Do NOT try to parse UUID, animations cannot be triggered by ID
2624 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); 2637 UUID animID=InventoryKey(anim, (int)AssetType.Animation);
2625 if (animID == LLUUID.Zero) 2638 if (animID == UUID.Zero)
2626 presence.AddAnimation(anim); 2639 presence.AddAnimation(anim);
2627 else 2640 else
2628 presence.AddAnimation(animID); 2641 presence.AddAnimation(animID);
@@ -2634,30 +2647,30 @@ namespace OpenSim.Region.ScriptEngine.Common
2634 { 2647 {
2635 m_host.AddScriptLPS(1); 2648 m_host.AddScriptLPS(1);
2636 2649
2637 LLUUID invItemID=InventorySelf(); 2650 UUID invItemID=InventorySelf();
2638 if (invItemID == LLUUID.Zero) 2651 if (invItemID == UUID.Zero)
2639 return; 2652 return;
2640 2653
2641 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2654 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2642 return; 2655 return;
2643 2656
2644 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2657 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2645 { 2658 {
2646 LLUUID animID = new LLUUID(); 2659 UUID animID = new UUID();
2647 2660
2648 if (!LLUUID.TryParse(anim, out animID)) 2661 if (!UUID.TryParse(anim, out animID))
2649 { 2662 {
2650 animID=InventoryKey(anim); 2663 animID=InventoryKey(anim);
2651 } 2664 }
2652 2665
2653 if (animID == LLUUID.Zero) 2666 if (animID == UUID.Zero)
2654 return; 2667 return;
2655 2668
2656 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); 2669 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2657 2670
2658 if (presence != null) 2671 if (presence != null)
2659 { 2672 {
2660 if (animID == LLUUID.Zero) 2673 if (animID == UUID.Zero)
2661 presence.RemoveAnimation(anim); 2674 presence.RemoveAnimation(anim);
2662 else 2675 else
2663 presence.RemoveAnimation(animID); 2676 presence.RemoveAnimation(animID);
@@ -2680,8 +2693,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2680 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2693 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain)
2681 { 2694 {
2682 m_host.AddScriptLPS(1); 2695 m_host.AddScriptLPS(1);
2683 m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2696 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2684 m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2697 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2685 m_host.ScheduleTerseUpdate(); 2698 m_host.ScheduleTerseUpdate();
2686 m_host.SendTerseUpdateToAllClients(); 2699 m_host.SendTerseUpdateToAllClients();
2687 } 2700 }
@@ -2700,19 +2713,19 @@ namespace OpenSim.Region.ScriptEngine.Common
2700 2713
2701 public void llRequestPermissions(string agent, int perm) 2714 public void llRequestPermissions(string agent, int perm)
2702 { 2715 {
2703 LLUUID agentID=new LLUUID(); 2716 UUID agentID=new UUID();
2704 2717
2705 if (!LLUUID.TryParse(agent, out agentID)) 2718 if (!UUID.TryParse(agent, out agentID))
2706 return; 2719 return;
2707 2720
2708 LLUUID invItemID=InventorySelf(); 2721 UUID invItemID=InventorySelf();
2709 2722
2710 if (invItemID == LLUUID.Zero) 2723 if (invItemID == UUID.Zero)
2711 return; // Not in a prim? How?? 2724 return; // Not in a prim? How??
2712 2725
2713 if (agentID == LLUUID.Zero || perm == 0) // Releasing permissions 2726 if (agentID == UUID.Zero || perm == 0) // Releasing permissions
2714 { 2727 {
2715 m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; 2728 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero;
2716 m_host.TaskInventory[invItemID].PermsMask=0; 2729 m_host.TaskInventory[invItemID].PermsMask=0;
2717 2730
2718 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2731 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -2786,14 +2799,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2786 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); 2799 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)});
2787 } 2800 }
2788 2801
2789 void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) 2802 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer)
2790 { 2803 {
2791 if (taskID != m_host.UUID) 2804 if (taskID != m_host.UUID)
2792 return; 2805 return;
2793 2806
2794 LLUUID invItemID=InventorySelf(); 2807 UUID invItemID=InventorySelf();
2795 2808
2796 if (invItemID == LLUUID.Zero) 2809 if (invItemID == UUID.Zero)
2797 return; 2810 return;
2798 2811
2799 client.OnScriptAnswer-=handleScriptAnswer; 2812 client.OnScriptAnswer-=handleScriptAnswer;
@@ -2816,7 +2829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2816 } 2829 }
2817 } 2830 }
2818 2831
2819 return LLUUID.Zero.ToString(); 2832 return UUID.Zero.ToString();
2820 } 2833 }
2821 2834
2822 public LSL_Types.LSLInteger llGetPermissions() 2835 public LSL_Types.LSLInteger llGetPermissions()
@@ -2854,8 +2867,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2854 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2867 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2855 if (linknumber > -1) 2868 if (linknumber > -1)
2856 { 2869 {
2857 LLObject.TextureEntry tex = part.Shape.Textures; 2870 Primitive.TextureEntry tex = part.Shape.Textures;
2858 LLColor texcolor; 2871 Color4 texcolor;
2859 if (face > -1) 2872 if (face > -1)
2860 { 2873 {
2861 texcolor = tex.CreateFace((uint)face).RGBA; 2874 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2901,8 +2914,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2901 { 2914 {
2902 linknumber = w; 2915 linknumber = w;
2903 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2916 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2904 LLObject.TextureEntry tex = part.Shape.Textures; 2917 Primitive.TextureEntry tex = part.Shape.Textures;
2905 LLColor texcolor; 2918 Color4 texcolor;
2906 if (face > -1) 2919 if (face > -1)
2907 { 2920 {
2908 texcolor = tex.CreateFace((uint)face).RGBA; 2921 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2945,7 +2958,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2945 public void llCreateLink(string target, int parent) 2958 public void llCreateLink(string target, int parent)
2946 { 2959 {
2947 m_host.AddScriptLPS(1); 2960 m_host.AddScriptLPS(1);
2948 LLUUID invItemID = InventorySelf(); 2961 UUID invItemID = InventorySelf();
2949 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) { 2962 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2950 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); 2963 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2951 return; 2964 return;
@@ -2970,7 +2983,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2970 childPrim.RootPart.UpdateFlag = uf; 2983 childPrim.RootPart.UpdateFlag = uf;
2971 } 2984 }
2972 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 2985 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2973 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 2986 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
2974 parentPrim.GetProperties(client); 2987 parentPrim.GetProperties(client);
2975 2988
2976 ScriptSleep(1000); 2989 ScriptSleep(1000);
@@ -2994,11 +3007,11 @@ namespace OpenSim.Region.ScriptEngine.Common
2994 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 3007 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
2995 if (part != null) 3008 if (part != null)
2996 { 3009 {
2997 return part.UUID.ToString(); 3010 return part.ToString();
2998 } 3011 }
2999 else 3012 else
3000 { 3013 {
3001 return LLUUID.Zero.ToString(); 3014 return UUID.Zero.ToString();
3002 } 3015 }
3003 } 3016 }
3004 3017
@@ -3020,7 +3033,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3020 { 3033 {
3021 m_host.AddScriptLPS(1); 3034 m_host.AddScriptLPS(1);
3022 int count = 0; 3035 int count = 0;
3023 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3036 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3024 { 3037 {
3025 if (inv.Value.Type == type || type == -1) 3038 if (inv.Value.Type == type || type == -1)
3026 { 3039 {
@@ -3034,7 +3047,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3034 { 3047 {
3035 m_host.AddScriptLPS(1); 3048 m_host.AddScriptLPS(1);
3036 ArrayList keys = new ArrayList(); 3049 ArrayList keys = new ArrayList();
3037 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3050 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3038 { 3051 {
3039 if (inv.Value.Type == type || type == -1) 3052 if (inv.Value.Type == type || type == -1)
3040 { 3053 {
@@ -3055,7 +3068,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3055 3068
3056 public void llSetScriptState(string name, int run) 3069 public void llSetScriptState(string name, int run)
3057 { 3070 {
3058 LLUUID item; 3071 UUID item;
3059 ScriptManager sm; 3072 ScriptManager sm;
3060 IScript script = null; 3073 IScript script = null;
3061 3074
@@ -3064,7 +3077,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3064 // These functions are supposed to be robust, 3077 // These functions are supposed to be robust,
3065 // so get the state one step at a time. 3078 // so get the state one step at a time.
3066 3079
3067 if ((item = ScriptByName(name)) != LLUUID.Zero) 3080 if ((item = ScriptByName(name)) != UUID.Zero)
3068 { 3081 {
3069 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 3082 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
3070 { 3083 {
@@ -3098,17 +3111,17 @@ namespace OpenSim.Region.ScriptEngine.Common
3098 { 3111 {
3099 m_host.AddScriptLPS(1); 3112 m_host.AddScriptLPS(1);
3100 bool found = false; 3113 bool found = false;
3101 LLUUID destId = LLUUID.Zero; 3114 UUID destId = UUID.Zero;
3102 LLUUID objId = LLUUID.Zero; 3115 UUID objId = UUID.Zero;
3103 3116
3104 if (!LLUUID.TryParse(destination, out destId)) 3117 if (!UUID.TryParse(destination, out destId))
3105 { 3118 {
3106 llSay(0, "Could not parse key " + destination); 3119 llSay(0, "Could not parse key " + destination);
3107 return; 3120 return;
3108 } 3121 }
3109 3122
3110 // move the first object found with this inventory name 3123 // move the first object found with this inventory name
3111 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3124 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3112 { 3125 {
3113 if (inv.Value.Name == inventory) 3126 if (inv.Value.Name == inventory)
3114 { 3127 {
@@ -3186,22 +3199,22 @@ namespace OpenSim.Region.ScriptEngine.Common
3186 { 3199 {
3187 if (item.Type == 3 && item.Name == name) 3200 if (item.Type == 3 && item.Name == name)
3188 { 3201 {
3189 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( 3202 UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
3190 m_localID, m_itemID, item.AssetID.ToString()); 3203 m_localID, m_itemID, item.AssetID.ToString());
3191 3204
3192 LLVector3 region = new LLVector3( 3205 Vector3 region = new Vector3(
3193 World.RegionInfo.RegionLocX * Constants.RegionSize, 3206 World.RegionInfo.RegionLocX * Constants.RegionSize,
3194 World.RegionInfo.RegionLocY * Constants.RegionSize, 3207 World.RegionInfo.RegionLocY * Constants.RegionSize,
3195 0); 3208 0);
3196 3209
3197 World.AssetCache.GetAsset(item.AssetID, 3210 World.AssetCache.GetAsset(item.AssetID,
3198 delegate(LLUUID i, AssetBase a) 3211 delegate(UUID i, AssetBase a)
3199 { 3212 {
3200 AssetLandmark lm = new AssetLandmark(a); 3213 AssetLandmark lm = new AssetLandmark(a);
3201 3214
3202 float rx = (uint)(lm.RegionHandle >> 32); 3215 float rx = (uint)(lm.RegionHandle >> 32);
3203 float ry = (uint)lm.RegionHandle; 3216 float ry = (uint)lm.RegionHandle;
3204 region = lm.Position + new LLVector3(rx, ry, 0) - region; 3217 region = lm.Position + new Vector3(rx, ry, 0) - region;
3205 3218
3206 string reply = region.ToString(); 3219 string reply = region.ToString();
3207 m_ScriptEngine.m_ASYNCLSLCommandManager. 3220 m_ScriptEngine.m_ASYNCLSLCommandManager.
@@ -3226,8 +3239,8 @@ namespace OpenSim.Region.ScriptEngine.Common
3226 public void llTeleportAgentHome(string agent) 3239 public void llTeleportAgentHome(string agent)
3227 { 3240 {
3228 m_host.AddScriptLPS(1); 3241 m_host.AddScriptLPS(1);
3229 LLUUID agentId = new LLUUID(); 3242 UUID agentId = new UUID();
3230 if (LLUUID.TryParse(agent, out agentId)) 3243 if (UUID.TryParse(agent, out agentId))
3231 { 3244 {
3232 ScenePresence presence = World.GetScenePresence(agentId); 3245 ScenePresence presence = World.GetScenePresence(agentId);
3233 if (presence != null) 3246 if (presence != null)
@@ -3243,7 +3256,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3243 public void llModifyLand(int action, int brush) 3256 public void llModifyLand(int action, int brush)
3244 { 3257 {
3245 m_host.AddScriptLPS(1); 3258 m_host.AddScriptLPS(1);
3246 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); 3259 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0));
3247 } 3260 }
3248 3261
3249 public void llCollisionSound(string impact_sound, double impact_volume) 3262 public void llCollisionSound(string impact_sound, double impact_volume)
@@ -3277,7 +3290,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3277 m_host.AddScriptLPS(1); 3290 m_host.AddScriptLPS(1);
3278 3291
3279 uint partLocalID; 3292 uint partLocalID;
3280 LLUUID partItemID; 3293 UUID partItemID;
3281 3294
3282 switch ((int)linknum) 3295 switch ((int)linknum)
3283 { 3296 {
@@ -3452,7 +3465,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3452 SceneObjectPart targ = World.GetSceneObjectPart(target); 3465 SceneObjectPart targ = World.GetSceneObjectPart(target);
3453 if (targ == null) 3466 if (targ == null)
3454 return; 3467 return;
3455 targ.ApplyImpulse(new LLVector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); 3468 targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0);
3456 } 3469 }
3457 3470
3458 public void llPassCollisions(int pass) 3471 public void llPassCollisions(int pass)
@@ -3731,7 +3744,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3731 public string llGetInventoryKey(string name) 3744 public string llGetInventoryKey(string name)
3732 { 3745 {
3733 m_host.AddScriptLPS(1); 3746 m_host.AddScriptLPS(1);
3734 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3747 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3735 { 3748 {
3736 if (inv.Value.Name == name) 3749 if (inv.Value.Name == name)
3737 { 3750 {
@@ -3741,11 +3754,11 @@ namespace OpenSim.Region.ScriptEngine.Common
3741 } 3754 }
3742 else 3755 else
3743 { 3756 {
3744 return LLUUID.Zero.ToString(); 3757 return UUID.Zero.ToString();
3745 } 3758 }
3746 } 3759 }
3747 } 3760 }
3748 return LLUUID.Zero.ToString(); 3761 return UUID.Zero.ToString();
3749 } 3762 }
3750 3763
3751 public void llAllowInventoryDrop(int add) 3764 public void llAllowInventoryDrop(int add)
@@ -3763,10 +3776,10 @@ namespace OpenSim.Region.ScriptEngine.Common
3763 m_host.AddScriptLPS(1); 3776 m_host.AddScriptLPS(1);
3764 3777
3765 LSL_Types.Vector3 SunDoubleVector3; 3778 LSL_Types.Vector3 SunDoubleVector3;
3766 LLVector3 SunFloatVector3; 3779 Vector3 SunFloatVector3;
3767 3780
3768 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3781 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3769 // have to convert from LLVector3 (float) to LSL_Types.Vector3 (double) 3782 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double)
3770 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3783 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3771 SunDoubleVector3.x = (double)SunFloatVector3.X; 3784 SunDoubleVector3.x = (double)SunFloatVector3.X;
3772 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3785 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3778,7 +3791,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3778 public LSL_Types.Vector3 llGetTextureOffset(int face) 3791 public LSL_Types.Vector3 llGetTextureOffset(int face)
3779 { 3792 {
3780 m_host.AddScriptLPS(1); 3793 m_host.AddScriptLPS(1);
3781 LLObject.TextureEntry tex = m_host.Shape.Textures; 3794 Primitive.TextureEntry tex = m_host.Shape.Textures;
3782 LSL_Types.Vector3 offset; 3795 LSL_Types.Vector3 offset;
3783 if (face == -1) 3796 if (face == -1)
3784 { 3797 {
@@ -3793,7 +3806,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3793 public LSL_Types.Vector3 llGetTextureScale(int side) 3806 public LSL_Types.Vector3 llGetTextureScale(int side)
3794 { 3807 {
3795 m_host.AddScriptLPS(1); 3808 m_host.AddScriptLPS(1);
3796 LLObject.TextureEntry tex = m_host.Shape.Textures; 3809 Primitive.TextureEntry tex = m_host.Shape.Textures;
3797 LSL_Types.Vector3 scale; 3810 LSL_Types.Vector3 scale;
3798 if (side == -1) 3811 if (side == -1)
3799 { 3812 {
@@ -3808,7 +3821,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3808 public double llGetTextureRot(int face) 3821 public double llGetTextureRot(int face)
3809 { 3822 {
3810 m_host.AddScriptLPS(1); 3823 m_host.AddScriptLPS(1);
3811 LLObject.TextureEntry tex = m_host.Shape.Textures; 3824 Primitive.TextureEntry tex = m_host.Shape.Textures;
3812 if (face == -1) 3825 if (face == -1)
3813 { 3826 {
3814 face = 0; 3827 face = 0;
@@ -3825,14 +3838,14 @@ namespace OpenSim.Region.ScriptEngine.Common
3825 public string llGetOwnerKey(string id) 3838 public string llGetOwnerKey(string id)
3826 { 3839 {
3827 m_host.AddScriptLPS(1); 3840 m_host.AddScriptLPS(1);
3828 LLUUID key = new LLUUID(); 3841 UUID key = new UUID();
3829 if (LLUUID.TryParse(id, out key)) 3842 if (UUID.TryParse(id, out key))
3830 { 3843 {
3831 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3844 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString();
3832 } 3845 }
3833 else 3846 else
3834 { 3847 {
3835 return LLUUID.Zero.ToString(); 3848 return UUID.Zero.ToString();
3836 } 3849 }
3837 } 3850 }
3838 3851
@@ -4041,8 +4054,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4041 return 2; 4054 return 2;
4042 if (src.Data[index] is String) 4055 if (src.Data[index] is String)
4043 { 4056 {
4044 LLUUID tuuid; 4057 UUID tuuid;
4045 if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) 4058 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
4046 { 4059 {
4047 return 3; 4060 return 3;
4048 } 4061 }
@@ -4454,8 +4467,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4454 public string llKey2Name(string id) 4467 public string llKey2Name(string id)
4455 { 4468 {
4456 m_host.AddScriptLPS(1); 4469 m_host.AddScriptLPS(1);
4457 LLUUID key = new LLUUID(); 4470 UUID key = new UUID();
4458 if (LLUUID.TryParse(id,out key)) 4471 if (UUID.TryParse(id,out key))
4459 { 4472 {
4460 ScenePresence presence = World.GetScenePresence(key); 4473 ScenePresence presence = World.GetScenePresence(key);
4461 4474
@@ -4479,7 +4492,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4479 { 4492 {
4480 m_host.AddScriptLPS(1); 4493 m_host.AddScriptLPS(1);
4481 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); 4494 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
4482 pTexAnim.Flags =(uint) mode; 4495 pTexAnim.Flags =(Primitive.TextureAnimMode)mode;
4483 4496
4484 //ALL_SIDES 4497 //ALL_SIDES
4485 if (face == -1) 4498 if (face == -1)
@@ -4568,8 +4581,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4568 public LSL_Types.LSLInteger llOverMyLand(string id) 4581 public LSL_Types.LSLInteger llOverMyLand(string id)
4569 { 4582 {
4570 m_host.AddScriptLPS(1); 4583 m_host.AddScriptLPS(1);
4571 LLUUID key = new LLUUID(); 4584 UUID key = new UUID();
4572 if (LLUUID.TryParse(id,out key)) 4585 if (UUID.TryParse(id,out key))
4573 { 4586 {
4574 ScenePresence presence = World.GetScenePresence(key); 4587 ScenePresence presence = World.GetScenePresence(key);
4575 if (presence != null) // object is an avatar 4588 if (presence != null) // object is an avatar
@@ -4612,8 +4625,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4612 { 4625 {
4613 m_host.AddScriptLPS(1); 4626 m_host.AddScriptLPS(1);
4614 4627
4615 LLUUID key = new LLUUID(); 4628 UUID key = new UUID();
4616 if (LLUUID.TryParse(id, out key)) 4629 if (UUID.TryParse(id, out key))
4617 { 4630 {
4618 ScenePresence av = World.GetScenePresence(key); 4631 ScenePresence av = World.GetScenePresence(key);
4619 4632
@@ -4751,8 +4764,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4751 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); 4764 Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
4752 4765
4753 // TODO find out about the other defaults and add them here 4766 // TODO find out about the other defaults and add them here
4754 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4767 ps.PartStartColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4755 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4768 ps.PartEndColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4756 ps.PartStartScaleX = 1.0f; 4769 ps.PartStartScaleX = 1.0f;
4757 ps.PartStartScaleY = 1.0f; 4770 ps.PartStartScaleY = 1.0f;
4758 ps.PartEndScaleX = 1.0f; 4771 ps.PartEndScaleX = 1.0f;
@@ -4800,7 +4813,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4800 4813
4801 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: 4814 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR:
4802 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 4815 tempv = (LSL_Types.Vector3)rules.Data[i + 1];
4803 //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); 4816 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1);
4804 4817
4805 prules.PartEndColor.R = (float)tempv.x; 4818 prules.PartEndColor.R = (float)tempv.x;
4806 prules.PartEndColor.G = (float)tempv.y; 4819 prules.PartEndColor.G = (float)tempv.y;
@@ -4879,8 +4892,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4879 break; 4892 break;
4880 4893
4881 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY: 4894 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY:
4882 LLUUID key = LLUUID.Zero; 4895 UUID key = UUID.Zero;
4883 if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) 4896 if (UUID.TryParse(rules.Data[i + 1].ToString(), out key))
4884 { 4897 {
4885 prules.Target = key; 4898 prules.Target = key;
4886 } 4899 }
@@ -4924,37 +4937,37 @@ namespace OpenSim.Region.ScriptEngine.Common
4924 NotImplemented("llGroundRepel"); 4937 NotImplemented("llGroundRepel");
4925 } 4938 }
4926 4939
4927 private LLUUID GetTaskInventoryItem(string name) 4940 private UUID GetTaskInventoryItem(string name)
4928 { 4941 {
4929 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 4942 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
4930 { 4943 {
4931 if (inv.Value.Name == name) 4944 if (inv.Value.Name == name)
4932 return inv.Key; 4945 return inv.Key;
4933 } 4946 }
4934 return LLUUID.Zero; 4947 return UUID.Zero;
4935 } 4948 }
4936 4949
4937 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4950 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4938 { 4951 {
4939 m_host.AddScriptLPS(1); 4952 m_host.AddScriptLPS(1);
4940 4953
4941 LLUUID destID; 4954 UUID destID;
4942 if (!LLUUID.TryParse(destination, out destID)) 4955 if (!UUID.TryParse(destination, out destID))
4943 return; 4956 return;
4944 4957
4945 List<LLUUID> itemList = new List<LLUUID>(); 4958 List<UUID> itemList = new List<UUID>();
4946 4959
4947 foreach (Object item in inventory.Data) 4960 foreach (Object item in inventory.Data)
4948 { 4961 {
4949 LLUUID itemID; 4962 UUID itemID;
4950 if (LLUUID.TryParse(item.ToString(), out itemID)) 4963 if (UUID.TryParse(item.ToString(), out itemID))
4951 { 4964 {
4952 itemList.Add(itemID); 4965 itemList.Add(itemID);
4953 } 4966 }
4954 else 4967 else
4955 { 4968 {
4956 itemID = GetTaskInventoryItem(item.ToString()); 4969 itemID = GetTaskInventoryItem(item.ToString());
4957 if (itemID != LLUUID.Zero) 4970 if (itemID != UUID.Zero)
4958 itemList.Add(itemID); 4971 itemList.Add(itemID);
4959 } 4972 }
4960 } 4973 }
@@ -5015,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5015 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 5028 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
5016 5029
5017 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 5030 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
5018 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z); 5031 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
5019 } 5032 }
5020 5033
5021 public string llAvatarOnSitTarget() 5034 public string llAvatarOnSitTarget()
@@ -5027,12 +5040,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5027 public void llAddToLandPassList(string avatar, double hours) 5040 public void llAddToLandPassList(string avatar, double hours)
5028 { 5041 {
5029 m_host.AddScriptLPS(1); 5042 m_host.AddScriptLPS(1);
5030 LLUUID key; 5043 UUID key;
5031 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 5044 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
5032 if (land.OwnerID == m_host.OwnerID) 5045 if (land.OwnerID == m_host.OwnerID)
5033 { 5046 {
5034 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 5047 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
5035 if (LLUUID.TryParse(avatar, out key)) 5048 if (UUID.TryParse(avatar, out key))
5036 { 5049 {
5037 entry.AgentID = key; 5050 entry.AgentID = key;
5038 entry.Flags = ParcelManager.AccessList.Access; 5051 entry.Flags = ParcelManager.AccessList.Access;
@@ -5058,13 +5071,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5058 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 5071 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
5059 { 5072 {
5060 m_host.AddScriptLPS(1); 5073 m_host.AddScriptLPS(1);
5061 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 5074 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5062 } 5075 }
5063 5076
5064 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 5077 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
5065 { 5078 {
5066 m_host.AddScriptLPS(1); 5079 m_host.AddScriptLPS(1);
5067 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 5080 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5068 } 5081 }
5069 5082
5070 public string llDumpList2String(LSL_Types.list src, string seperator) 5083 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -5086,7 +5099,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5086 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 5099 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos)
5087 { 5100 {
5088 m_host.AddScriptLPS(1); 5101 m_host.AddScriptLPS(1);
5089 bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); 5102 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
5090 if (result) 5103 if (result)
5091 { 5104 {
5092 return 1; 5105 return 1;
@@ -5101,8 +5114,8 @@ namespace OpenSim.Region.ScriptEngine.Common
5101 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5114 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
5102 { 5115 {
5103 m_host.AddScriptLPS(1); 5116 m_host.AddScriptLPS(1);
5104 LLUUID av = new LLUUID(); 5117 UUID av = new UUID();
5105 if (!LLUUID.TryParse(avatar,out av)) 5118 if (!UUID.TryParse(avatar,out av))
5106 { 5119 {
5107 LSLError("First parameter to llDialog needs to be a key"); 5120 LSLError("First parameter to llDialog needs to be a key");
5108 return; 5121 return;
@@ -5127,7 +5140,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5127 } 5140 }
5128 buts[i] = buttons.Data[i].ToString(); 5141 buts[i] = buttons.Data[i].ToString();
5129 } 5142 }
5130 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 5143 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
5131 // ScriptSleep(1000); 5144 // ScriptSleep(1000);
5132 } 5145 }
5133 5146
@@ -5144,7 +5157,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5144 5157
5145 public void llResetOtherScript(string name) 5158 public void llResetOtherScript(string name)
5146 { 5159 {
5147 LLUUID item; 5160 UUID item;
5148 ScriptManager sm; 5161 ScriptManager sm;
5149 IScript script = null; 5162 IScript script = null;
5150 5163
@@ -5153,7 +5166,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5153 // These functions are supposed to be robust, 5166 // These functions are supposed to be robust,
5154 // so get the state one step at a time. 5167 // so get the state one step at a time.
5155 5168
5156 if ((item = ScriptByName(name)) != LLUUID.Zero) 5169 if ((item = ScriptByName(name)) != UUID.Zero)
5157 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 5170 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
5158 sm.ResetScript(m_localID, item); 5171 sm.ResetScript(m_localID, item);
5159 5172
@@ -5168,7 +5181,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5168 5181
5169 public LSL_Types.LSLInteger llGetScriptState(string name) 5182 public LSL_Types.LSLInteger llGetScriptState(string name)
5170 { 5183 {
5171 LLUUID item; 5184 UUID item;
5172 ScriptManager sm; 5185 ScriptManager sm;
5173 IScript script = null; 5186 IScript script = null;
5174 5187
@@ -5177,7 +5190,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5177 // These functions are supposed to be robust, 5190 // These functions are supposed to be robust,
5178 // so get the state one step at a time. 5191 // so get the state one step at a time.
5179 5192
5180 if ((item = ScriptByName(name)) != LLUUID.Zero) 5193 if ((item = ScriptByName(name)) != UUID.Zero)
5181 { 5194 {
5182 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 5195 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
5183 { 5196 {
@@ -5216,10 +5229,10 @@ namespace OpenSim.Region.ScriptEngine.Common
5216 { 5229 {
5217 m_host.AddScriptLPS(1); 5230 m_host.AddScriptLPS(1);
5218 bool found = false; 5231 bool found = false;
5219 LLUUID destId = LLUUID.Zero; 5232 UUID destId = UUID.Zero;
5220 LLUUID srcId = LLUUID.Zero; 5233 UUID srcId = UUID.Zero;
5221 5234
5222 if (!LLUUID.TryParse(target, out destId)) 5235 if (!UUID.TryParse(target, out destId))
5223 { 5236 {
5224 llSay(0, "Could not parse key " + target); 5237 llSay(0, "Could not parse key " + target);
5225 return; 5238 return;
@@ -5232,7 +5245,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5232 } 5245 }
5233 5246
5234 // copy the first script found with this inventory name 5247 // copy the first script found with this inventory name
5235 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 5248 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
5236 { 5249 {
5237 if (inv.Value.Name == name) 5250 if (inv.Value.Name == name)
5238 { 5251 {
@@ -5264,8 +5277,8 @@ namespace OpenSim.Region.ScriptEngine.Common
5264 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5277 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
5265 if (xmlrpcMod.IsEnabled()) 5278 if (xmlrpcMod.IsEnabled())
5266 { 5279 {
5267 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); 5280 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5268 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5281 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
5269 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); 5282 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
5270 } 5283 }
5271 // ScriptSleep(1000); 5284 // ScriptSleep(1000);
@@ -5583,9 +5596,9 @@ namespace OpenSim.Region.ScriptEngine.Common
5583 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) 5596 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type)
5584 { 5597 {
5585 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5598 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5586 LLUUID sculptId; 5599 UUID sculptId;
5587 5600
5588 if (!LLUUID.TryParse(map, out sculptId)) 5601 if (!UUID.TryParse(map, out sculptId))
5589 { 5602 {
5590 llSay(0, "Could not parse key " + map); 5603 llSay(0, "Could not parse key " + map);
5591 return; 5604 return;
@@ -6015,9 +6028,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6015 ScenePresence av = World.GetScenePresence(id); 6028 ScenePresence av = World.GetScenePresence(id);
6016 if (av == null) 6029 if (av == null)
6017 return l; 6030 return l;
6018 LLUUID[] anims; 6031 UUID[] anims;
6019 anims = av.GetAnimationArray(); 6032 anims = av.GetAnimationArray();
6020 foreach (LLUUID foo in anims) 6033 foreach (UUID foo in anims)
6021 l.Add(foo.ToString()); 6034 l.Add(foo.ToString());
6022 return l; 6035 return l;
6023 } 6036 }
@@ -6025,8 +6038,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6025 public void llSetParcelMusicURL(string url) 6038 public void llSetParcelMusicURL(string url)
6026 { 6039 {
6027 m_host.AddScriptLPS(1); 6040 m_host.AddScriptLPS(1);
6028 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6041 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
6029 if (landowner == LLUUID.Zero) 6042 if (landowner == UUID.Zero)
6030 { 6043 {
6031 return; 6044 return;
6032 } 6045 }
@@ -6041,9 +6054,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6041 public void osSetParcelMediaURL(string url) 6054 public void osSetParcelMediaURL(string url)
6042 { 6055 {
6043 m_host.AddScriptLPS(1); 6056 m_host.AddScriptLPS(1);
6044 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6057 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
6045 6058
6046 if (landowner == LLUUID.Zero) 6059 if (landowner == UUID.Zero)
6047 { 6060 {
6048 return; 6061 return;
6049 } 6062 }
@@ -6059,13 +6072,20 @@ namespace OpenSim.Region.ScriptEngine.Common
6059 public LSL_Types.Vector3 llGetRootPosition() 6072 public LSL_Types.Vector3 llGetRootPosition()
6060 { 6073 {
6061 m_host.AddScriptLPS(1); 6074 m_host.AddScriptLPS(1);
6062 return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); 6075 return new LSL_Types.Vector3(
6076 m_host.ParentGroup.AbsolutePosition.X,
6077 m_host.ParentGroup.AbsolutePosition.Y,
6078 m_host.ParentGroup.AbsolutePosition.Z);
6063 } 6079 }
6064 6080
6065 public LSL_Types.Quaternion llGetRootRotation() 6081 public LSL_Types.Quaternion llGetRootRotation()
6066 { 6082 {
6067 m_host.AddScriptLPS(1); 6083 m_host.AddScriptLPS(1);
6068 return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); 6084 return new LSL_Types.Quaternion(
6085 m_host.ParentGroup.GroupRotation.X,
6086 m_host.ParentGroup.GroupRotation.Y,
6087 m_host.ParentGroup.GroupRotation.Z,
6088 m_host.ParentGroup.GroupRotation.W);
6069 } 6089 }
6070 6090
6071 public string llGetObjectDesc() 6091 public string llGetObjectDesc()
@@ -6097,8 +6117,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6097 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6117 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6098 if (linknumber > -1) 6118 if (linknumber > -1)
6099 { 6119 {
6100 LLObject.TextureEntry tex = part.Shape.Textures; 6120 Primitive.TextureEntry tex = part.Shape.Textures;
6101 LLColor texcolor; 6121 Color4 texcolor;
6102 if (face > -1) 6122 if (face > -1)
6103 { 6123 {
6104 texcolor = tex.CreateFace((uint)face).RGBA; 6124 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6136,8 +6156,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6136 { 6156 {
6137 linknumber = w; 6157 linknumber = w;
6138 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6158 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6139 LLObject.TextureEntry tex = part.Shape.Textures; 6159 Primitive.TextureEntry tex = part.Shape.Textures;
6140 LLColor texcolor; 6160 Color4 texcolor;
6141 if (face > -1) 6161 if (face > -1)
6142 { 6162 {
6143 texcolor = tex.CreateFace((uint)face).RGBA; 6163 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6184,7 +6204,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6184 6204
6185 public LSL_Types.Vector3 llGetGeometricCenter() 6205 public LSL_Types.Vector3 llGetGeometricCenter()
6186 { 6206 {
6187 return new LSL_Types.Vector3(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); 6207 return new LSL_Types.Vector3(
6208 m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z);
6188 } 6209 }
6189 6210
6190 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) 6211 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules)
@@ -6205,21 +6226,21 @@ namespace OpenSim.Region.ScriptEngine.Common
6205 break; 6226 break;
6206 6227
6207 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: 6228 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS:
6208 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 6229 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6209 res.Add(new LSL_Types.LSLInteger(1)); 6230 res.Add(new LSL_Types.LSLInteger(1));
6210 else 6231 else
6211 res.Add(new LSL_Types.LSLInteger(0)); 6232 res.Add(new LSL_Types.LSLInteger(0));
6212 break; 6233 break;
6213 6234
6214 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: 6235 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ:
6215 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 6236 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6216 res.Add(new LSL_Types.LSLInteger(1)); 6237 res.Add(new LSL_Types.LSLInteger(1));
6217 else 6238 else
6218 res.Add(new LSL_Types.LSLInteger(0)); 6239 res.Add(new LSL_Types.LSLInteger(0));
6219 break; 6240 break;
6220 6241
6221 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: 6242 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM:
6222 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 6243 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6223 res.Add(new LSL_Types.LSLInteger(1)); 6244 res.Add(new LSL_Types.LSLInteger(1));
6224 else 6245 else
6225 res.Add(new LSL_Types.LSLInteger(0)); 6246 res.Add(new LSL_Types.LSLInteger(0));
@@ -6324,8 +6345,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6324 if (face == -1) 6345 if (face == -1)
6325 face = 0; 6346 face = 0;
6326 6347
6327 LLObject.TextureEntry tex = m_host.Shape.Textures; 6348 Primitive.TextureEntry tex = m_host.Shape.Textures;
6328 LLObject.TextureEntryFace texface = tex.GetFace((uint)face); 6349 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6329 6350
6330 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6351 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString()));
6331 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6352 res.Add(new LSL_Types.Vector3(texface.RepeatU,
@@ -6344,7 +6365,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6344 face=Convert.ToInt32("" + rules.Data[idx++]); 6365 face=Convert.ToInt32("" + rules.Data[idx++]);
6345 6366
6346 tex = m_host.Shape.Textures; 6367 tex = m_host.Shape.Textures;
6347 LLColor texcolor; 6368 Color4 texcolor;
6348 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 6369 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
6349 texcolor = tex.DefaultTexture.RGBA; 6370 texcolor = tex.DefaultTexture.RGBA;
6350 else 6371 else
@@ -6698,7 +6719,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6698 public void llSetLocalRot(LSL_Types.Quaternion rot) 6719 public void llSetLocalRot(LSL_Types.Quaternion rot)
6699 { 6720 {
6700 m_host.AddScriptLPS(1); 6721 m_host.AddScriptLPS(1);
6701 m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 6722 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
6702 // ScriptSleep(200); 6723 // ScriptSleep(200);
6703 } 6724 }
6704 6725
@@ -6954,7 +6975,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6954 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 6975 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask)
6955 { 6976 {
6956 m_host.AddScriptLPS(1); 6977 m_host.AddScriptLPS(1);
6957 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6978 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6958 { 6979 {
6959 if (inv.Value.Name == item) 6980 if (inv.Value.Name == item)
6960 { 6981 {
@@ -6985,7 +7006,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6985 public string llGetInventoryCreator(string item) 7006 public string llGetInventoryCreator(string item)
6986 { 7007 {
6987 m_host.AddScriptLPS(1); 7008 m_host.AddScriptLPS(1);
6988 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7009 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6989 { 7010 {
6990 if (inv.Value.Name == item) 7011 if (inv.Value.Name == item)
6991 { 7012 {
@@ -7000,7 +7021,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7000 { 7021 {
7001 m_host.AddScriptLPS(1); 7022 m_host.AddScriptLPS(1);
7002 7023
7003 World.SimChatBroadcast(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 7024 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
7004// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 7025// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
7005// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 7026// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
7006 } 7027 }
@@ -7021,7 +7042,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7021 if (info == null) 7042 if (info == null)
7022 { 7043 {
7023 // ScriptSleep(1000); 7044 // ScriptSleep(1000);
7024 return LLUUID.Zero.ToString(); 7045 return UUID.Zero.ToString();
7025 } 7046 }
7026 reply = new LSL_Types.Vector3( 7047 reply = new LSL_Types.Vector3(
7027 info.RegionLocX * Constants.RegionSize, 7048 info.RegionLocX * Constants.RegionSize,
@@ -7038,7 +7059,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7038 if (info == null) 7059 if (info == null)
7039 { 7060 {
7040 // ScriptSleep(1000); 7061 // ScriptSleep(1000);
7041 return LLUUID.Zero.ToString(); 7062 return UUID.Zero.ToString();
7042 } 7063 }
7043 int access = info.RegionSettings.Maturity; 7064 int access = info.RegionSettings.Maturity;
7044 if (access == 0) 7065 if (access == 0)
@@ -7053,11 +7074,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7053 break; 7074 break;
7054 default: 7075 default:
7055 // ScriptSleep(1000); 7076 // ScriptSleep(1000);
7056 return LLUUID.Zero.ToString(); // Raise no event 7077 return UUID.Zero.ToString(); // Raise no event
7057 } 7078 }
7058 LLUUID rq = LLUUID.Random(); 7079 UUID rq = UUID.Random();
7059 7080
7060 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. 7081 UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.
7061 m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); 7082 m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString());
7062 7083
7063 m_ScriptEngine.m_ASYNCLSLCommandManager. 7084 m_ScriptEngine.m_ASYNCLSLCommandManager.
@@ -7069,7 +7090,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7069 catch(Exception e) 7090 catch(Exception e)
7070 { 7091 {
7071 Console.WriteLine(e.ToString()); 7092 Console.WriteLine(e.ToString());
7072 return LLUUID.Zero.ToString(); 7093 return UUID.Zero.ToString();
7073 } 7094 }
7074 } 7095 }
7075 7096
@@ -7082,8 +7103,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7082 public double llGetObjectMass(string id) 7103 public double llGetObjectMass(string id)
7083 { 7104 {
7084 m_host.AddScriptLPS(1); 7105 m_host.AddScriptLPS(1);
7085 LLUUID key = new LLUUID(); 7106 UUID key = new UUID();
7086 if (LLUUID.TryParse(id,out key)) 7107 if (UUID.TryParse(id,out key))
7087 { 7108 {
7088 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); 7109 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass();
7089 } 7110 }
@@ -7175,7 +7196,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7175 public void llLoadURL(string avatar_id, string message, string url) 7196 public void llLoadURL(string avatar_id, string message, string url)
7176 { 7197 {
7177 m_host.AddScriptLPS(1); 7198 m_host.AddScriptLPS(1);
7178 LLUUID avatarId = new LLUUID(avatar_id); 7199 UUID avatarId = new UUID(avatar_id);
7179 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, 7200 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
7180 url); 7201 url);
7181 // ScriptSleep(10000); 7202 // ScriptSleep(10000);
@@ -7321,7 +7342,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7321 public LSL_Types.LSLInteger llGetInventoryType(string name) 7342 public LSL_Types.LSLInteger llGetInventoryType(string name)
7322 { 7343 {
7323 m_host.AddScriptLPS(1); 7344 m_host.AddScriptLPS(1);
7324 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7345 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
7325 { 7346 {
7326 if (inv.Value.Name == name) 7347 if (inv.Value.Name == name)
7327 { 7348 {
@@ -7350,10 +7371,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7350 public LSL_Types.Vector3 llGetCameraPos() 7371 public LSL_Types.Vector3 llGetCameraPos()
7351 { 7372 {
7352 m_host.AddScriptLPS(1); 7373 m_host.AddScriptLPS(1);
7353 LLUUID invItemID=InventorySelf(); 7374 UUID invItemID=InventorySelf();
7354 if (invItemID == LLUUID.Zero) 7375 if (invItemID == UUID.Zero)
7355 return new LSL_Types.Vector3(); 7376 return new LSL_Types.Vector3();
7356 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 7377 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7357 return new LSL_Types.Vector3(); 7378 return new LSL_Types.Vector3();
7358 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) 7379 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0)
7359 { 7380 {
@@ -7363,7 +7384,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7363 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7384 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7364 if (presence != null) 7385 if (presence != null)
7365 { 7386 {
7366 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); 7387 LSL_Types.Vector3 pos = new LSL_Types.Vector3(
7388 presence.CameraPosition.X,
7389 presence.CameraPosition.Y,
7390 presence.CameraPosition.Z);
7367 return pos; 7391 return pos;
7368 } 7392 }
7369 return new LSL_Types.Vector3(); 7393 return new LSL_Types.Vector3();
@@ -7426,12 +7450,12 @@ namespace OpenSim.Region.ScriptEngine.Common
7426 public void llAddToLandBanList(string avatar, double hours) 7450 public void llAddToLandBanList(string avatar, double hours)
7427 { 7451 {
7428 m_host.AddScriptLPS(1); 7452 m_host.AddScriptLPS(1);
7429 LLUUID key; 7453 UUID key;
7430 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7454 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7431 if (land.OwnerID == m_host.OwnerID) 7455 if (land.OwnerID == m_host.OwnerID)
7432 { 7456 {
7433 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 7457 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
7434 if (LLUUID.TryParse(avatar, out key)) 7458 if (UUID.TryParse(avatar, out key))
7435 { 7459 {
7436 entry.AgentID = key; 7460 entry.AgentID = key;
7437 entry.Flags = ParcelManager.AccessList.Ban; 7461 entry.Flags = ParcelManager.AccessList.Ban;
@@ -7445,11 +7469,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7445 public void llRemoveFromLandPassList(string avatar) 7469 public void llRemoveFromLandPassList(string avatar)
7446 { 7470 {
7447 m_host.AddScriptLPS(1); 7471 m_host.AddScriptLPS(1);
7448 LLUUID key; 7472 UUID key;
7449 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7473 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7450 if (land.OwnerID == m_host.OwnerID) 7474 if (land.OwnerID == m_host.OwnerID)
7451 { 7475 {
7452 if (LLUUID.TryParse(avatar, out key)) 7476 if (UUID.TryParse(avatar, out key))
7453 { 7477 {
7454 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7478 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7455 { 7479 {
@@ -7467,11 +7491,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7467 public void llRemoveFromLandBanList(string avatar) 7491 public void llRemoveFromLandBanList(string avatar)
7468 { 7492 {
7469 m_host.AddScriptLPS(1); 7493 m_host.AddScriptLPS(1);
7470 LLUUID key; 7494 UUID key;
7471 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7495 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7472 if (land.OwnerID == m_host.OwnerID) 7496 if (land.OwnerID == m_host.OwnerID)
7473 { 7497 {
7474 if (LLUUID.TryParse(avatar, out key)) 7498 if (UUID.TryParse(avatar, out key))
7475 { 7499 {
7476 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7500 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7477 { 7501 {
@@ -7491,16 +7515,16 @@ namespace OpenSim.Region.ScriptEngine.Common
7491 m_host.AddScriptLPS(1); 7515 m_host.AddScriptLPS(1);
7492 7516
7493 // our key in the object we are in 7517 // our key in the object we are in
7494 LLUUID invItemID=InventorySelf(); 7518 UUID invItemID=InventorySelf();
7495 if (invItemID == LLUUID.Zero) return; 7519 if (invItemID == UUID.Zero) return;
7496 7520
7497 // the object we are in 7521 // the object we are in
7498 LLUUID objectID = m_host.ParentUUID; 7522 UUID objectID = m_host.ParentUUID;
7499 if (objectID == LLUUID.Zero) return; 7523 if(objectID == UUID.Zero) return;
7500 7524
7501 // we need the permission first, to know which avatar we want to set the camera for 7525 // we need the permission first, to know which avatar we want to set the camera for
7502 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7526 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7503 if (agentID == LLUUID.Zero) return; 7527 if (agentID == UUID.Zero) return;
7504 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7528 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7505 7529
7506 ScenePresence presence = World.GetScenePresence(agentID); 7530 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7542,16 +7566,16 @@ namespace OpenSim.Region.ScriptEngine.Common
7542 m_host.AddScriptLPS(1); 7566 m_host.AddScriptLPS(1);
7543 7567
7544 // our key in the object we are in 7568 // our key in the object we are in
7545 LLUUID invItemID=InventorySelf(); 7569 UUID invItemID=InventorySelf();
7546 if (invItemID == LLUUID.Zero) return; 7570 if (invItemID == UUID.Zero) return;
7547 7571
7548 // the object we are in 7572 // the object we are in
7549 LLUUID objectID = m_host.ParentUUID; 7573 UUID objectID = m_host.ParentUUID;
7550 if (objectID == LLUUID.Zero) return; 7574 if(objectID == UUID.Zero) return;
7551 7575
7552 // we need the permission first, to know which avatar we want to clear the camera for 7576 // we need the permission first, to know which avatar we want to clear the camera for
7553 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7577 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7554 if (agentID == LLUUID.Zero) return; 7578 if (agentID == UUID.Zero) return;
7555 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7579 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7556 7580
7557 ScenePresence presence = World.GetScenePresence(agentID); 7581 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7650,9 +7674,9 @@ namespace OpenSim.Region.ScriptEngine.Common
7650 param.Add(o.ToString()); 7674 param.Add(o.ToString());
7651 } 7675 }
7652 7676
7653 LLVector3 position = m_host.AbsolutePosition; 7677 Vector3 position = m_host.AbsolutePosition;
7654 LLVector3 velocity = m_host.Velocity; 7678 Vector3 velocity = m_host.Velocity;
7655 LLQuaternion rotation = m_host.RotationOffset; 7679 Quaternion rotation = m_host.RotationOffset;
7656 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 7680 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner);
7657 RegionInfo regionInfo = World.RegionInfo; 7681 RegionInfo regionInfo = World.RegionInfo;
7658 7682
@@ -7668,10 +7692,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7668 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; 7692 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name;
7669 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 7693 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString();
7670 7694
7671 LLUUID reqID = httpScriptMod. 7695 UUID reqID = httpScriptMod.
7672 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); 7696 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body);
7673 7697
7674 if (reqID != LLUUID.Zero) 7698 if (reqID != UUID.Zero)
7675 return reqID.ToString(); 7699 return reqID.ToString();
7676 else 7700 else
7677 return null; 7701 return null;
@@ -7781,7 +7805,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7781 LSL_Types.list ret = new LSL_Types.list(); 7805 LSL_Types.list ret = new LSL_Types.list();
7782 if (land != null) 7806 if (land != null)
7783 { 7807 {
7784 foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners()) 7808 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
7785 { 7809 {
7786 ret.Add(d.Key.ToString()); 7810 ret.Add(d.Key.ToString());
7787 ret.Add(d.Value); 7811 ret.Add(d.Value);
@@ -7794,7 +7818,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7794 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 7818 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id)
7795 { 7819 {
7796 m_host.AddScriptLPS(1); 7820 m_host.AddScriptLPS(1);
7797 SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); 7821 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
7798 if (part == null) 7822 if (part == null)
7799 { 7823 {
7800 return 0; 7824 return 0;
@@ -7900,8 +7924,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7900 { 7924 {
7901 m_host.AddScriptLPS(1); 7925 m_host.AddScriptLPS(1);
7902 LSL_Types.list ret = new LSL_Types.list(); 7926 LSL_Types.list ret = new LSL_Types.list();
7903 LLUUID key = new LLUUID(); 7927 UUID key = new UUID();
7904 if (LLUUID.TryParse(id, out key)) 7928 if (UUID.TryParse(id, out key))
7905 { 7929 {
7906 ScenePresence av = World.GetScenePresence(key); 7930 ScenePresence av = World.GetScenePresence(key);
7907 7931
@@ -7921,19 +7945,19 @@ namespace OpenSim.Region.ScriptEngine.Common
7921 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 7945 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
7922 break; 7946 break;
7923 case "4": 7947 case "4":
7924 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); 7948 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
7925 break; 7949 break;
7926 case "5": 7950 case "5":
7927 ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); 7951 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
7928 break; 7952 break;
7929 case "6": 7953 case "6":
7930 ret.Add(id); 7954 ret.Add(id);
7931 break; 7955 break;
7932 case "7": 7956 case "7":
7933 ret.Add(LLUUID.Zero.ToString()); 7957 ret.Add(UUID.Zero.ToString());
7934 break; 7958 break;
7935 case "8": 7959 case "8":
7936 ret.Add(LLUUID.Zero.ToString()); 7960 ret.Add(UUID.Zero.ToString());
7937 break; 7961 break;
7938 } 7962 }
7939 } 7963 }
@@ -7953,7 +7977,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7953 ret.Add(obj.Description); 7977 ret.Add(obj.Description);
7954 break; 7978 break;
7955 case "3": 7979 case "3":
7956 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); 7980 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
7957 break; 7981 break;
7958 case "4": 7982 case "4":
7959 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 7983 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
@@ -7979,14 +8003,14 @@ namespace OpenSim.Region.ScriptEngine.Common
7979 } 8003 }
7980 8004
7981 8005
7982 internal LLUUID ScriptByName(string name) 8006 internal UUID ScriptByName(string name)
7983 { 8007 {
7984 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 8008 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
7985 { 8009 {
7986 if (item.Type == 10 && item.Name == name) 8010 if (item.Type == 10 && item.Name == name)
7987 return item.ItemID; 8011 return item.ItemID;
7988 } 8012 }
7989 return LLUUID.Zero; 8013 return UUID.Zero;
7990 } 8014 }
7991 8015
7992 internal void ShoutError(string msg) 8016 internal void ShoutError(string msg)
@@ -8063,7 +8087,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8063 String[] notecardLines = { "0" }; 8087 String[] notecardLines = { "0" };
8064 notecardLines[0] = String.Empty; 8088 notecardLines[0] = String.Empty;
8065 8089
8066 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 8090 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
8067 { 8091 {
8068 if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard)) 8092 if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard))
8069 { 8093 {
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 581b820..8c24ae3 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Common
123 123
124 Vector3 vector = (Vector3)o; 124 Vector3 vector = (Vector3)o;
125 125
126 return (x == vector.x && x == vector.x && z == vector.z); 126 return (x == vector.x && y == vector.y && z == vector.y);
127 } 127 }
128 128
129 public static Vector3 operator -(Vector3 vector) 129 public static Vector3 operator -(Vector3 vector)
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 687d5e1..b410eec 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -25,8 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27using System; 27using System;
28using Axiom.Math; 28using OpenMetaverse;
29using libsecondlife;
30using Nini.Config; 29using Nini.Config;
31using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
32using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
@@ -40,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Common
40 public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface 39 public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface
41 { 40 {
42 public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, 41 public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID,
43 LLUUID itemID) 42 UUID itemID)
44 : base(scriptEngine, host, localID, itemID) 43 : base(scriptEngine, host, localID, itemID)
45 { 44 {
46 Prim = new OSSLPrim(this); 45 Prim = new OSSLPrim(this);
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Common
259 if (x > 255 || x < 0 || y > 255 || y < 0) 258 if (x > 255 || x < 0 || y > 255 || y < 0)
260 LSLError("osTerrainSetHeight: Coordinate out of bounds"); 259 LSLError("osTerrainSetHeight: Coordinate out of bounds");
261 260
262 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) 261 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
263 { 262 {
264 World.Heightmap[x, y] = val; 263 World.Heightmap[x, y] = val;
265 return 1; 264 return 1;
@@ -299,7 +298,7 @@ namespace OpenSim.Region.ScriptEngine.Common
299 World.SendGeneralAlert(msg); 298 World.SendGeneralAlert(msg);
300 } 299 }
301 300
302 public void osSetRot(LLUUID target, Quaternion rotation) 301 public void osSetRot(UUID target, Quaternion rotation)
303 { 302 {
304 m_host.AddScriptLPS(1); 303 m_host.AddScriptLPS(1);
305 if (World.Entities.ContainsKey(target)) 304 if (World.Entities.ContainsKey(target))
@@ -319,7 +318,7 @@ namespace OpenSim.Region.ScriptEngine.Common
319 if (dynamicID == String.Empty) 318 if (dynamicID == String.Empty)
320 { 319 {
321 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 320 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
322 LLUUID createdTexture = 321 UUID createdTexture =
323 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 322 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
324 extraParams, timer); 323 extraParams, timer);
325 return createdTexture.ToString(); 324 return createdTexture.ToString();
@@ -329,7 +328,7 @@ namespace OpenSim.Region.ScriptEngine.Common
329 //TODO update existing dynamic textures 328 //TODO update existing dynamic textures
330 } 329 }
331 330
332 return LLUUID.Zero.ToString(); 331 return UUID.Zero.ToString();
333 } 332 }
334 333
335 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 334 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
@@ -339,7 +338,7 @@ namespace OpenSim.Region.ScriptEngine.Common
339 if (dynamicID == String.Empty) 338 if (dynamicID == String.Empty)
340 { 339 {
341 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 340 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
342 LLUUID createdTexture = 341 UUID createdTexture =
343 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 342 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
344 extraParams, timer, true, (byte) alpha); 343 extraParams, timer, true, (byte) alpha);
345 return createdTexture.ToString(); 344 return createdTexture.ToString();
@@ -349,7 +348,7 @@ namespace OpenSim.Region.ScriptEngine.Common
349 //TODO update existing dynamic textures 348 //TODO update existing dynamic textures
350 } 349 }
351 350
352 return LLUUID.Zero.ToString(); 351 return UUID.Zero.ToString();
353 } 352 }
354 353
355 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, 354 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
@@ -361,7 +360,7 @@ namespace OpenSim.Region.ScriptEngine.Common
361 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 360 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
362 if (textureManager != null) 361 if (textureManager != null)
363 { 362 {
364 LLUUID createdTexture = 363 UUID createdTexture =
365 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 364 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
366 extraParams, timer); 365 extraParams, timer);
367 return createdTexture.ToString(); 366 return createdTexture.ToString();
@@ -372,7 +371,7 @@ namespace OpenSim.Region.ScriptEngine.Common
372 //TODO update existing dynamic textures 371 //TODO update existing dynamic textures
373 } 372 }
374 373
375 return LLUUID.Zero.ToString(); 374 return UUID.Zero.ToString();
376 } 375 }
377 376
378 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, 377 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
@@ -384,7 +383,7 @@ namespace OpenSim.Region.ScriptEngine.Common
384 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 383 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
385 if (textureManager != null) 384 if (textureManager != null)
386 { 385 {
387 LLUUID createdTexture = 386 UUID createdTexture =
388 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 387 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
389 extraParams, timer, true, (byte) alpha); 388 extraParams, timer, true, (byte) alpha);
390 return createdTexture.ToString(); 389 return createdTexture.ToString();
@@ -395,7 +394,7 @@ namespace OpenSim.Region.ScriptEngine.Common
395 //TODO update existing dynamic textures 394 //TODO update existing dynamic textures
396 } 395 }
397 396
398 return LLUUID.Zero.ToString(); 397 return UUID.Zero.ToString();
399 } 398 }
400 399
401 public bool osConsoleCommand(string command) 400 public bool osConsoleCommand(string command)
@@ -538,8 +537,8 @@ namespace OpenSim.Region.ScriptEngine.Common
538 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 537 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
539 if (xmlrpcMod.IsEnabled()) 538 if (xmlrpcMod.IsEnabled())
540 { 539 {
541 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new LLUUID(channel)); 540 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel));
542 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 541 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
543 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); 542 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
544 } 543 }
545 } 544 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
index 64f6970..ee86500 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections; 28using System.Collections;
29using System.Threading; 29using System.Threading;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; 33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
153 /// </summary> 153 /// </summary>
154 /// <param name="localID"></param> 154 /// <param name="localID"></param>
155 /// <param name="itemID"></param> 155 /// <param name="itemID"></param>
156 public void RemoveScript(uint localID, LLUUID itemID) 156 public void RemoveScript(uint localID, UUID itemID)
157 { 157 {
158 // Remove a specific script 158 // Remove a specific script
159 159
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index 77cc7ea..378610a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34 34
@@ -48,28 +48,28 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
48 private class DataserverRequest 48 private class DataserverRequest
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 52
53 public LLUUID ID; 53 public UUID ID;
54 public string handle; 54 public string handle;
55 55
56 public DateTime startTime; 56 public DateTime startTime;
57 } 57 }
58 58
59 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 59 public UUID RegisterRequest(uint localID, UUID itemID,
60 string identifier) 60 string identifier)
61 { 61 {
62 lock (DataserverRequests) 62 lock (DataserverRequests)
63 { 63 {
64 if (DataserverRequests.ContainsKey(identifier)) 64 if (DataserverRequests.ContainsKey(identifier))
65 return LLUUID.Zero; 65 return UUID.Zero;
66 66
67 DataserverRequest ds = new DataserverRequest(); 67 DataserverRequest ds = new DataserverRequest();
68 68
69 ds.localID = localID; 69 ds.localID = localID;
70 ds.itemID = itemID; 70 ds.itemID = itemID;
71 71
72 ds.ID = LLUUID.Random(); 72 ds.ID = UUID.Random();
73 ds.handle = identifier; 73 ds.handle = identifier;
74 74
75 ds.startTime = DateTime.Now; 75 ds.startTime = DateTime.Now;
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
99 new LSL_Types.LSLString(reply)}); 99 new LSL_Types.LSLString(reply)});
100 } 100 }
101 101
102 public void RemoveEvents(uint localID, LLUUID itemID) 102 public void RemoveEvents(uint localID, UUID itemID)
103 { 103 {
104 lock (DataserverRequests) 104 lock (DataserverRequests)
105 { 105 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 9b636fd..0fce1f2 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
27//#define SPAM 27//#define SPAM
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
@@ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
43 m_CmdManager = CmdManager; 43 m_CmdManager = CmdManager;
44 } 44 }
45 45
46 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 46 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
47 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 47 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
48 private Object SenseLock = new Object(); 48 private Object SenseLock = new Object();
49 49
50 // 50 //
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
53 private class SenseRepeatClass 53 private class SenseRepeatClass
54 { 54 {
55 public uint localID; 55 public uint localID;
56 public LLUUID itemID; 56 public UUID itemID;
57 public double interval; 57 public double interval;
58 public DateTime next; 58 public DateTime next;
59 59
60 public string name; 60 public string name;
61 public LLUUID keyID; 61 public UUID keyID;
62 public int type; 62 public int type;
63 public double range; 63 public double range;
64 public double arc; 64 public double arc;
@@ -68,8 +68,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
69 private object SenseRepeatListLock = new object(); 69 private object SenseRepeatListLock = new object();
70 70
71 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 71 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
72 string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) 72 string name, UUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
73 { 73 {
74 #if SPAM 74 #if SPAM
75 Console.WriteLine("SetSensorEvent"); 75 Console.WriteLine("SetSensorEvent");
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 #if SPAM 166 #if SPAM
@@ -199,11 +199,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
199 } 199 }
200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan"); 200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan");
201 201
202 LLVector3 sensorPos = SensePoint.AbsolutePosition; 202 Vector3 sensorPos = SensePoint.AbsolutePosition;
203 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 203 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
204 LLVector3 fromRegionPos = sensorPos + regionPos; 204 Vector3 fromRegionPos = sensorPos + regionPos;
205 205
206 LLQuaternion q = SensePoint.RotationOffset; 206 Quaternion q = SensePoint.RotationOffset;
207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
215 215
216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
217 { 217 {
218 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 218 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
220 if (dis <= ts.range) 220 if (dis <= ts.range)
221 { 221 {
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
248 double ang_obj = 0; 248 double ang_obj = 0;
249 try 249 try
250 { 250 {
251 LLVector3 diff = toRegionPos - fromRegionPos; 251 Vector3 diff = toRegionPos - fromRegionPos;
252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
261 if (ang_obj > ts.arc) keep = false; 261 if (ang_obj > ts.arc) keep = false;
262 } 262 }
263 263
264 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 264 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
265 { 265 {
266 keep = false; 266 keep = false;
267 } 267 }
@@ -303,10 +303,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
303 // Create object if it doesn't exist 303 // Create object if it doesn't exist
304 if (SenseEvents.ContainsKey(ts.localID) == false) 304 if (SenseEvents.ContainsKey(ts.localID) == false)
305 { 305 {
306 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 306 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
307 } 307 }
308 // clear if previous traces exist 308 // clear if previous traces exist
309 Dictionary<LLUUID, LSL_Types.list> Obj; 309 Dictionary<UUID, LSL_Types.list> Obj;
310 SenseEvents.TryGetValue(ts.localID, out Obj); 310 SenseEvents.TryGetValue(ts.localID, out Obj);
311 if (Obj.ContainsKey(ts.itemID) == true) 311 if (Obj.ContainsKey(ts.itemID) == true)
312 Obj.Remove(ts.itemID); 312 Obj.Remove(ts.itemID);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 09af34a..7940b36 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34{ 34{
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
47 private class TimerClass 47 private class TimerClass
48 { 48 {
49 public uint localID; 49 public uint localID;
50 public LLUUID itemID; 50 public UUID itemID;
51 //public double interval; 51 //public double interval;
52 public long interval; 52 public long interval;
53 //public DateTime next; 53 //public DateTime next;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
57 private List<TimerClass> Timers = new List<TimerClass>(); 57 private List<TimerClass> Timers = new List<TimerClass>();
58 private object TimerListLock = new object(); 58 private object TimerListLock = new object();
59 59
60 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 60 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
61 { 61 {
62 // Console.WriteLine("SetTimerEvent"); 62 // Console.WriteLine("SetTimerEvent");
63 63
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
82 } 82 }
83 } 83 }
84 84
85 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 85 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
86 { 86 {
87 // Remove from timer 87 // Remove from timer
88 lock (TimerListLock) 88 lock (TimerListLock)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 3fdfd8a..89d7045 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
33using OpenSim.Region.Environment; 33using OpenSim.Region.Environment;
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
96 { 96 {
97 } 97 }
98 98
99 private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) 99 private void HandleObjectPaid(UUID objectID, UUID agentID, int amount)
100 { 100 {
101 SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); 101 SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID);
102 if (part != null) 102 if (part != null)
@@ -117,7 +117,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
117 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); 117 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
118 } 118 }
119 119
120 public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient) 120 public void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient)
121 { 121 {
122 // Add to queue for all scripts in ObjectID object 122 // Add to queue for all scripts in ObjectID object
123 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); 123 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
135 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 135 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
136 detstruct._string[0] = remoteClient.Name; 136 detstruct._string[0] = remoteClient.Name;
137 detstruct._int[0] = 0; 137 detstruct._int[0] = 0;
138 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x,av.Rotation.y,av.Rotation.z,av.Rotation.w); 138 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X,av.Rotation.Y,av.Rotation.Z,av.Rotation.W);
139 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z); 139 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z);
140 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z); 140 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z);
141 } 141 }
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
170 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 170 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
171 detstruct._string[0] = remoteClient.Name; 171 detstruct._string[0] = remoteClient.Name;
172 detstruct._int[0] = 0; 172 detstruct._int[0] = 0;
173 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); 173 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X, av.Rotation.Y, av.Rotation.Z, av.Rotation.W);
174 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z); 174 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z);
175 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z); 175 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z);
176 } 176 }
@@ -187,14 +187,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
187 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) }); 187 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
188 } 188 }
189 189
190 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 190 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
191 { 191 {
192 myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + 192 myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " +
193 script.Length); 193 script.Length);
194 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez); 194 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez);
195 } 195 }
196 196
197 public void OnRemoveScript(uint localID, LLUUID itemID) 197 public void OnRemoveScript(uint localID, UUID itemID)
198 { 198 {
199 myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); 199 myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
200 myScriptEngine.m_ScriptManager.StopScript( 200 myScriptEngine.m_ScriptManager.StopScript(
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
203 ); 203 );
204 } 204 }
205 205
206 public void money(uint localID, LLUUID agentID, int amount) 206 public void money(uint localID, UUID agentID, int amount)
207 { 207 {
208 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) }); 208 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) });
209 } 209 }
@@ -220,12 +220,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
220 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { }); 220 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { });
221 } 221 }
222 222
223 public void touch(uint localID, uint originalID, LLUUID itemID) 223 public void touch(uint localID, uint originalID, UUID itemID)
224 { 224 {
225 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull); 225 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull);
226 } 226 }
227 227
228 public void touch_end(uint localID, uint originalID, LLUUID itemID) 228 public void touch_end(uint localID, uint originalID, UUID itemID)
229 { 229 {
230 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) }); 230 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
231 } 231 }
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
314 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) }); 314 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
315 } 315 }
316 316
317 public void land_collision_start(uint localID, LLUUID itemID) 317 public void land_collision_start(uint localID, UUID itemID)
318 { 318 {
319 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull); 319 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull);
320 } 320 }
@@ -324,48 +324,48 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
324 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull); 324 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull);
325 } 325 }
326 326
327 public void land_collision_end(uint localID, LLUUID itemID) 327 public void land_collision_end(uint localID, UUID itemID)
328 { 328 {
329 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull); 329 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull);
330 } 330 }
331 331
332 // Handled by long commands 332 // Handled by long commands
333 public void timer(uint localID, LLUUID itemID) 333 public void timer(uint localID, UUID itemID)
334 { 334 {
335 //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty); 335 //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty);
336 } 336 }
337 337
338 public void listen(uint localID, LLUUID itemID) 338 public void listen(uint localID, UUID itemID)
339 { 339 {
340 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull); 340 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull);
341 } 341 }
342 342
343 public void on_rez(uint localID, LLUUID itemID) 343 public void on_rez(uint localID, UUID itemID)
344 { 344 {
345 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull); 345 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull);
346 } 346 }
347 347
348 public void sensor(uint localID, LLUUID itemID) 348 public void sensor(uint localID, UUID itemID)
349 { 349 {
350 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull); 350 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull);
351 } 351 }
352 352
353 public void no_sensor(uint localID, LLUUID itemID) 353 public void no_sensor(uint localID, UUID itemID)
354 { 354 {
355 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull); 355 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull);
356 } 356 }
357 357
358 public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change) 358 public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change)
359 { 359 {
360 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)}); 360 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)});
361 } 361 }
362 362
363 public void email(uint localID, LLUUID itemID) 363 public void email(uint localID, UUID itemID)
364 { 364 {
365 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); 365 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull);
366 } 366 }
367 367
368 public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos) 368 public void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos)
369 { 369 {
370 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); 370 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) });
371 } 371 }
@@ -375,63 +375,63 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
375 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull); 375 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull);
376 } 376 }
377 377
378 public void at_rot_target(uint localID, LLUUID itemID) 378 public void at_rot_target(uint localID, UUID itemID)
379 { 379 {
380 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull); 380 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull);
381 } 381 }
382 382
383 public void not_at_rot_target(uint localID, LLUUID itemID) 383 public void not_at_rot_target(uint localID, UUID itemID)
384 { 384 {
385 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull); 385 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull);
386 } 386 }
387 387
388 public void run_time_permissions(uint localID, LLUUID itemID) 388 public void run_time_permissions(uint localID, UUID itemID)
389 { 389 {
390 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull); 390 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull);
391 } 391 }
392 392
393 public void changed(uint localID, LLUUID itemID) 393 public void changed(uint localID, UUID itemID)
394 { 394 {
395 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull); 395 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull);
396 } 396 }
397 397
398 public void attach(uint localID, LLUUID itemID) 398 public void attach(uint localID, UUID itemID)
399 { 399 {
400 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull); 400 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull);
401 } 401 }
402 402
403 public void dataserver(uint localID, LLUUID itemID) 403 public void dataserver(uint localID, UUID itemID)
404 { 404 {
405 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull); 405 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull);
406 } 406 }
407 407
408 public void link_message(uint localID, LLUUID itemID) 408 public void link_message(uint localID, UUID itemID)
409 { 409 {
410 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull); 410 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull);
411 } 411 }
412 412
413 public void moving_start(uint localID, LLUUID itemID) 413 public void moving_start(uint localID, UUID itemID)
414 { 414 {
415 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull); 415 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull);
416 } 416 }
417 417
418 public void moving_end(uint localID, LLUUID itemID) 418 public void moving_end(uint localID, UUID itemID)
419 { 419 {
420 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull); 420 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull);
421 } 421 }
422 422
423 public void object_rez(uint localID, LLUUID itemID) 423 public void object_rez(uint localID, UUID itemID)
424 { 424 {
425 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull); 425 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull);
426 } 426 }
427 427
428 public void remote_data(uint localID, LLUUID itemID) 428 public void remote_data(uint localID, UUID itemID)
429 { 429 {
430 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull); 430 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull);
431 } 431 }
432 432
433 // Handled by long commands 433 // Handled by long commands
434 public void http_response(uint localID, LLUUID itemID) 434 public void http_response(uint localID, UUID itemID)
435 { 435 {
436 // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull); 436 // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull);
437 } 437 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 5c57874..1a08795 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
34{ 34{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
134 public struct QueueItemStruct 134 public struct QueueItemStruct
135 { 135 {
136 public uint localID; 136 public uint localID;
137 public LLUUID itemID; 137 public UUID itemID;
138 public string functionName; 138 public string functionName;
139 public Queue_llDetectParams_Struct llDetectParams; 139 public Queue_llDetectParams_Struct llDetectParams;
140 public object[] param; 140 public object[] param;
@@ -308,10 +308,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
308 return; 308 return;
309 } 309 }
310 310
311 Dictionary<LLUUID, IScript>.KeyCollection scriptKeys = 311 Dictionary<UUID, IScript>.KeyCollection scriptKeys =
312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID); 312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID);
313 313
314 foreach (LLUUID itemID in scriptKeys) 314 foreach (UUID itemID in scriptKeys)
315 { 315 {
316 // Add to each script in that object 316 // Add to each script in that object
317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? 317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
326 /// <param name="itemID">Region script ID</param> 326 /// <param name="itemID">Region script ID</param>
327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> 327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
328 /// <param name="param">Array of parameters to match event mask</param> 328 /// <param name="param">Array of parameters to match event mask</param>
329 public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) 329 public void AddToScriptQueue(uint localID, UUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
330 { 330 {
331 lock (eventQueue) 331 lock (eventQueue)
332 { 332 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 4376e00..1e71ae5 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -31,7 +31,7 @@ using System.Reflection;
31using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using System.Threading; 32using System.Threading;
33using System.Globalization; 33using System.Globalization;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Scenes.Scripting; 37using OpenSim.Region.Environment.Scenes.Scripting;
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); 327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID);
328 //if (m_host != null) 328 //if (m_host != null)
329 //{ 329 //{
330 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 330 m_ScriptEngine.World.SimChat(Utils.StringToBytes(text),
331 ChatTypeEnum.DebugChannel, 2147483647, 331 ChatTypeEnum.DebugChannel, 2147483647,
332 m_host.AbsolutePosition, 332 m_host.AbsolutePosition,
333 m_host.Name, m_host.UUID, false); 333 m_host.Name, m_host.UUID, false);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 99bbdee..60333b1 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Runtime.Serialization.Formatters.Binary; 32using System.Runtime.Serialization.Formatters.Binary;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36 36
37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
69 private struct LUStruct 69 private struct LUStruct
70 { 70 {
71 public uint localID; 71 public uint localID;
72 public LLUUID itemID; 72 public UUID itemID;
73 public string script; 73 public string script;
74 public LUType Action; 74 public LUType Action;
75 public int startParam; 75 public int startParam;
@@ -84,13 +84,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
84 } 84 }
85 85
86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse 86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse
87 public Dictionary<LLUUID, String> scriptList = new Dictionary<LLUUID, string>(); 87 public Dictionary<UUID, String> scriptList = new Dictionary<UUID, string>();
88 88
89 // Object<string, Script<string, script>> 89 // Object<string, Script<string, script>>
90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. 90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.
91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! 91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead!
92 public Dictionary<uint, Dictionary<LLUUID, IScript>> Scripts = 92 public Dictionary<uint, Dictionary<UUID, IScript>> Scripts =
93 new Dictionary<uint, Dictionary<LLUUID, IScript>>(); 93 new Dictionary<uint, Dictionary<UUID, IScript>>();
94 94
95 95
96 public Scene World 96 public Scene World
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
254 /// </summary> 254 /// </summary>
255 /// <param name="itemID"></param> 255 /// <param name="itemID"></param>
256 /// <param name="localID"></param> 256 /// <param name="localID"></param>
257 public void StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 257 public void StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
258 { 258 {
259 lock (LUQueue) 259 lock (LUQueue)
260 { 260 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
280 /// </summary> 280 /// </summary>
281 /// <param name="localID"></param> 281 /// <param name="localID"></param>
282 /// <param name="itemID"></param> 282 /// <param name="itemID"></param>
283 public void StopScript(uint localID, LLUUID itemID) 283 public void StopScript(uint localID, UUID itemID)
284 { 284 {
285 LUStruct ls = new LUStruct(); 285 LUStruct ls = new LUStruct();
286 ls.localID = localID; 286 ls.localID = localID;
@@ -297,8 +297,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
297 // Create a new instance of the compiler (reuse) 297 // Create a new instance of the compiler (reuse)
298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler(); 298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
299 299
300 public abstract void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez); 300 public abstract void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez);
301 public abstract void _StopScript(uint localID, LLUUID itemID); 301 public abstract void _StopScript(uint localID, UUID itemID);
302 302
303 303
304 #endregion 304 #endregion
@@ -312,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
312 /// <param name="itemID">Script ID</param> 312 /// <param name="itemID">Script ID</param>
313 /// <param name="FunctionName">Name of function</param> 313 /// <param name="FunctionName">Name of function</param>
314 /// <param name="args">Arguments to pass to function</param> 314 /// <param name="args">Arguments to pass to function</param>
315 internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args) 315 internal void ExecuteEvent(uint localID, UUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
316 { 316 {
317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined 317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined
318 ///#if DEBUG 318 ///#if DEBUG
@@ -335,7 +335,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
335 Script.Exec.ExecuteEvent(FunctionName, args); 335 Script.Exec.ExecuteEvent(FunctionName, args);
336 } 336 }
337 337
338 public int GetStateEventFlags(uint localID, LLUUID itemID) 338 public int GetStateEventFlags(uint localID, UUID itemID)
339 { 339 {
340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">"); 340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">");
341 try 341 try
@@ -360,25 +360,25 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
360 360
361 #region Internal functions to keep track of script 361 #region Internal functions to keep track of script
362 362
363 public Dictionary<LLUUID, IScript>.KeyCollection GetScriptKeys(uint localID) 363 public Dictionary<UUID, IScript>.KeyCollection GetScriptKeys(uint localID)
364 { 364 {
365 if (Scripts.ContainsKey(localID) == false) 365 if (Scripts.ContainsKey(localID) == false)
366 return null; 366 return null;
367 367
368 Dictionary<LLUUID, IScript> Obj; 368 Dictionary<UUID, IScript> Obj;
369 Scripts.TryGetValue(localID, out Obj); 369 Scripts.TryGetValue(localID, out Obj);
370 370
371 return Obj.Keys; 371 return Obj.Keys;
372 } 372 }
373 373
374 public IScript GetScript(uint localID, LLUUID itemID) 374 public IScript GetScript(uint localID, UUID itemID)
375 { 375 {
376 lock (scriptLock) 376 lock (scriptLock)
377 { 377 {
378 if (Scripts.ContainsKey(localID) == false) 378 if (Scripts.ContainsKey(localID) == false)
379 return null; 379 return null;
380 380
381 Dictionary<LLUUID, IScript> Obj; 381 Dictionary<UUID, IScript> Obj;
382 Scripts.TryGetValue(localID, out Obj); 382 Scripts.TryGetValue(localID, out Obj);
383 if (Obj.ContainsKey(itemID) == false) 383 if (Obj.ContainsKey(itemID) == false)
384 return null; 384 return null;
@@ -390,18 +390,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
390 } 390 }
391 } 391 }
392 392
393 public void SetScript(uint localID, LLUUID itemID, IScript Script) 393 public void SetScript(uint localID, UUID itemID, IScript Script)
394 { 394 {
395 lock (scriptLock) 395 lock (scriptLock)
396 { 396 {
397 // Create object if it doesn't exist 397 // Create object if it doesn't exist
398 if (Scripts.ContainsKey(localID) == false) 398 if (Scripts.ContainsKey(localID) == false)
399 { 399 {
400 Scripts.Add(localID, new Dictionary<LLUUID, IScript>()); 400 Scripts.Add(localID, new Dictionary<UUID, IScript>());
401 } 401 }
402 402
403 // Delete script if it exists 403 // Delete script if it exists
404 Dictionary<LLUUID, IScript> Obj; 404 Dictionary<UUID, IScript> Obj;
405 Scripts.TryGetValue(localID, out Obj); 405 Scripts.TryGetValue(localID, out Obj);
406 if (Obj.ContainsKey(itemID) == true) 406 if (Obj.ContainsKey(itemID) == true)
407 Obj.Remove(itemID); 407 Obj.Remove(itemID);
@@ -411,14 +411,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
411 } 411 }
412 } 412 }
413 413
414 public void RemoveScript(uint localID, LLUUID itemID) 414 public void RemoveScript(uint localID, UUID itemID)
415 { 415 {
416 // Don't have that object? 416 // Don't have that object?
417 if (Scripts.ContainsKey(localID) == false) 417 if (Scripts.ContainsKey(localID) == false)
418 return; 418 return;
419 419
420 // Delete script if it exists 420 // Delete script if it exists
421 Dictionary<LLUUID, IScript> Obj; 421 Dictionary<UUID, IScript> Obj;
422 Scripts.TryGetValue(localID, out Obj); 422 Scripts.TryGetValue(localID, out Obj);
423 if (Obj.ContainsKey(itemID) == true) 423 if (Obj.ContainsKey(itemID) == true)
424 Obj.Remove(itemID); 424 Obj.Remove(itemID);
@@ -427,21 +427,21 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
427 #endregion 427 #endregion
428 428
429 429
430 public void ResetScript(uint localID, LLUUID itemID) 430 public void ResetScript(uint localID, UUID itemID)
431 { 431 {
432 IScript s = GetScript(localID, itemID); 432 IScript s = GetScript(localID, itemID);
433 string script = s.Source; 433 string script = s.Source;
434 StopScript(localID, itemID); 434 StopScript(localID, itemID);
435 SceneObjectPart part = World.GetSceneObjectPart(localID); 435 SceneObjectPart part = World.GetSceneObjectPart(localID);
436 part.GetInventoryItem(itemID).PermsMask = 0; 436 part.GetInventoryItem(itemID).PermsMask = 0;
437 part.GetInventoryItem(itemID).PermsGranter = LLUUID.Zero; 437 part.GetInventoryItem(itemID).PermsGranter = UUID.Zero;
438 StartScript(localID, itemID, script, s.StartParam, false); 438 StartScript(localID, itemID, script, s.StartParam, false);
439 } 439 }
440 440
441 441
442 #region Script serialization/deserialization 442 #region Script serialization/deserialization
443 443
444 public void GetSerializedScript(uint localID, LLUUID itemID) 444 public void GetSerializedScript(uint localID, UUID itemID)
445 { 445 {
446 // Serialize the script and return it 446 // Serialize the script and return it
447 // Should not be a problem 447 // Should not be a problem
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
451 fs.Close(); 451 fs.Close();
452 } 452 }
453 453
454 public void PutSerializedScript(uint localID, LLUUID itemID) 454 public void PutSerializedScript(uint localID, UUID itemID)
455 { 455 {
456 // Deserialize the script and inject it into an AppDomain 456 // Deserialize the script and inject it into an AppDomain
457 457
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
index 41fde02..a6473ee 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
@@ -25,7 +25,7 @@
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
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -38,40 +38,40 @@ namespace OpenSim.Region.ScriptEngine.Common
38 { 38 {
39 public interface RemoteEvents 39 public interface RemoteEvents
40 { 40 {
41 void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient); 41 void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient);
42 void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez); 42 void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez);
43 void OnRemoveScript(uint localID, LLUUID itemID); 43 void OnRemoveScript(uint localID, UUID itemID);
44 void state_exit(uint localID); 44 void state_exit(uint localID);
45 void touch(uint localID, uint originalID, LLUUID itemID); 45 void touch(uint localID, uint originalID, UUID itemID);
46 void touch_end(uint localID, uint originalID, LLUUID itemID); 46 void touch_end(uint localID, uint originalID, UUID itemID);
47 void collision_start(uint localID, ColliderArgs col); 47 void collision_start(uint localID, ColliderArgs col);
48 void collision(uint localID, ColliderArgs col); 48 void collision(uint localID, ColliderArgs col);
49 void collision_end(uint localID, ColliderArgs col); 49 void collision_end(uint localID, ColliderArgs col);
50 void land_collision_start(uint localID, LLUUID itemID); 50 void land_collision_start(uint localID, UUID itemID);
51 void land_collision(uint localID, ColliderArgs col); 51 void land_collision(uint localID, ColliderArgs col);
52 void land_collision_end(uint localID, LLUUID itemID); 52 void land_collision_end(uint localID, UUID itemID);
53 void timer(uint localID, LLUUID itemID); 53 void timer(uint localID, UUID itemID);
54 void listen(uint localID, LLUUID itemID); 54 void listen(uint localID, UUID itemID);
55 void on_rez(uint localID, LLUUID itemID); 55 void on_rez(uint localID, UUID itemID);
56 void sensor(uint localID, LLUUID itemID); 56 void sensor(uint localID, UUID itemID);
57 void no_sensor(uint localID, LLUUID itemID); 57 void no_sensor(uint localID, UUID itemID);
58 void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change); 58 void control(uint localID, UUID itemID, UUID agentID, uint held, uint change);
59 void money(uint LocalID, LLUUID agentID, int amount); 59 void money(uint LocalID, UUID agentID, int amount);
60 void email(uint localID, LLUUID itemID); 60 void email(uint localID, UUID itemID);
61 void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos); 61 void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
62 void not_at_target(uint localID); 62 void not_at_target(uint localID);
63 void at_rot_target(uint localID, LLUUID itemID); 63 void at_rot_target(uint localID, UUID itemID);
64 void not_at_rot_target(uint localID, LLUUID itemID); 64 void not_at_rot_target(uint localID, UUID itemID);
65 void run_time_permissions(uint localID, LLUUID itemID); 65 void run_time_permissions(uint localID, UUID itemID);
66 void changed(uint localID, LLUUID itemID); 66 void changed(uint localID, UUID itemID);
67 void attach(uint localID, LLUUID itemID); 67 void attach(uint localID, UUID itemID);
68 void dataserver(uint localID, LLUUID itemID); 68 void dataserver(uint localID, UUID itemID);
69 void link_message(uint localID, LLUUID itemID); 69 void link_message(uint localID, UUID itemID);
70 void moving_start(uint localID, LLUUID itemID); 70 void moving_start(uint localID, UUID itemID);
71 void moving_end(uint localID, LLUUID itemID); 71 void moving_end(uint localID, UUID itemID);
72 void object_rez(uint localID, LLUUID itemID); 72 void object_rez(uint localID, UUID itemID);
73 void remote_data(uint localID, LLUUID itemID); 73 void remote_data(uint localID, UUID itemID);
74 void http_response(uint localID, LLUUID itemID); 74 void http_response(uint localID, UUID itemID);
75 } 75 }
76 76
77 public interface ServerRemotingObject 77 public interface ServerRemotingObject
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
index a310978..b02f2f5 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
@@ -31,7 +31,7 @@ using System.Diagnostics;
31using System.Net; 31using System.Net;
32using System.Text; 32using System.Text;
33using System.Web; 33using System.Web;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Region.ScriptEngine.Common.TRPC; 35using OpenSim.Region.ScriptEngine.Common.TRPC;
36 36
37namespace OpenSim.Region.ScriptEngine.Common 37namespace OpenSim.Region.ScriptEngine.Common
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ScriptEngine.Common
53 typeof(Double), 53 typeof(Double),
54 typeof(Decimal), 54 typeof(Decimal),
55 typeof(Array), 55 typeof(Array),
56 typeof(LLUUID), 56 typeof(UUID),
57 typeof(UInt16), 57 typeof(UInt16),
58 typeof(UInt32), 58 typeof(UInt32),
59 typeof(UInt64) 59 typeof(UInt64)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 371ba45..cf1d489 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
120 //System.Console.WriteLine("SCRIPT:" + checkscript); 120 //System.Console.WriteLine("SCRIPT:" + checkscript);
121 121
122 // checks for alpha.alpha way of referring to objects in C# 122 // checks for alpha.alpha way of referring to objects in C#
123 // ignores alpha.x alpha.y, alpha.z for refering to vector components 123 // ignores alpha.X alpha.Y, alpha.Z for refering to vector components
124 Match SecurityM; 124 Match SecurityM;
125 125
126 126
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index c94b56a..8176d3f 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34using OpenSim.Region.ScriptEngine.Common; 34using OpenSim.Region.ScriptEngine.Common;
@@ -54,13 +54,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
54 } 54 }
55 55
56 // KEEP TRACK OF SCRIPTS <int id, whatever script> 56 // KEEP TRACK OF SCRIPTS <int id, whatever script>
57 //internal Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>>(); 57 //internal Dictionary<uint, Dictionary<UUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<UUID, LSL_BaseClass>>();
58 // LOAD SCRIPT 58 // LOAD SCRIPT
59 // UNLOAD SCRIPT 59 // UNLOAD SCRIPT
60 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim 60 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim
61 61
62 62
63 public override void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 63 public override void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
64 { 64 {
65 m_log.DebugFormat( 65 m_log.DebugFormat(
66 "[{0}]: ScriptManager StartScript: localID: {1}, itemID: {2}", 66 "[{0}]: ScriptManager StartScript: localID: {1}, itemID: {2}",
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
84 } 84 }
85 85
86 // Xantor 20080525: I need assetID here to see if we already compiled this one previously 86 // Xantor 20080525: I need assetID here to see if we already compiled this one previously
87 LLUUID assetID = LLUUID.Zero; 87 UUID assetID = UUID.Zero;
88 TaskInventoryItem taskInventoryItem = new TaskInventoryItem(); 88 TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
89 if (m_host.TaskInventory.TryGetValue(itemID, out taskInventoryItem)) 89 if (m_host.TaskInventory.TryGetValue(itemID, out taskInventoryItem))
90 assetID = taskInventoryItem.AssetID; 90 assetID = taskInventoryItem.AssetID;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
153 string text = "Error compiling script:\r\n" + e.Message.ToString(); 153 string text = "Error compiling script:\r\n" + e.Message.ToString();
154 if (text.Length > 1500) 154 if (text.Length > 1500)
155 text = text.Substring(0, 1499); // 0-1499 is 1500 characters 155 text = text.Substring(0, 1499); // 0-1499 is 1500 characters
156 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, 156 World.SimChat(Utils.StringToBytes(text), ChatTypeEnum.DebugChannel, 2147483647,
157 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 157 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
158 } 158 }
159 catch (Exception e2) // LEGIT: User Scripting 159 catch (Exception e2) // LEGIT: User Scripting
@@ -165,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
165 } 165 }
166 } 166 }
167 167
168 public override void _StopScript(uint localID, LLUUID itemID) 168 public override void _StopScript(uint localID, UUID itemID)
169 { 169 {
170 // Stop script 170 // Stop script
171#if DEBUG 171#if DEBUG
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
index 2df41d0..e94de68 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
32 32
@@ -38,6 +38,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
38 // Each API has an identifier, which is used to load the 38 // Each API has an identifier, which is used to load the
39 // proper runtime assembly at load time. 39 // proper runtime assembly at load time.
40 // 40 //
41 void Initialize(IScriptEngine engine, SceneObjectPart part, uint localID, LLUUID item); 41 void Initialize(IScriptEngine engine, SceneObjectPart part, uint localID, UUID item);
42 } 42 }
43} 43}
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
index 6b3804c..4b46c21 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
@@ -29,7 +29,7 @@ using log4net;
29using System; 29using System;
30using OpenSim.Region.ScriptEngine.Shared; 30using OpenSim.Region.ScriptEngine.Shared;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Region.ScriptEngine.Interfaces; 34using OpenSim.Region.ScriptEngine.Interfaces;
35using Amib.Threading; 35using Amib.Threading;
@@ -49,16 +49,16 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
49 ILog Log { get; } 49 ILog Log { get; }
50 string ScriptEngineName { get; } 50 string ScriptEngineName { get; }
51 51
52 bool PostScriptEvent(LLUUID itemID, EventParams parms); 52 bool PostScriptEvent(UUID itemID, EventParams parms);
53 bool PostObjectEvent(uint localID, EventParams parms); 53 bool PostObjectEvent(uint localID, EventParams parms);
54 void ApiResetScript(LLUUID itemID); 54 void ApiResetScript(UUID itemID);
55 void ResetScript(LLUUID itemID); 55 void ResetScript(UUID itemID);
56 void SetScriptState(LLUUID itemID, bool state); 56 void SetScriptState(UUID itemID, bool state);
57 bool GetScriptState(LLUUID itemID); 57 bool GetScriptState(UUID itemID);
58 void SetState(LLUUID itemID, string newState); 58 void SetState(UUID itemID, string newState);
59 int GetStartParameter(LLUUID itemID); 59 int GetStartParameter(UUID itemID);
60 IScriptWorkItem QueueEventHandler(object parms); 60 IScriptWorkItem QueueEventHandler(object parms);
61 61
62 DetectParams GetDetectParams(LLUUID item, int number); 62 DetectParams GetDetectParams(UUID item, int number);
63 } 63 }
64} 64}
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 3aeb602..f79c1a3 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.ScriptEngine.Shared; 34using OpenSim.Region.ScriptEngine.Shared;
@@ -55,13 +55,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
55 bool Running { get; set; } 55 bool Running { get; set; }
56 string State { get; set; } 56 string State { get; set; }
57 IScriptEngine Engine { get; } 57 IScriptEngine Engine { get; }
58 LLUUID AppDomain { get; set; } 58 UUID AppDomain { get; set; }
59 string PrimName { get; } 59 string PrimName { get; }
60 string ScriptName { get; } 60 string ScriptName { get; }
61 LLUUID ItemID { get; } 61 UUID ItemID { get; }
62 LLUUID ObjectID { get; } 62 UUID ObjectID { get; }
63 uint LocalID { get; } 63 uint LocalID { get; }
64 LLUUID AssetID { get; } 64 UUID AssetID { get; }
65 Queue EventQueue { get; } 65 Queue EventQueue { get; }
66 66
67 void ClearQueue(); 67 void ClearQueue();
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
82 Dictionary<string, object> GetVars(); 82 Dictionary<string, object> GetVars();
83 void SetVars(Dictionary<string, object> vars); 83 void SetVars(Dictionary<string, object> vars);
84 DetectParams GetDetectParams(int idx); 84 DetectParams GetDetectParams(int idx);
85 LLUUID GetDetectID(int idx); 85 UUID GetDetectID(int idx);
86 void SaveState(string assembly); 86 void SaveState(string assembly);
87 } 87 }
88} 88}
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
index 21888fa..afb7311 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
@@ -28,7 +28,7 @@
28/* Original code: Tedd Hansen */ 28/* Original code: Tedd Hansen */
29 29
30using System; 30using System;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.ScriptEngine.Common; 33using OpenSim.Region.ScriptEngine.Common;
34using OpenSim.Region.ScriptEngine.Common.TRPC; 34using OpenSim.Region.ScriptEngine.Common.TRPC;
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
77 } 77 }
78 } 78 }
79 79
80 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 80 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
81 { 81 {
82 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID 82 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID
83 myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); 83 myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)");
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
90 //remoteScript[localID].Events().OnRezScript(localID, itemID, script); 90 //remoteScript[localID].Events().OnRezScript(localID, itemID, script);
91 } 91 }
92 92
93 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 93 public void touch_start(uint localID, Vector3 offsetPos, IClientAPI remoteClient)
94 { 94 {
95 //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); 95 //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient);
96 RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); 96 RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?");
@@ -100,162 +100,162 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
100 // PLACEHOLDERS -- CODE WILL CHANGE! 100 // PLACEHOLDERS -- CODE WILL CHANGE!
101 101
102 102
103 //public void OnRemoveScript(uint localID, LLUUID itemID) 103 //public void OnRemoveScript(uint localID, UUID itemID)
104 //{ 104 //{
105 // remoteScript[localID].Events.OnRemoveScript(localID, itemID); 105 // remoteScript[localID].Events.OnRemoveScript(localID, itemID);
106 //} 106 //}
107 107
108 //public void state_exit(uint localID, LLUUID itemID) 108 //public void state_exit(uint localID, UUID itemID)
109 //{ 109 //{
110 // remoteScript[localID].Events.state_exit(localID, itemID); 110 // remoteScript[localID].Events.state_exit(localID, itemID);
111 //} 111 //}
112 112
113 //public void touch(uint localID, LLUUID itemID) 113 //public void touch(uint localID, UUID itemID)
114 //{ 114 //{
115 // remoteScript[localID].Events.touch(localID, itemID); 115 // remoteScript[localID].Events.touch(localID, itemID);
116 //} 116 //}
117 117
118 //public void touch_end(uint localID, LLUUID itemID) 118 //public void touch_end(uint localID, UUID itemID)
119 //{ 119 //{
120 // remoteScript[localID].Events.touch_end(localID, itemID); 120 // remoteScript[localID].Events.touch_end(localID, itemID);
121 //} 121 //}
122 122
123 //public void collision_start(uint localID, LLUUID itemID) 123 //public void collision_start(uint localID, UUID itemID)
124 //{ 124 //{
125 // remoteScript[localID].Events.collision_start(localID, itemID); 125 // remoteScript[localID].Events.collision_start(localID, itemID);
126 //} 126 //}
127 127
128 //public void collision(uint localID, LLUUID itemID) 128 //public void collision(uint localID, UUID itemID)
129 //{ 129 //{
130 // remoteScript[localID].Events.collision(localID, itemID); 130 // remoteScript[localID].Events.collision(localID, itemID);
131 //} 131 //}
132 132
133 //public void collision_end(uint localID, LLUUID itemID) 133 //public void collision_end(uint localID, UUID itemID)
134 //{ 134 //{
135 // remoteScript[localID].Events.collision_end(localID, itemID); 135 // remoteScript[localID].Events.collision_end(localID, itemID);
136 //} 136 //}
137 137
138 //public void land_collision_start(uint localID, LLUUID itemID) 138 //public void land_collision_start(uint localID, UUID itemID)
139 //{ 139 //{
140 // remoteScript[localID].Events.land_collision_start(localID, itemID); 140 // remoteScript[localID].Events.land_collision_start(localID, itemID);
141 //} 141 //}
142 142
143 //public void land_collision(uint localID, LLUUID itemID) 143 //public void land_collision(uint localID, UUID itemID)
144 //{ 144 //{
145 // remoteScript[localID].Events.land_collision(localID, itemID); 145 // remoteScript[localID].Events.land_collision(localID, itemID);
146 //} 146 //}
147 147
148 //public void land_collision_end(uint localID, LLUUID itemID) 148 //public void land_collision_end(uint localID, UUID itemID)
149 //{ 149 //{
150 // remoteScript[localID].Events.land_collision_end(localID, itemID); 150 // remoteScript[localID].Events.land_collision_end(localID, itemID);
151 //} 151 //}
152 152
153 //public void timer(uint localID, LLUUID itemID) 153 //public void timer(uint localID, UUID itemID)
154 //{ 154 //{
155 // remoteScript[localID].Events.timer(localID, itemID); 155 // remoteScript[localID].Events.timer(localID, itemID);
156 //} 156 //}
157 157
158 //public void listen(uint localID, LLUUID itemID) 158 //public void listen(uint localID, UUID itemID)
159 //{ 159 //{
160 // remoteScript[localID].Events.listen(localID, itemID); 160 // remoteScript[localID].Events.listen(localID, itemID);
161 //} 161 //}
162 162
163 //public void on_rez(uint localID, LLUUID itemID) 163 //public void on_rez(uint localID, UUID itemID)
164 //{ 164 //{
165 // remoteScript[localID].Events.on_rez(localID, itemID); 165 // remoteScript[localID].Events.on_rez(localID, itemID);
166 //} 166 //}
167 167
168 //public void sensor(uint localID, LLUUID itemID) 168 //public void sensor(uint localID, UUID itemID)
169 //{ 169 //{
170 // remoteScript[localID].Events.sensor(localID, itemID); 170 // remoteScript[localID].Events.sensor(localID, itemID);
171 //} 171 //}
172 172
173 //public void no_sensor(uint localID, LLUUID itemID) 173 //public void no_sensor(uint localID, UUID itemID)
174 //{ 174 //{
175 // remoteScript[localID].Events.no_sensor(localID, itemID); 175 // remoteScript[localID].Events.no_sensor(localID, itemID);
176 //} 176 //}
177 177
178 //public void control(uint localID, LLUUID itemID) 178 //public void control(uint localID, UUID itemID)
179 //{ 179 //{
180 // remoteScript[localID].Events.control(localID, itemID); 180 // remoteScript[localID].Events.control(localID, itemID);
181 //} 181 //}
182 182
183 //public void money(uint localID, LLUUID itemID) 183 //public void money(uint localID, UUID itemID)
184 //{ 184 //{
185 // remoteScript[localID].Events.money(localID, itemID); 185 // remoteScript[localID].Events.money(localID, itemID);
186 //} 186 //}
187 187
188 //public void email(uint localID, LLUUID itemID) 188 //public void email(uint localID, UUID itemID)
189 //{ 189 //{
190 // remoteScript[localID].Events.email(localID, itemID); 190 // remoteScript[localID].Events.email(localID, itemID);
191 //} 191 //}
192 192
193 //public void at_target(uint localID, LLUUID itemID) 193 //public void at_target(uint localID, UUID itemID)
194 //{ 194 //{
195 // remoteScript[localID].Events.at_target(localID, itemID); 195 // remoteScript[localID].Events.at_target(localID, itemID);
196 //} 196 //}
197 197
198 //public void not_at_target(uint localID, LLUUID itemID) 198 //public void not_at_target(uint localID, UUID itemID)
199 //{ 199 //{
200 // remoteScript[localID].Events.not_at_target(localID, itemID); 200 // remoteScript[localID].Events.not_at_target(localID, itemID);
201 //} 201 //}
202 202
203 //public void at_rot_target(uint localID, LLUUID itemID) 203 //public void at_rot_target(uint localID, UUID itemID)
204 //{ 204 //{
205 // remoteScript[localID].Events.at_rot_target(localID, itemID); 205 // remoteScript[localID].Events.at_rot_target(localID, itemID);
206 //} 206 //}
207 207
208 //public void not_at_rot_target(uint localID, LLUUID itemID) 208 //public void not_at_rot_target(uint localID, UUID itemID)
209 //{ 209 //{
210 // remoteScript[localID].Events.not_at_rot_target(localID, itemID); 210 // remoteScript[localID].Events.not_at_rot_target(localID, itemID);
211 //} 211 //}
212 212
213 //public void run_time_permissions(uint localID, LLUUID itemID) 213 //public void run_time_permissions(uint localID, UUID itemID)
214 //{ 214 //{
215 // remoteScript[localID].Events.run_time_permissions(localID, itemID); 215 // remoteScript[localID].Events.run_time_permissions(localID, itemID);
216 //} 216 //}
217 217
218 //public void changed(uint localID, LLUUID itemID) 218 //public void changed(uint localID, UUID itemID)
219 //{ 219 //{
220 // remoteScript[localID].Events.changed(localID, itemID); 220 // remoteScript[localID].Events.changed(localID, itemID);
221 //} 221 //}
222 222
223 //public void attach(uint localID, LLUUID itemID) 223 //public void attach(uint localID, UUID itemID)
224 //{ 224 //{
225 // remoteScript[localID].Events.attach(localID, itemID); 225 // remoteScript[localID].Events.attach(localID, itemID);
226 //} 226 //}
227 227
228 //public void dataserver(uint localID, LLUUID itemID) 228 //public void dataserver(uint localID, UUID itemID)
229 //{ 229 //{
230 // remoteScript[localID].Events.dataserver(localID, itemID); 230 // remoteScript[localID].Events.dataserver(localID, itemID);
231 //} 231 //}
232 232
233 //public void link_message(uint localID, LLUUID itemID) 233 //public void link_message(uint localID, UUID itemID)
234 //{ 234 //{
235 // remoteScript[localID].Events.link_message(localID, itemID); 235 // remoteScript[localID].Events.link_message(localID, itemID);
236 //} 236 //}
237 237
238 //public void moving_start(uint localID, LLUUID itemID) 238 //public void moving_start(uint localID, UUID itemID)
239 //{ 239 //{
240 // remoteScript[localID].Events.moving_start(localID, itemID); 240 // remoteScript[localID].Events.moving_start(localID, itemID);
241 //} 241 //}
242 242
243 //public void moving_end(uint localID, LLUUID itemID) 243 //public void moving_end(uint localID, UUID itemID)
244 //{ 244 //{
245 // remoteScript[localID].Events.moving_end(localID, itemID); 245 // remoteScript[localID].Events.moving_end(localID, itemID);
246 //} 246 //}
247 247
248 //public void object_rez(uint localID, LLUUID itemID) 248 //public void object_rez(uint localID, UUID itemID)
249 //{ 249 //{
250 // remoteScript[localID].Events.object_rez(localID, itemID); 250 // remoteScript[localID].Events.object_rez(localID, itemID);
251 //} 251 //}
252 252
253 //public void remote_data(uint localID, LLUUID itemID) 253 //public void remote_data(uint localID, UUID itemID)
254 //{ 254 //{
255 // remoteScript[localID].Events.remote_data(localID, itemID); 255 // remoteScript[localID].Events.remote_data(localID, itemID);
256 //} 256 //}
257 257
258 //public void http_response(uint localID, LLUUID itemID) 258 //public void http_response(uint localID, UUID itemID)
259 //{ 259 //{
260 // remoteScript[localID].Events.http_response(localID, itemID); 260 // remoteScript[localID].Events.http_response(localID, itemID);
261 //} 261 //}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index fcd1df8..93a1a80 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.ScriptEngine.Interfaces; 35using OpenSim.Region.ScriptEngine.Interfaces;
@@ -192,7 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
192 /// </summary> 192 /// </summary>
193 /// <param name="localID"></param> 193 /// <param name="localID"></param>
194 /// <param name="itemID"></param> 194 /// <param name="itemID"></param>
195 public void RemoveScript(uint localID, LLUUID itemID) 195 public void RemoveScript(uint localID, UUID itemID)
196 { 196 {
197 // Remove a specific script 197 // Remove a specific script
198 198
@@ -219,7 +219,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
219 219
220 } 220 }
221 221
222 public Object[] GetSerializationData(LLUUID itemID) 222 public Object[] GetSerializationData(UUID itemID)
223 { 223 {
224 List<Object> data = new List<Object>(); 224 List<Object> data = new List<Object>();
225 225
@@ -250,7 +250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
250 return data.ToArray(); 250 return data.ToArray();
251 } 251 }
252 252
253 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 253 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
254 Object[] data) 254 Object[] data)
255 { 255 {
256 int idx = 0; 256 int idx = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 93dfeea..b2be0df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -32,9 +32,8 @@ using System.Runtime.Remoting.Lifetime;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using Nini.Config; 34using Nini.Config;
35using Axiom.Math; 35using OpenMetaverse;
36using libsecondlife; 36using OpenMetaverse.Packets;
37using libsecondlife.Packets;
38using OpenSim; 37using OpenSim;
39using OpenSim.Framework; 38using OpenSim.Framework;
40using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
@@ -63,13 +62,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
63 internal IScriptEngine m_ScriptEngine; 62 internal IScriptEngine m_ScriptEngine;
64 internal SceneObjectPart m_host; 63 internal SceneObjectPart m_host;
65 internal uint m_localID; 64 internal uint m_localID;
66 internal LLUUID m_itemID; 65 internal UUID m_itemID;
67 internal bool throwErrorOnNotImplemented = true; 66 internal bool throwErrorOnNotImplemented = true;
68 internal AsyncCommandManager AsyncCommands = null; 67 internal AsyncCommandManager AsyncCommands = null;
69 internal float m_ScriptDelayFactor = 1.0f; 68 internal float m_ScriptDelayFactor = 1.0f;
70 internal float m_ScriptDistanceFactor = 1.0f; 69 internal float m_ScriptDistanceFactor = 1.0f;
71 70
72 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 71 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
73 { 72 {
74 m_ScriptEngine = ScriptEngine; 73 m_ScriptEngine = ScriptEngine;
75 m_host = host; 74 m_host = host;
@@ -129,11 +128,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
129 return World.GetCommander(name); 128 return World.GetCommander(name);
130 } 129 }
131 130
132 private LLUUID InventorySelf() 131 private UUID InventorySelf()
133 { 132 {
134 LLUUID invItemID = new LLUUID(); 133 UUID invItemID = new UUID();
135 134
136 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 135 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
137 { 136 {
138 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) 137 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
139 { 138 {
@@ -145,54 +144,54 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
145 return invItemID; 144 return invItemID;
146 } 145 }
147 146
148 private LLUUID InventoryKey(string name, int type) 147 private UUID InventoryKey(string name, int type)
149 { 148 {
150 m_host.AddScriptLPS(1); 149 m_host.AddScriptLPS(1);
151 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 150 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
152 { 151 {
153 if (inv.Value.Name == name) 152 if (inv.Value.Name == name)
154 { 153 {
155 if (inv.Value.Type != type) 154 if (inv.Value.Type != type)
156 return LLUUID.Zero; 155 return UUID.Zero;
157 156
158 return inv.Value.AssetID.ToString(); 157 return inv.Value.AssetID.ToString();
159 } 158 }
160 } 159 }
161 return LLUUID.Zero; 160 return UUID.Zero;
162 } 161 }
163 162
164 private LLUUID InventoryKey(string name) 163 private UUID InventoryKey(string name)
165 { 164 {
166 m_host.AddScriptLPS(1); 165 m_host.AddScriptLPS(1);
167 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 166 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
168 { 167 {
169 if (inv.Value.Name == name) 168 if (inv.Value.Name == name)
170 { 169 {
171 return inv.Value.AssetID.ToString(); 170 return inv.Value.AssetID.ToString();
172 } 171 }
173 } 172 }
174 return LLUUID.Zero; 173 return UUID.Zero;
175 } 174 }
176 175
177 176
178 /// <summary> 177 /// <summary>
179 /// accepts a valid LLUUID, -or- a name of an inventory item. 178 /// accepts a valid UUID, -or- a name of an inventory item.
180 /// Returns a valid LLUUID or LLUUID.Zero if key invalid and item not found 179 /// Returns a valid UUID or UUID.Zero if key invalid and item not found
181 /// in prim inventory. 180 /// in prim inventory.
182 /// </summary> 181 /// </summary>
183 /// <param name="k"></param> 182 /// <param name="k"></param>
184 /// <returns></returns> 183 /// <returns></returns>
185 private LLUUID KeyOrName(string k) 184 private UUID KeyOrName(string k)
186 { 185 {
187 LLUUID key = LLUUID.Zero; 186 UUID key = UUID.Zero;
188 187
189 // if we can parse the string as a key, use it. 188 // if we can parse the string as a key, use it.
190 if (LLUUID.TryParse(k, out key)) 189 if (UUID.TryParse(k, out key))
191 { 190 {
192 return key; 191 return key;
193 } 192 }
194 // else try to locate the name in inventory of object. found returns key, 193 // else try to locate the name in inventory of object. found returns key,
195 // not found returns LLUUID.Zero which will translate to the default particle texture 194 // not found returns UUID.Zero which will translate to the default particle texture
196 else 195 else
197 { 196 {
198 return InventoryKey(k); 197 return InventoryKey(k);
@@ -551,7 +550,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
551 if (text.Length > 1023) 550 if (text.Length > 1023)
552 text = text.Substring(0, 1023); 551 text = text.Substring(0, 1023);
553 552
554 World.SimChat(Helpers.StringToField(text), 553 World.SimChat(Utils.StringToBytes(text),
555 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 554 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
556 555
557 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 556 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -565,7 +564,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
565 if (text.Length > 1023) 564 if (text.Length > 1023)
566 text = text.Substring(0, 1023); 565 text = text.Substring(0, 1023);
567 566
568 World.SimChat(Helpers.StringToField(text), 567 World.SimChat(Utils.StringToBytes(text),
569 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 568 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
570 569
571 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 570 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -579,7 +578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
579 if (text.Length > 1023) 578 if (text.Length > 1023)
580 text = text.Substring(0, 1023); 579 text = text.Substring(0, 1023);
581 580
582 World.SimChat(Helpers.StringToField(text), 581 World.SimChat(Utils.StringToBytes(text),
583 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); 582 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true);
584 583
585 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 584 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -606,8 +605,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
606 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 605 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg)
607 { 606 {
608 m_host.AddScriptLPS(1); 607 m_host.AddScriptLPS(1);
609 LLUUID keyID; 608 UUID keyID;
610 LLUUID.TryParse(ID, out keyID); 609 UUID.TryParse(ID, out keyID);
611 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 610 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
612 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); 611 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
613 } 612 }
@@ -629,8 +628,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
629 public void llSensor(string name, string id, int type, double range, double arc) 628 public void llSensor(string name, string id, int type, double range, double arc)
630 { 629 {
631 m_host.AddScriptLPS(1); 630 m_host.AddScriptLPS(1);
632 LLUUID keyID = LLUUID.Zero; 631 UUID keyID = UUID.Zero;
633 LLUUID.TryParse(id, out keyID); 632 UUID.TryParse(id, out keyID);
634 633
635 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); 634 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host);
636 } 635 }
@@ -638,8 +637,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
638 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 637 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
639 { 638 {
640 m_host.AddScriptLPS(1); 639 m_host.AddScriptLPS(1);
641 LLUUID keyID = LLUUID.Zero; 640 UUID keyID = UUID.Zero;
642 LLUUID.TryParse(id, out keyID); 641 UUID.TryParse(id, out keyID);
643 642
644 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); 643 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host);
645 } 644 }
@@ -650,7 +649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
650 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_localID, m_itemID); 649 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_localID, m_itemID);
651 } 650 }
652 651
653 public string resolveName(LLUUID objecUUID) 652 public string resolveName(UUID objecUUID)
654 { 653 {
655 // try avatar username surname 654 // try avatar username surname
656 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); 655 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
@@ -841,7 +840,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
841 840
842 if ((status & ScriptBaseClass.STATUS_CAST_SHADOWS) == ScriptBaseClass.STATUS_CAST_SHADOWS) 841 if ((status & ScriptBaseClass.STATUS_CAST_SHADOWS) == ScriptBaseClass.STATUS_CAST_SHADOWS)
843 { 842 {
844 m_host.AddFlag(LLObject.ObjectFlags.CastShadows); 843 m_host.AddFlag(PrimFlags.CastShadows);
845 } 844 }
846 845
847 if ((status & ScriptBaseClass.STATUS_ROTATE_X) == ScriptBaseClass.STATUS_ROTATE_X) 846 if ((status & ScriptBaseClass.STATUS_ROTATE_X) == ScriptBaseClass.STATUS_ROTATE_X)
@@ -891,25 +890,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
891 public LSL_Types.LSLInteger llGetStatus(int status) 890 public LSL_Types.LSLInteger llGetStatus(int status)
892 { 891 {
893 m_host.AddScriptLPS(1); 892 m_host.AddScriptLPS(1);
894 // Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 893 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
895 switch (status) 894 switch (status)
896 { 895 {
897 case ScriptBaseClass.STATUS_PHYSICS: 896 case ScriptBaseClass.STATUS_PHYSICS:
898 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) 897 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics)
899 { 898 {
900 return 1; 899 return 1;
901 } 900 }
902 return 0; 901 return 0;
903 902
904 case ScriptBaseClass.STATUS_PHANTOM: 903 case ScriptBaseClass.STATUS_PHANTOM:
905 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) 904 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom)
906 { 905 {
907 return 1; 906 return 1;
908 } 907 }
909 return 0; 908 return 0;
910 909
911 case ScriptBaseClass.STATUS_CAST_SHADOWS: 910 case ScriptBaseClass.STATUS_CAST_SHADOWS:
912 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) 911 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.CastShadows) == (uint)PrimFlags.CastShadows)
913 { 912 {
914 return 1; 913 return 1;
915 } 914 }
@@ -976,7 +975,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
976 scale.y = World.m_maxNonphys; 975 scale.y = World.m_maxNonphys;
977 if (scale.z > World.m_maxNonphys) 976 if (scale.z > World.m_maxNonphys)
978 scale.z = World.m_maxNonphys; 977 scale.z = World.m_maxNonphys;
979 LLVector3 tmp = part.Scale; 978 Vector3 tmp = part.Scale;
980 tmp.X = (float)scale.x; 979 tmp.X = (float)scale.x;
981 tmp.Y = (float)scale.y; 980 tmp.Y = (float)scale.y;
982 tmp.Z = (float)scale.z; 981 tmp.Z = (float)scale.z;
@@ -999,8 +998,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
999 998
1000 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 999 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face)
1001 { 1000 {
1002 LLObject.TextureEntry tex = part.Shape.Textures; 1001 Primitive.TextureEntry tex = part.Shape.Textures;
1003 LLColor texcolor; 1002 Color4 texcolor;
1004 if (face > -1) 1003 if (face > -1)
1005 { 1004 {
1006 texcolor = tex.CreateFace((uint)face).RGBA; 1005 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1036,7 +1035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1036 1035
1037 public void SetGlow(SceneObjectPart part, int face, float glow) 1036 public void SetGlow(SceneObjectPart part, int face, float glow)
1038 { 1037 {
1039 LLObject.TextureEntry tex = part.Shape.Textures; 1038 Primitive.TextureEntry tex = part.Shape.Textures;
1040 if (face > -1) 1039 if (face > -1)
1041 { 1040 {
1042 tex.CreateFace((uint) face); 1041 tex.CreateFace((uint) face);
@@ -1083,7 +1082,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1083 break; 1082 break;
1084 } 1083 }
1085 1084
1086 LLObject.TextureEntry tex = part.Shape.Textures; 1085 Primitive.TextureEntry tex = part.Shape.Textures;
1087 if (face > -1) 1086 if (face > -1)
1088 { 1087 {
1089 tex.CreateFace((uint) face); 1088 tex.CreateFace((uint) face);
@@ -1111,7 +1110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1111 1110
1112 public void SetFullBright(SceneObjectPart part, int face, bool bright) 1111 public void SetFullBright(SceneObjectPart part, int face, bool bright)
1113 { 1112 {
1114 LLObject.TextureEntry tex = part.Shape.Textures; 1113 Primitive.TextureEntry tex = part.Shape.Textures;
1115 if (face > -1) 1114 if (face > -1)
1116 { 1115 {
1117 tex.CreateFace((uint) face); 1116 tex.CreateFace((uint) face);
@@ -1137,7 +1136,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1137 public double llGetAlpha(int face) 1136 public double llGetAlpha(int face)
1138 { 1137 {
1139 m_host.AddScriptLPS(1); 1138 m_host.AddScriptLPS(1);
1140 LLObject.TextureEntry tex = m_host.Shape.Textures; 1139 Primitive.TextureEntry tex = m_host.Shape.Textures;
1141 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1140 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1142 { 1141 {
1143 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 1142 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255);
@@ -1158,8 +1157,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1158 1157
1159 private void SetAlpha(SceneObjectPart part, double alpha, int face) 1158 private void SetAlpha(SceneObjectPart part, double alpha, int face)
1160 { 1159 {
1161 LLObject.TextureEntry tex = part.Shape.Textures; 1160 Primitive.TextureEntry tex = part.Shape.Textures;
1162 LLColor texcolor; 1161 Color4 texcolor;
1163 if (face > -1) 1162 if (face > -1)
1164 { 1163 {
1165 texcolor = tex.CreateFace((uint)face).RGBA; 1164 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1286,8 +1285,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1286 public LSL_Types.Vector3 llGetColor(int face) 1285 public LSL_Types.Vector3 llGetColor(int face)
1287 { 1286 {
1288 m_host.AddScriptLPS(1); 1287 m_host.AddScriptLPS(1);
1289 LLObject.TextureEntry tex = m_host.Shape.Textures; 1288 Primitive.TextureEntry tex = m_host.Shape.Textures;
1290 LLColor texcolor; 1289 Color4 texcolor;
1291 LSL_Types.Vector3 rgb; 1290 LSL_Types.Vector3 rgb;
1292 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1291 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1293 { 1292 {
@@ -1320,21 +1319,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1320 1319
1321 private void SetTexture(SceneObjectPart part, string texture, int face) 1320 private void SetTexture(SceneObjectPart part, string texture, int face)
1322 { 1321 {
1323 LLUUID textureID=new LLUUID(); 1322 UUID textureID=new UUID();
1324 1323
1325 if (!LLUUID.TryParse(texture, out textureID)) 1324 if (!UUID.TryParse(texture, out textureID))
1326 { 1325 {
1327 textureID=InventoryKey(texture, (int)AssetType.Texture); 1326 textureID=InventoryKey(texture, (int)AssetType.Texture);
1328 } 1327 }
1329 1328
1330 if (textureID == LLUUID.Zero) 1329 if (textureID == UUID.Zero)
1331 return; 1330 return;
1332 1331
1333 LLObject.TextureEntry tex = part.Shape.Textures; 1332 Primitive.TextureEntry tex = part.Shape.Textures;
1334 1333
1335 if (face > -1) 1334 if (face > -1)
1336 { 1335 {
1337 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1336 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1338 texface.TextureID = textureID; 1337 texface.TextureID = textureID;
1339 tex.FaceTextures[face] = texface; 1338 tex.FaceTextures[face] = texface;
1340 part.UpdateTexture(tex); 1339 part.UpdateTexture(tex);
@@ -1365,10 +1364,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1365 1364
1366 private void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1365 private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
1367 { 1366 {
1368 LLObject.TextureEntry tex = part.Shape.Textures; 1367 Primitive.TextureEntry tex = part.Shape.Textures;
1369 if (face > -1) 1368 if (face > -1)
1370 { 1369 {
1371 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1370 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1372 texface.RepeatU = (float)u; 1371 texface.RepeatU = (float)u;
1373 texface.RepeatV = (float)v; 1372 texface.RepeatV = (float)v;
1374 tex.FaceTextures[face] = texface; 1373 tex.FaceTextures[face] = texface;
@@ -1401,10 +1400,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1401 1400
1402 private void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1401 private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
1403 { 1402 {
1404 LLObject.TextureEntry tex = part.Shape.Textures; 1403 Primitive.TextureEntry tex = part.Shape.Textures;
1405 if (face > -1) 1404 if (face > -1)
1406 { 1405 {
1407 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1406 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1408 texface.OffsetU = (float)u; 1407 texface.OffsetU = (float)u;
1409 texface.OffsetV = (float)v; 1408 texface.OffsetV = (float)v;
1410 tex.FaceTextures[face] = texface; 1409 tex.FaceTextures[face] = texface;
@@ -1437,10 +1436,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1437 1436
1438 private void RotateTexture(SceneObjectPart part, double rotation, int face) 1437 private void RotateTexture(SceneObjectPart part, double rotation, int face)
1439 { 1438 {
1440 LLObject.TextureEntry tex = part.Shape.Textures; 1439 Primitive.TextureEntry tex = part.Shape.Textures;
1441 if (face > -1) 1440 if (face > -1)
1442 { 1441 {
1443 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1442 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1444 texface.Rotation = (float)rotation; 1443 texface.Rotation = (float)rotation;
1445 tex.FaceTextures[face] = texface; 1444 tex.FaceTextures[face] = texface;
1446 part.UpdateTexture(tex); 1445 part.UpdateTexture(tex);
@@ -1464,14 +1463,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1464 public string llGetTexture(int face) 1463 public string llGetTexture(int face)
1465 { 1464 {
1466 m_host.AddScriptLPS(1); 1465 m_host.AddScriptLPS(1);
1467 LLObject.TextureEntry tex = m_host.Shape.Textures; 1466 Primitive.TextureEntry tex = m_host.Shape.Textures;
1468 if (face == -1) 1467 if (face == -1)
1469 { 1468 {
1470 face = 0; 1469 face = 0;
1471 } 1470 }
1472 if (face > -1) 1471 if (face > -1)
1473 { 1472 {
1474 LLObject.TextureEntryFace texface; 1473 Primitive.TextureEntryFace texface;
1475 texface = tex.GetFace((uint)face); 1474 texface = tex.GetFace((uint)face);
1476 return texface.TextureID.ToString(); 1475 return texface.TextureID.ToString();
1477 } 1476 }
@@ -1501,11 +1500,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1501 1500
1502 if (part.ParentID != 0) 1501 if (part.ParentID != 0)
1503 { 1502 {
1504 part.UpdateOffSet(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1503 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1505 } 1504 }
1506 else 1505 else
1507 { 1506 {
1508 part.UpdateGroupPosition(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1507 part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1509 } 1508 }
1510 } 1509 }
1511 1510
@@ -1545,7 +1544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1545 1544
1546 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1545 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot)
1547 { 1546 {
1548 part.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1547 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1549 // Update rotation does not move the object in the physics scene if it's a linkset. 1548 // Update rotation does not move the object in the physics scene if it's a linkset.
1550 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1549 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1551 } 1550 }
@@ -1553,7 +1552,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1553 public LSL_Types.Quaternion llGetRot() 1552 public LSL_Types.Quaternion llGetRot()
1554 { 1553 {
1555 m_host.AddScriptLPS(1); 1554 m_host.AddScriptLPS(1);
1556 LLQuaternion q = m_host.RotationOffset; 1555 Quaternion q = m_host.RotationOffset;
1557 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1556 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
1558 } 1557 }
1559 1558
@@ -1605,7 +1604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1605 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1604 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range)
1606 { 1605 {
1607 m_host.AddScriptLPS(1); 1606 m_host.AddScriptLPS(1);
1608 return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1607 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
1609 1608
1610 } 1609 }
1611 1610
@@ -1631,7 +1630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1631 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1630 public void llMoveToTarget(LSL_Types.Vector3 target, double tau)
1632 { 1631 {
1633 m_host.AddScriptLPS(1); 1632 m_host.AddScriptLPS(1);
1634 m_host.MoveToTarget(new LLVector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1633 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
1635 } 1634 }
1636 1635
1637 public void llStopMoveToTarget() 1636 public void llStopMoveToTarget()
@@ -1652,7 +1651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1652 if (force.z > 20000) 1651 if (force.z > 20000)
1653 force.z = 20000; 1652 force.z = 20000;
1654 1653
1655 m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1654 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1656 } 1655 }
1657 1656
1658 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1657 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local)
@@ -1761,7 +1760,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1761 { 1760 {
1762 m_host.AddScriptLPS(1); 1761 m_host.AddScriptLPS(1);
1763 1762
1764 if (m_host.Sound != LLUUID.Zero) 1763 if (m_host.Sound != UUID.Zero)
1765 llStopSound(); 1764 llStopSound();
1766 1765
1767 m_host.Sound = KeyOrName(sound); 1766 m_host.Sound = KeyOrName(sound);
@@ -1803,7 +1802,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1803 { 1802 {
1804 m_host.AddScriptLPS(1); 1803 m_host.AddScriptLPS(1);
1805 1804
1806 m_host.Sound = LLUUID.Zero; 1805 m_host.Sound = UUID.Zero;
1807 m_host.SoundGain = 0; 1806 m_host.SoundGain = 0;
1808 m_host.SoundFlags = 0; 1807 m_host.SoundFlags = 0;
1809 m_host.SoundRadius = 0; 1808 m_host.SoundRadius = 0;
@@ -1811,7 +1810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1811 m_host.ScheduleFullUpdate(); 1810 m_host.ScheduleFullUpdate();
1812 m_host.SendFullUpdateToAllClients(); 1811 m_host.SendFullUpdateToAllClients();
1813 1812
1814 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); 1813 // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
1815 } 1814 }
1816 1815
1817 public void llPreloadSound(string sound) 1816 public void llPreloadSound(string sound)
@@ -2059,13 +2058,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2059 2058
2060 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2059 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount)
2061 { 2060 {
2062 LLUUID invItemID=InventorySelf(); 2061 UUID invItemID=InventorySelf();
2063 if (invItemID == LLUUID.Zero) 2062 if (invItemID == UUID.Zero)
2064 return 0; 2063 return 0;
2065 2064
2066 m_host.AddScriptLPS(1); 2065 m_host.AddScriptLPS(1);
2067 2066
2068 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2067 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2069 return 0; 2068 return 0;
2070 2069
2071 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) 2070 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
@@ -2074,9 +2073,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2074 return 0; 2073 return 0;
2075 } 2074 }
2076 2075
2077 LLUUID toID=new LLUUID(); 2076 UUID toID=new UUID();
2078 2077
2079 if (!LLUUID.TryParse(destination, out toID)) 2078 if (!UUID.TryParse(destination, out toID))
2080 { 2079 {
2081 LSLError("Bad key in llGiveMoney"); 2080 LSLError("Bad key in llGiveMoney");
2082 return 0; 2081 return 0;
@@ -2140,7 +2139,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2140 // it's possible to have two items with the same task inventory name. 2139 // it's possible to have two items with the same task inventory name.
2141 // this is an easter egg of sorts. 2140 // this is an easter egg of sorts.
2142 2141
2143 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2142 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2144 { 2143 {
2145 if (inv.Value.Name == inventory) 2144 if (inv.Value.Name == inventory)
2146 { 2145 {
@@ -2151,18 +2150,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2151 continue; 2150 continue;
2152 } 2151 }
2153 2152
2154 LLVector3 llpos = new LLVector3((float)pos.x, (float)pos.y, (float)pos.z); 2153 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
2155 2154
2156 // test if we're further away then 10m 2155 // test if we're further away then 10m
2157 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) 2156 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10)
2158 return; // wiki says, if it's further away then 10m, silently fail. 2157 return; // wiki says, if it's further away then 10m, silently fail.
2159 2158
2160 LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); 2159 Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z);
2161 2160
2162 // need the magnitude later 2161 // need the magnitude later
2163 float velmag = (float)Util.GetMagnitude(llvel); 2162 float velmag = (float)Util.GetMagnitude(llvel);
2164 2163
2165 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); 2164 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
2166 2165
2167 // If either of these are null, then there was an unknown error. 2166 // If either of these are null, then there was an unknown error.
2168 if (new_group == null) 2167 if (new_group == null)
@@ -2176,7 +2175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2176 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2175 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2177 "object_rez", new Object[] { 2176 "object_rez", new Object[] {
2178 new LSL_Types.LSLString( 2177 new LSL_Types.LSLString(
2179 new_group.RootPart.UUID.ToString()) }, 2178 new_group.RootPart.ToString()) },
2180 new DetectParams[0])); 2179 new DetectParams[0]));
2181 2180
2182 float groupmass = new_group.GetMass(); 2181 float groupmass = new_group.GetMass();
@@ -2243,7 +2242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2243 return; 2242 return;
2244 } 2243 }
2245 2244
2246 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2245 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2247 { 2246 {
2248 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2247 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2249 2248
@@ -2270,7 +2269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2270 return; 2269 return;
2271 } 2270 }
2272 2271
2273 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2272 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2274 { 2273 {
2275 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2274 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2276 2275
@@ -2331,14 +2330,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2331 2330
2332 // TODO: figure out values for client, fromSession, and imSessionID 2331 // TODO: figure out values for client, fromSession, and imSessionID
2333 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); 2332 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch());
2334 LLUUID friendTransactionID = LLUUID.Random(); 2333 UUID friendTransactionID = UUID.Random();
2335 2334
2336 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 2335 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
2337 2336
2338 GridInstantMessage msg = new GridInstantMessage(); 2337 GridInstantMessage msg = new GridInstantMessage();
2339 msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; 2338 msg.fromAgentID = new Guid(m_host.ToString()); // fromAgentID.Guid;
2340 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; 2339 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID;
2341 msg.toAgentID = new Guid(user); // toAgentID.UUID; 2340 msg.toAgentID = new Guid(user); // toAgentID.Guid;
2342 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here 2341 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
2343// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); 2342// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
2344// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); 2343// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
@@ -2356,8 +2355,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2356 msg.fromGroup = false;// fromGroup; 2355 msg.fromGroup = false;// fromGroup;
2357 msg.offline = (byte)0; //offline; 2356 msg.offline = (byte)0; //offline;
2358 msg.ParentEstateID = 0; //ParentEstateID; 2357 msg.ParentEstateID = 0; //ParentEstateID;
2359 msg.Position = new sLLVector3();// new sLLVector3(m_host.AbsolutePosition); 2358 msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
2360 msg.RegionID = World.RegionInfo.RegionID.UUID;//RegionID.UUID; 2359 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
2361 msg.binaryBucket = new byte[0];// binaryBucket; 2360 msg.binaryBucket = new byte[0];// binaryBucket;
2362 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2361 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2363 // ScriptSleep(2000); 2362 // ScriptSleep(2000);
@@ -2404,7 +2403,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2404 public string llGetKey() 2403 public string llGetKey()
2405 { 2404 {
2406 m_host.AddScriptLPS(1); 2405 m_host.AddScriptLPS(1);
2407 return m_host.UUID.ToString(); 2406 return m_host.ToString();
2408 } 2407 }
2409 2408
2410 public void llSetBuoyancy(double buoyancy) 2409 public void llSetBuoyancy(double buoyancy)
@@ -2468,11 +2467,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2468 { 2467 {
2469 m_host.AddScriptLPS(1); 2468 m_host.AddScriptLPS(1);
2470 2469
2471 LLUUID invItemID=InventorySelf(); 2470 UUID invItemID=InventorySelf();
2472 if (invItemID == LLUUID.Zero) 2471 if (invItemID == UUID.Zero)
2473 return; 2472 return;
2474 2473
2475 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2474 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2476 return; 2475 return;
2477 2476
2478 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2477 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
@@ -2481,9 +2480,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2481 2480
2482 if (presence != null) 2481 if (presence != null)
2483 { 2482 {
2484 // Do NOT try to parse LLUUID, animations cannot be triggered by ID 2483 // Do NOT try to parse UUID, animations cannot be triggered by ID
2485 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); 2484 UUID animID=InventoryKey(anim, (int)AssetType.Animation);
2486 if (animID == LLUUID.Zero) 2485 if (animID == UUID.Zero)
2487 presence.AddAnimation(anim); 2486 presence.AddAnimation(anim);
2488 else 2487 else
2489 presence.AddAnimation(animID); 2488 presence.AddAnimation(animID);
@@ -2495,30 +2494,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2495 { 2494 {
2496 m_host.AddScriptLPS(1); 2495 m_host.AddScriptLPS(1);
2497 2496
2498 LLUUID invItemID=InventorySelf(); 2497 UUID invItemID=InventorySelf();
2499 if (invItemID == LLUUID.Zero) 2498 if (invItemID == UUID.Zero)
2500 return; 2499 return;
2501 2500
2502 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2501 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2503 return; 2502 return;
2504 2503
2505 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2504 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2506 { 2505 {
2507 LLUUID animID = new LLUUID(); 2506 UUID animID = new UUID();
2508 2507
2509 if (!LLUUID.TryParse(anim, out animID)) 2508 if (!UUID.TryParse(anim, out animID))
2510 { 2509 {
2511 animID=InventoryKey(anim); 2510 animID=InventoryKey(anim);
2512 } 2511 }
2513 2512
2514 if (animID == LLUUID.Zero) 2513 if (animID == UUID.Zero)
2515 return; 2514 return;
2516 2515
2517 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); 2516 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2518 2517
2519 if (presence != null) 2518 if (presence != null)
2520 { 2519 {
2521 if (animID == LLUUID.Zero) 2520 if (animID == UUID.Zero)
2522 presence.RemoveAnimation(anim); 2521 presence.RemoveAnimation(anim);
2523 else 2522 else
2524 presence.RemoveAnimation(animID); 2523 presence.RemoveAnimation(animID);
@@ -2541,8 +2540,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2541 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2540 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain)
2542 { 2541 {
2543 m_host.AddScriptLPS(1); 2542 m_host.AddScriptLPS(1);
2544 m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2543 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2545 m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2544 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2546 m_host.ScheduleTerseUpdate(); 2545 m_host.ScheduleTerseUpdate();
2547 m_host.SendTerseUpdateToAllClients(); 2546 m_host.SendTerseUpdateToAllClients();
2548 } 2547 }
@@ -2561,19 +2560,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2561 2560
2562 public void llRequestPermissions(string agent, int perm) 2561 public void llRequestPermissions(string agent, int perm)
2563 { 2562 {
2564 LLUUID agentID=new LLUUID(); 2563 UUID agentID=new UUID();
2565 2564
2566 if (!LLUUID.TryParse(agent, out agentID)) 2565 if (!UUID.TryParse(agent, out agentID))
2567 return; 2566 return;
2568 2567
2569 LLUUID invItemID=InventorySelf(); 2568 UUID invItemID=InventorySelf();
2570 2569
2571 if (invItemID == LLUUID.Zero) 2570 if (invItemID == UUID.Zero)
2572 return; // Not in a prim? How?? 2571 return; // Not in a prim? How??
2573 2572
2574 if (agentID == LLUUID.Zero || perm == 0) // Releasing permissions 2573 if (agentID == UUID.Zero || perm == 0) // Releasing permissions
2575 { 2574 {
2576 m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; 2575 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero;
2577 m_host.TaskInventory[invItemID].PermsMask=0; 2576 m_host.TaskInventory[invItemID].PermsMask=0;
2578 2577
2579 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2578 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
@@ -2655,14 +2654,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2655 new DetectParams[0])); 2654 new DetectParams[0]));
2656 } 2655 }
2657 2656
2658 void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) 2657 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer)
2659 { 2658 {
2660 if (taskID != m_host.UUID) 2659 if (taskID != m_host.UUID)
2661 return; 2660 return;
2662 2661
2663 LLUUID invItemID=InventorySelf(); 2662 UUID invItemID=InventorySelf();
2664 2663
2665 if (invItemID == LLUUID.Zero) 2664 if (invItemID == UUID.Zero)
2666 return; 2665 return;
2667 2666
2668 client.OnScriptAnswer-=handleScriptAnswer; 2667 client.OnScriptAnswer-=handleScriptAnswer;
@@ -2687,7 +2686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2687 } 2686 }
2688 } 2687 }
2689 2688
2690 return LLUUID.Zero.ToString(); 2689 return UUID.Zero.ToString();
2691 } 2690 }
2692 2691
2693 public LSL_Types.LSLInteger llGetPermissions() 2692 public LSL_Types.LSLInteger llGetPermissions()
@@ -2725,8 +2724,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2725 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2724 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2726 if (linknumber > -1) 2725 if (linknumber > -1)
2727 { 2726 {
2728 LLObject.TextureEntry tex = part.Shape.Textures; 2727 Primitive.TextureEntry tex = part.Shape.Textures;
2729 LLColor texcolor; 2728 Color4 texcolor;
2730 if (face > -1) 2729 if (face > -1)
2731 { 2730 {
2732 texcolor = tex.CreateFace((uint)face).RGBA; 2731 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2772,8 +2771,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2772 { 2771 {
2773 linknumber = w; 2772 linknumber = w;
2774 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2773 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2775 LLObject.TextureEntry tex = part.Shape.Textures; 2774 Primitive.TextureEntry tex = part.Shape.Textures;
2776 LLColor texcolor; 2775 Color4 texcolor;
2777 if (face > -1) 2776 if (face > -1)
2778 { 2777 {
2779 texcolor = tex.CreateFace((uint)face).RGBA; 2778 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2816,7 +2815,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2816 public void llCreateLink(string target, int parent) 2815 public void llCreateLink(string target, int parent)
2817 { 2816 {
2818 m_host.AddScriptLPS(1); 2817 m_host.AddScriptLPS(1);
2819 LLUUID invItemID = InventorySelf(); 2818 UUID invItemID = InventorySelf();
2820 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0) { 2819 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2821 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); 2820 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2822 return; 2821 return;
@@ -2841,7 +2840,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2841 childPrim.RootPart.UpdateFlag = uf; 2840 childPrim.RootPart.UpdateFlag = uf;
2842 } 2841 }
2843 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 2842 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2844 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 2843 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
2845 parentPrim.GetProperties(client); 2844 parentPrim.GetProperties(client);
2846 2845
2847 ScriptSleep(1000); 2846 ScriptSleep(1000);
@@ -2865,11 +2864,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2865 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 2864 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
2866 if (part != null) 2865 if (part != null)
2867 { 2866 {
2868 return part.UUID.ToString(); 2867 return part.ToString();
2869 } 2868 }
2870 else 2869 else
2871 { 2870 {
2872 return LLUUID.Zero.ToString(); 2871 return UUID.Zero.ToString();
2873 } 2872 }
2874 } 2873 }
2875 2874
@@ -2891,7 +2890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2891 { 2890 {
2892 m_host.AddScriptLPS(1); 2891 m_host.AddScriptLPS(1);
2893 int count = 0; 2892 int count = 0;
2894 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2893 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2895 { 2894 {
2896 if (inv.Value.Type == type || type == -1) 2895 if (inv.Value.Type == type || type == -1)
2897 { 2896 {
@@ -2905,7 +2904,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2905 { 2904 {
2906 m_host.AddScriptLPS(1); 2905 m_host.AddScriptLPS(1);
2907 ArrayList keys = new ArrayList(); 2906 ArrayList keys = new ArrayList();
2908 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2907 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2909 { 2908 {
2910 if (inv.Value.Type == type || type == -1) 2909 if (inv.Value.Type == type || type == -1)
2911 { 2910 {
@@ -2926,14 +2925,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2926 2925
2927 public void llSetScriptState(string name, int run) 2926 public void llSetScriptState(string name, int run)
2928 { 2927 {
2929 LLUUID item; 2928 UUID item;
2930 2929
2931 m_host.AddScriptLPS(1); 2930 m_host.AddScriptLPS(1);
2932 2931
2933 // These functions are supposed to be robust, 2932 // These functions are supposed to be robust,
2934 // so get the state one step at a time. 2933 // so get the state one step at a time.
2935 2934
2936 if ((item = ScriptByName(name)) != LLUUID.Zero) 2935 if ((item = ScriptByName(name)) != UUID.Zero)
2937 { 2936 {
2938 m_ScriptEngine.SetScriptState(item, run == 0 ? false : true); 2937 m_ScriptEngine.SetScriptState(item, run == 0 ? false : true);
2939 } 2938 }
@@ -2954,17 +2953,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2954 { 2953 {
2955 m_host.AddScriptLPS(1); 2954 m_host.AddScriptLPS(1);
2956 bool found = false; 2955 bool found = false;
2957 LLUUID destId = LLUUID.Zero; 2956 UUID destId = UUID.Zero;
2958 LLUUID objId = LLUUID.Zero; 2957 UUID objId = UUID.Zero;
2959 2958
2960 if (!LLUUID.TryParse(destination, out destId)) 2959 if (!UUID.TryParse(destination, out destId))
2961 { 2960 {
2962 llSay(0, "Could not parse key " + destination); 2961 llSay(0, "Could not parse key " + destination);
2963 return; 2962 return;
2964 } 2963 }
2965 2964
2966 // move the first object found with this inventory name 2965 // move the first object found with this inventory name
2967 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2966 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2968 { 2967 {
2969 if (inv.Value.Name == inventory) 2968 if (inv.Value.Name == inventory)
2970 { 2969 {
@@ -3037,7 +3036,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3037 World.CommsManager.UserService.GetAgentByUUID(id); 3036 World.CommsManager.UserService.GetAgentByUUID(id);
3038 3037
3039 if (userProfile == null || userAgent == null) 3038 if (userProfile == null || userAgent == null)
3040 return LLUUID.Zero.ToString(); 3039 return UUID.Zero.ToString();
3041 3040
3042 string reply = String.Empty; 3041 string reply = String.Empty;
3043 3042
@@ -3065,12 +3064,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3065 reply = "0"; 3064 reply = "0";
3066 break; 3065 break;
3067 default: 3066 default:
3068 return LLUUID.Zero.ToString(); // Raise no event 3067 return UUID.Zero.ToString(); // Raise no event
3069 } 3068 }
3070 3069
3071 LLUUID rq = LLUUID.Random(); 3070 UUID rq = UUID.Random();
3072 3071
3073 LLUUID tid = AsyncCommands. 3072 UUID tid = AsyncCommands.
3074 DataserverPlugin.RegisterRequest(m_localID, 3073 DataserverPlugin.RegisterRequest(m_localID,
3075 m_itemID, rq.ToString()); 3074 m_itemID, rq.ToString());
3076 3075
@@ -3089,23 +3088,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3089 { 3088 {
3090 if (item.Type == 3 && item.Name == name) 3089 if (item.Type == 3 && item.Name == name)
3091 { 3090 {
3092 LLUUID tid = AsyncCommands. 3091 UUID tid = AsyncCommands.
3093 DataserverPlugin.RegisterRequest(m_localID, 3092 DataserverPlugin.RegisterRequest(m_localID,
3094 m_itemID, item.AssetID.ToString()); 3093 m_itemID, item.AssetID.ToString());
3095 3094
3096 LLVector3 region = new LLVector3( 3095 Vector3 region = new Vector3(
3097 World.RegionInfo.RegionLocX * Constants.RegionSize, 3096 World.RegionInfo.RegionLocX * Constants.RegionSize,
3098 World.RegionInfo.RegionLocY * Constants.RegionSize, 3097 World.RegionInfo.RegionLocY * Constants.RegionSize,
3099 0); 3098 0);
3100 3099
3101 World.AssetCache.GetAsset(item.AssetID, 3100 World.AssetCache.GetAsset(item.AssetID,
3102 delegate(LLUUID i, AssetBase a) 3101 delegate(UUID i, AssetBase a)
3103 { 3102 {
3104 AssetLandmark lm = new AssetLandmark(a); 3103 AssetLandmark lm = new AssetLandmark(a);
3105 3104
3106 float rx = (uint)(lm.RegionHandle >> 32); 3105 float rx = (uint)(lm.RegionHandle >> 32);
3107 float ry = (uint)lm.RegionHandle; 3106 float ry = (uint)lm.RegionHandle;
3108 region = lm.Position + new LLVector3(rx, ry, 0) - region; 3107 region = lm.Position + new Vector3(rx, ry, 0) - region;
3109 3108
3110 string reply = region.ToString(); 3109 string reply = region.ToString();
3111 AsyncCommands. 3110 AsyncCommands.
@@ -3130,8 +3129,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3130 public void llTeleportAgentHome(string agent) 3129 public void llTeleportAgentHome(string agent)
3131 { 3130 {
3132 m_host.AddScriptLPS(1); 3131 m_host.AddScriptLPS(1);
3133 LLUUID agentId = new LLUUID(); 3132 UUID agentId = new UUID();
3134 if (LLUUID.TryParse(agent, out agentId)) 3133 if (UUID.TryParse(agent, out agentId))
3135 { 3134 {
3136 ScenePresence presence = World.GetScenePresence(agentId); 3135 ScenePresence presence = World.GetScenePresence(agentId);
3137 if (presence != null) 3136 if (presence != null)
@@ -3147,7 +3146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3147 public void llModifyLand(int action, int brush) 3146 public void llModifyLand(int action, int brush)
3148 { 3147 {
3149 m_host.AddScriptLPS(1); 3148 m_host.AddScriptLPS(1);
3150 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); 3149 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0));
3151 } 3150 }
3152 3151
3153 public void llCollisionSound(string impact_sound, double impact_volume) 3152 public void llCollisionSound(string impact_sound, double impact_volume)
@@ -3182,7 +3181,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3182 m_host.AddScriptLPS(1); 3181 m_host.AddScriptLPS(1);
3183 3182
3184 // uint partLocalID; 3183 // uint partLocalID;
3185 LLUUID partItemID; 3184 UUID partItemID;
3186 3185
3187 switch ((int)linknum) 3186 switch ((int)linknum)
3188 { 3187 {
@@ -3357,7 +3356,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3357 SceneObjectPart targ = World.GetSceneObjectPart(target); 3356 SceneObjectPart targ = World.GetSceneObjectPart(target);
3358 if (targ == null) 3357 if (targ == null)
3359 return; 3358 return;
3360 targ.ApplyImpulse(new LLVector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); 3359 targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0);
3361 } 3360 }
3362 3361
3363 public void llPassCollisions(int pass) 3362 public void llPassCollisions(int pass)
@@ -3636,7 +3635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3636 public string llGetInventoryKey(string name) 3635 public string llGetInventoryKey(string name)
3637 { 3636 {
3638 m_host.AddScriptLPS(1); 3637 m_host.AddScriptLPS(1);
3639 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3638 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3640 { 3639 {
3641 if (inv.Value.Name == name) 3640 if (inv.Value.Name == name)
3642 { 3641 {
@@ -3646,11 +3645,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3646 } 3645 }
3647 else 3646 else
3648 { 3647 {
3649 return LLUUID.Zero.ToString(); 3648 return UUID.Zero.ToString();
3650 } 3649 }
3651 } 3650 }
3652 } 3651 }
3653 return LLUUID.Zero.ToString(); 3652 return UUID.Zero.ToString();
3654 } 3653 }
3655 3654
3656 public void llAllowInventoryDrop(int add) 3655 public void llAllowInventoryDrop(int add)
@@ -3668,10 +3667,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3668 m_host.AddScriptLPS(1); 3667 m_host.AddScriptLPS(1);
3669 3668
3670 LSL_Types.Vector3 SunDoubleVector3; 3669 LSL_Types.Vector3 SunDoubleVector3;
3671 LLVector3 SunFloatVector3; 3670 Vector3 SunFloatVector3;
3672 3671
3673 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3672 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3674 // have to convert from LLVector3 (float) to LSL_Types.Vector3 (double) 3673 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double)
3675 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3674 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3676 SunDoubleVector3.x = (double)SunFloatVector3.X; 3675 SunDoubleVector3.x = (double)SunFloatVector3.X;
3677 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3676 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3683,7 +3682,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3683 public LSL_Types.Vector3 llGetTextureOffset(int face) 3682 public LSL_Types.Vector3 llGetTextureOffset(int face)
3684 { 3683 {
3685 m_host.AddScriptLPS(1); 3684 m_host.AddScriptLPS(1);
3686 LLObject.TextureEntry tex = m_host.Shape.Textures; 3685 Primitive.TextureEntry tex = m_host.Shape.Textures;
3687 LSL_Types.Vector3 offset; 3686 LSL_Types.Vector3 offset;
3688 if (face == -1) 3687 if (face == -1)
3689 { 3688 {
@@ -3698,7 +3697,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3698 public LSL_Types.Vector3 llGetTextureScale(int side) 3697 public LSL_Types.Vector3 llGetTextureScale(int side)
3699 { 3698 {
3700 m_host.AddScriptLPS(1); 3699 m_host.AddScriptLPS(1);
3701 LLObject.TextureEntry tex = m_host.Shape.Textures; 3700 Primitive.TextureEntry tex = m_host.Shape.Textures;
3702 LSL_Types.Vector3 scale; 3701 LSL_Types.Vector3 scale;
3703 if (side == -1) 3702 if (side == -1)
3704 { 3703 {
@@ -3713,7 +3712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3713 public double llGetTextureRot(int face) 3712 public double llGetTextureRot(int face)
3714 { 3713 {
3715 m_host.AddScriptLPS(1); 3714 m_host.AddScriptLPS(1);
3716 LLObject.TextureEntry tex = m_host.Shape.Textures; 3715 Primitive.TextureEntry tex = m_host.Shape.Textures;
3717 if (face == -1) 3716 if (face == -1)
3718 { 3717 {
3719 face = 0; 3718 face = 0;
@@ -3730,14 +3729,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3730 public string llGetOwnerKey(string id) 3729 public string llGetOwnerKey(string id)
3731 { 3730 {
3732 m_host.AddScriptLPS(1); 3731 m_host.AddScriptLPS(1);
3733 LLUUID key = new LLUUID(); 3732 UUID key = new UUID();
3734 if (LLUUID.TryParse(id, out key)) 3733 if (UUID.TryParse(id, out key))
3735 { 3734 {
3736 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3735 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString();
3737 } 3736 }
3738 else 3737 else
3739 { 3738 {
3740 return LLUUID.Zero.ToString(); 3739 return UUID.Zero.ToString();
3741 } 3740 }
3742 } 3741 }
3743 3742
@@ -3946,8 +3945,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3946 return 2; 3945 return 2;
3947 if (src.Data[index] is String) 3946 if (src.Data[index] is String)
3948 { 3947 {
3949 LLUUID tuuid; 3948 UUID tuuid;
3950 if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) 3949 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
3951 { 3950 {
3952 return 3; 3951 return 3;
3953 } 3952 }
@@ -4359,8 +4358,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4359 public string llKey2Name(string id) 4358 public string llKey2Name(string id)
4360 { 4359 {
4361 m_host.AddScriptLPS(1); 4360 m_host.AddScriptLPS(1);
4362 LLUUID key = new LLUUID(); 4361 UUID key = new UUID();
4363 if (LLUUID.TryParse(id,out key)) 4362 if (UUID.TryParse(id,out key))
4364 { 4363 {
4365 ScenePresence presence = World.GetScenePresence(key); 4364 ScenePresence presence = World.GetScenePresence(key);
4366 4365
@@ -4384,7 +4383,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4384 { 4383 {
4385 m_host.AddScriptLPS(1); 4384 m_host.AddScriptLPS(1);
4386 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); 4385 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
4387 pTexAnim.Flags =(uint) mode; 4386 pTexAnim.Flags = (Primitive.TextureAnimMode)mode;
4388 4387
4389 //ALL_SIDES 4388 //ALL_SIDES
4390 if (face == -1) 4389 if (face == -1)
@@ -4473,8 +4472,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4473 public LSL_Types.LSLInteger llOverMyLand(string id) 4472 public LSL_Types.LSLInteger llOverMyLand(string id)
4474 { 4473 {
4475 m_host.AddScriptLPS(1); 4474 m_host.AddScriptLPS(1);
4476 LLUUID key = new LLUUID(); 4475 UUID key = new UUID();
4477 if (LLUUID.TryParse(id,out key)) 4476 if (UUID.TryParse(id,out key))
4478 { 4477 {
4479 ScenePresence presence = World.GetScenePresence(key); 4478 ScenePresence presence = World.GetScenePresence(key);
4480 if (presence != null) // object is an avatar 4479 if (presence != null) // object is an avatar
@@ -4517,8 +4516,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4517 { 4516 {
4518 m_host.AddScriptLPS(1); 4517 m_host.AddScriptLPS(1);
4519 4518
4520 LLUUID key = new LLUUID(); 4519 UUID key = new UUID();
4521 if (LLUUID.TryParse(id, out key)) 4520 if (UUID.TryParse(id, out key))
4522 { 4521 {
4523 ScenePresence av = World.GetScenePresence(key); 4522 ScenePresence av = World.GetScenePresence(key);
4524 4523
@@ -4656,8 +4655,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4656 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); 4655 Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
4657 4656
4658 // TODO find out about the other defaults and add them here 4657 // TODO find out about the other defaults and add them here
4659 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4658 ps.PartStartColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4660 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4659 ps.PartEndColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4661 ps.PartStartScaleX = 1.0f; 4660 ps.PartStartScaleX = 1.0f;
4662 ps.PartStartScaleY = 1.0f; 4661 ps.PartStartScaleY = 1.0f;
4663 ps.PartEndScaleX = 1.0f; 4662 ps.PartEndScaleX = 1.0f;
@@ -4705,7 +4704,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4705 4704
4706 case (int)ScriptBaseClass.PSYS_PART_END_COLOR: 4705 case (int)ScriptBaseClass.PSYS_PART_END_COLOR:
4707 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 4706 tempv = (LSL_Types.Vector3)rules.Data[i + 1];
4708 //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); 4707 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1);
4709 4708
4710 prules.PartEndColor.R = (float)tempv.x; 4709 prules.PartEndColor.R = (float)tempv.x;
4711 prules.PartEndColor.G = (float)tempv.y; 4710 prules.PartEndColor.G = (float)tempv.y;
@@ -4784,8 +4783,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4784 break; 4783 break;
4785 4784
4786 case (int)ScriptBaseClass.PSYS_SRC_TARGET_KEY: 4785 case (int)ScriptBaseClass.PSYS_SRC_TARGET_KEY:
4787 LLUUID key = LLUUID.Zero; 4786 UUID key = UUID.Zero;
4788 if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) 4787 if (UUID.TryParse(rules.Data[i + 1].ToString(), out key))
4789 { 4788 {
4790 prules.Target = key; 4789 prules.Target = key;
4791 } 4790 }
@@ -4829,37 +4828,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4829 NotImplemented("llGroundRepel"); 4828 NotImplemented("llGroundRepel");
4830 } 4829 }
4831 4830
4832 private LLUUID GetTaskInventoryItem(string name) 4831 private UUID GetTaskInventoryItem(string name)
4833 { 4832 {
4834 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 4833 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
4835 { 4834 {
4836 if (inv.Value.Name == name) 4835 if (inv.Value.Name == name)
4837 return inv.Key; 4836 return inv.Key;
4838 } 4837 }
4839 return LLUUID.Zero; 4838 return UUID.Zero;
4840 } 4839 }
4841 4840
4842 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4841 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4843 { 4842 {
4844 m_host.AddScriptLPS(1); 4843 m_host.AddScriptLPS(1);
4845 4844
4846 LLUUID destID; 4845 UUID destID;
4847 if (!LLUUID.TryParse(destination, out destID)) 4846 if (!UUID.TryParse(destination, out destID))
4848 return; 4847 return;
4849 4848
4850 List<LLUUID> itemList = new List<LLUUID>(); 4849 List<UUID> itemList = new List<UUID>();
4851 4850
4852 foreach (Object item in inventory.Data) 4851 foreach (Object item in inventory.Data)
4853 { 4852 {
4854 LLUUID itemID; 4853 UUID itemID;
4855 if (LLUUID.TryParse(item.ToString(), out itemID)) 4854 if (UUID.TryParse(item.ToString(), out itemID))
4856 { 4855 {
4857 itemList.Add(itemID); 4856 itemList.Add(itemID);
4858 } 4857 }
4859 else 4858 else
4860 { 4859 {
4861 itemID = GetTaskInventoryItem(item.ToString()); 4860 itemID = GetTaskInventoryItem(item.ToString());
4862 if (itemID != LLUUID.Zero) 4861 if (itemID != UUID.Zero)
4863 itemList.Add(itemID); 4862 itemList.Add(itemID);
4864 } 4863 }
4865 } 4864 }
@@ -4920,7 +4919,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4920 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 4919 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
4921 4920
4922 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 4921 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
4923 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z); 4922 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
4924 } 4923 }
4925 4924
4926 public string llAvatarOnSitTarget() 4925 public string llAvatarOnSitTarget()
@@ -4932,12 +4931,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4932 public void llAddToLandPassList(string avatar, double hours) 4931 public void llAddToLandPassList(string avatar, double hours)
4933 { 4932 {
4934 m_host.AddScriptLPS(1); 4933 m_host.AddScriptLPS(1);
4935 LLUUID key; 4934 UUID key;
4936 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 4935 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4937 if (land.OwnerID == m_host.OwnerID) 4936 if (land.OwnerID == m_host.OwnerID)
4938 { 4937 {
4939 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 4938 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
4940 if (LLUUID.TryParse(avatar, out key)) 4939 if (UUID.TryParse(avatar, out key))
4941 { 4940 {
4942 entry.AgentID = key; 4941 entry.AgentID = key;
4943 entry.Flags = ParcelManager.AccessList.Access; 4942 entry.Flags = ParcelManager.AccessList.Access;
@@ -4963,13 +4962,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4963 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 4962 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
4964 { 4963 {
4965 m_host.AddScriptLPS(1); 4964 m_host.AddScriptLPS(1);
4966 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 4965 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
4967 } 4966 }
4968 4967
4969 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 4968 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
4970 { 4969 {
4971 m_host.AddScriptLPS(1); 4970 m_host.AddScriptLPS(1);
4972 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 4971 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
4973 } 4972 }
4974 4973
4975 public string llDumpList2String(LSL_Types.list src, string seperator) 4974 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -4991,7 +4990,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4991 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 4990 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos)
4992 { 4991 {
4993 m_host.AddScriptLPS(1); 4992 m_host.AddScriptLPS(1);
4994 bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); 4993 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
4995 if (result) 4994 if (result)
4996 { 4995 {
4997 return 1; 4996 return 1;
@@ -5006,8 +5005,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5006 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5005 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
5007 { 5006 {
5008 m_host.AddScriptLPS(1); 5007 m_host.AddScriptLPS(1);
5009 LLUUID av = new LLUUID(); 5008 UUID av = new UUID();
5010 if (!LLUUID.TryParse(avatar,out av)) 5009 if (!UUID.TryParse(avatar,out av))
5011 { 5010 {
5012 LSLError("First parameter to llDialog needs to be a key"); 5011 LSLError("First parameter to llDialog needs to be a key");
5013 return; 5012 return;
@@ -5032,7 +5031,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5032 } 5031 }
5033 buts[i] = buttons.Data[i].ToString(); 5032 buts[i] = buttons.Data[i].ToString();
5034 } 5033 }
5035 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 5034 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
5036 // ScriptSleep(1000); 5035 // ScriptSleep(1000);
5037 } 5036 }
5038 5037
@@ -5049,11 +5048,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5049 5048
5050 public void llResetOtherScript(string name) 5049 public void llResetOtherScript(string name)
5051 { 5050 {
5052 LLUUID item; 5051 UUID item;
5053 5052
5054 m_host.AddScriptLPS(1); 5053 m_host.AddScriptLPS(1);
5055 5054
5056 if ((item = ScriptByName(name)) != LLUUID.Zero) 5055 if ((item = ScriptByName(name)) != UUID.Zero)
5057 m_ScriptEngine.ResetScript(item); 5056 m_ScriptEngine.ResetScript(item);
5058 else 5057 else
5059 ShoutError("llResetOtherScript: script "+name+" not found"); 5058 ShoutError("llResetOtherScript: script "+name+" not found");
@@ -5061,11 +5060,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5061 5060
5062 public LSL_Types.LSLInteger llGetScriptState(string name) 5061 public LSL_Types.LSLInteger llGetScriptState(string name)
5063 { 5062 {
5064 LLUUID item; 5063 UUID item;
5065 5064
5066 m_host.AddScriptLPS(1); 5065 m_host.AddScriptLPS(1);
5067 5066
5068 if ((item = ScriptByName(name)) != LLUUID.Zero) 5067 if ((item = ScriptByName(name)) != UUID.Zero)
5069 { 5068 {
5070 return m_ScriptEngine.GetScriptState(item) ?1:0; 5069 return m_ScriptEngine.GetScriptState(item) ?1:0;
5071 } 5070 }
@@ -5095,10 +5094,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5095 { 5094 {
5096 m_host.AddScriptLPS(1); 5095 m_host.AddScriptLPS(1);
5097 bool found = false; 5096 bool found = false;
5098 LLUUID destId = LLUUID.Zero; 5097 UUID destId = UUID.Zero;
5099 LLUUID srcId = LLUUID.Zero; 5098 UUID srcId = UUID.Zero;
5100 5099
5101 if (!LLUUID.TryParse(target, out destId)) 5100 if (!UUID.TryParse(target, out destId))
5102 { 5101 {
5103 llSay(0, "Could not parse key " + target); 5102 llSay(0, "Could not parse key " + target);
5104 return; 5103 return;
@@ -5111,7 +5110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5111 } 5110 }
5112 5111
5113 // copy the first script found with this inventory name 5112 // copy the first script found with this inventory name
5114 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 5113 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
5115 { 5114 {
5116 if (inv.Value.Name == name) 5115 if (inv.Value.Name == name)
5117 { 5116 {
@@ -5143,8 +5142,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5143 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5142 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
5144 if (xmlrpcMod.IsEnabled()) 5143 if (xmlrpcMod.IsEnabled())
5145 { 5144 {
5146 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); 5145 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5147 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5146 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
5148 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 5147 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
5149 "remote_data", resobj, 5148 "remote_data", resobj,
5150 new DetectParams[0])); 5149 new DetectParams[0]));
@@ -5464,9 +5463,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5464 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) 5463 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type)
5465 { 5464 {
5466 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5465 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5467 LLUUID sculptId; 5466 UUID sculptId;
5468 5467
5469 if (!LLUUID.TryParse(map, out sculptId)) 5468 if (!UUID.TryParse(map, out sculptId))
5470 { 5469 {
5471 llSay(0, "Could not parse key " + map); 5470 llSay(0, "Could not parse key " + map);
5472 return; 5471 return;
@@ -5896,9 +5895,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5896 ScenePresence av = World.GetScenePresence(id); 5895 ScenePresence av = World.GetScenePresence(id);
5897 if (av == null) 5896 if (av == null)
5898 return l; 5897 return l;
5899 LLUUID[] anims; 5898 UUID[] anims;
5900 anims = av.GetAnimationArray(); 5899 anims = av.GetAnimationArray();
5901 foreach (LLUUID foo in anims) 5900 foreach (UUID foo in anims)
5902 l.Add(foo.ToString()); 5901 l.Add(foo.ToString());
5903 return l; 5902 return l;
5904 } 5903 }
@@ -5906,8 +5905,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5906 public void llSetParcelMusicURL(string url) 5905 public void llSetParcelMusicURL(string url)
5907 { 5906 {
5908 m_host.AddScriptLPS(1); 5907 m_host.AddScriptLPS(1);
5909 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 5908 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
5910 if (landowner == LLUUID.Zero) 5909 if (landowner == UUID.Zero)
5911 { 5910 {
5912 return; 5911 return;
5913 } 5912 }
@@ -5922,9 +5921,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5922 public void osSetParcelMediaURL(string url) 5921 public void osSetParcelMediaURL(string url)
5923 { 5922 {
5924 m_host.AddScriptLPS(1); 5923 m_host.AddScriptLPS(1);
5925 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 5924 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
5926 5925
5927 if (landowner == LLUUID.Zero) 5926 if (landowner == UUID.Zero)
5928 { 5927 {
5929 return; 5928 return;
5930 } 5929 }
@@ -5978,8 +5977,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5978 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 5977 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
5979 if (linknumber > -1) 5978 if (linknumber > -1)
5980 { 5979 {
5981 LLObject.TextureEntry tex = part.Shape.Textures; 5980 Primitive.TextureEntry tex = part.Shape.Textures;
5982 LLColor texcolor; 5981 Color4 texcolor;
5983 if (face > -1) 5982 if (face > -1)
5984 { 5983 {
5985 texcolor = tex.CreateFace((uint)face).RGBA; 5984 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6017,8 +6016,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6017 { 6016 {
6018 linknumber = w; 6017 linknumber = w;
6019 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6018 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6020 LLObject.TextureEntry tex = part.Shape.Textures; 6019 Primitive.TextureEntry tex = part.Shape.Textures;
6021 LLColor texcolor; 6020 Color4 texcolor;
6022 if (face > -1) 6021 if (face > -1)
6023 { 6022 {
6024 texcolor = tex.CreateFace((uint)face).RGBA; 6023 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6086,21 +6085,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6086 break; 6085 break;
6087 6086
6088 case (int)ScriptBaseClass.PRIM_PHYSICS: 6087 case (int)ScriptBaseClass.PRIM_PHYSICS:
6089 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 6088 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6090 res.Add(new LSL_Types.LSLInteger(1)); 6089 res.Add(new LSL_Types.LSLInteger(1));
6091 else 6090 else
6092 res.Add(new LSL_Types.LSLInteger(0)); 6091 res.Add(new LSL_Types.LSLInteger(0));
6093 break; 6092 break;
6094 6093
6095 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 6094 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
6096 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 6095 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6097 res.Add(new LSL_Types.LSLInteger(1)); 6096 res.Add(new LSL_Types.LSLInteger(1));
6098 else 6097 else
6099 res.Add(new LSL_Types.LSLInteger(0)); 6098 res.Add(new LSL_Types.LSLInteger(0));
6100 break; 6099 break;
6101 6100
6102 case (int)ScriptBaseClass.PRIM_PHANTOM: 6101 case (int)ScriptBaseClass.PRIM_PHANTOM:
6103 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 6102 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6104 res.Add(new LSL_Types.LSLInteger(1)); 6103 res.Add(new LSL_Types.LSLInteger(1));
6105 else 6104 else
6106 res.Add(new LSL_Types.LSLInteger(0)); 6105 res.Add(new LSL_Types.LSLInteger(0));
@@ -6205,8 +6204,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6205 if (face == -1) 6204 if (face == -1)
6206 face = 0; 6205 face = 0;
6207 6206
6208 LLObject.TextureEntry tex = m_host.Shape.Textures; 6207 Primitive.TextureEntry tex = m_host.Shape.Textures;
6209 LLObject.TextureEntryFace texface = tex.GetFace((uint)face); 6208 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6210 6209
6211 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6210 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString()));
6212 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6211 res.Add(new LSL_Types.Vector3(texface.RepeatU,
@@ -6225,7 +6224,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6225 face=Convert.ToInt32(rules.Data[idx++].ToString()); 6224 face=Convert.ToInt32(rules.Data[idx++].ToString());
6226 6225
6227 tex = m_host.Shape.Textures; 6226 tex = m_host.Shape.Textures;
6228 LLColor texcolor; 6227 Color4 texcolor;
6229 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 6228 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
6230 texcolor = tex.DefaultTexture.RGBA; 6229 texcolor = tex.DefaultTexture.RGBA;
6231 else 6230 else
@@ -6579,7 +6578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6579 public void llSetLocalRot(LSL_Types.Quaternion rot) 6578 public void llSetLocalRot(LSL_Types.Quaternion rot)
6580 { 6579 {
6581 m_host.AddScriptLPS(1); 6580 m_host.AddScriptLPS(1);
6582 m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 6581 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
6583 // ScriptSleep(200); 6582 // ScriptSleep(200);
6584 } 6583 }
6585 6584
@@ -6835,7 +6834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6835 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 6834 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask)
6836 { 6835 {
6837 m_host.AddScriptLPS(1); 6836 m_host.AddScriptLPS(1);
6838 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6837 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6839 { 6838 {
6840 if (inv.Value.Name == item) 6839 if (inv.Value.Name == item)
6841 { 6840 {
@@ -6866,7 +6865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6866 public string llGetInventoryCreator(string item) 6865 public string llGetInventoryCreator(string item)
6867 { 6866 {
6868 m_host.AddScriptLPS(1); 6867 m_host.AddScriptLPS(1);
6869 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6868 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6870 { 6869 {
6871 if (inv.Value.Name == item) 6870 if (inv.Value.Name == item)
6872 { 6871 {
@@ -6881,7 +6880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6881 { 6880 {
6882 m_host.AddScriptLPS(1); 6881 m_host.AddScriptLPS(1);
6883 6882
6884 World.SimChatBroadcast(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 6883 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
6885// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 6884// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
6886// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 6885// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
6887 } 6886 }
@@ -6902,7 +6901,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6902 if (info == null) 6901 if (info == null)
6903 { 6902 {
6904 // ScriptSleep(1000); 6903 // ScriptSleep(1000);
6905 return LLUUID.Zero.ToString(); 6904 return UUID.Zero.ToString();
6906 } 6905 }
6907 reply = new LSL_Types.Vector3( 6906 reply = new LSL_Types.Vector3(
6908 info.RegionLocX * Constants.RegionSize, 6907 info.RegionLocX * Constants.RegionSize,
@@ -6919,7 +6918,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6919 if (info == null) 6918 if (info == null)
6920 { 6919 {
6921 // ScriptSleep(1000); 6920 // ScriptSleep(1000);
6922 return LLUUID.Zero.ToString(); 6921 return UUID.Zero.ToString();
6923 } 6922 }
6924 int access = info.RegionSettings.Maturity; 6923 int access = info.RegionSettings.Maturity;
6925 if (access == 0) 6924 if (access == 0)
@@ -6934,11 +6933,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6934 break; 6933 break;
6935 default: 6934 default:
6936 // ScriptSleep(1000); 6935 // ScriptSleep(1000);
6937 return LLUUID.Zero.ToString(); // Raise no event 6936 return UUID.Zero.ToString(); // Raise no event
6938 } 6937 }
6939 LLUUID rq = LLUUID.Random(); 6938 UUID rq = UUID.Random();
6940 6939
6941 LLUUID tid = AsyncCommands. 6940 UUID tid = AsyncCommands.
6942 DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString()); 6941 DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString());
6943 6942
6944 AsyncCommands. 6943 AsyncCommands.
@@ -6950,7 +6949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6950 catch(Exception e) 6949 catch(Exception e)
6951 { 6950 {
6952 Console.WriteLine(e.ToString()); 6951 Console.WriteLine(e.ToString());
6953 return LLUUID.Zero.ToString(); 6952 return UUID.Zero.ToString();
6954 } 6953 }
6955 } 6954 }
6956 6955
@@ -6963,8 +6962,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6963 public double llGetObjectMass(string id) 6962 public double llGetObjectMass(string id)
6964 { 6963 {
6965 m_host.AddScriptLPS(1); 6964 m_host.AddScriptLPS(1);
6966 LLUUID key = new LLUUID(); 6965 UUID key = new UUID();
6967 if (LLUUID.TryParse(id,out key)) 6966 if (UUID.TryParse(id,out key))
6968 { 6967 {
6969 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); 6968 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass();
6970 } 6969 }
@@ -7056,7 +7055,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7056 public void llLoadURL(string avatar_id, string message, string url) 7055 public void llLoadURL(string avatar_id, string message, string url)
7057 { 7056 {
7058 m_host.AddScriptLPS(1); 7057 m_host.AddScriptLPS(1);
7059 LLUUID avatarId = new LLUUID(avatar_id); 7058 UUID avatarId = new UUID(avatar_id);
7060 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, 7059 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
7061 url); 7060 url);
7062 // ScriptSleep(10000); 7061 // ScriptSleep(10000);
@@ -7202,7 +7201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7202 public LSL_Types.LSLInteger llGetInventoryType(string name) 7201 public LSL_Types.LSLInteger llGetInventoryType(string name)
7203 { 7202 {
7204 m_host.AddScriptLPS(1); 7203 m_host.AddScriptLPS(1);
7205 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7204 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
7206 { 7205 {
7207 if (inv.Value.Name == name) 7206 if (inv.Value.Name == name)
7208 { 7207 {
@@ -7231,10 +7230,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7231 public LSL_Types.Vector3 llGetCameraPos() 7230 public LSL_Types.Vector3 llGetCameraPos()
7232 { 7231 {
7233 m_host.AddScriptLPS(1); 7232 m_host.AddScriptLPS(1);
7234 LLUUID invItemID=InventorySelf(); 7233 UUID invItemID=InventorySelf();
7235 if (invItemID == LLUUID.Zero) 7234 if (invItemID == UUID.Zero)
7236 return new LSL_Types.Vector3(); 7235 return new LSL_Types.Vector3();
7237 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 7236 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7238 return new LSL_Types.Vector3(); 7237 return new LSL_Types.Vector3();
7239 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) 7238 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
7240 { 7239 {
@@ -7244,7 +7243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7244 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7243 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7245 if (presence != null) 7244 if (presence != null)
7246 { 7245 {
7247 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); 7246 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z);
7248 return pos; 7247 return pos;
7249 } 7248 }
7250 return new LSL_Types.Vector3(); 7249 return new LSL_Types.Vector3();
@@ -7307,12 +7306,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7307 public void llAddToLandBanList(string avatar, double hours) 7306 public void llAddToLandBanList(string avatar, double hours)
7308 { 7307 {
7309 m_host.AddScriptLPS(1); 7308 m_host.AddScriptLPS(1);
7310 LLUUID key; 7309 UUID key;
7311 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7310 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7312 if (land.OwnerID == m_host.OwnerID) 7311 if (land.OwnerID == m_host.OwnerID)
7313 { 7312 {
7314 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 7313 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
7315 if (LLUUID.TryParse(avatar, out key)) 7314 if (UUID.TryParse(avatar, out key))
7316 { 7315 {
7317 entry.AgentID = key; 7316 entry.AgentID = key;
7318 entry.Flags = ParcelManager.AccessList.Ban; 7317 entry.Flags = ParcelManager.AccessList.Ban;
@@ -7326,11 +7325,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7326 public void llRemoveFromLandPassList(string avatar) 7325 public void llRemoveFromLandPassList(string avatar)
7327 { 7326 {
7328 m_host.AddScriptLPS(1); 7327 m_host.AddScriptLPS(1);
7329 LLUUID key; 7328 UUID key;
7330 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7329 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7331 if (land.OwnerID == m_host.OwnerID) 7330 if (land.OwnerID == m_host.OwnerID)
7332 { 7331 {
7333 if (LLUUID.TryParse(avatar, out key)) 7332 if (UUID.TryParse(avatar, out key))
7334 { 7333 {
7335 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7334 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7336 { 7335 {
@@ -7348,11 +7347,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7348 public void llRemoveFromLandBanList(string avatar) 7347 public void llRemoveFromLandBanList(string avatar)
7349 { 7348 {
7350 m_host.AddScriptLPS(1); 7349 m_host.AddScriptLPS(1);
7351 LLUUID key; 7350 UUID key;
7352 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7351 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7353 if (land.OwnerID == m_host.OwnerID) 7352 if (land.OwnerID == m_host.OwnerID)
7354 { 7353 {
7355 if (LLUUID.TryParse(avatar, out key)) 7354 if (UUID.TryParse(avatar, out key))
7356 { 7355 {
7357 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7356 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7358 { 7357 {
@@ -7372,16 +7371,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7372 m_host.AddScriptLPS(1); 7371 m_host.AddScriptLPS(1);
7373 7372
7374 // our key in the object we are in 7373 // our key in the object we are in
7375 LLUUID invItemID=InventorySelf(); 7374 UUID invItemID=InventorySelf();
7376 if (invItemID == LLUUID.Zero) return; 7375 if (invItemID == UUID.Zero) return;
7377 7376
7378 // the object we are in 7377 // the object we are in
7379 LLUUID objectID = m_host.ParentUUID; 7378 UUID objectID = m_host.ParentUUID;
7380 if (objectID == LLUUID.Zero) return; 7379 if(objectID == UUID.Zero) return;
7381 7380
7382 // we need the permission first, to know which avatar we want to set the camera for 7381 // we need the permission first, to know which avatar we want to set the camera for
7383 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7382 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7384 if (agentID == LLUUID.Zero) return; 7383 if (agentID == UUID.Zero) return;
7385 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7384 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7386 7385
7387 ScenePresence presence = World.GetScenePresence(agentID); 7386 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7423,16 +7422,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7423 m_host.AddScriptLPS(1); 7422 m_host.AddScriptLPS(1);
7424 7423
7425 // our key in the object we are in 7424 // our key in the object we are in
7426 LLUUID invItemID=InventorySelf(); 7425 UUID invItemID=InventorySelf();
7427 if (invItemID == LLUUID.Zero) return; 7426 if (invItemID == UUID.Zero) return;
7428 7427
7429 // the object we are in 7428 // the object we are in
7430 LLUUID objectID = m_host.ParentUUID; 7429 UUID objectID = m_host.ParentUUID;
7431 if (objectID == LLUUID.Zero) return; 7430 if(objectID == UUID.Zero) return;
7432 7431
7433 // we need the permission first, to know which avatar we want to clear the camera for 7432 // we need the permission first, to know which avatar we want to clear the camera for
7434 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7433 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7435 if (agentID == LLUUID.Zero) return; 7434 if (agentID == UUID.Zero) return;
7436 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7435 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7437 7436
7438 ScenePresence presence = World.GetScenePresence(agentID); 7437 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7531,9 +7530,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7531 param.Add(o.ToString()); 7530 param.Add(o.ToString());
7532 } 7531 }
7533 7532
7534 LLVector3 position = m_host.AbsolutePosition; 7533 Vector3 position = m_host.AbsolutePosition;
7535 LLVector3 velocity = m_host.Velocity; 7534 Vector3 velocity = m_host.Velocity;
7536 LLQuaternion rotation = m_host.RotationOffset; 7535 Quaternion rotation = m_host.RotationOffset;
7537 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 7536 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner);
7538 RegionInfo regionInfo = World.RegionInfo; 7537 RegionInfo regionInfo = World.RegionInfo;
7539 7538
@@ -7549,10 +7548,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7549 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; 7548 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name;
7550 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 7549 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString();
7551 7550
7552 LLUUID reqID = httpScriptMod. 7551 UUID reqID = httpScriptMod.
7553 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); 7552 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body);
7554 7553
7555 if (reqID != LLUUID.Zero) 7554 if (reqID != UUID.Zero)
7556 return reqID.ToString(); 7555 return reqID.ToString();
7557 else 7556 else
7558 return null; 7557 return null;
@@ -7662,7 +7661,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7662 LSL_Types.list ret = new LSL_Types.list(); 7661 LSL_Types.list ret = new LSL_Types.list();
7663 if (land != null) 7662 if (land != null)
7664 { 7663 {
7665 foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners()) 7664 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
7666 { 7665 {
7667 ret.Add(d.Key.ToString()); 7666 ret.Add(d.Key.ToString());
7668 ret.Add(d.Value); 7667 ret.Add(d.Value);
@@ -7675,7 +7674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7675 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 7674 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id)
7676 { 7675 {
7677 m_host.AddScriptLPS(1); 7676 m_host.AddScriptLPS(1);
7678 SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); 7677 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
7679 if (part == null) 7678 if (part == null)
7680 { 7679 {
7681 return 0; 7680 return 0;
@@ -7781,8 +7780,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7781 { 7780 {
7782 m_host.AddScriptLPS(1); 7781 m_host.AddScriptLPS(1);
7783 LSL_Types.list ret = new LSL_Types.list(); 7782 LSL_Types.list ret = new LSL_Types.list();
7784 LLUUID key = new LLUUID(); 7783 UUID key = new UUID();
7785 if (LLUUID.TryParse(id, out key)) 7784 if (UUID.TryParse(id, out key))
7786 { 7785 {
7787 ScenePresence av = World.GetScenePresence(key); 7786 ScenePresence av = World.GetScenePresence(key);
7788 7787
@@ -7802,19 +7801,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7802 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 7801 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
7803 break; 7802 break;
7804 case "4": 7803 case "4":
7805 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); 7804 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
7806 break; 7805 break;
7807 case "5": 7806 case "5":
7808 ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); 7807 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
7809 break; 7808 break;
7810 case "6": 7809 case "6":
7811 ret.Add(id); 7810 ret.Add(id);
7812 break; 7811 break;
7813 case "7": 7812 case "7":
7814 ret.Add(LLUUID.Zero.ToString()); 7813 ret.Add(UUID.Zero.ToString());
7815 break; 7814 break;
7816 case "8": 7815 case "8":
7817 ret.Add(LLUUID.Zero.ToString()); 7816 ret.Add(UUID.Zero.ToString());
7818 break; 7817 break;
7819 } 7818 }
7820 } 7819 }
@@ -7834,7 +7833,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7834 ret.Add(obj.Description); 7833 ret.Add(obj.Description);
7835 break; 7834 break;
7836 case "3": 7835 case "3":
7837 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); 7836 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
7838 break; 7837 break;
7839 case "4": 7838 case "4":
7840 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 7839 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
@@ -7860,14 +7859,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7860 } 7859 }
7861 7860
7862 7861
7863 internal LLUUID ScriptByName(string name) 7862 internal UUID ScriptByName(string name)
7864 { 7863 {
7865 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 7864 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
7866 { 7865 {
7867 if (item.Type == 10 && item.Name == name) 7866 if (item.Type == 10 && item.Name == name)
7868 return item.ItemID; 7867 return item.ItemID;
7869 } 7868 }
7870 return LLUUID.Zero; 7869 return UUID.Zero;
7871 } 7870 }
7872 7871
7873 internal void ShoutError(string msg) 7872 internal void ShoutError(string msg)
@@ -7893,10 +7892,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7893 throw new Exception("LSL Runtime Error: " + msg); 7892 throw new Exception("LSL Runtime Error: " + msg);
7894 } 7893 }
7895 7894
7896 public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset); 7895 public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
7897 private void WithNotecard(LLUUID assetID, AssetRequestCallback cb) 7896 private void WithNotecard(UUID assetID, AssetRequestCallback cb)
7898 { 7897 {
7899 World.AssetCache.GetAsset(assetID, delegate(LLUUID i, AssetBase a) { cb(i, a); }, false); 7898 World.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
7900 } 7899 }
7901 7900
7902 public string llGetNumberOfNotecardLines(string name) 7901 public string llGetNumberOfNotecardLines(string name)
@@ -7907,7 +7906,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7907 { 7906 {
7908 if (item.Type == 7 && item.Name == name) 7907 if (item.Type == 7 && item.Name == name)
7909 { 7908 {
7910 LLUUID tid = AsyncCommands. 7909 UUID tid = AsyncCommands.
7911 DataserverPlugin.RegisterRequest(m_localID, 7910 DataserverPlugin.RegisterRequest(m_localID,
7912 m_itemID, item.AssetID.ToString()); 7911 m_itemID, item.AssetID.ToString());
7913 if (NotecardCache.IsCached(item.AssetID)) 7912 if (NotecardCache.IsCached(item.AssetID))
@@ -7918,7 +7917,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7918 // ScriptSleep(100); 7917 // ScriptSleep(100);
7919 return tid.ToString(); 7918 return tid.ToString();
7920 } 7919 }
7921 WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) 7920 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
7922 { 7921 {
7923 System.Text.ASCIIEncoding enc = 7922 System.Text.ASCIIEncoding enc =
7924 new System.Text.ASCIIEncoding(); 7923 new System.Text.ASCIIEncoding();
@@ -7934,7 +7933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7934 } 7933 }
7935 } 7934 }
7936 // ScriptSleep(100); 7935 // ScriptSleep(100);
7937 return LLUUID.Zero.ToString(); 7936 return UUID.Zero.ToString();
7938 } 7937 }
7939 7938
7940 public string llGetNotecardLine(string name, int line) 7939 public string llGetNotecardLine(string name, int line)
@@ -7945,7 +7944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7945 { 7944 {
7946 if (item.Type == 7 && item.Name == name) 7945 if (item.Type == 7 && item.Name == name)
7947 { 7946 {
7948 LLUUID tid = AsyncCommands. 7947 UUID tid = AsyncCommands.
7949 DataserverPlugin.RegisterRequest(m_localID, 7948 DataserverPlugin.RegisterRequest(m_localID,
7950 m_itemID, item.AssetID.ToString()); 7949 m_itemID, item.AssetID.ToString());
7951 if (NotecardCache.IsCached(item.AssetID)) 7950 if (NotecardCache.IsCached(item.AssetID))
@@ -7956,7 +7955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7956 // ScriptSleep(100); 7955 // ScriptSleep(100);
7957 return tid.ToString(); 7956 return tid.ToString();
7958 } 7957 }
7959 WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) 7958 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
7960 { 7959 {
7961 System.Text.ASCIIEncoding enc = 7960 System.Text.ASCIIEncoding enc =
7962 new System.Text.ASCIIEncoding(); 7961 new System.Text.ASCIIEncoding();
@@ -7987,10 +7986,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7987 public DateTime lastRef; 7986 public DateTime lastRef;
7988 } 7987 }
7989 7988
7990 private static Dictionary<LLUUID, Notecard> m_Notecards = 7989 private static Dictionary<UUID, Notecard> m_Notecards =
7991 new Dictionary<LLUUID, Notecard>(); 7990 new Dictionary<UUID, Notecard>();
7992 7991
7993 public static void Cache(LLUUID assetID, string text) 7992 public static void Cache(UUID assetID, string text)
7994 { 7993 {
7995 CacheCheck(); 7994 CacheCheck();
7996 7995
@@ -8081,7 +8080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8081 return output.ToArray(); 8080 return output.ToArray();
8082 } 8081 }
8083 8082
8084 public static bool IsCached(LLUUID assetID) 8083 public static bool IsCached(UUID assetID)
8085 { 8084 {
8086 lock (m_Notecards) 8085 lock (m_Notecards)
8087 { 8086 {
@@ -8089,7 +8088,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8089 } 8088 }
8090 } 8089 }
8091 8090
8092 public static int GetLines(LLUUID assetID) 8091 public static int GetLines(UUID assetID)
8093 { 8092 {
8094 if (!IsCached(assetID)) 8093 if (!IsCached(assetID))
8095 return -1; 8094 return -1;
@@ -8101,7 +8100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8101 } 8100 }
8102 } 8101 }
8103 8102
8104 public static string GetLine(LLUUID assetID, int line) 8103 public static string GetLine(UUID assetID, int line)
8105 { 8104 {
8106 if (line < 0) 8105 if (line < 0)
8107 return ""; 8106 return "";
@@ -8128,7 +8127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8128 8127
8129 public static void CacheCheck() 8128 public static void CacheCheck()
8130 { 8129 {
8131 foreach (LLUUID key in new List<LLUUID>(m_Notecards.Keys)) 8130 foreach (UUID key in new List<UUID>(m_Notecards.Keys))
8132 { 8131 {
8133 Notecard nc = m_Notecards[key]; 8132 Notecard nc = m_Notecards[key];
8134 if (nc.lastRef.AddSeconds(30) < DateTime.Now) 8133 if (nc.lastRef.AddSeconds(30) < DateTime.Now)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 257b17b..0f598ea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -26,8 +26,7 @@
26 */ 26 */
27using System; 27using System;
28using System.Runtime.Remoting.Lifetime; 28using System.Runtime.Remoting.Lifetime;
29using Axiom.Math; 29using OpenMetaverse;
30using libsecondlife;
31using Nini.Config; 30using Nini.Config;
32using OpenSim.Framework.Console; 31using OpenSim.Framework.Console;
33using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
@@ -46,9 +45,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
46 internal IScriptEngine m_ScriptEngine; 45 internal IScriptEngine m_ScriptEngine;
47 internal SceneObjectPart m_host; 46 internal SceneObjectPart m_host;
48 internal uint m_localID; 47 internal uint m_localID;
49 internal LLUUID m_itemID; 48 internal UUID m_itemID;
50 49
51 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 50 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
52 { 51 {
53 m_ScriptEngine = ScriptEngine; 52 m_ScriptEngine = ScriptEngine;
54 m_host = host; 53 m_host = host;
@@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
86 if (x > 255 || x < 0 || y > 255 || y < 0) 85 if (x > 255 || x < 0 || y > 255 || y < 0)
87 OSSLError("osTerrainSetHeight: Coordinate out of bounds"); 86 OSSLError("osTerrainSetHeight: Coordinate out of bounds");
88 87
89 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) 88 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
90 { 89 {
91 World.Heightmap[x, y] = val; 90 World.Heightmap[x, y] = val;
92 return 1; 91 return 1;
@@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
144 World.SendGeneralAlert(msg); 143 World.SendGeneralAlert(msg);
145 } 144 }
146 145
147 public void osSetRot(LLUUID target, Quaternion rotation) 146 public void osSetRot(UUID target, Quaternion rotation)
148 { 147 {
149 if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) 148 if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
150 { 149 {
@@ -176,7 +175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
176 if (dynamicID == String.Empty) 175 if (dynamicID == String.Empty)
177 { 176 {
178 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 177 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
179 LLUUID createdTexture = 178 UUID createdTexture =
180 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 179 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
181 extraParams, timer); 180 extraParams, timer);
182 return createdTexture.ToString(); 181 return createdTexture.ToString();
@@ -186,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
186 //TODO update existing dynamic textures 185 //TODO update existing dynamic textures
187 } 186 }
188 187
189 return LLUUID.Zero.ToString(); 188 return UUID.Zero.ToString();
190 } 189 }
191 190
192 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 191 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
@@ -202,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
202 if (dynamicID == String.Empty) 201 if (dynamicID == String.Empty)
203 { 202 {
204 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 203 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
205 LLUUID createdTexture = 204 UUID createdTexture =
206 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 205 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
207 extraParams, timer, true, (byte) alpha); 206 extraParams, timer, true, (byte) alpha);
208 return createdTexture.ToString(); 207 return createdTexture.ToString();
@@ -212,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
212 //TODO update existing dynamic textures 211 //TODO update existing dynamic textures
213 } 212 }
214 213
215 return LLUUID.Zero.ToString(); 214 return UUID.Zero.ToString();
216 } 215 }
217 216
218 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, 217 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
@@ -230,7 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
230 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 229 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
231 if (textureManager != null) 230 if (textureManager != null)
232 { 231 {
233 LLUUID createdTexture = 232 UUID createdTexture =
234 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 233 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
235 extraParams, timer); 234 extraParams, timer);
236 return createdTexture.ToString(); 235 return createdTexture.ToString();
@@ -241,7 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
241 //TODO update existing dynamic textures 240 //TODO update existing dynamic textures
242 } 241 }
243 242
244 return LLUUID.Zero.ToString(); 243 return UUID.Zero.ToString();
245 } 244 }
246 245
247 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, 246 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
259 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 258 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
260 if (textureManager != null) 259 if (textureManager != null)
261 { 260 {
262 LLUUID createdTexture = 261 UUID createdTexture =
263 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 262 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
264 extraParams, timer, true, (byte) alpha); 263 extraParams, timer, true, (byte) alpha);
265 return createdTexture.ToString(); 264 return createdTexture.ToString();
@@ -270,7 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
270 //TODO update existing dynamic textures 269 //TODO update existing dynamic textures
271 } 270 }
272 271
273 return LLUUID.Zero.ToString(); 272 return UUID.Zero.ToString();
274 } 273 }
275 274
276 public bool osConsoleCommand(string command) 275 public bool osConsoleCommand(string command)
@@ -539,9 +538,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
539 } 538 }
540 539
541 m_host.AddScriptLPS(1); 540 m_host.AddScriptLPS(1);
542 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 541 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
543 542
544 if (landowner == LLUUID.Zero) 543 if (landowner == UUID.Zero)
545 { 544 {
546 return; 545 return;
547 } 546 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
index 52d277e..7300f10 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Region.ScriptEngine.Shared; 32using OpenSim.Region.ScriptEngine.Shared;
33using OpenSim.Region.ScriptEngine.Shared.Api; 33using OpenSim.Region.ScriptEngine.Shared.Api;
34 34
@@ -49,28 +49,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
49 private class DataserverRequest 49 private class DataserverRequest
50 { 50 {
51 public uint localID; 51 public uint localID;
52 public LLUUID itemID; 52 public UUID itemID;
53 53
54 public LLUUID ID; 54 public UUID ID;
55 public string handle; 55 public string handle;
56 56
57 public DateTime startTime; 57 public DateTime startTime;
58 } 58 }
59 59
60 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 60 public UUID RegisterRequest(uint localID, UUID itemID,
61 string identifier) 61 string identifier)
62 { 62 {
63 lock (DataserverRequests) 63 lock (DataserverRequests)
64 { 64 {
65 if (DataserverRequests.ContainsKey(identifier)) 65 if (DataserverRequests.ContainsKey(identifier))
66 return LLUUID.Zero; 66 return UUID.Zero;
67 67
68 DataserverRequest ds = new DataserverRequest(); 68 DataserverRequest ds = new DataserverRequest();
69 69
70 ds.localID = localID; 70 ds.localID = localID;
71 ds.itemID = itemID; 71 ds.itemID = itemID;
72 72
73 ds.ID = LLUUID.Random(); 73 ds.ID = UUID.Random();
74 ds.handle = identifier; 74 ds.handle = identifier;
75 75
76 ds.startTime = DateTime.Now; 76 ds.startTime = DateTime.Now;
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
101 new DetectParams[0])); 101 new DetectParams[0]));
102 } 102 }
103 103
104 public void RemoveEvents(uint localID, LLUUID itemID) 104 public void RemoveEvents(uint localID, UUID itemID)
105 { 105 {
106 lock (DataserverRequests) 106 lock (DataserverRequests)
107 { 107 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
index 11b45b1..b353cba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment.Interfaces; 30using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Modules.Scripting.WorldComm; 31using OpenSim.Region.Environment.Modules.Scripting.WorldComm;
32using OpenSim.Region.ScriptEngine.Shared; 32using OpenSim.Region.ScriptEngine.Shared;
@@ -74,14 +74,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
74 } 74 }
75 } 75 }
76 76
77 public Object[] GetSerializationData(LLUUID itemID) 77 public Object[] GetSerializationData(UUID itemID)
78 { 78 {
79 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 79 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
80 80
81 return comms.GetSerializationData(itemID); 81 return comms.GetSerializationData(itemID);
82 } 82 }
83 83
84 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 84 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
85 Object[] data) 85 Object[] data)
86 { 86 {
87 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 87 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index eaf4bd0..d1e3921 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
@@ -45,8 +45,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
45 m_CmdManager = CmdManager; 45 m_CmdManager = CmdManager;
46 } 46 }
47 47
48 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 48 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
49 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 49 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
50 private Object SenseLock = new Object(); 50 private Object SenseLock = new Object();
51 51
52 // 52 //
@@ -55,12 +55,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
55 private class SenseRepeatClass 55 private class SenseRepeatClass
56 { 56 {
57 public uint localID; 57 public uint localID;
58 public LLUUID itemID; 58 public UUID itemID;
59 public double interval; 59 public double interval;
60 public DateTime next; 60 public DateTime next;
61 61
62 public string name; 62 public string name;
63 public LLUUID keyID; 63 public UUID keyID;
64 public int type; 64 public int type;
65 public double range; 65 public double range;
66 public double arc; 66 public double arc;
@@ -70,8 +70,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
70 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 70 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
71 private object SenseRepeatListLock = new object(); 71 private object SenseRepeatListLock = new object();
72 72
73 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 73 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
74 string name, LLUUID keyID, int type, double range, 74 string name, UUID keyID, int type, double range,
75 double arc, double sec, SceneObjectPart host) 75 double arc, double sec, SceneObjectPart host)
76 { 76 {
77 // Always remove first, in case this is a re-set 77 // Always remove first, in case this is a re-set
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 return null; 166 return null;
@@ -187,11 +187,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
187 return; 187 return;
188 } 188 }
189 189
190 LLVector3 sensorPos = SensePoint.AbsolutePosition; 190 Vector3 sensorPos = SensePoint.AbsolutePosition;
191 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 191 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
192 LLVector3 fromRegionPos = sensorPos + regionPos; 192 Vector3 fromRegionPos = sensorPos + regionPos;
193 193
194 LLQuaternion q = SensePoint.RotationOffset; 194 Quaternion q = SensePoint.RotationOffset;
195 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 195 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
196 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 196 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
197 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 197 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
203 203
204 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 204 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
205 { 205 {
206 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 206 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
207 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 207 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
208 if (dis <= ts.range) 208 if (dis <= ts.range)
209 { 209 {
@@ -239,7 +239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
239 double ang_obj = 0; 239 double ang_obj = 0;
240 try 240 try
241 { 241 {
242 LLVector3 diff = toRegionPos - fromRegionPos; 242 Vector3 diff = toRegionPos - fromRegionPos;
243 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 243 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
244 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 244 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
245 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 245 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -252,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
252 if (ang_obj > ts.arc) keep = false; 252 if (ang_obj > ts.arc) keep = false;
253 } 253 }
254 254
255 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 255 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
256 { 256 {
257 keep = false; 257 keep = false;
258 } 258 }
@@ -292,10 +292,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
292 // Create object if it doesn't exist 292 // Create object if it doesn't exist
293 if (SenseEvents.ContainsKey(ts.localID) == false) 293 if (SenseEvents.ContainsKey(ts.localID) == false)
294 { 294 {
295 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 295 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
296 } 296 }
297 // clear if previous traces exist 297 // clear if previous traces exist
298 Dictionary<LLUUID, LSL_Types.list> Obj; 298 Dictionary<UUID, LSL_Types.list> Obj;
299 SenseEvents.TryGetValue(ts.localID, out Obj); 299 SenseEvents.TryGetValue(ts.localID, out Obj);
300 if (Obj.ContainsKey(ts.itemID) == true) 300 if (Obj.ContainsKey(ts.itemID) == true)
301 Obj.Remove(ts.itemID); 301 Obj.Remove(ts.itemID);
@@ -320,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
320 for (idx = 0; idx < SensedObjects.Length; idx++) 320 for (idx = 0; idx < SensedObjects.Length; idx++)
321 { 321 {
322 detect[idx] = new DetectParams(); 322 detect[idx] = new DetectParams();
323 detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); 323 detect[idx].Key=(UUID)(SensedObjects.Data[idx]);
324 detect[idx].Populate(m_CmdManager.m_ScriptEngine.World); 324 detect[idx].Populate(m_CmdManager.m_ScriptEngine.World);
325 } 325 }
326 326
@@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
333 } 333 }
334 } 334 }
335 335
336 public Object[] GetSerializationData(LLUUID itemID) 336 public Object[] GetSerializationData(UUID itemID)
337 { 337 {
338 List<Object> data = new List<Object>(); 338 List<Object> data = new List<Object>();
339 339
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
352 return data.ToArray(); 352 return data.ToArray();
353 } 353 }
354 354
355 public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, 355 public void CreateFromData(uint localID, UUID itemID, UUID objectID,
356 Object[] data) 356 Object[] data)
357 { 357 {
358 SceneObjectPart part = 358 SceneObjectPart part =
@@ -373,7 +373,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
373 373
374 ts.interval = (double)data[idx]; 374 ts.interval = (double)data[idx];
375 ts.name = (string)data[idx+1]; 375 ts.name = (string)data[idx+1];
376 ts.keyID = (LLUUID)data[idx+2]; 376 ts.keyID = (UUID)data[idx+2];
377 ts.type = (int)data[idx+3]; 377 ts.type = (int)data[idx+3];
378 ts.range = (double)data[idx+4]; 378 ts.range = (double)data[idx+4];
379 ts.arc = (double)data[idx+5]; 379 ts.arc = (double)data[idx+5];
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
index 36e992b..ec7cd35 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Region.ScriptEngine.Shared.Api; 32using OpenSim.Region.ScriptEngine.Shared.Api;
33 33
34namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins 34namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
48 private class TimerClass 48 private class TimerClass
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 //public double interval; 52 //public double interval;
53 public long interval; 53 public long interval;
54 //public DateTime next; 54 //public DateTime next;
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
58 private List<TimerClass> Timers = new List<TimerClass>(); 58 private List<TimerClass> Timers = new List<TimerClass>();
59 private object TimerListLock = new object(); 59 private object TimerListLock = new object();
60 60
61 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 61 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
62 { 62 {
63 // Always remove first, in case this is a re-set 63 // Always remove first, in case this is a re-set
64 UnSetTimerEvents(m_localID, m_itemID); 64 UnSetTimerEvents(m_localID, m_itemID);
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
81 } 81 }
82 } 82 }
83 83
84 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 84 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
85 { 85 {
86 // Remove from timer 86 // Remove from timer
87 lock (TimerListLock) 87 lock (TimerListLock)
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
122 } 122 }
123 } 123 }
124 124
125 public Object[] GetSerializationData(LLUUID itemID) 125 public Object[] GetSerializationData(UUID itemID)
126 { 126 {
127 List<Object> data = new List<Object>(); 127 List<Object> data = new List<Object>();
128 128
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
140 return data.ToArray(); 140 return data.ToArray();
141 } 141 }
142 142
143 public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, 143 public void CreateFromData(uint localID, UUID itemID, UUID objectID,
144 Object[] data) 144 Object[] data)
145 { 145 {
146 int idx = 0; 146 int idx = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
index 45f92e3..57efb2e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
118 //System.Console.WriteLine("SCRIPT:" + checkscript); 118 //System.Console.WriteLine("SCRIPT:" + checkscript);
119 119
120 // checks for alpha.alpha way of referring to objects in C# 120 // checks for alpha.alpha way of referring to objects in C#
121 // ignores alpha.x alpha.y, alpha.z for refering to vector components 121 // ignores alpha.X alpha.Y, alpha.Z for refering to vector components
122 Match SecurityM; 122 Match SecurityM;
123 123
124 // BROKEN: this check is very wrong. It block's any url in strings. 124 // BROKEN: this check is very wrong. It block's any url in strings.
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index d3222e7..8599e06 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -31,7 +31,7 @@ using System.Threading;
31using System.Collections; 31using System.Collections;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Runtime.Serialization; 33using System.Runtime.Serialization;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment; 36using OpenSim.Region.Environment;
37using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
@@ -70,24 +70,24 @@ namespace OpenSim.Region.ScriptEngine.Shared
70 { 70 {
71 public DetectParams() 71 public DetectParams()
72 { 72 {
73 Key = LLUUID.Zero; 73 Key = UUID.Zero;
74 OffsetPos = new LSL_Types.Vector3(); 74 OffsetPos = new LSL_Types.Vector3();
75 LinkNum = 0; 75 LinkNum = 0;
76 Group = LLUUID.Zero; 76 Group = UUID.Zero;
77 Name = String.Empty; 77 Name = String.Empty;
78 Owner = LLUUID.Zero; 78 Owner = UUID.Zero;
79 Position = new LSL_Types.Vector3(); 79 Position = new LSL_Types.Vector3();
80 Rotation = new LSL_Types.Quaternion(); 80 Rotation = new LSL_Types.Quaternion();
81 Type = 0; 81 Type = 0;
82 Velocity = new LSL_Types.Vector3(); 82 Velocity = new LSL_Types.Vector3();
83 } 83 }
84 84
85 public LLUUID Key; 85 public UUID Key;
86 public LSL_Types.Vector3 OffsetPos; 86 public LSL_Types.Vector3 OffsetPos;
87 public int LinkNum; 87 public int LinkNum;
88 public LLUUID Group; 88 public UUID Group;
89 public string Name; 89 public string Name;
90 public LLUUID Owner; 90 public UUID Owner;
91 public LSL_Types.Vector3 Position; 91 public LSL_Types.Vector3 Position;
92 public LSL_Types.Quaternion Rotation; 92 public LSL_Types.Quaternion Rotation;
93 public int Type; 93 public int Type;
@@ -109,17 +109,17 @@ namespace OpenSim.Region.ScriptEngine.Shared
109 presence.AbsolutePosition.Y, 109 presence.AbsolutePosition.Y,
110 presence.AbsolutePosition.Z); 110 presence.AbsolutePosition.Z);
111 Rotation = new LSL_Types.Quaternion( 111 Rotation = new LSL_Types.Quaternion(
112 presence.Rotation.x, 112 presence.Rotation.X,
113 presence.Rotation.y, 113 presence.Rotation.Y,
114 presence.Rotation.z, 114 presence.Rotation.Z,
115 presence.Rotation.w); 115 presence.Rotation.W);
116 Velocity = new LSL_Types.Vector3( 116 Velocity = new LSL_Types.Vector3(
117 presence.Velocity.X, 117 presence.Velocity.X,
118 presence.Velocity.Y, 118 presence.Velocity.Y,
119 presence.Velocity.Z); 119 presence.Velocity.Z);
120 120
121 Type = 0x01; // Avatar 121 Type = 0x01; // Avatar
122 if (presence.Velocity != LLVector3.Zero) 122 if (presence.Velocity != Vector3.Zero)
123 Type |= 0x02; // Active 123 Type |= 0x02; // Active
124 124
125 Group = presence.ControllingClient.ActiveGroupId; 125 Group = presence.ControllingClient.ActiveGroupId;
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
134 Group = part.GroupID; 134 Group = part.GroupID;
135 Name = part.Name; 135 Name = part.Name;
136 Owner = part.OwnerID; 136 Owner = part.OwnerID;
137 if (part.Velocity == LLVector3.Zero) 137 if (part.Velocity == Vector3.Zero)
138 Type = 0x04; // Passive 138 Type = 0x04; // Passive
139 else 139 else
140 Type = 0x02; // Passive 140 Type = 0x02; // Passive
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
152 part.AbsolutePosition.Y, 152 part.AbsolutePosition.Y,
153 part.AbsolutePosition.Z); 153 part.AbsolutePosition.Z);
154 154
155 LLQuaternion wr = part.GetWorldRotation(); 155 Quaternion wr = part.GetWorldRotation();
156 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); 156 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
157 157
158 Velocity = new LSL_Types.Vector3(part.Velocity.X, 158 Velocity = new LSL_Types.Vector3(part.Velocity.X,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index e3dd9e9..d35bfa8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -56,12 +56,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
56 private IScriptWorkItem m_CurrentResult=null; 56 private IScriptWorkItem m_CurrentResult=null;
57 private Queue m_EventQueue = new Queue(32); 57 private Queue m_EventQueue = new Queue(32);
58 private bool m_RunEvents = false; 58 private bool m_RunEvents = false;
59 private LLUUID m_ItemID; 59 private UUID m_ItemID;
60 private uint m_LocalID; 60 private uint m_LocalID;
61 private LLUUID m_ObjectID; 61 private UUID m_ObjectID;
62 private LLUUID m_AssetID; 62 private UUID m_AssetID;
63 private IScript m_Script; 63 private IScript m_Script;
64 private LLUUID m_AppDomain; 64 private UUID m_AppDomain;
65 private DetectParams[] m_DetectParams; 65 private DetectParams[] m_DetectParams;
66 private bool m_TimerQueued; 66 private bool m_TimerQueued;
67 private DateTime m_EventStart; 67 private DateTime m_EventStart;
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
98 get { return m_Engine; } 98 get { return m_Engine; }
99 } 99 }
100 100
101 public LLUUID AppDomain 101 public UUID AppDomain
102 { 102 {
103 get { return m_AppDomain; } 103 get { return m_AppDomain; }
104 set { m_AppDomain = value; } 104 set { m_AppDomain = value; }
@@ -114,12 +114,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
114 get { return m_ScriptName; } 114 get { return m_ScriptName; }
115 } 115 }
116 116
117 public LLUUID ItemID 117 public UUID ItemID
118 { 118 {
119 get { return m_ItemID; } 119 get { return m_ItemID; }
120 } 120 }
121 121
122 public LLUUID ObjectID 122 public UUID ObjectID
123 { 123 {
124 get { return m_ObjectID; } 124 get { return m_ObjectID; }
125 } 125 }
@@ -129,7 +129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
129 get { return m_LocalID; } 129 get { return m_LocalID; }
130 } 130 }
131 131
132 public LLUUID AssetID 132 public UUID AssetID
133 { 133 {
134 get { return m_AssetID; } 134 get { return m_AssetID; }
135 } 135 }
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
152 } 152 }
153 153
154 public ScriptInstance(IScriptEngine engine, uint localID, 154 public ScriptInstance(IScriptEngine engine, uint localID,
155 LLUUID objectID, LLUUID itemID, LLUUID assetID, string assembly, 155 UUID objectID, UUID itemID, UUID assetID, string assembly,
156 AppDomain dom, string primName, string scriptName, 156 AppDomain dom, string primName, string scriptName,
157 int startParam, bool postOnRez, StateSource stateSource, 157 int startParam, bool postOnRez, StateSource stateSource,
158 int maxScriptQueue) 158 int maxScriptQueue)
@@ -520,7 +520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
520 string text = "Runtime error:\n" + e.InnerException.ToString(); 520 string text = "Runtime error:\n" + e.InnerException.ToString();
521 if (text.Length > 1000) 521 if (text.Length > 1000)
522 text = text.Substring(0, 1000); 522 text = text.Substring(0, 1000);
523 m_Engine.World.SimChat(Helpers.StringToField(text), 523 m_Engine.World.SimChat(Utils.StringToBytes(text),
524 ChatTypeEnum.DebugChannel, 2147483647, 524 ChatTypeEnum.DebugChannel, 2147483647,
525 part.AbsolutePosition, 525 part.AbsolutePosition,
526 part.Name, part.UUID, false); 526 part.Name, part.UUID, false);
@@ -581,7 +581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
581 Stop(0); 581 Stop(0);
582 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 582 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
583 part.GetInventoryItem(m_ItemID).PermsMask = 0; 583 part.GetInventoryItem(m_ItemID).PermsMask = 0;
584 part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; 584 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
585 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 585 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
586 async.RemoveScript(m_LocalID, m_ItemID); 586 async.RemoveScript(m_LocalID, m_ItemID);
587 m_EventQueue.Clear(); 587 m_EventQueue.Clear();
@@ -602,7 +602,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
602 m_Script.ResetVars(); 602 m_Script.ResetVars();
603 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 603 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
604 part.GetInventoryItem(m_ItemID).PermsMask = 0; 604 part.GetInventoryItem(m_ItemID).PermsMask = 0;
605 part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; 605 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
606 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 606 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
607 async.RemoveScript(m_LocalID, m_ItemID); 607 async.RemoveScript(m_LocalID, m_ItemID);
608 if (m_CurrentEvent != "state_entry") 608 if (m_CurrentEvent != "state_entry")
@@ -630,10 +630,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
630 return m_DetectParams[idx]; 630 return m_DetectParams[idx];
631 } 631 }
632 632
633 public LLUUID GetDetectID(int idx) 633 public UUID GetDetectID(int idx)
634 { 634 {
635 if (idx < 0 || idx >= m_DetectParams.Length) 635 if (idx < 0 || idx >= m_DetectParams.Length)
636 return LLUUID.Zero; 636 return UUID.Zero;
637 637
638 return m_DetectParams[idx].Key; 638 return m_DetectParams[idx].Key;
639 } 639 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
index ba003c5..bc9b174 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -264,9 +264,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
264 new LSL_Types.Vector3(vect); 264 new LSL_Types.Vector3(vect);
265 265
266 int d_linkNum=0; 266 int d_linkNum=0;
267 LLUUID d_group = LLUUID.Zero; 267 UUID d_group = UUID.Zero;
268 string d_name = String.Empty; 268 string d_name = String.Empty;
269 LLUUID d_owner = LLUUID.Zero; 269 UUID d_owner = UUID.Zero;
270 LSL_Types.Vector3 d_position = 270 LSL_Types.Vector3 d_position =
271 new LSL_Types.Vector3(); 271 new LSL_Types.Vector3();
272 LSL_Types.Quaternion d_rotation = 272 LSL_Types.Quaternion d_rotation =
@@ -285,14 +285,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
285 285
286 tmp = det.Attributes.GetNamedItem( 286 tmp = det.Attributes.GetNamedItem(
287 "group").Value; 287 "group").Value;
288 LLUUID.TryParse(tmp, out d_group); 288 UUID.TryParse(tmp, out d_group);
289 289
290 d_name = det.Attributes.GetNamedItem( 290 d_name = det.Attributes.GetNamedItem(
291 "name").Value; 291 "name").Value;
292 292
293 tmp = det.Attributes.GetNamedItem( 293 tmp = det.Attributes.GetNamedItem(
294 "owner").Value; 294 "owner").Value;
295 LLUUID.TryParse(tmp, out d_owner); 295 UUID.TryParse(tmp, out d_owner);
296 296
297 tmp = det.Attributes.GetNamedItem( 297 tmp = det.Attributes.GetNamedItem(
298 "position").Value; 298 "position").Value;
@@ -318,8 +318,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
318 { 318 {
319 } 319 }
320 320
321 LLUUID uuid = new LLUUID(); 321 UUID uuid = new UUID();
322 LLUUID.TryParse(det.InnerText, 322 UUID.TryParse(det.InnerText,
323 out uuid); 323 out uuid);
324 324
325 DetectParams d = new DetectParams(); 325 DetectParams d = new DetectParams();
@@ -427,10 +427,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
427 if (itemType == "list") 427 if (itemType == "list")
428 return ReadList(tag); 428 return ReadList(tag);
429 429
430 if (itemType == "libsecondlife.LLUUID") 430 if (itemType == "libsecondlife.UUID")
431 { 431 {
432 LLUUID val = new LLUUID(); 432 UUID val = new UUID();
433 LLUUID.TryParse(tag.InnerText, out val); 433 UUID.TryParse(tag.InnerText, out val);
434 434
435 return val; 435 return val;
436 } 436 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 4713283..3820dae 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
123 123
124 Vector3 vector = (Vector3)o; 124 Vector3 vector = (Vector3)o;
125 125
126 return (x == vector.x && x == vector.x && z == vector.z); 126 return (x == vector.x && y == vector.y && z == vector.z);
127 } 127 }
128 128
129 public static Vector3 operator -(Vector3 vector) 129 public static Vector3 operator -(Vector3 vector)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index d431286..22abd79 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 33using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
34using OpenSim.Region.Interfaces; 34using OpenSim.Region.Interfaces;
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Scenes;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.ScriptEngine.Shared; 37using OpenSim.Region.ScriptEngine.Shared;
38using OpenSim.Region.ScriptEngine.Interfaces; 38using OpenSim.Region.ScriptEngine.Interfaces;
39using Axiom.Math;
40 39
41namespace OpenSim.Region.ScriptEngine.XEngine 40namespace OpenSim.Region.ScriptEngine.XEngine
42{ 41{
@@ -68,7 +67,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
68 } 67 }
69 } 68 }
70 69
71 private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, 70 private void HandleObjectPaid(UUID objectID, UUID agentID,
72 int amount) 71 int amount)
73 { 72 {
74 SceneObjectPart part = 73 SceneObjectPart part =
@@ -80,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
80 } 79 }
81 } 80 }
82 81
83 public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, 82 public void touch_start(uint localID, uint originalID, Vector3 offsetPos,
84 IClientAPI remoteClient) 83 IClientAPI remoteClient)
85 { 84 {
86 // Add to queue for all scripts in ObjectID object 85 // Add to queue for all scripts in ObjectID object
@@ -108,7 +107,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
108 det)); 107 det));
109 } 108 }
110 109
111 public void touch(uint localID, uint originalID, LLVector3 offsetPos, 110 public void touch(uint localID, uint originalID, Vector3 offsetPos,
112 IClientAPI remoteClient) 111 IClientAPI remoteClient)
113 { 112 {
114 // Add to queue for all scripts in ObjectID object 113 // Add to queue for all scripts in ObjectID object
@@ -177,7 +176,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
177 // state_entry: not processed here 176 // state_entry: not processed here
178 // state_exit: not processed here 177 // state_exit: not processed here
179 178
180 public void money(uint localID, LLUUID agentID, int amount) 179 public void money(uint localID, UUID agentID, int amount)
181 { 180 {
182 myScriptEngine.PostObjectEvent(localID, new EventParams( 181 myScriptEngine.PostObjectEvent(localID, new EventParams(
183 "money", new object[] { 182 "money", new object[] {
@@ -242,7 +241,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
242 det.ToArray())); 241 det.ToArray()));
243 } 242 }
244 243
245 public void land_collision_start(uint localID, LLUUID itemID) 244 public void land_collision_start(uint localID, UUID itemID)
246 { 245 {
247 myScriptEngine.PostObjectEvent(localID, new EventParams( 246 myScriptEngine.PostObjectEvent(localID, new EventParams(
248 "land_collision_start", 247 "land_collision_start",
@@ -250,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
250 new DetectParams[0])); 249 new DetectParams[0]));
251 } 250 }
252 251
253 public void land_collision(uint localID, LLUUID itemID) 252 public void land_collision(uint localID, UUID itemID)
254 { 253 {
255 myScriptEngine.PostObjectEvent(localID, new EventParams( 254 myScriptEngine.PostObjectEvent(localID, new EventParams(
256 "land_collision", 255 "land_collision",
@@ -258,7 +257,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
258 new DetectParams[0])); 257 new DetectParams[0]));
259 } 258 }
260 259
261 public void land_collision_end(uint localID, LLUUID itemID) 260 public void land_collision_end(uint localID, UUID itemID)
262 { 261 {
263 myScriptEngine.PostObjectEvent(localID, new EventParams( 262 myScriptEngine.PostObjectEvent(localID, new EventParams(
264 "land_collision_end", 263 "land_collision_end",
@@ -269,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
269 // timer: not handled here 268 // timer: not handled here
270 // listen: not handled here 269 // listen: not handled here
271 270
272 public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change) 271 public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change)
273 { 272 {
274 myScriptEngine.PostObjectEvent(localID, new EventParams( 273 myScriptEngine.PostObjectEvent(localID, new EventParams(
275 "control",new object[] { 274 "control",new object[] {
@@ -279,7 +278,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
279 new DetectParams[0])); 278 new DetectParams[0]));
280 } 279 }
281 280
282 public void email(uint localID, LLUUID itemID, string timeSent, 281 public void email(uint localID, UUID itemID, string timeSent,
283 string address, string subject, string message, int numLeft) 282 string address, string subject, string message, int numLeft)
284 { 283 {
285 myScriptEngine.PostObjectEvent(localID, new EventParams( 284 myScriptEngine.PostObjectEvent(localID, new EventParams(
@@ -292,8 +291,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
292 new DetectParams[0])); 291 new DetectParams[0]));
293 } 292 }
294 293
295 public void at_target(uint localID, uint handle, LLVector3 targetpos, 294 public void at_target(uint localID, uint handle, Vector3 targetpos,
296 LLVector3 atpos) 295 Vector3 atpos)
297 { 296 {
298 myScriptEngine.PostObjectEvent(localID, new EventParams( 297 myScriptEngine.PostObjectEvent(localID, new EventParams(
299 "at_target", new object[] { 298 "at_target", new object[] {
@@ -310,14 +309,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
310 new DetectParams[0])); 309 new DetectParams[0]));
311 } 310 }
312 311
313 public void at_rot_target(uint localID, LLUUID itemID) 312 public void at_rot_target(uint localID, UUID itemID)
314 { 313 {
315 myScriptEngine.PostObjectEvent(localID, new EventParams( 314 myScriptEngine.PostObjectEvent(localID, new EventParams(
316 "at_rot_target",new object[0], 315 "at_rot_target",new object[0],
317 new DetectParams[0])); 316 new DetectParams[0]));
318 } 317 }
319 318
320 public void not_at_rot_target(uint localID, LLUUID itemID) 319 public void not_at_rot_target(uint localID, UUID itemID)
321 { 320 {
322 myScriptEngine.PostObjectEvent(localID, new EventParams( 321 myScriptEngine.PostObjectEvent(localID, new EventParams(
323 "not_at_rot_target",new object[0], 322 "not_at_rot_target",new object[0],
@@ -326,7 +325,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
326 325
327 // run_time_permissions: not handled here 326 // run_time_permissions: not handled here
328 327
329 public void attach(uint localID, LLUUID itemID, LLUUID avatar) 328 public void attach(uint localID, UUID itemID, UUID avatar)
330 { 329 {
331 myScriptEngine.PostObjectEvent(localID, new EventParams( 330 myScriptEngine.PostObjectEvent(localID, new EventParams(
332 "attach",new object[] { 331 "attach",new object[] {
@@ -337,14 +336,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
337 // dataserver: not handled here 336 // dataserver: not handled here
338 // link_message: not handled here 337 // link_message: not handled here
339 338
340 public void moving_start(uint localID, LLUUID itemID) 339 public void moving_start(uint localID, UUID itemID)
341 { 340 {
342 myScriptEngine.PostObjectEvent(localID, new EventParams( 341 myScriptEngine.PostObjectEvent(localID, new EventParams(
343 "moving_start",new object[0], 342 "moving_start",new object[0],
344 new DetectParams[0])); 343 new DetectParams[0]));
345 } 344 }
346 345
347 public void moving_end(uint localID, LLUUID itemID) 346 public void moving_end(uint localID, UUID itemID)
348 { 347 {
349 myScriptEngine.PostObjectEvent(localID, new EventParams( 348 myScriptEngine.PostObjectEvent(localID, new EventParams(
350 "moving_end",new object[0], 349 "moving_end",new object[0],
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 8ad8110..485531d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -76,28 +76,28 @@ namespace OpenSim.Region.ScriptEngine.XEngine
76 76
77 // Maps the local id to the script inventory items in it 77 // Maps the local id to the script inventory items in it
78 78
79 private Dictionary<uint, List<LLUUID> > m_PrimObjects = 79 private Dictionary<uint, List<UUID> > m_PrimObjects =
80 new Dictionary<uint, List<LLUUID> >(); 80 new Dictionary<uint, List<UUID> >();
81 81
82 // Maps the LLUUID above to the script instance 82 // Maps the UUID above to the script instance
83 83
84 private Dictionary<LLUUID, IScriptInstance> m_Scripts = 84 private Dictionary<UUID, IScriptInstance> m_Scripts =
85 new Dictionary<LLUUID, IScriptInstance>(); 85 new Dictionary<UUID, IScriptInstance>();
86 86
87 // Maps the asset ID to the assembly 87 // Maps the asset ID to the assembly
88 88
89 private Dictionary<LLUUID, string> m_Assemblies = 89 private Dictionary<UUID, string> m_Assemblies =
90 new Dictionary<LLUUID, string>(); 90 new Dictionary<UUID, string>();
91 91
92 // This will list AppDomains by script asset 92 // This will list AppDomains by script asset
93 93
94 private Dictionary<LLUUID, AppDomain> m_AppDomains = 94 private Dictionary<UUID, AppDomain> m_AppDomains =
95 new Dictionary<LLUUID, AppDomain>(); 95 new Dictionary<UUID, AppDomain>();
96 96
97 // List the scripts running in each appdomain 97 // List the scripts running in each appdomain
98 98
99 private Dictionary<LLUUID, List<LLUUID> > m_DomainScripts = 99 private Dictionary<UUID, List<UUID> > m_DomainScripts =
100 new Dictionary<LLUUID, List<LLUUID> >(); 100 new Dictionary<UUID, List<UUID> >();
101 101
102 private Queue m_CompileQueue = new Queue(100); 102 private Queue m_CompileQueue = new Queue(100);
103 IWorkItemResult m_CurrentCompile = null; 103 IWorkItemResult m_CurrentCompile = null;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
125 // private struct RezScriptParms 125 // private struct RezScriptParms
126 // { 126 // {
127 // uint LocalID; 127 // uint LocalID;
128 // LLUUID ItemID; 128 // UUID ItemID;
129 // string Script; 129 // string Script;
130 // } 130 // }
131 131
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
314 get { return false; } 314 get { return false; }
315 } 315 }
316 316
317 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 317 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
318 { 318 {
319 Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez}; 319 Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez};
320 320
@@ -395,7 +395,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
395 { 395 {
396 Object[] p = (Object[])parm; 396 Object[] p = (Object[])parm;
397 uint localID = (uint)p[0]; 397 uint localID = (uint)p[0];
398 LLUUID itemID = (LLUUID)p[1]; 398 UUID itemID = (UUID)p[1];
399 string script =(string)p[2]; 399 string script =(string)p[2];
400 int startParam = (int)p[3]; 400 int startParam = (int)p[3];
401 bool postOnRez = (bool)p[4]; 401 bool postOnRez = (bool)p[4];
@@ -411,7 +411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
411 if (item == null) 411 if (item == null)
412 return false; 412 return false;
413 413
414 LLUUID assetID = item.AssetID; 414 UUID assetID = item.AssetID;
415 415
416// m_log.DebugFormat("[XEngine] Compiling script {0} ({1})", 416// m_log.DebugFormat("[XEngine] Compiling script {0} ({1})",
417// item.Name, itemID.ToString()); 417// item.Name, itemID.ToString());
@@ -430,7 +430,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
430 string text = "Error compiling script:\r\n" + e.Message.ToString(); 430 string text = "Error compiling script:\r\n" + e.Message.ToString();
431 if (text.Length > 1000) 431 if (text.Length > 1000)
432 text = text.Substring(0, 1000); 432 text = text.Substring(0, 1000);
433 World.SimChat(Helpers.StringToField(text), 433 World.SimChat(Utils.StringToBytes(text),
434 ChatTypeEnum.DebugChannel, 2147483647, 434 ChatTypeEnum.DebugChannel, 2147483647,
435 part.AbsolutePosition, 435 part.AbsolutePosition,
436 part.Name, part.UUID, false); 436 part.Name, part.UUID, false);
@@ -455,7 +455,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
455 if ((!m_Scripts.ContainsKey(itemID)) || 455 if ((!m_Scripts.ContainsKey(itemID)) ||
456 (m_Scripts[itemID].AssetID != assetID)) 456 (m_Scripts[itemID].AssetID != assetID))
457 { 457 {
458 LLUUID appDomain = assetID; 458 UUID appDomain = assetID;
459 459
460 if (part.ParentGroup.RootPart.IsAttachment) 460 if (part.ParentGroup.RootPart.IsAttachment)
461 appDomain = part.ParentGroup.RootPart.UUID; 461 appDomain = part.ParentGroup.RootPart.UUID;
@@ -480,7 +480,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
480 m_AppDomains[appDomain].AssemblyResolve += 480 m_AppDomains[appDomain].AssemblyResolve +=
481 new ResolveEventHandler( 481 new ResolveEventHandler(
482 AssemblyResolver.OnAssemblyResolve); 482 AssemblyResolver.OnAssemblyResolve);
483 m_DomainScripts[appDomain] = new List<LLUUID>(); 483 m_DomainScripts[appDomain] = new List<UUID>();
484 } 484 }
485 catch (Exception e) 485 catch (Exception e)
486 { 486 {
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
507 } 507 }
508 508
509 if (!m_PrimObjects.ContainsKey(localID)) 509 if (!m_PrimObjects.ContainsKey(localID))
510 m_PrimObjects[localID] = new List<LLUUID>(); 510 m_PrimObjects[localID] = new List<UUID>();
511 511
512 if (!m_PrimObjects[localID].Contains(itemID)) 512 if (!m_PrimObjects[localID].Contains(itemID))
513 m_PrimObjects[localID].Add(itemID); 513 m_PrimObjects[localID].Add(itemID);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
518 return true; 518 return true;
519 } 519 }
520 520
521 public void OnRemoveScript(uint localID, LLUUID itemID) 521 public void OnRemoveScript(uint localID, UUID itemID)
522 { 522 {
523 lock (m_Scripts) 523 lock (m_Scripts)
524 { 524 {
@@ -569,24 +569,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine
569 } 569 }
570 } 570 }
571 571
572 public void OnScriptReset(uint localID, LLUUID itemID) 572 public void OnScriptReset(uint localID, UUID itemID)
573 { 573 {
574 ResetScript(itemID); 574 ResetScript(itemID);
575 } 575 }
576 576
577 public void OnStartScript(uint localID, LLUUID itemID) 577 public void OnStartScript(uint localID, UUID itemID)
578 { 578 {
579 StartScript(itemID); 579 StartScript(itemID);
580 } 580 }
581 581
582 public void OnStopScript(uint localID, LLUUID itemID) 582 public void OnStopScript(uint localID, UUID itemID)
583 { 583 {
584 StopScript(itemID); 584 StopScript(itemID);
585 } 585 }
586 586
587 private void CleanAssemblies() 587 private void CleanAssemblies()
588 { 588 {
589 List<LLUUID> assetIDList = new List<LLUUID>(m_Assemblies.Keys); 589 List<UUID> assetIDList = new List<UUID>(m_Assemblies.Keys);
590 590
591 foreach (IScriptInstance i in m_Scripts.Values) 591 foreach (IScriptInstance i in m_Scripts.Values)
592 { 592 {
@@ -594,7 +594,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
594 assetIDList.Remove(i.AssetID); 594 assetIDList.Remove(i.AssetID);
595 } 595 }
596 596
597 foreach (LLUUID assetID in assetIDList) 597 foreach (UUID assetID in assetIDList)
598 { 598 {
599// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]); 599// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]);
600 try 600 try
@@ -615,7 +615,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
615 } 615 }
616 } 616 }
617 617
618 private void UnloadAppDomain(LLUUID id) 618 private void UnloadAppDomain(UUID id)
619 { 619 {
620 if (m_AppDomains.ContainsKey(id)) 620 if (m_AppDomains.ContainsKey(id))
621 { 621 {
@@ -681,7 +681,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
681 if (!m_PrimObjects.ContainsKey(localID)) 681 if (!m_PrimObjects.ContainsKey(localID))
682 return false; 682 return false;
683 683
684 foreach (LLUUID itemID in m_PrimObjects[localID]) 684 foreach (UUID itemID in m_PrimObjects[localID])
685 { 685 {
686 if (m_Scripts.ContainsKey(itemID)) 686 if (m_Scripts.ContainsKey(itemID))
687 { 687 {
@@ -699,7 +699,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
699 // 699 //
700 // Post an event to a single script 700 // Post an event to a single script
701 // 701 //
702 public bool PostScriptEvent(LLUUID itemID, EventParams p) 702 public bool PostScriptEvent(UUID itemID, EventParams p)
703 { 703 {
704 if (m_Scripts.ContainsKey(itemID)) 704 if (m_Scripts.ContainsKey(itemID))
705 { 705 {
@@ -737,7 +737,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
737 return null; 737 return null;
738 } 738 }
739 739
740 private IScriptInstance GetInstance(LLUUID itemID) 740 private IScriptInstance GetInstance(UUID itemID)
741 { 741 {
742 IScriptInstance instance; 742 IScriptInstance instance;
743 lock (m_Scripts) 743 lock (m_Scripts)
@@ -749,7 +749,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
749 return instance; 749 return instance;
750 } 750 }
751 751
752 public void SetScriptState(LLUUID itemID, bool running) 752 public void SetScriptState(UUID itemID, bool running)
753 { 753 {
754 IScriptInstance instance = GetInstance(itemID); 754 IScriptInstance instance = GetInstance(itemID);
755 if (instance != null) 755 if (instance != null)
@@ -761,7 +761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
761 } 761 }
762 } 762 }
763 763
764 public bool GetScriptState(LLUUID itemID) 764 public bool GetScriptState(UUID itemID)
765 { 765 {
766 IScriptInstance instance = GetInstance(itemID); 766 IScriptInstance instance = GetInstance(itemID);
767 if (instance != null) 767 if (instance != null)
@@ -769,35 +769,35 @@ namespace OpenSim.Region.ScriptEngine.XEngine
769 return false; 769 return false;
770 } 770 }
771 771
772 public void ApiResetScript(LLUUID itemID) 772 public void ApiResetScript(UUID itemID)
773 { 773 {
774 IScriptInstance instance = GetInstance(itemID); 774 IScriptInstance instance = GetInstance(itemID);
775 if (instance != null) 775 if (instance != null)
776 instance.ApiResetScript(); 776 instance.ApiResetScript();
777 } 777 }
778 778
779 public void ResetScript(LLUUID itemID) 779 public void ResetScript(UUID itemID)
780 { 780 {
781 IScriptInstance instance = GetInstance(itemID); 781 IScriptInstance instance = GetInstance(itemID);
782 if (instance != null) 782 if (instance != null)
783 instance.ResetScript(); 783 instance.ResetScript();
784 } 784 }
785 785
786 public void StartScript(LLUUID itemID) 786 public void StartScript(UUID itemID)
787 { 787 {
788 IScriptInstance instance = GetInstance(itemID); 788 IScriptInstance instance = GetInstance(itemID);
789 if (instance != null) 789 if (instance != null)
790 instance.Start(); 790 instance.Start();
791 } 791 }
792 792
793 public void StopScript(LLUUID itemID) 793 public void StopScript(UUID itemID)
794 { 794 {
795 IScriptInstance instance = GetInstance(itemID); 795 IScriptInstance instance = GetInstance(itemID);
796 if (instance != null) 796 if (instance != null)
797 instance.Stop(0); 797 instance.Stop(0);
798 } 798 }
799 799
800 public DetectParams GetDetectParams(LLUUID itemID, int idx) 800 public DetectParams GetDetectParams(UUID itemID, int idx)
801 { 801 {
802 IScriptInstance instance = GetInstance(itemID); 802 IScriptInstance instance = GetInstance(itemID);
803 if (instance != null) 803 if (instance != null)
@@ -805,22 +805,22 @@ namespace OpenSim.Region.ScriptEngine.XEngine
805 return null; 805 return null;
806 } 806 }
807 807
808 public LLUUID GetDetectID(LLUUID itemID, int idx) 808 public UUID GetDetectID(UUID itemID, int idx)
809 { 809 {
810 IScriptInstance instance = GetInstance(itemID); 810 IScriptInstance instance = GetInstance(itemID);
811 if (instance != null) 811 if (instance != null)
812 return instance.GetDetectID(idx); 812 return instance.GetDetectID(idx);
813 return LLUUID.Zero; 813 return UUID.Zero;
814 } 814 }
815 815
816 public void SetState(LLUUID itemID, string newState) 816 public void SetState(UUID itemID, string newState)
817 { 817 {
818 IScriptInstance instance = GetInstance(itemID); 818 IScriptInstance instance = GetInstance(itemID);
819 if (instance == null) 819 if (instance == null)
820 return; 820 return;
821 instance.SetState(newState); 821 instance.SetState(newState);
822 } 822 }
823 public string GetState(LLUUID itemID) 823 public string GetState(UUID itemID)
824 { 824 {
825 IScriptInstance instance = GetInstance(itemID); 825 IScriptInstance instance = GetInstance(itemID);
826 if (instance == null) 826 if (instance == null)
@@ -828,7 +828,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
828 return instance.State; 828 return instance.State;
829 } 829 }
830 830
831 public int GetStartParameter(LLUUID itemID) 831 public int GetStartParameter(UUID itemID)
832 { 832 {
833 IScriptInstance instance = GetInstance(itemID); 833 IScriptInstance instance = GetInstance(itemID);
834 if (instance == null) 834 if (instance == null)
@@ -836,7 +836,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
836 return instance.StartParam; 836 return instance.StartParam;
837 } 837 }
838 838
839 public bool GetScriptRunning(LLUUID objectID, LLUUID itemID) 839 public bool GetScriptRunning(UUID objectID, UUID itemID)
840 { 840 {
841 return GetScriptState(itemID); 841 return GetScriptState(itemID);
842 } 842 }