aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs24
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs8
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs98
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs4
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs16
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs6
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs6
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs4
-rw-r--r--OpenSim/Data/AssetDataBase.cs6
-rw-r--r--OpenSim/Data/Base/AppearanceTableMapper.cs116
-rw-r--r--OpenSim/Data/Base/BaseRowMapper.cs4
-rw-r--r--OpenSim/Data/GridDataBase.cs6
-rw-r--r--OpenSim/Data/IGridData.cs6
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs8
-rw-r--r--OpenSim/Data/MSSQL/MSSQLEstateData.cs26
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridData.cs14
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs48
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs38
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs144
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs116
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs6
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs26
-rw-r--r--OpenSim/Data/MySQL/MySQLGridData.cs12
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs54
-rw-r--r--OpenSim/Data/MySQL/MySQLLogData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLManager.cs134
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs138
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs62
-rw-r--r--OpenSim/Data/NHibernate/LLQuaternionUserType.cs15
-rw-r--r--OpenSim/Data/NHibernate/LLUUIDUserType.cs10
-rw-r--r--OpenSim/Data/NHibernate/LLVector3UserType.cs12
-rw-r--r--OpenSim/Data/NHibernate/NHibernateAssetData.cs8
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs28
-rw-r--r--OpenSim/Data/NHibernate/NHibernateRegionData.cs28
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs36
-rw-r--r--OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml4
-rw-r--r--OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml8
-rw-r--r--OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml14
-rw-r--r--OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml52
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml12
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml56
-rw-r--r--OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml12
-rw-r--r--OpenSim/Data/NHibernate/Terrain.cs10
-rw-r--r--OpenSim/Data/NHibernate/TextureUserType.cs14
-rw-r--r--OpenSim/Data/Null/NullDataStore.cs20
-rw-r--r--OpenSim/Data/OpenSimDataReader.cs10
-rw-r--r--OpenSim/Data/OpenSimDatabaseConnector.cs6
-rw-r--r--OpenSim/Data/OpenSimObjectFieldMapper.cs18
-rw-r--r--OpenSim/Data/PrimitiveBaseShapeTableMapper.cs8
-rw-r--r--OpenSim/Data/RegionProfileData.cs17
-rw-r--r--OpenSim/Data/ReservationData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs10
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs26
-rw-r--r--OpenSim/Data/SQLite/SQLiteGridData.cs12
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs54
-rw-r--r--OpenSim/Data/SQLite/SQLiteManager.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs128
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs90
-rw-r--r--OpenSim/Data/UserDataBase.cs36
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs38
-rw-r--r--OpenSim/Framework/AgentCircuitManager.cs8
-rw-r--r--OpenSim/Framework/AgentUpdateArgs.cs20
-rw-r--r--OpenSim/Framework/AssetBase.cs10
-rw-r--r--OpenSim/Framework/AssetLandmark.cs10
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs10
-rw-r--r--OpenSim/Framework/AssetRequest.cs6
-rw-r--r--OpenSim/Framework/AssetRequestToClient.cs6
-rw-r--r--OpenSim/Framework/AssetStorage.cs8
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs210
-rw-r--r--OpenSim/Framework/AvatarPickerAvatar.cs6
-rw-r--r--OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs8
-rw-r--r--OpenSim/Framework/AvatarPickerReplyDataArgs.cs6
-rw-r--r--OpenSim/Framework/AvatarWearable.cs34
-rw-r--r--OpenSim/Framework/AvatarWearingArgs.cs8
-rw-r--r--OpenSim/Framework/Cache.cs48
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs9
-rw-r--r--OpenSim/Framework/ClientManager.cs8
-rw-r--r--OpenSim/Framework/ColliderData.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs52
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs54
-rw-r--r--OpenSim/Framework/Communications/Cache/FileAssetClient.cs16
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs46
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs38
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs76
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSD.cs24
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs14
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs26
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs4
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs8
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs8
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs34
-rw-r--r--OpenSim/Framework/Communications/IAvatarService.cs6
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs4
-rw-r--r--OpenSim/Framework/Communications/IInterRegionCommunications.cs14
-rw-r--r--OpenSim/Framework/Communications/IInterServiceInventoryServices.cs6
-rw-r--r--OpenSim/Framework/Communications/IInventoryServices.cs8
-rw-r--r--OpenSim/Framework/Communications/ISecureInventoryService.cs22
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs40
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs58
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs32
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs28
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs68
-rw-r--r--OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs2
-rw-r--r--OpenSim/Framework/Configuration/XML/XmlConfiguration.cs2
-rw-r--r--OpenSim/Framework/ConfigurationMember.cs30
-rw-r--r--OpenSim/Framework/ConfigurationOption.cs8
-rw-r--r--OpenSim/Framework/EstateBan.cs4
-rw-r--r--OpenSim/Framework/EstateSettings.cs80
-rw-r--r--OpenSim/Framework/FriendListItem.cs8
-rw-r--r--OpenSim/Framework/GridInstantMessage.cs5
-rw-r--r--OpenSim/Framework/IAssetProvider.cs6
-rw-r--r--OpenSim/Framework/IAssetServer.cs6
-rw-r--r--OpenSim/Framework/IClientAPI.cs334
-rw-r--r--OpenSim/Framework/IInventoryData.cs20
-rw-r--r--OpenSim/Framework/IRegionCommsListener.cs16
-rw-r--r--OpenSim/Framework/IScene.cs8
-rw-r--r--OpenSim/Framework/IUserData.cs32
-rw-r--r--OpenSim/Framework/InventoryCollection.cs6
-rw-r--r--OpenSim/Framework/InventoryFolderBase.cs16
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs26
-rw-r--r--OpenSim/Framework/LLGroup.cs16
-rw-r--r--OpenSim/Framework/LandData.cs52
-rw-r--r--OpenSim/Framework/LandStatReportItem.cs4
-rw-r--r--OpenSim/Framework/LandUpdateArgs.cs16
-rw-r--r--OpenSim/Framework/Location.cs2
-rw-r--r--OpenSim/Framework/Login.cs18
-rw-r--r--OpenSim/Framework/MapBlockData.cs6
-rw-r--r--OpenSim/Framework/OSChatMessage.cs14
-rw-r--r--OpenSim/Framework/OSUUID.cs114
-rw-r--r--OpenSim/Framework/PacketPool.cs12
-rw-r--r--OpenSim/Framework/PluginLoader.cs2
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs48
-rw-r--r--OpenSim/Framework/ProxyCodec.cs4
-rw-r--r--OpenSim/Framework/RegionCommsListener.cs18
-rw-r--r--OpenSim/Framework/RegionHandshakeArgs.cs22
-rw-r--r--OpenSim/Framework/RegionInfo.cs48
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs6
-rw-r--r--OpenSim/Framework/RegionSettings.cs68
-rw-r--r--OpenSim/Framework/RequestAssetArgs.cs6
-rw-r--r--OpenSim/Framework/SerializableRegionInfo.cs14
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs4
-rw-r--r--OpenSim/Framework/Servers/LLSDMethod.cs2
-rw-r--r--OpenSim/Framework/Servers/LLSDMethodString.cs2
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs18
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs50
-rw-r--r--OpenSim/Framework/TextureRequestArgs.cs8
-rw-r--r--OpenSim/Framework/UserAgentData.cs28
-rw-r--r--OpenSim/Framework/UserProfileData.cs38
-rw-r--r--OpenSim/Framework/Util.cs28
-rw-r--r--OpenSim/Framework/ViewerEffectEventHandlerArg.cs8
-rw-r--r--OpenSim/Framework/sLLVector3.cs51
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs6
-rw-r--r--OpenSim/Grid/AssetServer/RestService.cs10
-rw-r--r--OpenSim/Grid/Communications/OGS1/OGS1InterServiceInventoryService.cs10
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs46
-rw-r--r--OpenSim/Grid/InventoryServer/GridInventoryService.cs10
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs4
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs8
-rw-r--r--OpenSim/Grid/MessagingServer/MessageService.cs40
-rw-r--r--OpenSim/Grid/MessagingServer/PresenceBackreferenceEntry.cs16
-rw-r--r--OpenSim/Grid/MessagingServer/UserManager.cs6
-rw-r--r--OpenSim/Grid/MessagingServer/UserPresenceData.cs4
-rw-r--r--OpenSim/Grid/MessagingServer/XMPPHTTPService.cs10
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServerMain.cs4
-rw-r--r--OpenSim/Grid/UserServer/Main.cs20
-rw-r--r--OpenSim/Grid/UserServer/MessageServersConnector.cs12
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs14
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs84
-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
-rw-r--r--OpenSim/TestSuite/BotManager.cs4
-rw-r--r--OpenSim/TestSuite/PhysicsBot.cs8
-rw-r--r--OpenSim/Tests/Common/VectorToleranceConstraint.cs12
-rw-r--r--OpenSim/Tests/Framework/UtilTest.cs24
-rw-r--r--OpenSim/Tools/Export/OpenSimExport.cs4
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs4
-rw-r--r--OpenSim/Tools/pCampBot/PhysicsBot.cs8
378 files changed, 6701 insertions, 7036 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 6691f14..7803d92 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Timers; 33using System.Timers;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nini.Config; 36using Nini.Config;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
@@ -113,7 +113,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
113 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 113 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword))
114 throw new Exception("wrong password"); 114 throw new Exception("wrong password");
115 115
116 LLUUID regionID = new LLUUID((string) requestData["regionID"]); 116 UUID regionID = new UUID((string) requestData["regionID"]);
117 117
118 responseData["accepted"] = "true"; 118 responseData["accepted"] = "true";
119 response.Value = responseData; 119 response.Value = responseData;
@@ -198,7 +198,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
198 throw new Exception("wrong password"); 198 throw new Exception("wrong password");
199 199
200 string file = (string)requestData["filename"]; 200 string file = (string)requestData["filename"];
201 LLUUID regionID = (string) requestData["regionid"]; 201 UUID regionID = (string) requestData["regionid"];
202 m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file); 202 m_log.InfoFormat("[RADMIN]: Terrain Loading: {0}", file);
203 203
204 responseData["accepted"] = "true"; 204 responseData["accepted"] = "true";
@@ -379,7 +379,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
379 379
380 // extract or generate region ID now 380 // extract or generate region ID now
381 Scene scene = null; 381 Scene scene = null;
382 LLUUID regionID = LLUUID.Zero; 382 UUID regionID = UUID.Zero;
383 if (requestData.ContainsKey("region_id") && 383 if (requestData.ContainsKey("region_id") &&
384 !String.IsNullOrEmpty((string)requestData["region_id"])) 384 !String.IsNullOrEmpty((string)requestData["region_id"]))
385 { 385 {
@@ -391,7 +391,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
391 } 391 }
392 else 392 else
393 { 393 {
394 regionID = LLUUID.Random(); 394 regionID = UUID.Random();
395 m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID); 395 m_log.DebugFormat("[RADMIN] CreateRegion: new region UUID {0}", regionID);
396 } 396 }
397 397
@@ -517,7 +517,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
517 /// <description>error message if success is false</description></item> 517 /// <description>error message if success is false</description></item>
518 /// <item><term>avatar_uuid</term> 518 /// <item><term>avatar_uuid</term>
519 /// <description>UUID of the newly created avatar 519 /// <description>UUID of the newly created avatar
520 /// account; LLUUID.Zero if failed. 520 /// account; UUID.Zero if failed.
521 /// </description></item> 521 /// </description></item>
522 /// </list> 522 /// </list>
523 /// </remarks> 523 /// </remarks>
@@ -551,9 +551,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
551 if (null != userProfile) 551 if (null != userProfile)
552 throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); 552 throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname));
553 553
554 LLUUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY); 554 UUID userID = m_app.CreateUser(firstname, lastname, passwd, regX, regY);
555 555
556 if (userID == LLUUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}", 556 if (userID == UUID.Zero) throw new Exception(String.Format("failed to create new user {0} {1}",
557 firstname, lastname)); 557 firstname, lastname));
558 558
559 responseData["success"] = "true"; 559 responseData["success"] = "true";
@@ -569,7 +569,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
569 m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); 569 m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString());
570 570
571 responseData["success"] = "false"; 571 responseData["success"] = "false";
572 responseData["avatar_uuid"] = LLUUID.Zero.ToString(); 572 responseData["avatar_uuid"] = UUID.Zero.ToString();
573 responseData["error"] = e.Message; 573 responseData["error"] = e.Message;
574 574
575 response.Value = responseData; 575 response.Value = responseData;
@@ -742,7 +742,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
742 Scene scene = null; 742 Scene scene = null;
743 if (requestData.Contains("region_uuid")) 743 if (requestData.Contains("region_uuid"))
744 { 744 {
745 LLUUID region_uuid = (string)requestData["region_uuid"]; 745 UUID region_uuid = (string)requestData["region_uuid"];
746 if (!m_app.SceneManager.TryGetScene(region_uuid, out scene)) 746 if (!m_app.SceneManager.TryGetScene(region_uuid, out scene))
747 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 747 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
748 } 748 }
@@ -802,7 +802,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
802 string filename = (string)requestData["filename"]; 802 string filename = (string)requestData["filename"];
803 if (requestData.Contains("region_uuid")) 803 if (requestData.Contains("region_uuid"))
804 { 804 {
805 LLUUID region_uuid = (string)requestData["region_uuid"]; 805 UUID region_uuid = (string)requestData["region_uuid"];
806 if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) 806 if (!m_app.SceneManager.TrySetCurrentScene(region_uuid))
807 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 807 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
808 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 808 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString());
@@ -827,7 +827,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
827 switch (xml_version) 827 switch (xml_version)
828 { 828 {
829 case "1": 829 case "1":
830 m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new LLVector3(0, 0, 0)); 830 m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new Vector3(0, 0, 0));
831 break; 831 break;
832 832
833 case "2": 833 case "2":
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs
index 24e5ada..972d840 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs
@@ -35,7 +35,7 @@ using System.Collections.Generic;
35using System.Collections.Specialized; 35using System.Collections.Specialized;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
38using libsecondlife; 38using OpenMetaverse;
39using System.Xml; 39using System.Xml;
40 40
41namespace OpenSim.ApplicationPlugins.Rest.Inventory 41namespace OpenSim.ApplicationPlugins.Rest.Inventory
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
index 1b94741..9d34b4e 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.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.Generic; 31using System.Collections.Generic;
@@ -190,12 +190,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
190 190
191 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); 191 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
192 192
193 // The only parameter we accept is an LLUUID for 193 // The only parameter we accept is an UUID for
194 // the asset 194 // the asset
195 195
196 if (rdata.Parameters.Length == 1) 196 if (rdata.Parameters.Length == 1)
197 { 197 {
198 LLUUID uuid = new LLUUID(rdata.Parameters[0]); 198 UUID uuid = new UUID(rdata.Parameters[0]);
199 AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture); 199 AssetBase asset = Rest.AssetServices.GetAsset(uuid, istexture);
200 200
201 if (asset != null) 201 if (asset != null)
@@ -233,7 +233,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
233 { 233 {
234 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method); 234 Rest.Log.DebugFormat("{0} REST Asset handler, Method = <{1}> ENTRY", MsgId, rdata.method);
235 235
236 // The only parameter we accept is an LLUUID for 236 // The only parameter we accept is an UUID for
237 // the asset 237 // the asset
238 238
239 if (rdata.Parameters.Length == 1) 239 if (rdata.Parameters.Length == 1)
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index 82e9a13..d352655 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -31,12 +31,12 @@ using System.IO;
31using System.Threading; 31using System.Threading;
32using System.Xml; 32using System.Xml;
33using System.Drawing; 33using System.Drawing;
34using OpenJPEGNet;
35using OpenSim.Framework; 34using OpenSim.Framework;
36using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
37using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
38using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
39using libsecondlife; 38using OpenMetaverse;
39using OpenMetaverse.Imaging;
40using Nini.Config; 40using Nini.Config;
41 41
42namespace OpenSim.ApplicationPlugins.Rest.Inventory 42namespace OpenSim.ApplicationPlugins.Rest.Inventory
@@ -189,7 +189,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
189 189
190 // We can only get here if we are authorized 190 // We can only get here if we are authorized
191 // 191 //
192 // The requestor may have specified an LLUUID or 192 // The requestor may have specified an UUID or
193 // a conjoined FirstName LastName string. We'll 193 // a conjoined FirstName LastName string. We'll
194 // try both. If we fail with the first, UUID, 194 // try both. If we fail with the first, UUID,
195 // attempt, we try the other. As an example, the 195 // attempt, we try the other. As an example, the
@@ -202,6 +202,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
202 // required to designate a GET for an entire 202 // required to designate a GET for an entire
203 // inventory. 203 // inventory.
204 // 204 //
205
206
205 // Do we have at least a user agent name? 207 // Do we have at least a user agent name?
206 208
207 if (rdata.Parameters.Length < 1) 209 if (rdata.Parameters.Length < 1)
@@ -210,15 +212,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
210 rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified"); 212 rdata.Fail(Rest.HttpStatusCodeBadRequest, "no user identity specified");
211 } 213 }
212 214
213 // The first parameter MUST be the agent identification, either an LLUUID 215 // The first parameter MUST be the agent identification, either an UUID
214 // or a space-separated First-name Last-Name specification. We check for 216 // or a space-separated First-name Last-Name specification. We check for
215 // an LLUUID first, if anyone names their character using a valid LLUUID 217 // an UUID first, if anyone names their character using a valid UUID
216 // that identifies another existing avatar will cause this a problem... 218 // that identifies another existing avatar will cause this a problem...
217 219
218 try 220 try
219 { 221 {
220 rdata.uuid = new LLUUID(rdata.Parameters[PARM_USERID]); 222 rdata.uuid = new UUID(rdata.Parameters[PARM_USERID]);
221 Rest.Log.DebugFormat("{0} LLUUID supplied", MsgId); 223 Rest.Log.DebugFormat("{0} UUID supplied", MsgId);
222 rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid); 224 rdata.userProfile = Rest.UserServices.GetUserProfile(rdata.uuid);
223 } 225 }
224 catch 226 catch
@@ -490,7 +492,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
490 // may have already set the parent ID explicitly, in which 492 // may have already set the parent ID explicitly, in which
491 // case we don't have to do it here. 493 // case we don't have to do it here.
492 494
493 if (folder.ParentID == LLUUID.Zero || folder.ParentID == context.ID) 495 if (folder.ParentID == UUID.Zero || folder.ParentID == context.ID)
494 { 496 {
495 if (newnode != String.Empty) 497 if (newnode != String.Empty)
496 { 498 {
@@ -550,7 +552,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
550 // If the parentID is zero, then this is going 552 // If the parentID is zero, then this is going
551 // directly into the root identified by the URI. 553 // directly into the root identified by the URI.
552 554
553 if (item.Folder == LLUUID.Zero) 555 if (item.Folder == UUID.Zero)
554 { 556 {
555 item.Folder = context.ID; 557 item.Folder = context.ID;
556 } 558 }
@@ -719,7 +721,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
719 { 721 {
720 if ((rfound = (folder.Name == PRIVATE_ROOT_NAME))) 722 if ((rfound = (folder.Name == PRIVATE_ROOT_NAME)))
721 { 723 {
722 if ((rfound = (folder.ParentID == LLUUID.Zero))) 724 if ((rfound = (folder.ParentID == UUID.Zero)))
723 break; 725 break;
724 } 726 }
725 } 727 }
@@ -746,7 +748,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
746 foreach (InventoryFolderBase folder in entity.Folders) 748 foreach (InventoryFolderBase folder in entity.Folders)
747 { 749 {
748 if (folder.ParentID == uri.ParentID || 750 if (folder.ParentID == uri.ParentID ||
749 folder.ParentID == LLUUID.Zero) 751 folder.ParentID == UUID.Zero)
750 { 752 {
751 folder.ParentID = uri.ParentID; 753 folder.ParentID = uri.ParentID;
752 xml = folder; 754 xml = folder;
@@ -778,9 +780,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
778 // All went well, so we generate a UUID is one is 780 // All went well, so we generate a UUID is one is
779 // needed. 781 // needed.
780 782
781 if (xml.ID == LLUUID.Zero) 783 if (xml.ID == UUID.Zero)
782 { 784 {
783 xml.ID = LLUUID.Random(); 785 xml.ID = UUID.Random();
784 } 786 }
785 787
786 uri.ParentID = TrashCan.ID; 788 uri.ParentID = TrashCan.ID;
@@ -834,9 +836,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
834 836
835 xml = entity.Items[0]; 837 xml = entity.Items[0];
836 838
837 if (xml.ID == LLUUID.Zero) 839 if (xml.ID == UUID.Zero)
838 { 840 {
839 xml.ID = LLUUID.Random(); 841 xml.ID = UUID.Random();
840 } 842 }
841 843
842 // If the folder reference has changed, then this item is 844 // If the folder reference has changed, then this item is
@@ -1336,7 +1338,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1336 { 1338 {
1337 TrashCan = new InventoryFolderBase(); 1339 TrashCan = new InventoryFolderBase();
1338 TrashCan.Name = "tmp"; 1340 TrashCan.Name = "tmp";
1339 TrashCan.ID = LLUUID.Random(); 1341 TrashCan.ID = UUID.Random();
1340 TrashCan.Version = 1; 1342 TrashCan.Version = 1;
1341 TrashCan.Type = (short) AssetType.TrashFolder; 1343 TrashCan.Type = (short) AssetType.TrashFolder;
1342 TrashCan.ParentID = f.ID; 1344 TrashCan.ParentID = f.ID;
@@ -1556,9 +1558,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1556 // Default values 1558 // Default values
1557 1559
1558 result.Name = String.Empty; 1560 result.Name = String.Empty;
1559 result.ID = LLUUID.Zero; 1561 result.ID = UUID.Zero;
1560 result.Owner = ic.UserID; 1562 result.Owner = ic.UserID;
1561 result.ParentID = LLUUID.Zero; // Context 1563 result.ParentID = UUID.Zero; // Context
1562 result.Type = (short) AssetType.Folder; 1564 result.Type = (short) AssetType.Folder;
1563 result.Version = 1; 1565 result.Version = 1;
1564 1566
@@ -1573,13 +1575,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1573 result.Name = ic.xml.Value; 1575 result.Name = ic.xml.Value;
1574 break; 1576 break;
1575 case "uuid" : 1577 case "uuid" :
1576 result.ID = new LLUUID(ic.xml.Value); 1578 result.ID = new UUID(ic.xml.Value);
1577 break; 1579 break;
1578 case "parent" : 1580 case "parent" :
1579 result.ParentID = new LLUUID(ic.xml.Value); 1581 result.ParentID = new UUID(ic.xml.Value);
1580 break; 1582 break;
1581 case "owner" : 1583 case "owner" :
1582 result.Owner = new LLUUID(ic.xml.Value); 1584 result.Owner = new UUID(ic.xml.Value);
1583 break; 1585 break;
1584 case "type" : 1586 case "type" :
1585 result.Type = Int16.Parse(ic.xml.Value); 1587 result.Type = Int16.Parse(ic.xml.Value);
@@ -1604,7 +1606,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1604 // is necessary where a new folder may have been 1606 // is necessary where a new folder may have been
1605 // introduced. 1607 // introduced.
1606 1608
1607 if (result.ParentID == LLUUID.Zero) 1609 if (result.ParentID == UUID.Zero)
1608 { 1610 {
1609 result.ParentID = ic.Parent(); 1611 result.ParentID = ic.Parent();
1610 } 1612 }
@@ -1632,9 +1634,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1632 // This is a new folder, so no existing UUID is available 1634 // This is a new folder, so no existing UUID is available
1633 // or appropriate 1635 // or appropriate
1634 1636
1635 if (result.ID == LLUUID.Zero) 1637 if (result.ID == UUID.Zero)
1636 { 1638 {
1637 result.ID = LLUUID.Random(); 1639 result.ID = UUID.Random();
1638 } 1640 }
1639 1641
1640 // Treat this as a new context. Any other information is 1642 // Treat this as a new context. Any other information is
@@ -1664,12 +1666,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1664 1666
1665 result.Name = String.Empty; 1667 result.Name = String.Empty;
1666 result.Description = String.Empty; 1668 result.Description = String.Empty;
1667 result.ID = LLUUID.Zero; 1669 result.ID = UUID.Zero;
1668 result.Folder = LLUUID.Zero; 1670 result.Folder = UUID.Zero;
1669 result.Owner = ic.UserID; 1671 result.Owner = ic.UserID;
1670 result.Creator = ic.UserID; 1672 result.Creator = ic.UserID;
1671 result.AssetID = LLUUID.Zero; 1673 result.AssetID = UUID.Zero;
1672 result.GroupID = LLUUID.Zero; 1674 result.GroupID = UUID.Zero;
1673 result.GroupOwned = false; 1675 result.GroupOwned = false;
1674 result.InvType = (int) InventoryType.Unknown; 1676 result.InvType = (int) InventoryType.Unknown;
1675 result.AssetType = (int) AssetType.Unknown; 1677 result.AssetType = (int) AssetType.Unknown;
@@ -1689,19 +1691,19 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1689 result.Description = ic.xml.Value; 1691 result.Description = ic.xml.Value;
1690 break; 1692 break;
1691 case "uuid" : 1693 case "uuid" :
1692 result.ID = new LLUUID(ic.xml.Value); 1694 result.ID = new UUID(ic.xml.Value);
1693 break; 1695 break;
1694 case "folder" : 1696 case "folder" :
1695 result.Folder = new LLUUID(ic.xml.Value); 1697 result.Folder = new UUID(ic.xml.Value);
1696 break; 1698 break;
1697 case "owner" : 1699 case "owner" :
1698 result.Owner = new LLUUID(ic.xml.Value); 1700 result.Owner = new UUID(ic.xml.Value);
1699 break; 1701 break;
1700 case "invtype" : 1702 case "invtype" :
1701 result.InvType = Int32.Parse(ic.xml.Value); 1703 result.InvType = Int32.Parse(ic.xml.Value);
1702 break; 1704 break;
1703 case "creator" : 1705 case "creator" :
1704 result.Creator = new LLUUID(ic.xml.Value); 1706 result.Creator = new UUID(ic.xml.Value);
1705 break; 1707 break;
1706 case "assettype" : 1708 case "assettype" :
1707 result.AssetType = Int32.Parse(ic.xml.Value); 1709 result.AssetType = Int32.Parse(ic.xml.Value);
@@ -1710,7 +1712,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1710 result.GroupOwned = Boolean.Parse(ic.xml.Value); 1712 result.GroupOwned = Boolean.Parse(ic.xml.Value);
1711 break; 1713 break;
1712 case "groupid" : 1714 case "groupid" :
1713 result.GroupID = new LLUUID(ic.xml.Value); 1715 result.GroupID = new UUID(ic.xml.Value);
1714 break; 1716 break;
1715 case "flags" : 1717 case "flags" :
1716 result.Flags = UInt32.Parse(ic.xml.Value); 1718 result.Flags = UInt32.Parse(ic.xml.Value);
@@ -1776,7 +1778,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1776 // This is not a persistent attribute 1778 // This is not a persistent attribute
1777 bool inline = true; 1779 bool inline = true;
1778 1780
1779 LLUUID uuid = LLUUID.Zero; 1781 UUID uuid = UUID.Zero;
1780 1782
1781 // Attribute is optional 1783 // Attribute is optional
1782 if (ic.xml.HasAttributes) 1784 if (ic.xml.HasAttributes)
@@ -1804,7 +1806,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1804 break; 1806 break;
1805 1807
1806 case "uuid" : 1808 case "uuid" :
1807 uuid = new LLUUID(ic.xml.Value); 1809 uuid = new UUID(ic.xml.Value);
1808 break; 1810 break;
1809 1811
1810 case "inline" : 1812 case "inline" :
@@ -1834,7 +1836,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1834 { 1836 {
1835 if (ic.Item != null) 1837 if (ic.Item != null)
1836 { 1838 {
1837 ic.Item.AssetID = new LLUUID(ic.xml.ReadElementContentAsString()); 1839 ic.Item.AssetID = new UUID(ic.xml.ReadElementContentAsString());
1838 Rest.Log.DebugFormat("{0} Asset ID supplied: {1}", MsgId, ic.Item.AssetID); 1840 Rest.Log.DebugFormat("{0} Asset ID supplied: {1}", MsgId, ic.Item.AssetID);
1839 } 1841 }
1840 else 1842 else
@@ -1855,9 +1857,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1855 // Generate a UUID of none were given, and generally none should 1857 // Generate a UUID of none were given, and generally none should
1856 // be. Ever. 1858 // be. Ever.
1857 1859
1858 if (uuid == LLUUID.Zero) 1860 if (uuid == UUID.Zero)
1859 { 1861 {
1860 uuid = LLUUID.Random(); 1862 uuid = UUID.Random();
1861 } 1863 }
1862 1864
1863 // Create AssetBase entity to hold the inlined asset 1865 // Create AssetBase entity to hold the inlined asset
@@ -1887,7 +1889,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1887 // If this is in the context of an item, establish 1889 // If this is in the context of an item, establish
1888 // a link with the item in context. 1890 // a link with the item in context.
1889 1891
1890 if (ic.Item != null && ic.Item.AssetID == LLUUID.Zero) 1892 if (ic.Item != null && ic.Item.AssetID == UUID.Zero)
1891 { 1893 {
1892 ic.Item.AssetID = uuid; 1894 ic.Item.AssetID = uuid;
1893 } 1895 }
@@ -1970,7 +1972,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1970 // here. It should always get set from the information stored 1972 // here. It should always get set from the information stored
1971 // when the Asset element was processed. 1973 // when the Asset element was processed.
1972 1974
1973 if (ic.Item.AssetID == LLUUID.Zero) 1975 if (ic.Item.AssetID == UUID.Zero)
1974 { 1976 {
1975 Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId); 1977 Rest.Log.ErrorFormat("{0} Unable to complete request", MsgId);
1976 Rest.Log.InfoFormat("{0} Asset information is missing", MsgId); 1978 Rest.Log.InfoFormat("{0} Asset information is missing", MsgId);
@@ -1979,16 +1981,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1979 1981
1980 // If the item is new, then assign it an ID 1982 // If the item is new, then assign it an ID
1981 1983
1982 if (ic.Item.ID == LLUUID.Zero) 1984 if (ic.Item.ID == UUID.Zero)
1983 { 1985 {
1984 ic.Item.ID = LLUUID.Random(); 1986 ic.Item.ID = UUID.Random();
1985 } 1987 }
1986 1988
1987 // If the context is being implied, obtain the current 1989 // If the context is being implied, obtain the current
1988 // folder item's ID. If it was specified explicitly, make 1990 // folder item's ID. If it was specified explicitly, make
1989 // sure that theparent folder exists. 1991 // sure that theparent folder exists.
1990 1992
1991 if (ic.Item.Folder == LLUUID.Zero) 1993 if (ic.Item.Folder == UUID.Zero)
1992 { 1994 {
1993 ic.Item.Folder = ic.Parent(); 1995 ic.Item.Folder = ic.Parent();
1994 } 1996 }
@@ -2113,8 +2115,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2113 Bitmap temp; 2115 Bitmap temp;
2114 Stream tgadata = new MemoryStream(ic.Asset.Data); 2116 Stream tgadata = new MemoryStream(ic.Asset.Data);
2115 2117
2116 temp = OpenJPEGNet.LoadTGAClass.LoadTGA(tgadata); 2118 temp = LoadTGAClass.LoadTGA(tgadata);
2117 ic.Asset.Data = OpenJPEGNet.OpenJPEG.EncodeFromImage(temp, true); 2119 ic.Asset.Data = OpenJPEG.EncodeFromImage(temp, true);
2118 } 2120 }
2119 2121
2120 ic.reset(); 2122 ic.reset();
@@ -2129,7 +2131,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2129 /// extensions. 2131 /// extensions.
2130 /// </summary> 2132 /// </summary>
2131 2133
2132 internal LLUUID uuid = LLUUID.Zero; 2134 internal UUID uuid = UUID.Zero;
2133 internal bool HaveInventory = false; 2135 internal bool HaveInventory = false;
2134 internal ICollection<InventoryFolderImpl> folders = null; 2136 internal ICollection<InventoryFolderImpl> folders = null;
2135 internal ICollection<InventoryItemBase> items = null; 2137 internal ICollection<InventoryItemBase> items = null;
@@ -2214,7 +2216,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2214 EveryOnePermissions = DefaultEveryOne; 2216 EveryOnePermissions = DefaultEveryOne;
2215 } 2217 }
2216 2218
2217 internal LLUUID Parent() 2219 internal UUID Parent()
2218 { 2220 {
2219 if (stk.Count != 0) 2221 if (stk.Count != 0)
2220 { 2222 {
@@ -2222,7 +2224,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2222 } 2224 }
2223 else 2225 else
2224 { 2226 {
2225 return LLUUID.Zero; 2227 return UUID.Zero;
2226 } 2228 }
2227 } 2229 }
2228 2230
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
index 3ac48c9..aba7357 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
@@ -26,7 +26,7 @@
26 * 26 *
27 */ 27 */
28 28
29using libsecondlife; 29using OpenMetaverse;
30using Nini.Config; 30using Nini.Config;
31using System; 31using System;
32using System.IO; 32using System.IO;
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs
index 1cbe38f..54d8478 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.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.Generic; 31using System.Collections.Generic;
@@ -174,7 +174,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
174 float x = Convert.ToSingle(rdata.Parameters[PARM_MOVE_X]); 174 float x = Convert.ToSingle(rdata.Parameters[PARM_MOVE_X]);
175 float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]); 175 float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]);
176 float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]); 176 float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]);
177 LLVector3 vector = new LLVector3(x,y,z); 177 Vector3 vector = new Vector3(x,y,z);
178 avatar.DoAutoPilot(0,vector,avatar.ControllingClient); 178 avatar.DoAutoPilot(0,vector,avatar.ControllingClient);
179 } 179 }
180 catch (Exception e) 180 catch (Exception e)
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index ce564dd..d812e24 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
36using System.Timers; 36using System.Timers;
37using System.Xml; 37using System.Xml;
38using System.Xml.Serialization; 38using System.Xml.Serialization;
39using libsecondlife; 39using OpenMetaverse;
40using Mono.Addins; 40using Mono.Addins;
41using Nwc.XmlRpc; 41using Nwc.XmlRpc;
42using Nini.Config; 42using Nini.Config;
@@ -109,11 +109,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
109 // be resilient and don't get confused by a terminating '/' 109 // be resilient and don't get confused by a terminating '/'
110 param = param.TrimEnd(new char[]{'/'}); 110 param = param.TrimEnd(new char[]{'/'});
111 string[] comps = param.Split('/'); 111 string[] comps = param.Split('/');
112 LLUUID regionID = (LLUUID)comps[0]; 112 UUID regionID = (UUID)comps[0];
113 113
114 m_log.DebugFormat("{0} GET region UUID {1}", MsgID, regionID.ToString()); 114 m_log.DebugFormat("{0} GET region UUID {1}", MsgID, regionID.ToString());
115 115
116 if (LLUUID.Zero == regionID) throw new Exception("missing region ID"); 116 if (UUID.Zero == regionID) throw new Exception("missing region ID");
117 117
118 Scene scene = null; 118 Scene scene = null;
119 App.SceneManager.TryGetScene(regionID, out scene); 119 App.SceneManager.TryGetScene(regionID, out scene);
@@ -150,7 +150,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
150 return RegionStats(httpResponse, scene); 150 return RegionStats(httpResponse, scene);
151 151
152 case "prims": 152 case "prims":
153 return RegionPrims(httpResponse, scene, LLVector3.Zero, LLVector3.Zero); 153 return RegionPrims(httpResponse, scene, Vector3.Zero, Vector3.Zero);
154 } 154 }
155 } 155 }
156 156
@@ -162,11 +162,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
162 string[] subregion = comps[2].Split(','); 162 string[] subregion = comps[2].Split(',');
163 if (subregion.Length == 6) 163 if (subregion.Length == 6)
164 { 164 {
165 LLVector3 min, max; 165 Vector3 min, max;
166 try 166 try
167 { 167 {
168 min = new LLVector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); 168 min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2]));
169 max = new LLVector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); 169 max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5]));
170 } 170 }
171 catch (Exception) 171 catch (Exception)
172 { 172 {
@@ -215,7 +215,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
215 return XmlWriterResult; 215 return XmlWriterResult;
216 } 216 }
217 217
218 protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, LLVector3 min, LLVector3 max) 218 protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
219 { 219 {
220 httpResponse.SendChunked = true; 220 httpResponse.SendChunked = true;
221 httpResponse.ContentType = "text/xml"; 221 httpResponse.ContentType = "text/xml";
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
index 6e3d1ff..73a1b9b 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
@@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
36using System.Timers; 36using System.Timers;
37using System.Xml; 37using System.Xml;
38using System.Xml.Serialization; 38using System.Xml.Serialization;
39using libsecondlife; 39using OpenMetaverse;
40using Mono.Addins; 40using Mono.Addins;
41using Nwc.XmlRpc; 41using Nwc.XmlRpc;
42using Nini.Config; 42using Nini.Config;
@@ -76,10 +76,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
76 // Parse region ID and other parameters 76 // Parse region ID and other parameters
77 param = param.TrimEnd(new char[]{'/'}); 77 param = param.TrimEnd(new char[]{'/'});
78 string[] comps = param.Split('/'); 78 string[] comps = param.Split('/');
79 LLUUID regionID = (LLUUID)comps[0]; 79 UUID regionID = (UUID)comps[0];
80 80
81 m_log.DebugFormat("{0} POST region UUID {1}", MsgID, regionID.ToString()); 81 m_log.DebugFormat("{0} POST region UUID {1}", MsgID, regionID.ToString());
82 if (LLUUID.Zero == regionID) throw new Exception("missing region ID"); 82 if (UUID.Zero == regionID) throw new Exception("missing region ID");
83 83
84 Scene scene = null; 84 Scene scene = null;
85 App.SceneManager.TryGetScene(regionID, out scene); 85 App.SceneManager.TryGetScene(regionID, out scene);
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 74cf354..d517895 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.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; 29using System;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
@@ -58,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
58 region_id = regInfo.RegionID.ToString(); 58 region_id = regInfo.RegionID.ToString();
59 region_x = regInfo.RegionLocX; 59 region_x = regInfo.RegionLocX;
60 region_y = regInfo.RegionLocY; 60 region_y = regInfo.RegionLocY;
61 if (regInfo.EstateSettings.EstateOwner != LLUUID.Zero) 61 if (regInfo.EstateSettings.EstateOwner != UUID.Zero)
62 region_owner_id = regInfo.EstateSettings.EstateOwner.ToString(); 62 region_owner_id = regInfo.EstateSettings.EstateOwner.ToString();
63 else 63 else
64 region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString(); 64 region_owner_id = regInfo.MasterAvatarAssignedUUID.ToString();
@@ -101,4 +101,4 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
101 } 101 }
102 } 102 }
103 } 103 }
104} \ No newline at end of file 104}
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
index 1f68d2b..4c24f3f 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RestRegionPlugin.cs
@@ -36,7 +36,7 @@ using System.Text.RegularExpressions;
36using System.Timers; 36using System.Timers;
37using System.Xml; 37using System.Xml;
38using System.Xml.Serialization; 38using System.Xml.Serialization;
39using libsecondlife; 39using OpenMetaverse;
40using Nwc.XmlRpc; 40using Nwc.XmlRpc;
41using Nini.Config; 41using Nini.Config;
42using OpenSim.Framework; 42using OpenSim.Framework;
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index 1f633d5..3fb9662 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -34,7 +34,7 @@ using System.Net;
34using System.Reflection; 34using System.Reflection;
35using System.Timers; 35using System.Timers;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using Nwc.XmlRpc; 38using Nwc.XmlRpc;
39using Nini.Config; 39using Nini.Config;
40using OpenSim.Framework; 40using OpenSim.Framework;
@@ -339,7 +339,7 @@ namespace OpenSim.ApplicationPlugins.Rest
339 /// HTTP header is indeed the password on file for the avatar 339 /// HTTP header is indeed the password on file for the avatar
340 /// specified by the UUID 340 /// specified by the UUID
341 /// </summary> 341 /// </summary>
342 protected bool IsVerifiedUser(OSHttpRequest request, LLUUID uuid) 342 protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid)
343 { 343 {
344 // XXX under construction 344 // XXX under construction
345 return false; 345 return false;
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs
index 690abd0..f38d578 100644
--- a/OpenSim/Data/AssetDataBase.cs
+++ b/OpenSim/Data/AssetDataBase.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;
29using OpenSim.Framework; 29using OpenSim.Framework;
30 30
31namespace OpenSim.Data 31namespace OpenSim.Data
32{ 32{
33 public abstract class AssetDataBase : IAssetProviderPlugin 33 public abstract class AssetDataBase : IAssetProviderPlugin
34 { 34 {
35 public abstract AssetBase FetchAsset(LLUUID uuid); 35 public abstract AssetBase FetchAsset(UUID uuid);
36 public abstract void CreateAsset(AssetBase asset); 36 public abstract void CreateAsset(AssetBase asset);
37 public abstract void UpdateAsset(AssetBase asset); 37 public abstract void UpdateAsset(AssetBase asset);
38 public abstract bool ExistsAsset(LLUUID uuid); 38 public abstract bool ExistsAsset(UUID uuid);
39 39
40 public abstract string Version { get; } 40 public abstract string Version { get; }
41 public abstract string Name { get; } 41 public abstract string Name { get; }
diff --git a/OpenSim/Data/Base/AppearanceTableMapper.cs b/OpenSim/Data/Base/AppearanceTableMapper.cs
index 7964880..c1bb739 100644
--- a/OpenSim/Data/Base/AppearanceTableMapper.cs
+++ b/OpenSim/Data/Base/AppearanceTableMapper.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31using OpenSim.Framework; 31using OpenSim.Framework;
32 32
@@ -55,15 +55,15 @@ namespace OpenSim.Data.Base
55 m_schema = rowMapperSchema; 55 m_schema = rowMapperSchema;
56 56
57 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID", 57 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID",
58 delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.UUID; }, 58 delegate(AppearanceRowMapper mapper) { return mapper.Object.Owner.Guid; },
59 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new LLUUID(value.ToString()); }); 59 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Owner = new UUID(value.ToString()); });
60 60
61 rowMapperSchema.AddMapping<uint>("Serial", 61 rowMapperSchema.AddMapping<uint>("Serial",
62 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; }, 62 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.Serial; },
63 delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; }); 63 delegate(AppearanceRowMapper mapper, uint value) { mapper.Object.Serial = (int)value; });
64 64
65 rowMapperSchema.AddMapping<Guid>("WearableItem0", 65 rowMapperSchema.AddMapping<Guid>("WearableItem0",
66 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.UUID; }, 66 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].ItemID.Guid; },
67 delegate(AppearanceRowMapper mapper, Guid value) 67 delegate(AppearanceRowMapper mapper, Guid value)
68 { 68 {
69 if (mapper.Object.Wearables == null) 69 if (mapper.Object.Wearables == null)
@@ -74,121 +74,121 @@ namespace OpenSim.Data.Base
74 mapper.Object.Wearables[i] = new AvatarWearable(); 74 mapper.Object.Wearables[i] = new AvatarWearable();
75 } 75 }
76 } 76 }
77 mapper.Object.Wearables[0].ItemID = new LLUUID(value.ToString()); 77 mapper.Object.Wearables[0].ItemID = new UUID(value.ToString());
78 }); 78 });
79 79
80 rowMapperSchema.AddMapping<Guid>("WearableAsset0", 80 rowMapperSchema.AddMapping<Guid>("WearableAsset0",
81 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; }, 81 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.Guid; },
82 delegate(AppearanceRowMapper mapper, Guid value) 82 delegate(AppearanceRowMapper mapper, Guid value)
83 { mapper.Object.Wearables[0].AssetID = new LLUUID(value.ToString()); }); 83 { mapper.Object.Wearables[0].AssetID = new UUID(value.ToString()); });
84 84
85 rowMapperSchema.AddMapping<Guid>("WearableItem1", 85 rowMapperSchema.AddMapping<Guid>("WearableItem1",
86 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; }, 86 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.Guid; },
87 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new LLUUID(value.ToString()); }); 87 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new UUID(value.ToString()); });
88 88
89 rowMapperSchema.AddMapping<Guid>("WearableAsset1", 89 rowMapperSchema.AddMapping<Guid>("WearableAsset1",
90 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; }, 90 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.Guid; },
91 delegate(AppearanceRowMapper mapper, Guid value) 91 delegate(AppearanceRowMapper mapper, Guid value)
92 { mapper.Object.Wearables[1].AssetID = new LLUUID(value.ToString()); }); 92 { mapper.Object.Wearables[1].AssetID = new UUID(value.ToString()); });
93 93
94 rowMapperSchema.AddMapping<Guid>("WearableItem2", 94 rowMapperSchema.AddMapping<Guid>("WearableItem2",
95 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; }, 95 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.Guid; },
96 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new LLUUID(value.ToString()); }); 96 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new UUID(value.ToString()); });
97 97
98 rowMapperSchema.AddMapping<Guid>("WearableAsset2", 98 rowMapperSchema.AddMapping<Guid>("WearableAsset2",
99 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; }, 99 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.Guid; },
100 delegate(AppearanceRowMapper mapper, Guid value) 100 delegate(AppearanceRowMapper mapper, Guid value)
101 { mapper.Object.Wearables[2].AssetID = new LLUUID(value.ToString()); }); 101 { mapper.Object.Wearables[2].AssetID = new UUID(value.ToString()); });
102 102
103 rowMapperSchema.AddMapping<Guid>("WearableItem3", 103 rowMapperSchema.AddMapping<Guid>("WearableItem3",
104 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; }, 104 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.Guid; },
105 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new LLUUID(value.ToString()); }); 105 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new UUID(value.ToString()); });
106 106
107 rowMapperSchema.AddMapping<Guid>("WearableAsset3", 107 rowMapperSchema.AddMapping<Guid>("WearableAsset3",
108 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; }, 108 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.Guid; },
109 delegate(AppearanceRowMapper mapper, Guid value) 109 delegate(AppearanceRowMapper mapper, Guid value)
110 { mapper.Object.Wearables[3].AssetID = new LLUUID(value.ToString()); }); 110 { mapper.Object.Wearables[3].AssetID = new UUID(value.ToString()); });
111 111
112 rowMapperSchema.AddMapping<Guid>("WearableItem4", 112 rowMapperSchema.AddMapping<Guid>("WearableItem4",
113 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; }, 113 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.Guid; },
114 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new LLUUID(value.ToString()); }); 114 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new UUID(value.ToString()); });
115 115
116 rowMapperSchema.AddMapping<Guid>("WearableAsset4", 116 rowMapperSchema.AddMapping<Guid>("WearableAsset4",
117 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; }, 117 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.Guid; },
118 delegate(AppearanceRowMapper mapper, Guid value) 118 delegate(AppearanceRowMapper mapper, Guid value)
119 { mapper.Object.Wearables[4].AssetID = new LLUUID(value.ToString()); }); 119 { mapper.Object.Wearables[4].AssetID = new UUID(value.ToString()); });
120 120
121 rowMapperSchema.AddMapping<Guid>("WearableItem5", 121 rowMapperSchema.AddMapping<Guid>("WearableItem5",
122 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; }, 122 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.Guid; },
123 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new LLUUID(value.ToString()); }); 123 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new UUID(value.ToString()); });
124 124
125 rowMapperSchema.AddMapping<Guid>("WearableAsset5", 125 rowMapperSchema.AddMapping<Guid>("WearableAsset5",
126 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; }, 126 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.Guid; },
127 delegate(AppearanceRowMapper mapper, Guid value) 127 delegate(AppearanceRowMapper mapper, Guid value)
128 { mapper.Object.Wearables[5].AssetID = new LLUUID(value.ToString()); }); 128 { mapper.Object.Wearables[5].AssetID = new UUID(value.ToString()); });
129 129
130 rowMapperSchema.AddMapping<Guid>("WearableItem6", 130 rowMapperSchema.AddMapping<Guid>("WearableItem6",
131 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; }, 131 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.Guid; },
132 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new LLUUID(value.ToString()); }); 132 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new UUID(value.ToString()); });
133 133
134 rowMapperSchema.AddMapping<Guid>("WearableAsset6", 134 rowMapperSchema.AddMapping<Guid>("WearableAsset6",
135 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; }, 135 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.Guid; },
136 delegate(AppearanceRowMapper mapper, Guid value) 136 delegate(AppearanceRowMapper mapper, Guid value)
137 { mapper.Object.Wearables[6].AssetID = new LLUUID(value.ToString()); }); 137 { mapper.Object.Wearables[6].AssetID = new UUID(value.ToString()); });
138 138
139 rowMapperSchema.AddMapping<Guid>("WearableItem7", 139 rowMapperSchema.AddMapping<Guid>("WearableItem7",
140 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; }, 140 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.Guid; },
141 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new LLUUID(value.ToString()); }); 141 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new UUID(value.ToString()); });
142 142
143 rowMapperSchema.AddMapping<Guid>("WearableAsset7", 143 rowMapperSchema.AddMapping<Guid>("WearableAsset7",
144 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; }, 144 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.Guid; },
145 delegate(AppearanceRowMapper mapper, Guid value) 145 delegate(AppearanceRowMapper mapper, Guid value)
146 { mapper.Object.Wearables[7].AssetID = new LLUUID(value.ToString()); }); 146 { mapper.Object.Wearables[7].AssetID = new UUID(value.ToString()); });
147 147
148 rowMapperSchema.AddMapping<Guid>("WearableItem8", 148 rowMapperSchema.AddMapping<Guid>("WearableItem8",
149 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; }, 149 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.Guid; },
150 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new LLUUID(value.ToString()); }); 150 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new UUID(value.ToString()); });
151 151
152 rowMapperSchema.AddMapping<Guid>("WearableAsset8", 152 rowMapperSchema.AddMapping<Guid>("WearableAsset8",
153 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; }, 153 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.Guid; },
154 delegate(AppearanceRowMapper mapper, Guid value) 154 delegate(AppearanceRowMapper mapper, Guid value)
155 { mapper.Object.Wearables[8].AssetID = new LLUUID(value.ToString()); }); 155 { mapper.Object.Wearables[8].AssetID = new UUID(value.ToString()); });
156 156
157 rowMapperSchema.AddMapping<Guid>("WearableItem9", 157 rowMapperSchema.AddMapping<Guid>("WearableItem9",
158 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; }, 158 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.Guid; },
159 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new LLUUID(value.ToString()); }); 159 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new UUID(value.ToString()); });
160 160
161 rowMapperSchema.AddMapping<Guid>("WearableAsset9", 161 rowMapperSchema.AddMapping<Guid>("WearableAsset9",
162 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; }, 162 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.Guid; },
163 delegate(AppearanceRowMapper mapper, Guid value) 163 delegate(AppearanceRowMapper mapper, Guid value)
164 { mapper.Object.Wearables[9].AssetID = new LLUUID(value.ToString()); }); 164 { mapper.Object.Wearables[9].AssetID = new UUID(value.ToString()); });
165 165
166 rowMapperSchema.AddMapping<Guid>("WearableItem10", 166 rowMapperSchema.AddMapping<Guid>("WearableItem10",
167 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; }, 167 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.Guid; },
168 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new LLUUID(value.ToString()); }); 168 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new UUID(value.ToString()); });
169 169
170 rowMapperSchema.AddMapping<Guid>("WearableAsset10", 170 rowMapperSchema.AddMapping<Guid>("WearableAsset10",
171 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; }, 171 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.Guid; },
172 delegate(AppearanceRowMapper mapper, Guid value) 172 delegate(AppearanceRowMapper mapper, Guid value)
173 { mapper.Object.Wearables[10].AssetID = new LLUUID(value.ToString()); }); 173 { mapper.Object.Wearables[10].AssetID = new UUID(value.ToString()); });
174 174
175 rowMapperSchema.AddMapping<Guid>("WearableItem11", 175 rowMapperSchema.AddMapping<Guid>("WearableItem11",
176 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; }, 176 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.Guid; },
177 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new LLUUID(value.ToString()); }); 177 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new UUID(value.ToString()); });
178 178
179 rowMapperSchema.AddMapping<Guid>("WearableAsset11", 179 rowMapperSchema.AddMapping<Guid>("WearableAsset11",
180 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; }, 180 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.Guid; },
181 delegate(AppearanceRowMapper mapper, Guid value) 181 delegate(AppearanceRowMapper mapper, Guid value)
182 { mapper.Object.Wearables[11].AssetID = new LLUUID(value.ToString()); }); 182 { mapper.Object.Wearables[11].AssetID = new UUID(value.ToString()); });
183 183
184 rowMapperSchema.AddMapping<Guid>("WearableItem12", 184 rowMapperSchema.AddMapping<Guid>("WearableItem12",
185 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; }, 185 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.Guid; },
186 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new LLUUID(value.ToString()); }); 186 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new UUID(value.ToString()); });
187 187
188 rowMapperSchema.AddMapping<Guid>("WearableAsset12", 188 rowMapperSchema.AddMapping<Guid>("WearableAsset12",
189 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; }, 189 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.Guid; },
190 delegate(AppearanceRowMapper mapper, Guid value) 190 delegate(AppearanceRowMapper mapper, Guid value)
191 { mapper.Object.Wearables[12].AssetID = new LLUUID(value.ToString()); }); 191 { mapper.Object.Wearables[12].AssetID = new UUID(value.ToString()); });
192 192
193 } 193 }
194 194
@@ -213,7 +213,7 @@ namespace OpenSim.Data.Base
213 public bool Update(Guid userID, AvatarAppearance appearance) 213 public bool Update(Guid userID, AvatarAppearance appearance)
214 { 214 {
215 AppearanceRowMapper mapper = CreateRowMapper(appearance); 215 AppearanceRowMapper mapper = CreateRowMapper(appearance);
216 return Update(appearance.Owner.UUID, mapper); 216 return Update(appearance.Owner.Guid, mapper);
217 } 217 }
218 218
219 /// <summary> 219 /// <summary>
@@ -244,7 +244,7 @@ namespace OpenSim.Data.Base
244 protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance) 244 protected AppearanceRowMapper FromReader(BaseDataReader reader, AvatarAppearance appearance)
245 { 245 {
246 AppearanceRowMapper mapper = CreateRowMapper(appearance); 246 AppearanceRowMapper mapper = CreateRowMapper(appearance);
247 mapper.FillObject(reader); 247 mapper.FiPrimitive(reader);
248 return mapper; 248 return mapper;
249 } 249 }
250 250
@@ -256,7 +256,7 @@ namespace OpenSim.Data.Base
256 public override AppearanceRowMapper FromReader(BaseDataReader reader) 256 public override AppearanceRowMapper FromReader(BaseDataReader reader)
257 { 257 {
258 AppearanceRowMapper mapper = CreateRowMapper(); 258 AppearanceRowMapper mapper = CreateRowMapper();
259 mapper.FillObject(reader); 259 mapper.FiPrimitive(reader);
260 return mapper; 260 return mapper;
261 } 261 }
262 262
diff --git a/OpenSim/Data/Base/BaseRowMapper.cs b/OpenSim/Data/Base/BaseRowMapper.cs
index d07f9b3..d0e545b 100644
--- a/OpenSim/Data/Base/BaseRowMapper.cs
+++ b/OpenSim/Data/Base/BaseRowMapper.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Data.Base
32 /// </summary> 32 /// </summary>
33 public abstract class BaseRowMapper 33 public abstract class BaseRowMapper
34 { 34 {
35 public abstract void FillObject(BaseDataReader reader); 35 public abstract void FiPrimitive(BaseDataReader reader);
36 } 36 }
37 37
38 /// <summary> 38 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Data.Base
67 /// 67 ///
68 /// </summary> 68 /// </summary>
69 /// <param name="reader"></param> 69 /// <param name="reader"></param>
70 public override void FillObject(BaseDataReader reader) 70 public override void FiPrimitive(BaseDataReader reader)
71 { 71 {
72 foreach (BaseFieldMapper fieldMapper in m_schema.Fields.Values) 72 foreach (BaseFieldMapper fieldMapper in m_schema.Fields.Values)
73 { 73 {
diff --git a/OpenSim/Data/GridDataBase.cs b/OpenSim/Data/GridDataBase.cs
index 0b56d07..0fd4d86 100644
--- a/OpenSim/Data/GridDataBase.cs
+++ b/OpenSim/Data/GridDataBase.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.Data 30namespace OpenSim.Data
31{ 31{
32 public abstract class GridDataBase : IGridDataPlugin 32 public abstract class GridDataBase : IGridDataPlugin
33 { 33 {
34 public abstract RegionProfileData GetProfileByHandle(ulong regionHandle); 34 public abstract RegionProfileData GetProfileByHandle(ulong regionHandle);
35 public abstract RegionProfileData GetProfileByLLUUID(LLUUID UUID); 35 public abstract RegionProfileData GetProfileByUUID(UUID UUID);
36 public abstract RegionProfileData GetProfileByString(string regionName); 36 public abstract RegionProfileData GetProfileByString(string regionName);
37 public abstract RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); 37 public abstract RegionProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
38 public abstract bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); 38 public abstract bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey);
39 public abstract DataResponse AddProfile(RegionProfileData profile); 39 public abstract DataResponse AddProfile(RegionProfileData profile);
40 public abstract ReservationData GetReservationAtPoint(uint x, uint y); 40 public abstract ReservationData GetReservationAtPoint(uint x, uint y);
41 public abstract DataResponse UpdateProfile(RegionProfileData profile); 41 public abstract DataResponse UpdateProfile(RegionProfileData profile);
diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs
index c77bbb7..c5f4ee1 100644
--- a/OpenSim/Data/IGridData.cs
+++ b/OpenSim/Data/IGridData.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;
30 30
31namespace OpenSim.Data 31namespace OpenSim.Data
@@ -60,7 +60,7 @@ namespace OpenSim.Data
60 /// </summary> 60 /// </summary>
61 /// <param name="UUID">A 128bit UUID</param> 61 /// <param name="UUID">A 128bit UUID</param>
62 /// <returns>A sim profile</returns> 62 /// <returns>A sim profile</returns>
63 RegionProfileData GetProfileByLLUUID(LLUUID UUID); 63 RegionProfileData GetProfileByUUID(UUID UUID);
64 64
65 /// <summary> 65 /// <summary>
66 /// Returns a sim profile from a string match 66 /// Returns a sim profile from a string match
@@ -87,7 +87,7 @@ namespace OpenSim.Data
87 /// <param name="regionHandle">The regionhandle sent by the sim</param> 87 /// <param name="regionHandle">The regionhandle sent by the sim</param>
88 /// <param name="simrecvkey">The receiving key sent by the sim</param> 88 /// <param name="simrecvkey">The receiving key sent by the sim</param>
89 /// <returns>Whether the sim has been authenticated</returns> 89 /// <returns>Whether the sim has been authenticated</returns>
90 bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); 90 bool AuthenticateSim(UUID UUID, ulong regionHandle, string simrecvkey);
91 91
92 /// <summary> 92 /// <summary>
93 /// Adds a new profile to the database 93 /// Adds a new profile to the database
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index e10e3aa..ed1c91b 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -84,7 +84,7 @@ namespace OpenSim.Data.MSSQL
84 /// </summary> 84 /// </summary>
85 /// <param name="assetID">the asset UUID</param> 85 /// <param name="assetID">the asset UUID</param>
86 /// <returns></returns> 86 /// <returns></returns>
87 override public AssetBase FetchAsset(LLUUID assetID) 87 override public AssetBase FetchAsset(UUID assetID)
88 { 88 {
89 Dictionary<string, string> param = new Dictionary<string, string>(); 89 Dictionary<string, string> param = new Dictionary<string, string>();
90 param["id"] = assetID.ToString(); 90 param["id"] = assetID.ToString();
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// <param name="asset">the asset</param> 102 /// <param name="asset">the asset</param>
103 override public void CreateAsset(AssetBase asset) 103 override public void CreateAsset(AssetBase asset)
104 { 104 {
105 if (ExistsAsset((LLUUID) asset.FullID)) 105 if (ExistsAsset((UUID) asset.FullID))
106 { 106 {
107 return; 107 return;
108 } 108 }
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
181 /// </summary> 181 /// </summary>
182 /// <param name="uuid"></param> 182 /// <param name="uuid"></param>
183 /// <returns>true if exist.</returns> 183 /// <returns>true if exist.</returns>
184 override public bool ExistsAsset(LLUUID uuid) 184 override public bool ExistsAsset(UUID uuid)
185 { 185 {
186 if (FetchAsset(uuid) != null) 186 if (FetchAsset(uuid) != null)
187 { 187 {
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
index 74eecd8..b42c67f 100644
--- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// </summary> 102 /// </summary>
103 /// <param name="regionID">region ID.</param> 103 /// <param name="regionID">region ID.</param>
104 /// <returns></returns> 104 /// <returns></returns>
105 public EstateSettings LoadEstateSettings(LLUUID regionID) 105 public EstateSettings LoadEstateSettings(UUID regionID)
106 { 106 {
107 EstateSettings es = new EstateSettings(); 107 EstateSettings es = new EstateSettings();
108 108
@@ -128,10 +128,10 @@ namespace OpenSim.Data.MSSQL
128 else 128 else
129 _FieldMap[name].SetValue(es, false); 129 _FieldMap[name].SetValue(es, false);
130 } 130 }
131 else if (_FieldMap[name].GetValue(es) is LLUUID) 131 else if (_FieldMap[name].GetValue(es) is UUID)
132 { 132 {
133 LLUUID uuid; 133 UUID uuid;
134 LLUUID.TryParse(reader[name].ToString(), out uuid); 134 UUID.TryParse(reader[name].ToString(), out uuid);
135 135
136 _FieldMap[name].SetValue(es, uuid); 136 _FieldMap[name].SetValue(es, uuid);
137 } 137 }
@@ -333,8 +333,8 @@ namespace OpenSim.Data.MSSQL
333 { 333 {
334 EstateBan eb = new EstateBan(); 334 EstateBan eb = new EstateBan();
335 335
336 LLUUID uuid; 336 UUID uuid;
337 LLUUID.TryParse(reader["bannedUUID"].ToString(), out uuid); 337 UUID.TryParse(reader["bannedUUID"].ToString(), out uuid);
338 338
339 eb.bannedUUID = uuid; 339 eb.bannedUUID = uuid;
340 eb.bannedIP = "0.0.0.0"; 340 eb.bannedIP = "0.0.0.0";
@@ -345,9 +345,9 @@ namespace OpenSim.Data.MSSQL
345 } 345 }
346 } 346 }
347 347
348 private LLUUID[] LoadUUIDList(uint estateID, string table) 348 private UUID[] LoadUUIDList(uint estateID, string table)
349 { 349 {
350 List<LLUUID> uuids = new List<LLUUID>(); 350 List<UUID> uuids = new List<UUID>();
351 351
352 string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table); 352 string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table);
353 353
@@ -361,8 +361,8 @@ namespace OpenSim.Data.MSSQL
361 { 361 {
362 // EstateBan eb = new EstateBan(); 362 // EstateBan eb = new EstateBan();
363 363
364 LLUUID uuid; 364 UUID uuid;
365 LLUUID.TryParse(reader["uuid"].ToString(), out uuid); 365 UUID.TryParse(reader["uuid"].ToString(), out uuid);
366 366
367 uuids.Add(uuid); 367 uuids.Add(uuid);
368 } 368 }
@@ -399,7 +399,7 @@ namespace OpenSim.Data.MSSQL
399 } 399 }
400 } 400 }
401 401
402 private void SaveUUIDList(uint estateID, string table, LLUUID[] data) 402 private void SaveUUIDList(uint estateID, string table, UUID[] data)
403 { 403 {
404 //Delete first 404 //Delete first
405 string sql = string.Format("delete from {0} where EstateID = @EstateID", table); 405 string sql = string.Format("delete from {0} where EstateID = @EstateID", table);
@@ -416,7 +416,7 @@ namespace OpenSim.Data.MSSQL
416 416
417 bool createParamOnce = true; 417 bool createParamOnce = true;
418 418
419 foreach (LLUUID uuid in data) 419 foreach (UUID uuid in data)
420 { 420 {
421 if (createParamOnce) 421 if (createParamOnce)
422 { 422 {
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index 423d4aa..47edc4b 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Reflection; 31using System.Reflection;
32using System.Security.Cryptography; 32using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37 37
@@ -176,7 +176,7 @@ namespace OpenSim.Data.MSSQL
176 /// </summary> 176 /// </summary>
177 /// <param name="uuid">The region UUID</param> 177 /// <param name="uuid">The region UUID</param>
178 /// <returns>The sim profile</returns> 178 /// <returns>The sim profile</returns>
179 override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) 179 override public RegionProfileData GetProfileByUUID(UUID uuid)
180 { 180 {
181 Dictionary<string, string> param = new Dictionary<string, string>(); 181 Dictionary<string, string> param = new Dictionary<string, string>();
182 param["uuid"] = uuid.ToString(); 182 param["uuid"] = uuid.ToString();
@@ -284,7 +284,7 @@ namespace OpenSim.Data.MSSQL
284 284
285 parameters["regionHandle"] = profile.regionHandle.ToString(); 285 parameters["regionHandle"] = profile.regionHandle.ToString();
286 parameters["regionName"] = profile.regionName; 286 parameters["regionName"] = profile.regionName;
287 parameters["uuid"] = profile.UUID.ToString(); 287 parameters["uuid"] = profile.ToString();
288 parameters["regionRecvKey"] = profile.regionRecvKey; 288 parameters["regionRecvKey"] = profile.regionRecvKey;
289 parameters["regionSecret"] = profile.regionSecret; 289 parameters["regionSecret"] = profile.regionSecret;
290 parameters["regionSendKey"] = profile.regionSendKey; 290 parameters["regionSendKey"] = profile.regionSendKey;
@@ -352,7 +352,7 @@ namespace OpenSim.Data.MSSQL
352 352
353 parameters["regionHandle"] = profile.regionHandle.ToString(); 353 parameters["regionHandle"] = profile.regionHandle.ToString();
354 parameters["regionName"] = profile.regionName; 354 parameters["regionName"] = profile.regionName;
355 parameters["uuid"] = profile.UUID.ToString(); 355 parameters["uuid"] = profile.ToString();
356 parameters["regionRecvKey"] = profile.regionRecvKey; 356 parameters["regionRecvKey"] = profile.regionRecvKey;
357 parameters["regionSecret"] = profile.regionSecret; 357 parameters["regionSecret"] = profile.regionSecret;
358 parameters["regionSendKey"] = profile.regionSendKey; 358 parameters["regionSendKey"] = profile.regionSendKey;
@@ -403,14 +403,14 @@ namespace OpenSim.Data.MSSQL
403 /// <param name="handle">The attempted regionHandle of the challenger</param> 403 /// <param name="handle">The attempted regionHandle of the challenger</param>
404 /// <param name="authkey">The secret</param> 404 /// <param name="authkey">The secret</param>
405 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 405 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
406 override public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 406 override public bool AuthenticateSim(UUID uuid, ulong handle, string authkey)
407 { 407 {
408 bool throwHissyFit = false; // Should be true by 1.0 408 bool throwHissyFit = false; // Should be true by 1.0
409 409
410 if (throwHissyFit) 410 if (throwHissyFit)
411 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 411 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
412 412
413 RegionProfileData data = GetProfileByLLUUID(uuid); 413 RegionProfileData data = GetProfileByUUID(uuid);
414 414
415 return (handle == data.regionHandle && authkey == data.regionSecret); 415 return (handle == data.regionHandle && authkey == data.regionSecret);
416 } 416 }
@@ -424,7 +424,7 @@ namespace OpenSim.Data.MSSQL
424 /// <param name="authhash"></param> 424 /// <param name="authhash"></param>
425 /// <param name="challenge"></param> 425 /// <param name="challenge"></param>
426 /// <returns></returns> 426 /// <returns></returns>
427 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 427 public bool AuthenticateSim(UUID uuid, ulong handle, string authhash, string challenge)
428 { 428 {
429 // SHA512Managed HashProvider = new SHA512Managed(); 429 // SHA512Managed HashProvider = new SHA512Managed();
430 // Encoding TextProvider = new UTF8Encoding(); 430 // Encoding TextProvider = new UTF8Encoding();
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 9e60b16..e7df7c1 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -167,7 +167,7 @@ namespace OpenSim.Data.MSSQL
167 /// </summary> 167 /// </summary>
168 /// <param name="folderID">The folder to search</param> 168 /// <param name="folderID">The folder to search</param>
169 /// <returns>A list containing inventory items</returns> 169 /// <returns>A list containing inventory items</returns>
170 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 170 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
171 { 171 {
172 try 172 try
173 { 173 {
@@ -201,13 +201,13 @@ namespace OpenSim.Data.MSSQL
201 /// </summary> 201 /// </summary>
202 /// <param name="user">The user whos inventory is to be searched</param> 202 /// <param name="user">The user whos inventory is to be searched</param>
203 /// <returns>A list of folder objects</returns> 203 /// <returns>A list of folder objects</returns>
204 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 204 public List<InventoryFolderBase> getUserRootFolders(UUID user)
205 { 205 {
206 try 206 try
207 { 207 {
208 Dictionary<string, string> param = new Dictionary<string, string>(); 208 Dictionary<string, string> param = new Dictionary<string, string>();
209 param["uuid"] = user.ToString(); 209 param["uuid"] = user.ToString();
210 param["zero"] = LLUUID.Zero.ToString(); 210 param["zero"] = UUID.Zero.ToString();
211 211
212 using (IDbCommand result = 212 using (IDbCommand result =
213 database.Query( 213 database.Query(
@@ -235,13 +235,13 @@ namespace OpenSim.Data.MSSQL
235 /// </summary> 235 /// </summary>
236 /// <param name="user">the User UUID</param> 236 /// <param name="user">the User UUID</param>
237 /// <returns></returns> 237 /// <returns></returns>
238 public InventoryFolderBase getUserRootFolder(LLUUID user) 238 public InventoryFolderBase getUserRootFolder(UUID user)
239 { 239 {
240 try 240 try
241 { 241 {
242 Dictionary<string, string> param = new Dictionary<string, string>(); 242 Dictionary<string, string> param = new Dictionary<string, string>();
243 param["uuid"] = user.ToString(); 243 param["uuid"] = user.ToString();
244 param["zero"] = LLUUID.Zero.ToString(); 244 param["zero"] = UUID.Zero.ToString();
245 245
246 using (IDbCommand result = 246 using (IDbCommand result =
247 database.Query( 247 database.Query(
@@ -281,7 +281,7 @@ namespace OpenSim.Data.MSSQL
281 /// </summary> 281 /// </summary>
282 /// <param name="parentID">The folder to search</param> 282 /// <param name="parentID">The folder to search</param>
283 /// <returns>A list of inventory folders</returns> 283 /// <returns>A list of inventory folders</returns>
284 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 284 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
285 { 285 {
286 try 286 try
287 { 287 {
@@ -318,23 +318,23 @@ namespace OpenSim.Data.MSSQL
318 { 318 {
319 InventoryItemBase item = new InventoryItemBase(); 319 InventoryItemBase item = new InventoryItemBase();
320 320
321 item.ID = new LLUUID((string) reader["inventoryID"]); 321 item.ID = new UUID((string) reader["inventoryID"]);
322 item.AssetID = new LLUUID((string) reader["assetID"]); 322 item.AssetID = new UUID((string) reader["assetID"]);
323 item.AssetType = (int) reader["assetType"]; 323 item.AssetType = (int) reader["assetType"];
324 item.Folder = new LLUUID((string) reader["parentFolderID"]); 324 item.Folder = new UUID((string) reader["parentFolderID"]);
325 item.Owner = new LLUUID((string) reader["avatarID"]); 325 item.Owner = new UUID((string) reader["avatarID"]);
326 item.Name = (string) reader["inventoryName"]; 326 item.Name = (string) reader["inventoryName"];
327 item.Description = (string) reader["inventoryDescription"]; 327 item.Description = (string) reader["inventoryDescription"];
328 item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]); 328 item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]);
329 item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]); 329 item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]);
330 item.InvType = (int) reader["invType"]; 330 item.InvType = (int) reader["invType"];
331 item.Creator = new LLUUID((string) reader["creatorID"]); 331 item.Creator = new UUID((string) reader["creatorID"]);
332 item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]); 332 item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]);
333 item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]); 333 item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]);
334 item.SalePrice = (int) reader["salePrice"]; 334 item.SalePrice = (int) reader["salePrice"];
335 item.SaleType = Convert.ToByte(reader["saleType"]); 335 item.SaleType = Convert.ToByte(reader["saleType"]);
336 item.CreationDate = (int) reader["creationDate"]; 336 item.CreationDate = (int) reader["creationDate"];
337 item.GroupID = new LLUUID(reader["groupID"].ToString()); 337 item.GroupID = new UUID(reader["groupID"].ToString());
338 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); 338 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
339 item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]); 339 item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]);
340 340
@@ -353,7 +353,7 @@ namespace OpenSim.Data.MSSQL
353 /// </summary> 353 /// </summary>
354 /// <param name="item">The item to return</param> 354 /// <param name="item">The item to return</param>
355 /// <returns>An inventory item</returns> 355 /// <returns>An inventory item</returns>
356 public InventoryItemBase getInventoryItem(LLUUID itemID) 356 public InventoryItemBase getInventoryItem(UUID itemID)
357 { 357 {
358 try 358 try
359 { 359 {
@@ -389,9 +389,9 @@ namespace OpenSim.Data.MSSQL
389 try 389 try
390 { 390 {
391 InventoryFolderBase folder = new InventoryFolderBase(); 391 InventoryFolderBase folder = new InventoryFolderBase();
392 folder.Owner = new LLUUID((string) reader["agentID"]); 392 folder.Owner = new UUID((string) reader["agentID"]);
393 folder.ParentID = new LLUUID((string) reader["parentFolderID"]); 393 folder.ParentID = new UUID((string) reader["parentFolderID"]);
394 folder.ID = new LLUUID((string) reader["folderID"]); 394 folder.ID = new UUID((string) reader["folderID"]);
395 folder.Name = (string) reader["folderName"]; 395 folder.Name = (string) reader["folderName"];
396 folder.Type = (short) reader["type"]; 396 folder.Type = (short) reader["type"];
397 folder.Version = Convert.ToUInt16(reader["version"]); 397 folder.Version = Convert.ToUInt16(reader["version"]);
@@ -410,7 +410,7 @@ namespace OpenSim.Data.MSSQL
410 /// </summary> 410 /// </summary>
411 /// <param name="folder">The folder to return</param> 411 /// <param name="folder">The folder to return</param>
412 /// <returns>A folder class</returns> 412 /// <returns>A folder class</returns>
413 public InventoryFolderBase getInventoryFolder(LLUUID folderID) 413 public InventoryFolderBase getInventoryFolder(UUID folderID)
414 { 414 {
415 try 415 try
416 { 416 {
@@ -556,7 +556,7 @@ namespace OpenSim.Data.MSSQL
556 /// Delete an item in inventory database 556 /// Delete an item in inventory database
557 /// </summary> 557 /// </summary>
558 /// <param name="item">the item UUID</param> 558 /// <param name="item">the item UUID</param>
559 public void deleteInventoryItem(LLUUID itemID) 559 public void deleteInventoryItem(UUID itemID)
560 { 560 {
561 try 561 try
562 { 562 {
@@ -679,7 +679,7 @@ namespace OpenSim.Data.MSSQL
679 /// </summary> 679 /// </summary>
680 /// <param name="folders">list where folders will be appended</param> 680 /// <param name="folders">list where folders will be appended</param>
681 /// <param name="parentID">ID of parent</param> 681 /// <param name="parentID">ID of parent</param>
682 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) 682 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
683 { 683 {
684 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID); 684 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID);
685 685
@@ -688,7 +688,7 @@ namespace OpenSim.Data.MSSQL
688 } 688 }
689 689
690 // See IInventoryDataPlugin 690 // See IInventoryDataPlugin
691 public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) 691 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
692 { 692 {
693 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 693 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
694 getInventoryFolders(ref folders, parentID); 694 getInventoryFolders(ref folders, parentID);
@@ -703,7 +703,7 @@ namespace OpenSim.Data.MSSQL
703 /// Delete a folder in inventory databasae 703 /// Delete a folder in inventory databasae
704 /// </summary> 704 /// </summary>
705 /// <param name="folderID">the folder UUID</param> 705 /// <param name="folderID">the folder UUID</param>
706 protected void deleteOneFolder(LLUUID folderID) 706 protected void deleteOneFolder(UUID folderID)
707 { 707 {
708 try 708 try
709 { 709 {
@@ -725,7 +725,7 @@ namespace OpenSim.Data.MSSQL
725 /// Delete an item in inventory database 725 /// Delete an item in inventory database
726 /// </summary> 726 /// </summary>
727 /// <param name="folderID">the item ID</param> 727 /// <param name="folderID">the item ID</param>
728 protected void deleteItemsInFolder(LLUUID folderID) 728 protected void deleteItemsInFolder(UUID folderID)
729 { 729 {
730 try 730 try
731 { 731 {
@@ -749,7 +749,7 @@ namespace OpenSim.Data.MSSQL
749 /// Delete an inventory folder 749 /// Delete an inventory folder
750 /// </summary> 750 /// </summary>
751 /// <param name="folderId">Id of folder to delete</param> 751 /// <param name="folderId">Id of folder to delete</param>
752 public void deleteInventoryFolder(LLUUID folderID) 752 public void deleteInventoryFolder(UUID folderID)
753 { 753 {
754 // lock (database) 754 // lock (database)
755 { 755 {
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index 535cf33..abbcddf 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37 37
@@ -220,7 +220,7 @@ namespace OpenSim.Data.MSSQL
220 { 220 {
221 return SqlDbType.Bit; 221 return SqlDbType.Bit;
222 } 222 }
223 if (type == typeof(LLUUID)) 223 if (type == typeof(UUID))
224 { 224 {
225 return SqlDbType.VarChar; 225 return SqlDbType.VarChar;
226 } 226 }
@@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
244 { 244 {
245 Type valueType = value.GetType(); 245 Type valueType = value.GetType();
246 246
247 if (valueType == typeof(LLUUID)) 247 if (valueType == typeof(UUID))
248 { 248 {
249 return value.ToString(); 249 return value.ToString();
250 } 250 }
@@ -335,7 +335,7 @@ namespace OpenSim.Data.MSSQL
335 // Region Main 335 // Region Main
336 regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]); 336 regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]);
337 regionprofile.regionName = (string)reader["regionName"]; 337 regionprofile.regionName = (string)reader["regionName"];
338 regionprofile.UUID = new LLUUID((string)reader["uuid"]); 338 regionprofile.UUID = new UUID((string)reader["uuid"]);
339 339
340 // Secrets 340 // Secrets
341 regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; 341 regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
@@ -372,16 +372,16 @@ namespace OpenSim.Data.MSSQL
372 regionprofile.regionUserURI = (string)reader["regionUserURI"]; 372 regionprofile.regionUserURI = (string)reader["regionUserURI"];
373 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 373 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
374 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; 374 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
375 regionprofile.owner_uuid = new LLUUID((string) reader["owner_uuid"]); 375 regionprofile.owner_uuid = new UUID((string) reader["owner_uuid"]);
376 // World Map Addition 376 // World Map Addition
377 string tempRegionMap = reader["regionMapTexture"].ToString(); 377 string tempRegionMap = reader["regionMapTexture"].ToString();
378 if (tempRegionMap != String.Empty) 378 if (tempRegionMap != String.Empty)
379 { 379 {
380 regionprofile.regionMapTextureID = new LLUUID(tempRegionMap); 380 regionprofile.regionMapTextureID = new UUID(tempRegionMap);
381 } 381 }
382 else 382 else
383 { 383 {
384 regionprofile.regionMapTextureID = new LLUUID(); 384 regionprofile.regionMapTextureID = new UUID();
385 } 385 }
386 } 386 }
387 else 387 else
@@ -403,7 +403,7 @@ namespace OpenSim.Data.MSSQL
403 403
404 if (reader.Read()) 404 if (reader.Read())
405 { 405 {
406 retval.ID = new LLUUID((string)reader["UUID"]); 406 retval.ID = new UUID((string)reader["UUID"]);
407 retval.FirstName = (string)reader["username"]; 407 retval.FirstName = (string)reader["username"];
408 retval.SurName = (string)reader["lastname"]; 408 retval.SurName = (string)reader["lastname"];
409 409
@@ -411,11 +411,11 @@ namespace OpenSim.Data.MSSQL
411 retval.PasswordSalt = (string)reader["passwordSalt"]; 411 retval.PasswordSalt = (string)reader["passwordSalt"];
412 412
413 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); 413 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
414 retval.HomeLocation = new LLVector3( 414 retval.HomeLocation = new Vector3(
415 Convert.ToSingle(reader["homeLocationX"].ToString()), 415 Convert.ToSingle(reader["homeLocationX"].ToString()),
416 Convert.ToSingle(reader["homeLocationY"].ToString()), 416 Convert.ToSingle(reader["homeLocationY"].ToString()),
417 Convert.ToSingle(reader["homeLocationZ"].ToString())); 417 Convert.ToSingle(reader["homeLocationZ"].ToString()));
418 retval.HomeLookAt = new LLVector3( 418 retval.HomeLookAt = new Vector3(
419 Convert.ToSingle(reader["homeLookAtX"].ToString()), 419 Convert.ToSingle(reader["homeLookAtX"].ToString()),
420 Convert.ToSingle(reader["homeLookAtY"].ToString()), 420 Convert.ToSingle(reader["homeLookAtY"].ToString()),
421 Convert.ToSingle(reader["homeLookAtZ"].ToString())); 421 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
@@ -432,9 +432,9 @@ namespace OpenSim.Data.MSSQL
432 retval.AboutText = (string)reader["profileAboutText"]; 432 retval.AboutText = (string)reader["profileAboutText"];
433 retval.FirstLifeAboutText = (string)reader["profileFirstText"]; 433 retval.FirstLifeAboutText = (string)reader["profileFirstText"];
434 434
435 retval.Image = new LLUUID((string)reader["profileImage"]); 435 retval.Image = new UUID((string)reader["profileImage"]);
436 retval.FirstLifeImage = new LLUUID((string)reader["profileFirstImage"]); 436 retval.FirstLifeImage = new UUID((string)reader["profileFirstImage"]);
437 retval.WebLoginKey = new LLUUID((string)reader["webLoginKey"]); 437 retval.WebLoginKey = new UUID((string)reader["webLoginKey"]);
438 } 438 }
439 else 439 else
440 { 440 {
@@ -455,9 +455,9 @@ namespace OpenSim.Data.MSSQL
455 if (reader.Read()) 455 if (reader.Read())
456 { 456 {
457 // Agent IDs 457 // Agent IDs
458 retval.ProfileID = new LLUUID((string)reader["UUID"]); 458 retval.ProfileID = new UUID((string)reader["UUID"]);
459 retval.SessionID = new LLUUID((string)reader["sessionID"]); 459 retval.SessionID = new UUID((string)reader["sessionID"]);
460 retval.SecureSessionID = new LLUUID((string)reader["secureSessionID"]); 460 retval.SecureSessionID = new UUID((string)reader["secureSessionID"]);
461 461
462 // Agent Who? 462 // Agent Who?
463 retval.AgentIP = (string)reader["agentIP"]; 463 retval.AgentIP = (string)reader["agentIP"];
@@ -471,8 +471,8 @@ namespace OpenSim.Data.MSSQL
471 // Current position 471 // Current position
472 retval.Region = (string)reader["currentRegion"]; 472 retval.Region = (string)reader["currentRegion"];
473 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); 473 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
474 LLVector3 tmp_v; 474 Vector3 tmp_v;
475 LLVector3.TryParse((string)reader["currentPos"], out tmp_v); 475 Vector3.TryParse((string)reader["currentPos"], out tmp_v);
476 retval.Position = tmp_v; 476 retval.Position = tmp_v;
477 477
478 } 478 }
@@ -497,7 +497,7 @@ namespace OpenSim.Data.MSSQL
497 asset = new AssetBase(); 497 asset = new AssetBase();
498 asset.Data = (byte[])reader["data"]; 498 asset.Data = (byte[])reader["data"];
499 asset.Description = (string)reader["description"]; 499 asset.Description = (string)reader["description"];
500 asset.FullID = new LLUUID((string)reader["id"]); 500 asset.FullID = new UUID((string)reader["id"]);
501 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; 501 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
502 asset.Name = (string)reader["name"]; 502 asset.Name = (string)reader["name"];
503 asset.Type = Convert.ToSByte(reader["assetType"]); 503 asset.Type = Convert.ToSByte(reader["assetType"]);
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index 46aa6c9..d267e41 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
@@ -174,12 +174,12 @@ namespace OpenSim.Data.MSSQL
174 /// </summary> 174 /// </summary>
175 /// <param name="regionUUID">The region UUID.</param> 175 /// <param name="regionUUID">The region UUID.</param>
176 /// <returns></returns> 176 /// <returns></returns>
177 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 177 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
178 { 178 {
179 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 179 Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
180 180
181 //Retrieve all values of current region 181 //Retrieve all values of current region
182 RetrievePrimsDataForRegion(regionUUID, LLUUID.Zero, ""); 182 RetrievePrimsDataForRegion(regionUUID, UUID.Zero, "");
183 183
184 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); 184 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
185 185
@@ -235,7 +235,7 @@ namespace OpenSim.Data.MSSQL
235 "No shape found for prim in storage, so setting default box shape"); 235 "No shape found for prim in storage, so setting default box shape");
236 prim.Shape = PrimitiveBaseShape.Default; 236 prim.Shape = PrimitiveBaseShape.Default;
237 } 237 }
238 createdObjects[new LLUUID(objID)].AddPart(prim); 238 createdObjects[new UUID(objID)].AddPart(prim);
239 } 239 }
240 240
241 LoadItems(prim); 241 LoadItems(prim);
@@ -292,7 +292,7 @@ namespace OpenSim.Data.MSSQL
292// } 292// }
293// else 293// else
294// { 294// {
295// createdObjects[new LLUUID(objID)].AddPart(prim); 295// createdObjects[new UUID(objID)].AddPart(prim);
296// } 296// }
297// } 297// }
298// } 298// }
@@ -307,7 +307,7 @@ namespace OpenSim.Data.MSSQL
307// { 307// {
308// while (readerShapes.Read()) 308// while (readerShapes.Read())
309// { 309// {
310// LLUUID UUID = new LLUUID((string) readerShapes["UUID"]); 310// UUID UUID = new UUID((string) readerShapes["UUID"]);
311// 311//
312// foreach (SceneObjectGroup objectGroup in createdObjects.Values) 312// foreach (SceneObjectGroup objectGroup in createdObjects.Values)
313// { 313// {
@@ -324,7 +324,7 @@ namespace OpenSim.Data.MSSQL
324 #endregion 324 #endregion
325 } 325 }
326 326
327 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 327 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
328 { 328 {
329 //Retrieve all values of current region, and current scene/or prims 329 //Retrieve all values of current region, and current scene/or prims
330 //Build primID's, we use IN so I can select all prims from objgroup 330 //Build primID's, we use IN so I can select all prims from objgroup
@@ -341,9 +341,9 @@ namespace OpenSim.Data.MSSQL
341 341
342 foreach (SceneObjectPart prim in obj.Children.Values) 342 foreach (SceneObjectPart prim in obj.Children.Values)
343 { 343 {
344 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 344 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
345 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 345 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
346 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) 346 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
347 { 347 {
348 lock (_PrimsDataSet) 348 lock (_PrimsDataSet)
349 { 349 {
@@ -391,7 +391,7 @@ namespace OpenSim.Data.MSSQL
391 /// </summary> 391 /// </summary>
392 /// <param name="objectID">id of scenegroup</param> 392 /// <param name="objectID">id of scenegroup</param>
393 /// <param name="regionUUID">regionUUID (is this used anyway</param> 393 /// <param name="regionUUID">regionUUID (is this used anyway</param>
394 public void RemoveObject(LLUUID objectID, LLUUID regionUUID) 394 public void RemoveObject(UUID objectID, UUID regionUUID)
395 { 395 {
396 _Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID); 396 _Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID);
397 397
@@ -418,7 +418,7 @@ namespace OpenSim.Data.MSSQL
418 /// </summary> 418 /// </summary>
419 /// <param name="primID"></param> 419 /// <param name="primID"></param>
420 /// <param name="items"></param> 420 /// <param name="items"></param>
421 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 421 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
422 { 422 {
423 _Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); 423 _Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
424 424
@@ -456,7 +456,7 @@ namespace OpenSim.Data.MSSQL
456 /// </summary> 456 /// </summary>
457 /// <param name="regionID">regionID.</param> 457 /// <param name="regionID">regionID.</param>
458 /// <returns></returns> 458 /// <returns></returns>
459 public double[,] LoadTerrain(LLUUID regionID) 459 public double[,] LoadTerrain(UUID regionID)
460 { 460 {
461 double[,] terrain = new double[256, 256]; 461 double[,] terrain = new double[256, 256];
462 terrain.Initialize(); 462 terrain.Initialize();
@@ -501,7 +501,7 @@ namespace OpenSim.Data.MSSQL
501 /// </summary> 501 /// </summary>
502 /// <param name="terrain">terrain map data.</param> 502 /// <param name="terrain">terrain map data.</param>
503 /// <param name="regionID">regionID.</param> 503 /// <param name="regionID">regionID.</param>
504 public void StoreTerrain(double[,] terrain, LLUUID regionID) 504 public void StoreTerrain(double[,] terrain, UUID regionID)
505 { 505 {
506 int revision = Util.UnixTimeSinceEpoch(); 506 int revision = Util.UnixTimeSinceEpoch();
507 507
@@ -532,7 +532,7 @@ namespace OpenSim.Data.MSSQL
532 /// </summary> 532 /// </summary>
533 /// <param name="regionUUID">The region UUID.</param> 533 /// <param name="regionUUID">The region UUID.</param>
534 /// <returns></returns> 534 /// <returns></returns>
535 public List<LandData> LoadLandObjects(LLUUID regionUUID) 535 public List<LandData> LoadLandObjects(UUID regionUUID)
536 { 536 {
537 List<LandData> landDataForRegion = new List<LandData>(); 537 List<LandData> landDataForRegion = new List<LandData>();
538 538
@@ -617,7 +617,7 @@ VALUES
617 /// Removes a land object from DB. 617 /// Removes a land object from DB.
618 /// </summary> 618 /// </summary>
619 /// <param name="globalID">UUID of landobject</param> 619 /// <param name="globalID">UUID of landobject</param>
620 public void RemoveLandObject(LLUUID globalID) 620 public void RemoveLandObject(UUID globalID)
621 { 621 {
622 using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID")) 622 using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID"))
623 { 623 {
@@ -637,7 +637,7 @@ VALUES
637 /// </summary> 637 /// </summary>
638 /// <param name="regionUUID">The region UUID.</param> 638 /// <param name="regionUUID">The region UUID.</param>
639 /// <returns></returns> 639 /// <returns></returns>
640 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 640 public RegionSettings LoadRegionSettings(UUID regionUUID)
641 { 641 {
642 string sql = "select * from regionsettings where regionUUID = @regionUUID"; 642 string sql = "select * from regionsettings where regionUUID = @regionUUID";
643 RegionSettings regionSettings; 643 RegionSettings regionSettings;
@@ -801,7 +801,7 @@ VALUES
801 //TODO change this is some more generic code so we doesnt have to change it every time a new field is added? 801 //TODO change this is some more generic code so we doesnt have to change it every time a new field is added?
802 RegionSettings newSettings = new RegionSettings(); 802 RegionSettings newSettings = new RegionSettings();
803 803
804 newSettings.RegionUUID = new LLUUID((string)row["regionUUID"]); 804 newSettings.RegionUUID = new UUID((string)row["regionUUID"]);
805 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); 805 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]);
806 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); 806 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]);
807 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); 807 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]);
@@ -815,10 +815,10 @@ VALUES
815 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); 815 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]);
816 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); 816 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]);
817 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); 817 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]);
818 newSettings.TerrainTexture1 = new LLUUID((String)row["terrain_texture_1"]); 818 newSettings.TerrainTexture1 = new UUID((String)row["terrain_texture_1"]);
819 newSettings.TerrainTexture2 = new LLUUID((String)row["terrain_texture_2"]); 819 newSettings.TerrainTexture2 = new UUID((String)row["terrain_texture_2"]);
820 newSettings.TerrainTexture3 = new LLUUID((String)row["terrain_texture_3"]); 820 newSettings.TerrainTexture3 = new UUID((String)row["terrain_texture_3"]);
821 newSettings.TerrainTexture4 = new LLUUID((String)row["terrain_texture_4"]); 821 newSettings.TerrainTexture4 = new UUID((String)row["terrain_texture_4"]);
822 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); 822 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]);
823 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); 823 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]);
824 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); 824 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]);
@@ -834,7 +834,7 @@ VALUES
834 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); 834 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
835 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); 835 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
836 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); 836 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
837 newSettings.Covenant = new LLUUID((String)row["covenant"]); 837 newSettings.Covenant = new UUID((String)row["covenant"]);
838 838
839 return newSettings; 839 return newSettings;
840 } 840 }
@@ -848,7 +848,7 @@ VALUES
848 { 848 {
849 LandData newData = new LandData(); 849 LandData newData = new LandData();
850 850
851 newData.GlobalID = new LLUUID((String)row["UUID"]); 851 newData.GlobalID = new UUID((String)row["UUID"]);
852 newData.LocalID = Convert.ToInt32(row["LocalLandID"]); 852 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
853 853
854 // Bitmap is a byte[512] 854 // Bitmap is a byte[512]
@@ -864,41 +864,41 @@ VALUES
864 //Enum libsecondlife.Parcel.ParcelCategory 864 //Enum libsecondlife.Parcel.ParcelCategory
865 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); 865 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
866 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 866 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
867 newData.GroupID = new LLUUID((String)row["GroupUUID"]); 867 newData.GroupID = new UUID((String)row["GroupUUID"]);
868 newData.SalePrice = Convert.ToInt32(row["SalePrice"]); 868 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
869 newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); 869 newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
870 //Enum. libsecondlife.Parcel.ParcelStatus 870 //Enum. libsecondlife.Parcel.ParcelStatus
871 newData.Flags = Convert.ToUInt32(row["LandFlags"]); 871 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
872 newData.LandingType = Convert.ToByte(row["LandingType"]); 872 newData.LandingType = Convert.ToByte(row["LandingType"]);
873 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 873 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
874 newData.MediaID = new LLUUID((String)row["MediaTextureUUID"]); 874 newData.MediaID = new UUID((String)row["MediaTextureUUID"]);
875 newData.MediaURL = (String)row["MediaURL"]; 875 newData.MediaURL = (String)row["MediaURL"];
876 newData.MusicURL = (String)row["MusicURL"]; 876 newData.MusicURL = (String)row["MusicURL"];
877 newData.PassHours = Convert.ToSingle(row["PassHours"]); 877 newData.PassHours = Convert.ToSingle(row["PassHours"]);
878 newData.PassPrice = Convert.ToInt32(row["PassPrice"]); 878 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
879 879
880 LLUUID authedbuyer; 880 UUID authedbuyer;
881 LLUUID snapshotID; 881 UUID snapshotID;
882 882
883 if (LLUUID.TryParse((string)row["AuthBuyerID"], out authedbuyer)) 883 if (UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer))
884 newData.AuthBuyerID = authedbuyer; 884 newData.AuthBuyerID = authedbuyer;
885 885
886 if (LLUUID.TryParse((string)row["SnapshotUUID"], out snapshotID)) 886 if (UUID.TryParse((string)row["SnapshotUUID"], out snapshotID))
887 newData.SnapshotID = snapshotID; 887 newData.SnapshotID = snapshotID;
888 888
889 try 889 try
890 { 890 {
891 newData.UserLocation = 891 newData.UserLocation =
892 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 892 new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
893 Convert.ToSingle(row["UserLocationZ"])); 893 Convert.ToSingle(row["UserLocationZ"]));
894 newData.UserLookAt = 894 newData.UserLookAt =
895 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 895 new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
896 Convert.ToSingle(row["UserLookAtZ"])); 896 Convert.ToSingle(row["UserLookAtZ"]));
897 } 897 }
898 catch (InvalidCastException) 898 catch (InvalidCastException)
899 { 899 {
900 newData.UserLocation = LLVector3.Zero; 900 newData.UserLocation = Vector3.Zero;
901 newData.UserLookAt = LLVector3.Zero; 901 newData.UserLookAt = Vector3.Zero;
902 _Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 902 _Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
903 } 903 }
904 904
@@ -915,7 +915,7 @@ VALUES
915 private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row) 915 private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row)
916 { 916 {
917 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 917 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
918 entry.AgentID = new LLUUID((string)row["AccessUUID"]); 918 entry.AgentID = new UUID((string)row["AccessUUID"]);
919 entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]); 919 entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]);
920 entry.Time = new DateTime(); 920 entry.Time = new DateTime();
921 return entry; 921 return entry;
@@ -930,7 +930,7 @@ VALUES
930 { 930 {
931 SceneObjectPart prim = new SceneObjectPart(); 931 SceneObjectPart prim = new SceneObjectPart();
932 932
933 prim.UUID = new LLUUID((String)row["UUID"]); 933 prim.UUID = new UUID((String)row["UUID"]);
934 // explicit conversion of integers is required, which sort 934 // explicit conversion of integers is required, which sort
935 // of sucks. No idea if there is a shortcut here or not. 935 // of sucks. No idea if there is a shortcut here or not.
936 prim.ParentID = Convert.ToUInt32(row["ParentID"]); 936 prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@@ -943,54 +943,54 @@ VALUES
943 prim.TouchName = (String)row["TouchName"]; 943 prim.TouchName = (String)row["TouchName"];
944 // permissions 944 // permissions
945 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); 945 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
946 prim.CreatorID = new LLUUID((String)row["CreatorID"]); 946 prim.CreatorID = new UUID((String)row["CreatorID"]);
947 prim.OwnerID = new LLUUID((String)row["OwnerID"]); 947 prim.OwnerID = new UUID((String)row["OwnerID"]);
948 prim.GroupID = new LLUUID((String)row["GroupID"]); 948 prim.GroupID = new UUID((String)row["GroupID"]);
949 prim.LastOwnerID = new LLUUID((String)row["LastOwnerID"]); 949 prim.LastOwnerID = new UUID((String)row["LastOwnerID"]);
950 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); 950 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
951 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); 951 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
952 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); 952 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
953 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); 953 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
954 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); 954 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
955 // vectors 955 // vectors
956 prim.OffsetPosition = new LLVector3( 956 prim.OffsetPosition = new Vector3(
957 Convert.ToSingle(row["PositionX"]), 957 Convert.ToSingle(row["PositionX"]),
958 Convert.ToSingle(row["PositionY"]), 958 Convert.ToSingle(row["PositionY"]),
959 Convert.ToSingle(row["PositionZ"]) 959 Convert.ToSingle(row["PositionZ"])
960 ); 960 );
961 prim.GroupPosition = new LLVector3( 961 prim.GroupPosition = new Vector3(
962 Convert.ToSingle(row["GroupPositionX"]), 962 Convert.ToSingle(row["GroupPositionX"]),
963 Convert.ToSingle(row["GroupPositionY"]), 963 Convert.ToSingle(row["GroupPositionY"]),
964 Convert.ToSingle(row["GroupPositionZ"]) 964 Convert.ToSingle(row["GroupPositionZ"])
965 ); 965 );
966 prim.Velocity = new LLVector3( 966 prim.Velocity = new Vector3(
967 Convert.ToSingle(row["VelocityX"]), 967 Convert.ToSingle(row["VelocityX"]),
968 Convert.ToSingle(row["VelocityY"]), 968 Convert.ToSingle(row["VelocityY"]),
969 Convert.ToSingle(row["VelocityZ"]) 969 Convert.ToSingle(row["VelocityZ"])
970 ); 970 );
971 prim.AngularVelocity = new LLVector3( 971 prim.AngularVelocity = new Vector3(
972 Convert.ToSingle(row["AngularVelocityX"]), 972 Convert.ToSingle(row["AngularVelocityX"]),
973 Convert.ToSingle(row["AngularVelocityY"]), 973 Convert.ToSingle(row["AngularVelocityY"]),
974 Convert.ToSingle(row["AngularVelocityZ"]) 974 Convert.ToSingle(row["AngularVelocityZ"])
975 ); 975 );
976 prim.Acceleration = new LLVector3( 976 prim.Acceleration = new Vector3(
977 Convert.ToSingle(row["AccelerationX"]), 977 Convert.ToSingle(row["AccelerationX"]),
978 Convert.ToSingle(row["AccelerationY"]), 978 Convert.ToSingle(row["AccelerationY"]),
979 Convert.ToSingle(row["AccelerationZ"]) 979 Convert.ToSingle(row["AccelerationZ"])
980 ); 980 );
981 // quaternions 981 // quaternions
982 prim.RotationOffset = new LLQuaternion( 982 prim.RotationOffset = new Quaternion(
983 Convert.ToSingle(row["RotationX"]), 983 Convert.ToSingle(row["RotationX"]),
984 Convert.ToSingle(row["RotationY"]), 984 Convert.ToSingle(row["RotationY"]),
985 Convert.ToSingle(row["RotationZ"]), 985 Convert.ToSingle(row["RotationZ"]),
986 Convert.ToSingle(row["RotationW"]) 986 Convert.ToSingle(row["RotationW"])
987 ); 987 );
988 prim.SitTargetPositionLL = new LLVector3( 988 prim.SitTargetPositionLL = new Vector3(
989 Convert.ToSingle(row["SitTargetOffsetX"]), 989 Convert.ToSingle(row["SitTargetOffsetX"]),
990 Convert.ToSingle(row["SitTargetOffsetY"]), 990 Convert.ToSingle(row["SitTargetOffsetY"]),
991 Convert.ToSingle(row["SitTargetOffsetZ"]) 991 Convert.ToSingle(row["SitTargetOffsetZ"])
992 ); 992 );
993 prim.SitTargetOrientationLL = new LLQuaternion( 993 prim.SitTargetOrientationLL = new Quaternion(
994 Convert.ToSingle(row["SitTargetOrientX"]), 994 Convert.ToSingle(row["SitTargetOrientX"]),
995 Convert.ToSingle(row["SitTargetOrientY"]), 995 Convert.ToSingle(row["SitTargetOrientY"]),
996 Convert.ToSingle(row["SitTargetOrientZ"]), 996 Convert.ToSingle(row["SitTargetOrientZ"]),
@@ -1003,14 +1003,14 @@ VALUES
1003 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); 1003 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
1004 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); 1004 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]);
1005 1005
1006 prim.Sound = new LLUUID(row["LoopedSound"].ToString()); 1006 prim.Sound = new UUID(row["LoopedSound"].ToString());
1007 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); 1007 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
1008 prim.SoundFlags = 1; // If it's persisted at all, it's looped 1008 prim.SoundFlags = 1; // If it's persisted at all, it's looped
1009 1009
1010 if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value) 1010 if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value)
1011 prim.TextureAnimation = (Byte[])row["TextureAnimation"]; 1011 prim.TextureAnimation = (Byte[])row["TextureAnimation"];
1012 1012
1013 prim.RotationalVelocity = new LLVector3( 1013 prim.RotationalVelocity = new Vector3(
1014 Convert.ToSingle(row["OmegaX"]), 1014 Convert.ToSingle(row["OmegaX"]),
1015 Convert.ToSingle(row["OmegaY"]), 1015 Convert.ToSingle(row["OmegaY"]),
1016 Convert.ToSingle(row["OmegaZ"]) 1016 Convert.ToSingle(row["OmegaZ"])
@@ -1019,13 +1019,13 @@ VALUES
1019 // TODO: Rotation 1019 // TODO: Rotation
1020 // OmegaX, OmegaY, OmegaZ 1020 // OmegaX, OmegaY, OmegaZ
1021 1021
1022 prim.SetCameraEyeOffset(new LLVector3( 1022 prim.SetCameraEyeOffset(new Vector3(
1023 Convert.ToSingle(row["CameraEyeOffsetX"]), 1023 Convert.ToSingle(row["CameraEyeOffsetX"]),
1024 Convert.ToSingle(row["CameraEyeOffsetY"]), 1024 Convert.ToSingle(row["CameraEyeOffsetY"]),
1025 Convert.ToSingle(row["CameraEyeOffsetZ"]) 1025 Convert.ToSingle(row["CameraEyeOffsetZ"])
1026 )); 1026 ));
1027 1027
1028 prim.SetCameraAtOffset(new LLVector3( 1028 prim.SetCameraAtOffset(new Vector3(
1029 Convert.ToSingle(row["CameraAtOffsetX"]), 1029 Convert.ToSingle(row["CameraAtOffsetX"]),
1030 Convert.ToSingle(row["CameraAtOffsetY"]), 1030 Convert.ToSingle(row["CameraAtOffsetY"]),
1031 Convert.ToSingle(row["CameraAtOffsetZ"]) 1031 Convert.ToSingle(row["CameraAtOffsetZ"])
@@ -1056,7 +1056,7 @@ VALUES
1056 private static PrimitiveBaseShape buildShape(DataRow row) 1056 private static PrimitiveBaseShape buildShape(DataRow row)
1057 { 1057 {
1058 PrimitiveBaseShape s = new PrimitiveBaseShape(); 1058 PrimitiveBaseShape s = new PrimitiveBaseShape();
1059 s.Scale = new LLVector3( 1059 s.Scale = new Vector3(
1060 Convert.ToSingle(row["ScaleX"]), 1060 Convert.ToSingle(row["ScaleX"]),
1061 Convert.ToSingle(row["ScaleY"]), 1061 Convert.ToSingle(row["ScaleY"]),
1062 Convert.ToSingle(row["ScaleZ"]) 1062 Convert.ToSingle(row["ScaleZ"])
@@ -1108,10 +1108,10 @@ VALUES
1108 { 1108 {
1109 TaskInventoryItem taskItem = new TaskInventoryItem(); 1109 TaskInventoryItem taskItem = new TaskInventoryItem();
1110 1110
1111 taskItem.ItemID = new LLUUID((String)row["itemID"]); 1111 taskItem.ItemID = new UUID((String)row["itemID"]);
1112 taskItem.ParentPartID = new LLUUID((String)row["primID"]); 1112 taskItem.ParentPartID = new UUID((String)row["primID"]);
1113 taskItem.AssetID = new LLUUID((String)row["assetID"]); 1113 taskItem.AssetID = new UUID((String)row["assetID"]);
1114 taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); 1114 taskItem.ParentID = new UUID((String)row["parentFolderID"]);
1115 1115
1116 taskItem.InvType = Convert.ToInt32(row["invType"]); 1116 taskItem.InvType = Convert.ToInt32(row["invType"]);
1117 taskItem.Type = Convert.ToInt32(row["assetType"]); 1117 taskItem.Type = Convert.ToInt32(row["assetType"]);
@@ -1119,10 +1119,10 @@ VALUES
1119 taskItem.Name = (String)row["name"]; 1119 taskItem.Name = (String)row["name"];
1120 taskItem.Description = (String)row["description"]; 1120 taskItem.Description = (String)row["description"];
1121 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1121 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1122 taskItem.CreatorID = new LLUUID((String)row["creatorID"]); 1122 taskItem.CreatorID = new UUID((String)row["creatorID"]);
1123 taskItem.OwnerID = new LLUUID((String)row["ownerID"]); 1123 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1124 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1124 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1125 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1125 taskItem.GroupID = new UUID((String)row["groupID"]);
1126 1126
1127 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); 1127 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1128 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); 1128 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@@ -1225,7 +1225,7 @@ VALUES
1225 /// <param name="land">land parameters.</param> 1225 /// <param name="land">land parameters.</param>
1226 /// <param name="regionUUID">region UUID.</param> 1226 /// <param name="regionUUID">region UUID.</param>
1227 /// <returns></returns> 1227 /// <returns></returns>
1228 private SqlParameter[] CreateLandParameters(LandData land, LLUUID regionUUID) 1228 private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
1229 { 1229 {
1230 SqlParameter[] parameters = new SqlParameter[32]; 1230 SqlParameter[] parameters = new SqlParameter[32];
1231 1231
@@ -1274,7 +1274,7 @@ VALUES
1274 /// <param name="parcelAccessEntry">parcel access entry.</param> 1274 /// <param name="parcelAccessEntry">parcel access entry.</param>
1275 /// <param name="parcelID">parcel ID.</param> 1275 /// <param name="parcelID">parcel ID.</param>
1276 /// <returns></returns> 1276 /// <returns></returns>
1277 private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, LLUUID parcelID) 1277 private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, UUID parcelID)
1278 { 1278 {
1279 SqlParameter[] parameters = new SqlParameter[3]; 1279 SqlParameter[] parameters = new SqlParameter[3];
1280 1280
@@ -1292,7 +1292,7 @@ VALUES
1292 /// <param name="prim">prim data.</param> 1292 /// <param name="prim">prim data.</param>
1293 /// <param name="sceneGroupID">scenegroup ID.</param> 1293 /// <param name="sceneGroupID">scenegroup ID.</param>
1294 /// <param name="regionUUID">regionUUID.</param> 1294 /// <param name="regionUUID">regionUUID.</param>
1295 private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1295 private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1296 { 1296 {
1297 row["UUID"] = prim.UUID.ToString(); 1297 row["UUID"] = prim.UUID.ToString();
1298 row["RegionUUID"] = regionUUID.ToString(); 1298 row["RegionUUID"] = regionUUID.ToString();
@@ -1340,12 +1340,12 @@ VALUES
1340 row["RotationW"] = prim.RotationOffset.W; 1340 row["RotationW"] = prim.RotationOffset.W;
1341 1341
1342 // Sit target 1342 // Sit target
1343 LLVector3 sitTargetPos = prim.SitTargetPositionLL; 1343 Vector3 sitTargetPos = prim.SitTargetPositionLL;
1344 row["SitTargetOffsetX"] = sitTargetPos.X; 1344 row["SitTargetOffsetX"] = sitTargetPos.X;
1345 row["SitTargetOffsetY"] = sitTargetPos.Y; 1345 row["SitTargetOffsetY"] = sitTargetPos.Y;
1346 row["SitTargetOffsetZ"] = sitTargetPos.Z; 1346 row["SitTargetOffsetZ"] = sitTargetPos.Z;
1347 1347
1348 LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; 1348 Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
1349 row["SitTargetOrientW"] = sitTargetOrient.W; 1349 row["SitTargetOrientW"] = sitTargetOrient.W;
1350 row["SitTargetOrientX"] = sitTargetOrient.X; 1350 row["SitTargetOrientX"] = sitTargetOrient.X;
1351 row["SitTargetOrientY"] = sitTargetOrient.Y; 1351 row["SitTargetOrientY"] = sitTargetOrient.Y;
@@ -1364,7 +1364,7 @@ VALUES
1364 } 1364 }
1365 else 1365 else
1366 { 1366 {
1367 row["LoopedSound"] = LLUUID.Zero; 1367 row["LoopedSound"] = UUID.Zero;
1368 row["LoopedSoundGain"] = 0.0f; 1368 row["LoopedSoundGain"] = 0.0f;
1369 } 1369 }
1370 1370
@@ -1446,13 +1446,13 @@ VALUES
1446 1446
1447 #endregion 1447 #endregion
1448 1448
1449 private void RetrievePrimsDataForRegion(LLUUID regionUUID, LLUUID sceneGroupID, string primID) 1449 private void RetrievePrimsDataForRegion(UUID regionUUID, UUID sceneGroupID, string primID)
1450 { 1450 {
1451 using (SqlConnection connection = _Database.DatabaseConnection()) 1451 using (SqlConnection connection = _Database.DatabaseConnection())
1452 { 1452 {
1453 _PrimDataAdapter.SelectCommand.Connection = connection; 1453 _PrimDataAdapter.SelectCommand.Connection = connection;
1454 _PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1454 _PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1455 if (sceneGroupID != LLUUID.Zero) 1455 if (sceneGroupID != UUID.Zero)
1456 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1456 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1457 else 1457 else
1458 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1458 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@@ -1462,7 +1462,7 @@ VALUES
1462 1462
1463 _ShapeDataAdapter.SelectCommand.Connection = connection; 1463 _ShapeDataAdapter.SelectCommand.Connection = connection;
1464 _ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1464 _ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1465 if (sceneGroupID != LLUUID.Zero) 1465 if (sceneGroupID != UUID.Zero)
1466 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1466 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1467 else 1467 else
1468 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1468 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@@ -1472,7 +1472,7 @@ VALUES
1472 1472
1473 _ItemsDataAdapter.SelectCommand.Connection = connection; 1473 _ItemsDataAdapter.SelectCommand.Connection = connection;
1474 _ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1474 _ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1475 if (sceneGroupID != LLUUID.Zero) 1475 if (sceneGroupID != UUID.Zero)
1476 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1476 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1477 else 1477 else
1478 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1478 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index cfe5f50..9118012 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -183,13 +183,13 @@ namespace OpenSim.Data.MSSQL
183 /// <param name="friendlistowner">UUID of the friendlist owner</param> 183 /// <param name="friendlistowner">UUID of the friendlist owner</param>
184 /// <param name="friend">Friend's UUID</param> 184 /// <param name="friend">Friend's UUID</param>
185 /// <param name="perms">Permission flag</param> 185 /// <param name="perms">Permission flag</param>
186 override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 186 override public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
187 { 187 {
188 int dtvalue = Util.UnixTimeSinceEpoch(); 188 int dtvalue = Util.UnixTimeSinceEpoch();
189 189
190 Dictionary<string, string> param = new Dictionary<string, string>(); 190 Dictionary<string, string> param = new Dictionary<string, string>();
191 param["@ownerID"] = friendlistowner.UUID.ToString(); 191 param["@ownerID"] = friendlistowner.ToString();
192 param["@friendID"] = friend.UUID.ToString(); 192 param["@friendID"] = friend.ToString();
193 param["@friendPerms"] = perms.ToString(); 193 param["@friendPerms"] = perms.ToString();
194 param["@datetimestamp"] = dtvalue.ToString(); 194 param["@datetimestamp"] = dtvalue.ToString();
195 195
@@ -229,11 +229,11 @@ namespace OpenSim.Data.MSSQL
229 /// </summary> 229 /// </summary>
230 /// <param name="friendlistowner">UUID of the friendlist owner</param> 230 /// <param name="friendlistowner">UUID of the friendlist owner</param>
231 /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param> 231 /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param>
232 override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 232 override public void RemoveUserFriend(UUID friendlistowner, UUID friend)
233 { 233 {
234 Dictionary<string, string> param = new Dictionary<string, string>(); 234 Dictionary<string, string> param = new Dictionary<string, string>();
235 param["@ownerID"] = friendlistowner.UUID.ToString(); 235 param["@ownerID"] = friendlistowner.ToString();
236 param["@friendID"] = friend.UUID.ToString(); 236 param["@friendID"] = friend.ToString();
237 237
238 238
239 try 239 try
@@ -267,11 +267,11 @@ namespace OpenSim.Data.MSSQL
267 /// <param name="friendlistowner">UUID of the friendlist owner</param> 267 /// <param name="friendlistowner">UUID of the friendlist owner</param>
268 /// <param name="friend">UUID of the friend</param> 268 /// <param name="friend">UUID of the friend</param>
269 /// <param name="perms">new permission flag</param> 269 /// <param name="perms">new permission flag</param>
270 override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 270 override public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
271 { 271 {
272 Dictionary<string, string> param = new Dictionary<string, string>(); 272 Dictionary<string, string> param = new Dictionary<string, string>();
273 param["@ownerID"] = friendlistowner.UUID.ToString(); 273 param["@ownerID"] = friendlistowner.ToString();
274 param["@friendID"] = friend.UUID.ToString(); 274 param["@friendID"] = friend.ToString();
275 param["@friendPerms"] = perms.ToString(); 275 param["@friendPerms"] = perms.ToString();
276 276
277 277
@@ -298,12 +298,12 @@ namespace OpenSim.Data.MSSQL
298 /// </summary> 298 /// </summary>
299 /// <param name="friendlistowner">UUID of the friendlist owner</param> 299 /// <param name="friendlistowner">UUID of the friendlist owner</param>
300 /// <returns>Friendlist list</returns> 300 /// <returns>Friendlist list</returns>
301 override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 301 override public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
302 { 302 {
303 List<FriendListItem> Lfli = new List<FriendListItem>(); 303 List<FriendListItem> Lfli = new List<FriendListItem>();
304 304
305 Dictionary<string, string> param = new Dictionary<string, string>(); 305 Dictionary<string, string> param = new Dictionary<string, string>();
306 param["@ownerID"] = friendlistowner.UUID.ToString(); 306 param["@ownerID"] = friendlistowner.ToString();
307 307
308 try 308 try
309 { 309 {
@@ -318,8 +318,8 @@ namespace OpenSim.Data.MSSQL
318 while (reader.Read()) 318 while (reader.Read())
319 { 319 {
320 FriendListItem fli = new FriendListItem(); 320 FriendListItem fli = new FriendListItem();
321 fli.FriendListOwner = new LLUUID((string)reader["ownerID"]); 321 fli.FriendListOwner = new UUID((string)reader["ownerID"]);
322 fli.Friend = new LLUUID((string)reader["friendID"]); 322 fli.Friend = new UUID((string)reader["friendID"]);
323 fli.FriendPerms = (uint)Convert.ToInt32(reader["friendPerms"]); 323 fli.FriendPerms = (uint)Convert.ToInt32(reader["friendPerms"]);
324 324
325 // This is not a real column in the database table, it's a joined column from the opposite record 325 // This is not a real column in the database table, it's a joined column from the opposite record
@@ -345,7 +345,7 @@ namespace OpenSim.Data.MSSQL
345 /// <param name="avatarid">avatar uuid</param> 345 /// <param name="avatarid">avatar uuid</param>
346 /// <param name="regionuuid">region uuid</param> 346 /// <param name="regionuuid">region uuid</param>
347 /// <param name="regionhandle">region handle</param> 347 /// <param name="regionhandle">region handle</param>
348 override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 348 override public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
349 { 349 {
350 //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); 350 //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
351 } 351 }
@@ -356,7 +356,7 @@ namespace OpenSim.Data.MSSQL
356 /// <param name="queryID"></param> 356 /// <param name="queryID"></param>
357 /// <param name="query"></param> 357 /// <param name="query"></param>
358 /// <returns></returns> 358 /// <returns></returns>
359 override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 359 override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
360 { 360 {
361 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); 361 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
362 string[] querysplit; 362 string[] querysplit;
@@ -375,7 +375,7 @@ namespace OpenSim.Data.MSSQL
375 while (reader.Read()) 375 while (reader.Read())
376 { 376 {
377 AvatarPickerAvatar user = new AvatarPickerAvatar(); 377 AvatarPickerAvatar user = new AvatarPickerAvatar();
378 user.AvatarID = new LLUUID((string)reader["UUID"]); 378 user.AvatarID = new UUID((string)reader["UUID"]);
379 user.firstName = (string)reader["username"]; 379 user.firstName = (string)reader["username"];
380 user.lastName = (string)reader["lastname"]; 380 user.lastName = (string)reader["lastname"];
381 returnlist.Add(user); 381 returnlist.Add(user);
@@ -400,7 +400,7 @@ namespace OpenSim.Data.MSSQL
400 while (reader.Read()) 400 while (reader.Read())
401 { 401 {
402 AvatarPickerAvatar user = new AvatarPickerAvatar(); 402 AvatarPickerAvatar user = new AvatarPickerAvatar();
403 user.AvatarID = new LLUUID((string)reader["UUID"]); 403 user.AvatarID = new UUID((string)reader["UUID"]);
404 user.firstName = (string)reader["username"]; 404 user.firstName = (string)reader["username"];
405 user.lastName = (string)reader["lastname"]; 405 user.lastName = (string)reader["lastname"];
406 returnlist.Add(user); 406 returnlist.Add(user);
@@ -420,7 +420,7 @@ namespace OpenSim.Data.MSSQL
420 /// </summary> 420 /// </summary>
421 /// <param name="uuid"></param> 421 /// <param name="uuid"></param>
422 /// <returns></returns> 422 /// <returns></returns>
423 override public UserProfileData GetUserByUUID(LLUUID uuid) 423 override public UserProfileData GetUserByUUID(UUID uuid)
424 { 424 {
425 try 425 try
426 { 426 {
@@ -467,7 +467,7 @@ namespace OpenSim.Data.MSSQL
467 /// </summary> 467 /// </summary>
468 /// <param name="uuid">The accounts UUID</param> 468 /// <param name="uuid">The accounts UUID</param>
469 /// <returns>The users session</returns> 469 /// <returns>The users session</returns>
470 override public UserAgentData GetAgentByUUID(LLUUID uuid) 470 override public UserAgentData GetAgentByUUID(UUID uuid)
471 { 471 {
472 try 472 try
473 { 473 {
@@ -493,7 +493,7 @@ namespace OpenSim.Data.MSSQL
493 /// <param name="AgentID">The agent UUID</param> 493 /// <param name="AgentID">The agent UUID</param>
494 /// <param name="WebLoginKey">the WebLogin Key</param> 494 /// <param name="WebLoginKey">the WebLogin Key</param>
495 /// <remarks>unused ?</remarks> 495 /// <remarks>unused ?</remarks>
496 override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 496 override public void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
497 { 497 {
498 UserProfileData user = GetUserByUUID(AgentID); 498 UserProfileData user = GetUserByUUID(AgentID);
499 user.WebLoginKey = WebLoginKey; 499 user.WebLoginKey = WebLoginKey;
@@ -549,12 +549,12 @@ namespace OpenSim.Data.MSSQL
549 /// <param name="profileImage">UUID for profile image</param> 549 /// <param name="profileImage">UUID for profile image</param>
550 /// <param name="firstImage">UUID for firstlife image</param> 550 /// <param name="firstImage">UUID for firstlife image</param>
551 /// <returns>Success?</returns> 551 /// <returns>Success?</returns>
552 private bool InsertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, 552 private bool InsertUserRow(UUID uuid, string username, string lastname, string passwordHash,
553 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, 553 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
554 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 554 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
555 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 555 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
556 string aboutText, string firstText, 556 string aboutText, string firstText,
557 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) 557 UUID profileImage, UUID firstImage, UUID webLoginKey)
558 { 558 {
559 string sql = "INSERT INTO "+m_usersTableName; 559 string sql = "INSERT INTO "+m_usersTableName;
560 sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; 560 sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
@@ -594,7 +594,7 @@ namespace OpenSim.Data.MSSQL
594 parameters["profileFirstText"] = firstText; 594 parameters["profileFirstText"] = firstText;
595 parameters["profileImage"] = profileImage.ToString(); 595 parameters["profileImage"] = profileImage.ToString();
596 parameters["profileFirstImage"] = firstImage.ToString(); 596 parameters["profileFirstImage"] = firstImage.ToString();
597 parameters["webLoginKey"] = LLUUID.Random().ToString(); 597 parameters["webLoginKey"] = UUID.Random().ToString();
598 598
599 599
600 try 600 try
@@ -683,7 +683,7 @@ namespace OpenSim.Data.MSSQL
683 SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString()); 683 SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString());
684 SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString()); 684 SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString());
685 SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString()); 685 SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString());
686 SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.UUID.ToString()); 686 SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.ToString());
687 command.Parameters.Add(param1); 687 command.Parameters.Add(param1);
688 command.Parameters.Add(param2); 688 command.Parameters.Add(param2);
689 command.Parameters.Add(param3); 689 command.Parameters.Add(param3);
@@ -728,7 +728,7 @@ namespace OpenSim.Data.MSSQL
728 /// <param name="to">The receivers account ID</param> 728 /// <param name="to">The receivers account ID</param>
729 /// <param name="amount">The amount to transfer</param> 729 /// <param name="amount">The amount to transfer</param>
730 /// <returns>false</returns> 730 /// <returns>false</returns>
731 override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) 731 override public bool MoneyTransferRequest(UUID from, UUID to, uint amount)
732 { 732 {
733 return false; 733 return false;
734 } 734 }
@@ -741,14 +741,14 @@ namespace OpenSim.Data.MSSQL
741 /// <param name="to">The receivers account ID</param> 741 /// <param name="to">The receivers account ID</param>
742 /// <param name="item">The item to transfer</param> 742 /// <param name="item">The item to transfer</param>
743 /// <returns>false</returns> 743 /// <returns>false</returns>
744 override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 744 override public bool InventoryTransferRequest(UUID from, UUID to, UUID item)
745 { 745 {
746 return false; 746 return false;
747 } 747 }
748 748
749 /// Appearance 749 /// Appearance
750 /// TODO: stubs for now to get us to a compiling state gently 750 /// TODO: stubs for now to get us to a compiling state gently
751 override public AvatarAppearance GetUserAppearance(LLUUID user) 751 override public AvatarAppearance GetUserAppearance(UUID user)
752 { 752 {
753// return new AvatarAppearance(); 753// return new AvatarAppearance();
754 try 754 try
@@ -784,37 +784,37 @@ namespace OpenSim.Data.MSSQL
784 { 784 {
785 AvatarAppearance appearance = new AvatarAppearance(); 785 AvatarAppearance appearance = new AvatarAppearance();
786 786
787 appearance.Owner = new LLUUID((string)reader["owner"]); 787 appearance.Owner = new UUID((string)reader["owner"]);
788 appearance.Serial = Convert.ToInt32(reader["serial"]); 788 appearance.Serial = Convert.ToInt32(reader["serial"]);
789 appearance.VisualParams = (byte[])reader["visual_params"]; 789 appearance.VisualParams = (byte[])reader["visual_params"];
790 appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); 790 appearance.Texture = new Primitive.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length);
791 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); 791 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]);
792 appearance.BodyItem = new LLUUID((string)reader["body_item"]); 792 appearance.BodyItem = new UUID((string)reader["body_item"]);
793 appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); 793 appearance.BodyAsset = new UUID((string)reader["body_asset"]);
794 appearance.SkinItem = new LLUUID((string)reader["skin_item"]); 794 appearance.SkinItem = new UUID((string)reader["skin_item"]);
795 appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); 795 appearance.SkinAsset = new UUID((string)reader["skin_asset"]);
796 appearance.HairItem = new LLUUID((string)reader["hair_item"]); 796 appearance.HairItem = new UUID((string)reader["hair_item"]);
797 appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); 797 appearance.HairAsset = new UUID((string)reader["hair_asset"]);
798 appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); 798 appearance.EyesItem = new UUID((string)reader["eyes_item"]);
799 appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); 799 appearance.EyesAsset = new UUID((string)reader["eyes_asset"]);
800 appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); 800 appearance.ShirtItem = new UUID((string)reader["shirt_item"]);
801 appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); 801 appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]);
802 appearance.PantsItem = new LLUUID((string)reader["pants_item"]); 802 appearance.PantsItem = new UUID((string)reader["pants_item"]);
803 appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); 803 appearance.PantsAsset = new UUID((string)reader["pants_asset"]);
804 appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); 804 appearance.ShoesItem = new UUID((string)reader["shoes_item"]);
805 appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); 805 appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]);
806 appearance.SocksItem = new LLUUID((string)reader["socks_item"]); 806 appearance.SocksItem = new UUID((string)reader["socks_item"]);
807 appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); 807 appearance.SocksAsset = new UUID((string)reader["socks_asset"]);
808 appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); 808 appearance.JacketItem = new UUID((string)reader["jacket_item"]);
809 appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); 809 appearance.JacketAsset = new UUID((string)reader["jacket_asset"]);
810 appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); 810 appearance.GlovesItem = new UUID((string)reader["gloves_item"]);
811 appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); 811 appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]);
812 appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); 812 appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]);
813 appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); 813 appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]);
814 appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); 814 appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]);
815 appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); 815 appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]);
816 appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); 816 appearance.SkirtItem = new UUID((string)reader["skirt_item"]);
817 appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); 817 appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]);
818 818
819 return appearance; 819 return appearance;
820 } 820 }
@@ -831,7 +831,7 @@ namespace OpenSim.Data.MSSQL
831 /// </summary> 831 /// </summary>
832 /// <param name="user">the used UUID</param> 832 /// <param name="user">the used UUID</param>
833 /// <param name="appearance">the appearence</param> 833 /// <param name="appearance">the appearence</param>
834 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 834 override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
835 { 835 {
836 string sql = String.Empty; 836 string sql = String.Empty;
837 sql += "DELETE FROM avatarappearance WHERE owner=@owner "; 837 sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
@@ -918,7 +918,7 @@ namespace OpenSim.Data.MSSQL
918 { 918 {
919 } 919 }
920 920
921 override public void ResetAttachments(LLUUID userID) 921 override public void ResetAttachments(UUID userID)
922 { 922 {
923 } 923 }
924 } 924 }
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 08a8c6e..5c58a4b 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using MySql.Data.MySqlClient; 34using MySql.Data.MySqlClient;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -116,7 +116,7 @@ namespace OpenSim.Data.MySQL
116 /// <param name="assetID">Asset UUID to fetch</param> 116 /// <param name="assetID">Asset UUID to fetch</param>
117 /// <returns>Return the asset</returns> 117 /// <returns>Return the asset</returns>
118 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks> 118 /// <remarks>On failure : throw an exception and attempt to reconnect to database</remarks>
119 override public AssetBase FetchAsset(LLUUID assetID) 119 override public AssetBase FetchAsset(UUID assetID)
120 { 120 {
121 AssetBase asset = null; 121 AssetBase asset = null;
122 lock (_dbConnection) 122 lock (_dbConnection)
@@ -223,7 +223,7 @@ namespace OpenSim.Data.MySQL
223 /// </summary> 223 /// </summary>
224 /// <param name="uuid">The asset UUID</param> 224 /// <param name="uuid">The asset UUID</param>
225 /// <returns>true if exist.</returns> 225 /// <returns>true if exist.</returns>
226 override public bool ExistsAsset(LLUUID uuid) 226 override public bool ExistsAsset(UUID uuid)
227 { 227 {
228 bool assetExists = false; 228 bool assetExists = false;
229 229
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 2ab7d40..8eddec6 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using MySql.Data.MySqlClient; 36using MySql.Data.MySqlClient;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -157,7 +157,7 @@ namespace OpenSim.Data.MySQL
157 m_lastConnectionUse = timeNow; 157 m_lastConnectionUse = timeNow;
158 } 158 }
159 159
160 public EstateSettings LoadEstateSettings(LLUUID regionID) 160 public EstateSettings LoadEstateSettings(UUID regionID)
161 { 161 {
162 EstateSettings es = new EstateSettings(); 162 EstateSettings es = new EstateSettings();
163 es.OnSave += StoreEstateSettings; 163 es.OnSave += StoreEstateSettings;
@@ -185,11 +185,11 @@ namespace OpenSim.Data.MySQL
185 else 185 else
186 m_FieldMap[name].SetValue(es, false); 186 m_FieldMap[name].SetValue(es, false);
187 } 187 }
188 else if (m_FieldMap[name].GetValue(es) is libsecondlife.LLUUID) 188 else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
189 { 189 {
190 LLUUID uuid = LLUUID.Zero; 190 UUID uuid = UUID.Zero;
191 191
192 LLUUID.TryParse(r[name].ToString(), out uuid); 192 UUID.TryParse(r[name].ToString(), out uuid);
193 m_FieldMap[name].SetValue(es, uuid); 193 m_FieldMap[name].SetValue(es, uuid);
194 } 194 }
195 else 195 else
@@ -330,8 +330,8 @@ namespace OpenSim.Data.MySQL
330 { 330 {
331 EstateBan eb = new EstateBan(); 331 EstateBan eb = new EstateBan();
332 332
333 LLUUID uuid = new LLUUID(); 333 UUID uuid = new UUID();
334 LLUUID.TryParse(r["bannedUUID"].ToString(), out uuid); 334 UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
335 335
336 eb.bannedUUID = uuid; 336 eb.bannedUUID = uuid;
337 eb.bannedIP = "0.0.0.0"; 337 eb.bannedIP = "0.0.0.0";
@@ -366,7 +366,7 @@ namespace OpenSim.Data.MySQL
366 } 366 }
367 } 367 }
368 368
369 void SaveUUIDList(uint EstateID, string table, LLUUID[] data) 369 void SaveUUIDList(uint EstateID, string table, UUID[] data)
370 { 370 {
371 CheckConnection(); 371 CheckConnection();
372 372
@@ -381,7 +381,7 @@ namespace OpenSim.Data.MySQL
381 381
382 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )"; 382 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )";
383 383
384 foreach (LLUUID uuid in data) 384 foreach (UUID uuid in data)
385 { 385 {
386 cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString()); 386 cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString());
387 cmd.Parameters.AddWithValue("?uuid", uuid.ToString()); 387 cmd.Parameters.AddWithValue("?uuid", uuid.ToString());
@@ -391,9 +391,9 @@ namespace OpenSim.Data.MySQL
391 } 391 }
392 } 392 }
393 393
394 LLUUID[] LoadUUIDList(uint EstateID, string table) 394 UUID[] LoadUUIDList(uint EstateID, string table)
395 { 395 {
396 List<LLUUID> uuids = new List<LLUUID>(); 396 List<UUID> uuids = new List<UUID>();
397 397
398 CheckConnection(); 398 CheckConnection();
399 399
@@ -408,8 +408,8 @@ namespace OpenSim.Data.MySQL
408 { 408 {
409 // EstateBan eb = new EstateBan(); 409 // EstateBan eb = new EstateBan();
410 410
411 LLUUID uuid = new LLUUID(); 411 UUID uuid = new UUID();
412 LLUUID.TryParse(r["uuid"].ToString(), out uuid); 412 UUID.TryParse(r["uuid"].ToString(), out uuid);
413 413
414 uuids.Add(uuid); 414 uuids.Add(uuid);
415 } 415 }
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index 9dc3d18..fa5b33c 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35 35
@@ -121,7 +121,7 @@ namespace OpenSim.Data.MySQL
121 } 121 }
122 else 122 else
123 { 123 {
124 m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); 124 m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.Xml and we'll use that instead");
125 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 125 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
126 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 126 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
127 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 127 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
@@ -322,7 +322,7 @@ namespace OpenSim.Data.MySQL
322 /// </summary> 322 /// </summary>
323 /// <param name="uuid">The region UUID</param> 323 /// <param name="uuid">The region UUID</param>
324 /// <returns>The sim profile</returns> 324 /// <returns>The sim profile</returns>
325 override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) 325 override public RegionProfileData GetProfileByUUID(UUID uuid)
326 { 326 {
327 MySQLSuperManager dbm = GetLockedConnection(); 327 MySQLSuperManager dbm = GetLockedConnection();
328 328
@@ -458,14 +458,14 @@ namespace OpenSim.Data.MySQL
458 /// <param name="handle">The attempted regionHandle of the challenger</param> 458 /// <param name="handle">The attempted regionHandle of the challenger</param>
459 /// <param name="authkey">The secret</param> 459 /// <param name="authkey">The secret</param>
460 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 460 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
461 override public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 461 override public bool AuthenticateSim(UUID uuid, ulong handle, string authkey)
462 { 462 {
463 bool throwHissyFit = false; // Should be true by 1.0 463 bool throwHissyFit = false; // Should be true by 1.0
464 464
465 if (throwHissyFit) 465 if (throwHissyFit)
466 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 466 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
467 467
468 RegionProfileData data = GetProfileByLLUUID(uuid); 468 RegionProfileData data = GetProfileByUUID(uuid);
469 469
470 return (handle == data.regionHandle && authkey == data.regionSecret); 470 return (handle == data.regionHandle && authkey == data.regionSecret);
471 } 471 }
@@ -479,7 +479,7 @@ namespace OpenSim.Data.MySQL
479 /// <param name="authhash"></param> 479 /// <param name="authhash"></param>
480 /// <param name="challenge"></param> 480 /// <param name="challenge"></param>
481 /// <returns></returns> 481 /// <returns></returns>
482 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 482 public bool AuthenticateSim(UUID uuid, ulong handle, string authhash, string challenge)
483 { 483 {
484 // SHA512Managed HashProvider = new SHA512Managed(); 484 // SHA512Managed HashProvider = new SHA512Managed();
485 // Encoding TextProvider = new UTF8Encoding(); 485 // Encoding TextProvider = new UTF8Encoding();
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index fe2d393..50d3cc7 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.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 MySql.Data.MySqlClient; 33using MySql.Data.MySqlClient;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -125,7 +125,7 @@ namespace OpenSim.Data.MySQL
125 /// </summary> 125 /// </summary>
126 /// <param name="folderID">The folder to search</param> 126 /// <param name="folderID">The folder to search</param>
127 /// <returns>A list containing inventory items</returns> 127 /// <returns>A list containing inventory items</returns>
128 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 128 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
129 { 129 {
130 try 130 try
131 { 131 {
@@ -163,7 +163,7 @@ namespace OpenSim.Data.MySQL
163 /// </summary> 163 /// </summary>
164 /// <param name="user">The user whos inventory is to be searched</param> 164 /// <param name="user">The user whos inventory is to be searched</param>
165 /// <returns>A list of folder objects</returns> 165 /// <returns>A list of folder objects</returns>
166 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 166 public List<InventoryFolderBase> getUserRootFolders(UUID user)
167 { 167 {
168 try 168 try
169 { 169 {
@@ -176,7 +176,7 @@ namespace OpenSim.Data.MySQL
176 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", 176 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
177 database.Connection); 177 database.Connection);
178 result.Parameters.AddWithValue("?uuid", user.ToString()); 178 result.Parameters.AddWithValue("?uuid", user.ToString());
179 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); 179 result.Parameters.AddWithValue("?zero", UUID.Zero.ToString());
180 MySqlDataReader reader = result.ExecuteReader(); 180 MySqlDataReader reader = result.ExecuteReader();
181 181
182 List<InventoryFolderBase> items = new List<InventoryFolderBase>(); 182 List<InventoryFolderBase> items = new List<InventoryFolderBase>();
@@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL
204 /// </summary> 204 /// </summary>
205 /// <param name="user">The user UUID</param> 205 /// <param name="user">The user UUID</param>
206 /// <returns></returns> 206 /// <returns></returns>
207 public InventoryFolderBase getUserRootFolder(LLUUID user) 207 public InventoryFolderBase getUserRootFolder(UUID user)
208 { 208 {
209 try 209 try
210 { 210 {
@@ -217,7 +217,7 @@ namespace OpenSim.Data.MySQL
217 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", 217 "SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid",
218 database.Connection); 218 database.Connection);
219 result.Parameters.AddWithValue("?uuid", user.ToString()); 219 result.Parameters.AddWithValue("?uuid", user.ToString());
220 result.Parameters.AddWithValue("?zero", LLUUID.Zero.ToString()); 220 result.Parameters.AddWithValue("?zero", UUID.Zero.ToString());
221 221
222 MySqlDataReader reader = result.ExecuteReader(); 222 MySqlDataReader reader = result.ExecuteReader();
223 223
@@ -258,7 +258,7 @@ namespace OpenSim.Data.MySQL
258 /// </summary> 258 /// </summary>
259 /// <param name="parentID">The folder to search</param> 259 /// <param name="parentID">The folder to search</param>
260 /// <returns>A list of inventory folders</returns> 260 /// <returns>A list of inventory folders</returns>
261 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 261 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
262 { 262 {
263 try 263 try
264 { 264 {
@@ -302,23 +302,23 @@ namespace OpenSim.Data.MySQL
302 { 302 {
303 InventoryItemBase item = new InventoryItemBase(); 303 InventoryItemBase item = new InventoryItemBase();
304 304
305 item.ID = new LLUUID((string) reader["inventoryID"]); 305 item.ID = new UUID((string) reader["inventoryID"]);
306 item.AssetID = new LLUUID((string) reader["assetID"]); 306 item.AssetID = new UUID((string) reader["assetID"]);
307 item.AssetType = (int) reader["assetType"]; 307 item.AssetType = (int) reader["assetType"];
308 item.Folder = new LLUUID((string) reader["parentFolderID"]); 308 item.Folder = new UUID((string) reader["parentFolderID"]);
309 item.Owner = new LLUUID((string) reader["avatarID"]); 309 item.Owner = new UUID((string) reader["avatarID"]);
310 item.Name = (string) reader["inventoryName"]; 310 item.Name = (string) reader["inventoryName"];
311 item.Description = (string) reader["inventoryDescription"]; 311 item.Description = (string) reader["inventoryDescription"];
312 item.NextPermissions = (uint) reader["inventoryNextPermissions"]; 312 item.NextPermissions = (uint) reader["inventoryNextPermissions"];
313 item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"]; 313 item.CurrentPermissions = (uint) reader["inventoryCurrentPermissions"];
314 item.InvType = (int) reader["invType"]; 314 item.InvType = (int) reader["invType"];
315 item.Creator = new LLUUID((string) reader["creatorID"]); 315 item.Creator = new UUID((string) reader["creatorID"]);
316 item.BasePermissions = (uint) reader["inventoryBasePermissions"]; 316 item.BasePermissions = (uint) reader["inventoryBasePermissions"];
317 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; 317 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
318 item.SalePrice = (int) reader["salePrice"]; 318 item.SalePrice = (int) reader["salePrice"];
319 item.SaleType = Convert.ToByte(reader["saleType"]); 319 item.SaleType = Convert.ToByte(reader["saleType"]);
320 item.CreationDate = (int) reader["creationDate"]; 320 item.CreationDate = (int) reader["creationDate"];
321 item.GroupID = new LLUUID(reader["groupID"].ToString()); 321 item.GroupID = new UUID(reader["groupID"].ToString());
322 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); 322 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
323 item.Flags = (uint) reader["flags"]; 323 item.Flags = (uint) reader["flags"];
324 324
@@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL
337 /// </summary> 337 /// </summary>
338 /// <param name="item">The item to return</param> 338 /// <param name="item">The item to return</param>
339 /// <returns>An inventory item</returns> 339 /// <returns>An inventory item</returns>
340 public InventoryItemBase getInventoryItem(LLUUID itemID) 340 public InventoryItemBase getInventoryItem(UUID itemID)
341 { 341 {
342 try 342 try
343 { 343 {
@@ -378,9 +378,9 @@ namespace OpenSim.Data.MySQL
378 try 378 try
379 { 379 {
380 InventoryFolderBase folder = new InventoryFolderBase(); 380 InventoryFolderBase folder = new InventoryFolderBase();
381 folder.Owner = new LLUUID((string) reader["agentID"]); 381 folder.Owner = new UUID((string) reader["agentID"]);
382 folder.ParentID = new LLUUID((string) reader["parentFolderID"]); 382 folder.ParentID = new UUID((string) reader["parentFolderID"]);
383 folder.ID = new LLUUID((string) reader["folderID"]); 383 folder.ID = new UUID((string) reader["folderID"]);
384 folder.Name = (string) reader["folderName"]; 384 folder.Name = (string) reader["folderName"];
385 folder.Type = (short) reader["type"]; 385 folder.Type = (short) reader["type"];
386 folder.Version = (ushort) ((int) reader["version"]); 386 folder.Version = (ushort) ((int) reader["version"]);
@@ -400,7 +400,7 @@ namespace OpenSim.Data.MySQL
400 /// </summary> 400 /// </summary>
401 /// <param name="folder">The folder to return</param> 401 /// <param name="folder">The folder to return</param>
402 /// <returns>A folder class</returns> 402 /// <returns>A folder class</returns>
403 public InventoryFolderBase getInventoryFolder(LLUUID folderID) 403 public InventoryFolderBase getInventoryFolder(UUID folderID)
404 { 404 {
405 try 405 try
406 { 406 {
@@ -498,7 +498,7 @@ namespace OpenSim.Data.MySQL
498 /// Detele the specified inventory item 498 /// Detele the specified inventory item
499 /// </summary> 499 /// </summary>
500 /// <param name="item">The inventory item UUID to delete</param> 500 /// <param name="item">The inventory item UUID to delete</param>
501 public void deleteInventoryItem(LLUUID itemID) 501 public void deleteInventoryItem(UUID itemID)
502 { 502 {
503 try 503 try
504 { 504 {
@@ -596,7 +596,7 @@ namespace OpenSim.Data.MySQL
596 /// </summary> 596 /// </summary>
597 /// <param name="folders">list where folders will be appended</param> 597 /// <param name="folders">list where folders will be appended</param>
598 /// <param name="parentID">ID of parent</param> 598 /// <param name="parentID">ID of parent</param>
599 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) 599 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
600 { 600 {
601 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID); 601 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID);
602 602
@@ -610,7 +610,7 @@ namespace OpenSim.Data.MySQL
610 /// </summary> 610 /// </summary>
611 /// <param name="parentID"></param> 611 /// <param name="parentID"></param>
612 /// <returns></returns> 612 /// <returns></returns>
613 public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) 613 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
614 { 614 {
615 /* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one 615 /* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one
616 * - We will only need to hit the database twice instead of n times. 616 * - We will only need to hit the database twice instead of n times.
@@ -631,8 +631,8 @@ namespace OpenSim.Data.MySQL
631 try 631 try
632 { 632 {
633 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 633 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
634 Dictionary<LLUUID, List<InventoryFolderBase>> hashtable 634 Dictionary<UUID, List<InventoryFolderBase>> hashtable
635 = new Dictionary<LLUUID, List<InventoryFolderBase>>(); ; 635 = new Dictionary<UUID, List<InventoryFolderBase>>(); ;
636 List<InventoryFolderBase> parentFolder = new List<InventoryFolderBase>(); 636 List<InventoryFolderBase> parentFolder = new List<InventoryFolderBase>();
637 lock (database) 637 lock (database)
638 { 638 {
@@ -655,7 +655,7 @@ namespace OpenSim.Data.MySQL
655 655
656 if (parentFolder.Count >= 1) // No result means parent folder does not exist 656 if (parentFolder.Count >= 1) // No result means parent folder does not exist
657 { 657 {
658 if (parentFolder[0].ParentID == LLUUID.Zero) // We are querying the root folder 658 if (parentFolder[0].ParentID == UUID.Zero) // We are querying the root folder
659 { 659 {
660 /* Get all of the agent's folders from the database, put them in a list and return it */ 660 /* Get all of the agent's folders from the database, put them in a list and return it */
661 result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE agentID = ?uuid", 661 result = new MySqlCommand("SELECT * FROM inventoryfolders WHERE agentID = ?uuid",
@@ -728,7 +728,7 @@ namespace OpenSim.Data.MySQL
728 /// Delete a folder from database 728 /// Delete a folder from database
729 /// </summary> 729 /// </summary>
730 /// <param name="folderID">the folder UUID</param> 730 /// <param name="folderID">the folder UUID</param>
731 protected void deleteOneFolder(LLUUID folderID) 731 protected void deleteOneFolder(UUID folderID)
732 { 732 {
733 try 733 try
734 { 734 {
@@ -754,7 +754,7 @@ namespace OpenSim.Data.MySQL
754 /// Delete all item in a folder 754 /// Delete all item in a folder
755 /// </summary> 755 /// </summary>
756 /// <param name="folderID">the folder UUID</param> 756 /// <param name="folderID">the folder UUID</param>
757 protected void deleteItemsInFolder(LLUUID folderID) 757 protected void deleteItemsInFolder(UUID folderID)
758 { 758 {
759 try 759 try
760 { 760 {
@@ -780,7 +780,7 @@ namespace OpenSim.Data.MySQL
780 /// Deletes an inventory folder 780 /// Deletes an inventory folder
781 /// </summary> 781 /// </summary>
782 /// <param name="folderId">Id of folder to delete</param> 782 /// <param name="folderId">Id of folder to delete</param>
783 public void deleteInventoryFolder(LLUUID folderID) 783 public void deleteInventoryFolder(UUID folderID)
784 { 784 {
785 List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID); 785 List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID);
786 786
diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs
index c02016c..07ef916 100644
--- a/OpenSim/Data/MySQL/MySQLLogData.cs
+++ b/OpenSim/Data/MySQL/MySQLLogData.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Data.MySQL
63 } 63 }
64 else 64 else
65 { 65 {
66 m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.xml and we'll use that instead"); 66 m_log.Warn("Using deprecated mysql_connection.ini. Please update database_connect in GridServer_Config.Xml and we'll use that instead");
67 67
68 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 68 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
69 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 69 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index e863216..6048f93 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -31,7 +31,7 @@ using System.Collections;
31using System.Data; 31using System.Data;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using MySql.Data.MySqlClient; 36using MySql.Data.MySqlClient;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -384,8 +384,8 @@ namespace OpenSim.Data.MySQL
384 { 384 {
385 retval.regionHandle = tmp64; 385 retval.regionHandle = tmp64;
386 } 386 }
387 LLUUID tmp_uuid; 387 UUID tmp_uuid;
388 if (!LLUUID.TryParse((string)reader["uuid"], out tmp_uuid)) 388 if (!UUID.TryParse((string)reader["uuid"], out tmp_uuid))
389 { 389 {
390 return null; 390 return null;
391 } 391 }
@@ -396,7 +396,7 @@ namespace OpenSim.Data.MySQL
396 396
397 // non-critical parts 397 // non-critical parts
398 retval.regionName = (string)reader["regionName"]; 398 retval.regionName = (string)reader["regionName"];
399 retval.originUUID = new LLUUID((string) reader["originUUID"]); 399 retval.originUUID = new UUID((string) reader["originUUID"]);
400 400
401 // Secrets 401 // Secrets
402 retval.regionRecvKey = (string) reader["regionRecvKey"]; 402 retval.regionRecvKey = (string) reader["regionRecvKey"];
@@ -434,8 +434,8 @@ namespace OpenSim.Data.MySQL
434 retval.regionUserSendKey = (string) reader["regionUserSendKey"]; 434 retval.regionUserSendKey = (string) reader["regionUserSendKey"];
435 435
436 // World Map Addition 436 // World Map Addition
437 LLUUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); 437 UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID);
438 LLUUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); 438 UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid);
439 } 439 }
440 else 440 else
441 { 441 {
@@ -463,8 +463,8 @@ namespace OpenSim.Data.MySQL
463 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString()); 463 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString());
464 retval.reservationName = (string) reader["resName"]; 464 retval.reservationName = (string) reader["resName"];
465 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1; 465 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1;
466 LLUUID tmp; 466 UUID tmp;
467 LLUUID.TryParse((string) reader["userUUID"], out tmp); 467 UUID.TryParse((string) reader["userUUID"], out tmp);
468 retval.userUUID = tmp; 468 retval.userUUID = tmp;
469 } 469 }
470 else 470 else
@@ -486,15 +486,15 @@ namespace OpenSim.Data.MySQL
486 if (reader.Read()) 486 if (reader.Read())
487 { 487 {
488 // Agent IDs 488 // Agent IDs
489 LLUUID tmp; 489 UUID tmp;
490 if (!LLUUID.TryParse((string)reader["UUID"], out tmp)) 490 if (!UUID.TryParse((string)reader["UUID"], out tmp))
491 return null; 491 return null;
492 retval.ProfileID = tmp; 492 retval.ProfileID = tmp;
493 493
494 LLUUID.TryParse((string) reader["sessionID"], out tmp); 494 UUID.TryParse((string) reader["sessionID"], out tmp);
495 retval.SessionID = tmp; 495 retval.SessionID = tmp;
496 496
497 LLUUID.TryParse((string)reader["secureSessionID"], out tmp); 497 UUID.TryParse((string)reader["secureSessionID"], out tmp);
498 retval.SecureSessionID = tmp; 498 retval.SecureSessionID = tmp;
499 499
500 // Agent Who? 500 // Agent Who?
@@ -507,10 +507,10 @@ namespace OpenSim.Data.MySQL
507 retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); 507 retval.LogoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
508 508
509 // Current position 509 // Current position
510 retval.Region = new LLUUID((string)reader["currentRegion"]); 510 retval.Region = new UUID((string)reader["currentRegion"]);
511 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); 511 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
512 LLVector3 tmp_v; 512 Vector3 tmp_v;
513 LLVector3.TryParse((string) reader["currentPos"], out tmp_v); 513 Vector3.TryParse((string) reader["currentPos"], out tmp_v);
514 retval.Position = tmp_v; 514 retval.Position = tmp_v;
515 } 515 }
516 else 516 else
@@ -531,8 +531,8 @@ namespace OpenSim.Data.MySQL
531 531
532 if (reader.Read()) 532 if (reader.Read())
533 { 533 {
534 LLUUID id; 534 UUID id;
535 if (!LLUUID.TryParse((string)reader["UUID"], out id)) 535 if (!UUID.TryParse((string)reader["UUID"], out id))
536 return null; 536 return null;
537 537
538 retval.ID = id; 538 retval.ID = id;
@@ -543,17 +543,17 @@ namespace OpenSim.Data.MySQL
543 retval.PasswordSalt = (string) reader["passwordSalt"]; 543 retval.PasswordSalt = (string) reader["passwordSalt"];
544 544
545 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); 545 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
546 retval.HomeLocation = new LLVector3( 546 retval.HomeLocation = new Vector3(
547 Convert.ToSingle(reader["homeLocationX"].ToString()), 547 Convert.ToSingle(reader["homeLocationX"].ToString()),
548 Convert.ToSingle(reader["homeLocationY"].ToString()), 548 Convert.ToSingle(reader["homeLocationY"].ToString()),
549 Convert.ToSingle(reader["homeLocationZ"].ToString())); 549 Convert.ToSingle(reader["homeLocationZ"].ToString()));
550 retval.HomeLookAt = new LLVector3( 550 retval.HomeLookAt = new Vector3(
551 Convert.ToSingle(reader["homeLookAtX"].ToString()), 551 Convert.ToSingle(reader["homeLookAtX"].ToString()),
552 Convert.ToSingle(reader["homeLookAtY"].ToString()), 552 Convert.ToSingle(reader["homeLookAtY"].ToString()),
553 Convert.ToSingle(reader["homeLookAtZ"].ToString())); 553 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
554 554
555 LLUUID regionID = LLUUID.Zero; 555 UUID regionID = UUID.Zero;
556 LLUUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero 556 UUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use UUID.Zero
557 retval.HomeRegionID = regionID; 557 retval.HomeRegionID = regionID;
558 558
559 retval.Created = Convert.ToInt32(reader["created"].ToString()); 559 retval.Created = Convert.ToInt32(reader["created"].ToString());
@@ -576,29 +576,29 @@ namespace OpenSim.Data.MySQL
576 retval.FirstLifeAboutText = (string)reader["profileFirstText"]; 576 retval.FirstLifeAboutText = (string)reader["profileFirstText"];
577 577
578 if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) 578 if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
579 retval.Image = LLUUID.Zero; 579 retval.Image = UUID.Zero;
580 else { 580 else {
581 LLUUID tmp; 581 UUID tmp;
582 LLUUID.TryParse((string)reader["profileImage"], out tmp); 582 UUID.TryParse((string)reader["profileImage"], out tmp);
583 retval.Image = tmp; 583 retval.Image = tmp;
584 } 584 }
585 585
586 if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) 586 if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage")))
587 retval.FirstLifeImage = LLUUID.Zero; 587 retval.FirstLifeImage = UUID.Zero;
588 else { 588 else {
589 LLUUID tmp; 589 UUID tmp;
590 LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); 590 UUID.TryParse((string)reader["profileFirstImage"], out tmp);
591 retval.FirstLifeImage = tmp; 591 retval.FirstLifeImage = tmp;
592 } 592 }
593 593
594 if (reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) 594 if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
595 { 595 {
596 retval.WebLoginKey = LLUUID.Zero; 596 retval.WebLoginKey = UUID.Zero;
597 } 597 }
598 else 598 else
599 { 599 {
600 LLUUID tmp; 600 UUID tmp;
601 LLUUID.TryParse((string)reader["webLoginKey"], out tmp); 601 UUID.TryParse((string)reader["webLoginKey"], out tmp);
602 retval.WebLoginKey = tmp; 602 retval.WebLoginKey = tmp;
603 } 603 }
604 604
@@ -611,12 +611,12 @@ namespace OpenSim.Data.MySQL
611 611
612 if (reader.IsDBNull(reader.GetOrdinal("partner"))) 612 if (reader.IsDBNull(reader.GetOrdinal("partner")))
613 { 613 {
614 retval.Partner = LLUUID.Zero; 614 retval.Partner = UUID.Zero;
615 } 615 }
616 else 616 else
617 { 617 {
618 LLUUID tmp; 618 UUID tmp;
619 LLUUID.TryParse((string)reader["partner"], out tmp); 619 UUID.TryParse((string)reader["partner"], out tmp);
620 retval.Partner = tmp; 620 retval.Partner = tmp;
621 } 621 }
622 } 622 }
@@ -638,37 +638,37 @@ namespace OpenSim.Data.MySQL
638 if (reader.Read()) 638 if (reader.Read())
639 { 639 {
640 appearance = new AvatarAppearance(); 640 appearance = new AvatarAppearance();
641 appearance.Owner = new LLUUID((string)reader["owner"]); 641 appearance.Owner = new UUID((string)reader["owner"]);
642 appearance.Serial = Convert.ToInt32(reader["serial"]); 642 appearance.Serial = Convert.ToInt32(reader["serial"]);
643 appearance.VisualParams = (byte[])reader["visual_params"]; 643 appearance.VisualParams = (byte[])reader["visual_params"];
644 appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); 644 appearance.Texture = new Primitive.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length);
645 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); 645 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]);
646 appearance.BodyItem = new LLUUID((string)reader["body_item"]); 646 appearance.BodyItem = new UUID((string)reader["body_item"]);
647 appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); 647 appearance.BodyAsset = new UUID((string)reader["body_asset"]);
648 appearance.SkinItem = new LLUUID((string)reader["skin_item"]); 648 appearance.SkinItem = new UUID((string)reader["skin_item"]);
649 appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); 649 appearance.SkinAsset = new UUID((string)reader["skin_asset"]);
650 appearance.HairItem = new LLUUID((string)reader["hair_item"]); 650 appearance.HairItem = new UUID((string)reader["hair_item"]);
651 appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); 651 appearance.HairAsset = new UUID((string)reader["hair_asset"]);
652 appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); 652 appearance.EyesItem = new UUID((string)reader["eyes_item"]);
653 appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); 653 appearance.EyesAsset = new UUID((string)reader["eyes_asset"]);
654 appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); 654 appearance.ShirtItem = new UUID((string)reader["shirt_item"]);
655 appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); 655 appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]);
656 appearance.PantsItem = new LLUUID((string)reader["pants_item"]); 656 appearance.PantsItem = new UUID((string)reader["pants_item"]);
657 appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); 657 appearance.PantsAsset = new UUID((string)reader["pants_asset"]);
658 appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); 658 appearance.ShoesItem = new UUID((string)reader["shoes_item"]);
659 appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); 659 appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]);
660 appearance.SocksItem = new LLUUID((string)reader["socks_item"]); 660 appearance.SocksItem = new UUID((string)reader["socks_item"]);
661 appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); 661 appearance.SocksAsset = new UUID((string)reader["socks_asset"]);
662 appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); 662 appearance.JacketItem = new UUID((string)reader["jacket_item"]);
663 appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); 663 appearance.JacketAsset = new UUID((string)reader["jacket_asset"]);
664 appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); 664 appearance.GlovesItem = new UUID((string)reader["gloves_item"]);
665 appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); 665 appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]);
666 appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); 666 appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]);
667 appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); 667 appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]);
668 appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); 668 appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]);
669 appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); 669 appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]);
670 appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); 670 appearance.SkirtItem = new UUID((string)reader["skirt_item"]);
671 appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); 671 appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]);
672 } 672 }
673 return appearance; 673 return appearance;
674 } 674 }
@@ -766,12 +766,12 @@ namespace OpenSim.Data.MySQL
766 /// <param name="firstImage">UUID for firstlife image</param> 766 /// <param name="firstImage">UUID for firstlife image</param>
767 /// <param name="webLoginKey">Ignored</param> 767 /// <param name="webLoginKey">Ignored</param>
768 /// <returns>Success?</returns> 768 /// <returns>Success?</returns>
769 public bool insertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, 769 public bool insertUserRow(UUID uuid, string username, string lastname, string passwordHash,
770 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, 770 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
771 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 771 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
772 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 772 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
773 string aboutText, string firstText, 773 string aboutText, string firstText,
774 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) 774 UUID profileImage, UUID firstImage, UUID webLoginKey)
775 { 775 {
776 m_log.Debug("[MySQLManager]: Fetching profile for " + uuid.ToString()); 776 m_log.Debug("[MySQLManager]: Fetching profile for " + uuid.ToString());
777 string sql = 777 string sql =
@@ -867,12 +867,12 @@ namespace OpenSim.Data.MySQL
867 /// <param name="firstImage">UUID for firstlife image</param> 867 /// <param name="firstImage">UUID for firstlife image</param>
868 /// <param name="webLoginKey">UUID for weblogin Key</param> 868 /// <param name="webLoginKey">UUID for weblogin Key</param>
869 /// <returns>Success?</returns> 869 /// <returns>Success?</returns>
870 public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, 870 public bool updateUserRow(UUID uuid, string username, string lastname, string passwordHash,
871 string passwordSalt, UInt64 homeRegion, LLUUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, 871 string passwordSalt, UInt64 homeRegion, UUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ,
872 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 872 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
873 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 873 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
874 string aboutText, string firstText, 874 string aboutText, string firstText,
875 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey, int userFlags, int godLevel, string customType, LLUUID partner) 875 UUID profileImage, UUID firstImage, UUID webLoginKey, int userFlags, int godLevel, string customType, UUID partner)
876 { 876 {
877 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; 877 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname ";
878 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; 878 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , ";
@@ -1211,7 +1211,7 @@ namespace OpenSim.Data.MySQL
1211 1211
1212 } 1212 }
1213 1213
1214 public void writeAttachments(LLUUID agentID, Hashtable data) 1214 public void writeAttachments(UUID agentID, Hashtable data)
1215 { 1215 {
1216 string sql = "delete from avatarattachments where UUID = ?uuid"; 1216 string sql = "delete from avatarattachments where UUID = ?uuid";
1217 1217
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 903f022..9552ba1 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using MySql.Data.MySqlClient; 36using MySql.Data.MySqlClient;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -296,15 +296,15 @@ namespace OpenSim.Data.MySQL
296 /// </summary> 296 /// </summary>
297 /// <param name="obj">The object</param> 297 /// <param name="obj">The object</param>
298 /// <param name="regionUUID">The region UUID</param> 298 /// <param name="regionUUID">The region UUID</param>
299 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 299 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
300 { 300 {
301 lock (m_dataSet) 301 lock (m_dataSet)
302 { 302 {
303 foreach (SceneObjectPart prim in obj.Children.Values) 303 foreach (SceneObjectPart prim in obj.Children.Values)
304 { 304 {
305 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 305 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
306 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 306 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
307 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) 307 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
308 { 308 {
309 //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 309 //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
310 addPrim(prim, obj.UUID, regionUUID); 310 addPrim(prim, obj.UUID, regionUUID);
@@ -323,9 +323,9 @@ namespace OpenSim.Data.MySQL
323 /// </summary> 323 /// </summary>
324 /// <param name="obj">The object</param> 324 /// <param name="obj">The object</param>
325 /// <param name="regionUUID">The Region UUID</param> 325 /// <param name="regionUUID">The Region UUID</param>
326 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 326 public void RemoveObject(UUID obj, UUID regionUUID)
327 { 327 {
328 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 328 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj, regionUUID);
329 329
330 DataTable prims = m_primTable; 330 DataTable prims = m_primTable;
331 DataTable shapes = m_shapeTable; 331 DataTable shapes = m_shapeTable;
@@ -337,7 +337,7 @@ namespace OpenSim.Data.MySQL
337 foreach (DataRow row in primRows) 337 foreach (DataRow row in primRows)
338 { 338 {
339 // Remove shapes row 339 // Remove shapes row
340 LLUUID uuid = new LLUUID((string) row["UUID"]); 340 UUID uuid = new UUID((string) row["UUID"]);
341 DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); 341 DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid));
342 if (shapeRow != null) 342 if (shapeRow != null)
343 { 343 {
@@ -358,7 +358,7 @@ namespace OpenSim.Data.MySQL
358 /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. 358 /// The caller must acquire the necessrary synchronization locks and commit or rollback changes.
359 /// </summary> 359 /// </summary>
360 /// <param name="uuid">the Item UUID</param> 360 /// <param name="uuid">the Item UUID</param>
361 private void RemoveItems(LLUUID uuid) 361 private void RemoveItems(UUID uuid)
362 { 362 {
363 String sql = String.Format("primID = '{0}'", uuid); 363 String sql = String.Format("primID = '{0}'", uuid);
364 DataRow[] itemRows = m_itemsTable.Select(sql); 364 DataRow[] itemRows = m_itemsTable.Select(sql);
@@ -374,9 +374,9 @@ namespace OpenSim.Data.MySQL
374 /// </summary> 374 /// </summary>
375 /// <param name="regionUUID">the Region UUID</param> 375 /// <param name="regionUUID">the Region UUID</param>
376 /// <returns>List of loaded groups</returns> 376 /// <returns>List of loaded groups</returns>
377 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 377 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
378 { 378 {
379 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 379 Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
380 380
381 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); 381 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
382 382
@@ -436,7 +436,7 @@ namespace OpenSim.Data.MySQL
436 "No shape found for prim in storage, so setting default box shape"); 436 "No shape found for prim in storage, so setting default box shape");
437 prim.Shape = PrimitiveBaseShape.Default; 437 prim.Shape = PrimitiveBaseShape.Default;
438 } 438 }
439 createdObjects[new LLUUID(objID)].AddPart(prim); 439 createdObjects[new UUID(objID)].AddPart(prim);
440 } 440 }
441 441
442 LoadItems(prim); 442 LoadItems(prim);
@@ -497,7 +497,7 @@ namespace OpenSim.Data.MySQL
497 /// </summary> 497 /// </summary>
498 /// <param name="ter">HeightField data</param> 498 /// <param name="ter">HeightField data</param>
499 /// <param name="regionID">region UUID</param> 499 /// <param name="regionID">region UUID</param>
500 public void StoreTerrain(double[,] ter, LLUUID regionID) 500 public void StoreTerrain(double[,] ter, UUID regionID)
501 { 501 {
502 int revision = 1; 502 int revision = 1;
503 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString()); 503 m_log.Info("[REGION DB]: Storing terrain revision r" + revision.ToString());
@@ -527,7 +527,7 @@ namespace OpenSim.Data.MySQL
527 /// </summary> 527 /// </summary>
528 /// <param name="regionID">the region UUID</param> 528 /// <param name="regionID">the region UUID</param>
529 /// <returns>Heightfield data</returns> 529 /// <returns>Heightfield data</returns>
530 public double[,] LoadTerrain(LLUUID regionID) 530 public double[,] LoadTerrain(UUID regionID)
531 { 531 {
532 double[,] terret = new double[256,256]; 532 double[,] terret = new double[256,256];
533 terret.Initialize(); 533 terret.Initialize();
@@ -583,7 +583,7 @@ namespace OpenSim.Data.MySQL
583 /// </list> 583 /// </list>
584 /// </summary> 584 /// </summary>
585 /// <param name="globalID"></param> 585 /// <param name="globalID"></param>
586 public void RemoveLandObject(LLUUID globalID) 586 public void RemoveLandObject(UUID globalID)
587 { 587 {
588 lock (m_dataSet) 588 lock (m_dataSet)
589 { 589 {
@@ -646,7 +646,7 @@ namespace OpenSim.Data.MySQL
646 } 646 }
647 } 647 }
648 648
649 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 649 public RegionSettings LoadRegionSettings(UUID regionUUID)
650 { 650 {
651 lock (m_dataSet) 651 lock (m_dataSet)
652 { 652 {
@@ -701,7 +701,7 @@ namespace OpenSim.Data.MySQL
701 /// </summary> 701 /// </summary>
702 /// <param name="regionUUID"></param> 702 /// <param name="regionUUID"></param>
703 /// <returns></returns> 703 /// <returns></returns>
704 public List<LandData> LoadLandObjects(LLUUID regionUUID) 704 public List<LandData> LoadLandObjects(UUID regionUUID)
705 { 705 {
706 List<LandData> landDataForRegion = new List<LandData>(); 706 List<LandData> landDataForRegion = new List<LandData>();
707 lock (m_dataSet) 707 lock (m_dataSet)
@@ -1101,7 +1101,7 @@ namespace OpenSim.Data.MySQL
1101 private SceneObjectPart buildPrim(DataRow row) 1101 private SceneObjectPart buildPrim(DataRow row)
1102 { 1102 {
1103 SceneObjectPart prim = new SceneObjectPart(); 1103 SceneObjectPart prim = new SceneObjectPart();
1104 prim.UUID = new LLUUID((String) row["UUID"]); 1104 prim.UUID = new UUID((String) row["UUID"]);
1105 // explicit conversion of integers is required, which sort 1105 // explicit conversion of integers is required, which sort
1106 // of sucks. No idea if there is a shortcut here or not. 1106 // of sucks. No idea if there is a shortcut here or not.
1107 prim.ParentID = Convert.ToUInt32(row["ParentID"]); 1107 prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@@ -1114,54 +1114,54 @@ namespace OpenSim.Data.MySQL
1114 prim.TouchName = (String) row["TouchName"]; 1114 prim.TouchName = (String) row["TouchName"];
1115 // permissions 1115 // permissions
1116 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); 1116 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
1117 prim.CreatorID = new LLUUID((String) row["CreatorID"]); 1117 prim.CreatorID = new UUID((String) row["CreatorID"]);
1118 prim.OwnerID = new LLUUID((String) row["OwnerID"]); 1118 prim.OwnerID = new UUID((String) row["OwnerID"]);
1119 prim.GroupID = new LLUUID((String) row["GroupID"]); 1119 prim.GroupID = new UUID((String) row["GroupID"]);
1120 prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); 1120 prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
1121 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); 1121 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
1122 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); 1122 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
1123 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); 1123 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
1124 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); 1124 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
1125 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); 1125 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
1126 // vectors 1126 // vectors
1127 prim.OffsetPosition = new LLVector3( 1127 prim.OffsetPosition = new Vector3(
1128 Convert.ToSingle(row["PositionX"]), 1128 Convert.ToSingle(row["PositionX"]),
1129 Convert.ToSingle(row["PositionY"]), 1129 Convert.ToSingle(row["PositionY"]),
1130 Convert.ToSingle(row["PositionZ"]) 1130 Convert.ToSingle(row["PositionZ"])
1131 ); 1131 );
1132 prim.GroupPosition = new LLVector3( 1132 prim.GroupPosition = new Vector3(
1133 Convert.ToSingle(row["GroupPositionX"]), 1133 Convert.ToSingle(row["GroupPositionX"]),
1134 Convert.ToSingle(row["GroupPositionY"]), 1134 Convert.ToSingle(row["GroupPositionY"]),
1135 Convert.ToSingle(row["GroupPositionZ"]) 1135 Convert.ToSingle(row["GroupPositionZ"])
1136 ); 1136 );
1137 prim.Velocity = new LLVector3( 1137 prim.Velocity = new Vector3(
1138 Convert.ToSingle(row["VelocityX"]), 1138 Convert.ToSingle(row["VelocityX"]),
1139 Convert.ToSingle(row["VelocityY"]), 1139 Convert.ToSingle(row["VelocityY"]),
1140 Convert.ToSingle(row["VelocityZ"]) 1140 Convert.ToSingle(row["VelocityZ"])
1141 ); 1141 );
1142 prim.AngularVelocity = new LLVector3( 1142 prim.AngularVelocity = new Vector3(
1143 Convert.ToSingle(row["AngularVelocityX"]), 1143 Convert.ToSingle(row["AngularVelocityX"]),
1144 Convert.ToSingle(row["AngularVelocityY"]), 1144 Convert.ToSingle(row["AngularVelocityY"]),
1145 Convert.ToSingle(row["AngularVelocityZ"]) 1145 Convert.ToSingle(row["AngularVelocityZ"])
1146 ); 1146 );
1147 prim.Acceleration = new LLVector3( 1147 prim.Acceleration = new Vector3(
1148 Convert.ToSingle(row["AccelerationX"]), 1148 Convert.ToSingle(row["AccelerationX"]),
1149 Convert.ToSingle(row["AccelerationY"]), 1149 Convert.ToSingle(row["AccelerationY"]),
1150 Convert.ToSingle(row["AccelerationZ"]) 1150 Convert.ToSingle(row["AccelerationZ"])
1151 ); 1151 );
1152 // quaternions 1152 // quaternions
1153 prim.RotationOffset = new LLQuaternion( 1153 prim.RotationOffset = new Quaternion(
1154 Convert.ToSingle(row["RotationX"]), 1154 Convert.ToSingle(row["RotationX"]),
1155 Convert.ToSingle(row["RotationY"]), 1155 Convert.ToSingle(row["RotationY"]),
1156 Convert.ToSingle(row["RotationZ"]), 1156 Convert.ToSingle(row["RotationZ"]),
1157 Convert.ToSingle(row["RotationW"]) 1157 Convert.ToSingle(row["RotationW"])
1158 ); 1158 );
1159 prim.SitTargetPositionLL = new LLVector3( 1159 prim.SitTargetPositionLL = new Vector3(
1160 Convert.ToSingle(row["SitTargetOffsetX"]), 1160 Convert.ToSingle(row["SitTargetOffsetX"]),
1161 Convert.ToSingle(row["SitTargetOffsetY"]), 1161 Convert.ToSingle(row["SitTargetOffsetY"]),
1162 Convert.ToSingle(row["SitTargetOffsetZ"]) 1162 Convert.ToSingle(row["SitTargetOffsetZ"])
1163 ); 1163 );
1164 prim.SitTargetOrientationLL = new LLQuaternion( 1164 prim.SitTargetOrientationLL = new Quaternion(
1165 Convert.ToSingle(row["SitTargetOrientX"]), 1165 Convert.ToSingle(row["SitTargetOrientX"]),
1166 Convert.ToSingle(row["SitTargetOrientY"]), 1166 Convert.ToSingle(row["SitTargetOrientY"]),
1167 Convert.ToSingle(row["SitTargetOrientZ"]), 1167 Convert.ToSingle(row["SitTargetOrientZ"]),
@@ -1174,14 +1174,14 @@ namespace OpenSim.Data.MySQL
1174 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); 1174 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
1175 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); 1175 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]);
1176 1176
1177 prim.Sound = new LLUUID(row["LoopedSound"].ToString()); 1177 prim.Sound = new UUID(row["LoopedSound"].ToString());
1178 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); 1178 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
1179 prim.SoundFlags = 1; // If it's persisted at all, it's looped 1179 prim.SoundFlags = 1; // If it's persisted at all, it's looped
1180 1180
1181 if (!row.IsNull("TextureAnimation")) 1181 if (!row.IsNull("TextureAnimation"))
1182 prim.TextureAnimation = (Byte[])row["TextureAnimation"]; 1182 prim.TextureAnimation = (Byte[])row["TextureAnimation"];
1183 1183
1184 prim.RotationalVelocity = new LLVector3( 1184 prim.RotationalVelocity = new Vector3(
1185 Convert.ToSingle(row["OmegaX"]), 1185 Convert.ToSingle(row["OmegaX"]),
1186 Convert.ToSingle(row["OmegaY"]), 1186 Convert.ToSingle(row["OmegaY"]),
1187 Convert.ToSingle(row["OmegaZ"]) 1187 Convert.ToSingle(row["OmegaZ"])
@@ -1190,13 +1190,13 @@ namespace OpenSim.Data.MySQL
1190 // TODO: Rotation 1190 // TODO: Rotation
1191 // OmegaX, OmegaY, OmegaZ 1191 // OmegaX, OmegaY, OmegaZ
1192 1192
1193 prim.SetCameraEyeOffset(new LLVector3( 1193 prim.SetCameraEyeOffset(new Vector3(
1194 Convert.ToSingle(row["CameraEyeOffsetX"]), 1194 Convert.ToSingle(row["CameraEyeOffsetX"]),
1195 Convert.ToSingle(row["CameraEyeOffsetY"]), 1195 Convert.ToSingle(row["CameraEyeOffsetY"]),
1196 Convert.ToSingle(row["CameraEyeOffsetZ"]) 1196 Convert.ToSingle(row["CameraEyeOffsetZ"])
1197 )); 1197 ));
1198 1198
1199 prim.SetCameraAtOffset(new LLVector3( 1199 prim.SetCameraAtOffset(new Vector3(
1200 Convert.ToSingle(row["CameraAtOffsetX"]), 1200 Convert.ToSingle(row["CameraAtOffsetX"]),
1201 Convert.ToSingle(row["CameraAtOffsetY"]), 1201 Convert.ToSingle(row["CameraAtOffsetY"]),
1202 Convert.ToSingle(row["CameraAtOffsetZ"]) 1202 Convert.ToSingle(row["CameraAtOffsetZ"])
@@ -1229,10 +1229,10 @@ namespace OpenSim.Data.MySQL
1229 { 1229 {
1230 TaskInventoryItem taskItem = new TaskInventoryItem(); 1230 TaskInventoryItem taskItem = new TaskInventoryItem();
1231 1231
1232 taskItem.ItemID = new LLUUID((String)row["itemID"]); 1232 taskItem.ItemID = new UUID((String)row["itemID"]);
1233 taskItem.ParentPartID = new LLUUID((String)row["primID"]); 1233 taskItem.ParentPartID = new UUID((String)row["primID"]);
1234 taskItem.AssetID = new LLUUID((String)row["assetID"]); 1234 taskItem.AssetID = new UUID((String)row["assetID"]);
1235 taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); 1235 taskItem.ParentID = new UUID((String)row["parentFolderID"]);
1236 1236
1237 taskItem.InvType = Convert.ToInt32(row["invType"]); 1237 taskItem.InvType = Convert.ToInt32(row["invType"]);
1238 taskItem.Type = Convert.ToInt32(row["assetType"]); 1238 taskItem.Type = Convert.ToInt32(row["assetType"]);
@@ -1240,10 +1240,10 @@ namespace OpenSim.Data.MySQL
1240 taskItem.Name = (String)row["name"]; 1240 taskItem.Name = (String)row["name"];
1241 taskItem.Description = (String)row["description"]; 1241 taskItem.Description = (String)row["description"];
1242 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1242 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1243 taskItem.CreatorID = new LLUUID((String)row["creatorID"]); 1243 taskItem.CreatorID = new UUID((String)row["creatorID"]);
1244 taskItem.OwnerID = new LLUUID((String)row["ownerID"]); 1244 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1245 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1245 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1246 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1246 taskItem.GroupID = new UUID((String)row["groupID"]);
1247 1247
1248 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); 1248 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1249 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); 1249 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@@ -1259,7 +1259,7 @@ namespace OpenSim.Data.MySQL
1259 { 1259 {
1260 RegionSettings newSettings = new RegionSettings(); 1260 RegionSettings newSettings = new RegionSettings();
1261 1261
1262 newSettings.RegionUUID = new LLUUID((string) row["regionUUID"]); 1262 newSettings.RegionUUID = new UUID((string) row["regionUUID"]);
1263 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); 1263 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]);
1264 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); 1264 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]);
1265 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); 1265 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]);
@@ -1273,10 +1273,10 @@ namespace OpenSim.Data.MySQL
1273 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); 1273 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]);
1274 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); 1274 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]);
1275 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); 1275 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]);
1276 newSettings.TerrainTexture1 = new LLUUID((String) row["terrain_texture_1"]); 1276 newSettings.TerrainTexture1 = new UUID((String) row["terrain_texture_1"]);
1277 newSettings.TerrainTexture2 = new LLUUID((String) row["terrain_texture_2"]); 1277 newSettings.TerrainTexture2 = new UUID((String) row["terrain_texture_2"]);
1278 newSettings.TerrainTexture3 = new LLUUID((String) row["terrain_texture_3"]); 1278 newSettings.TerrainTexture3 = new UUID((String) row["terrain_texture_3"]);
1279 newSettings.TerrainTexture4 = new LLUUID((String) row["terrain_texture_4"]); 1279 newSettings.TerrainTexture4 = new UUID((String) row["terrain_texture_4"]);
1280 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); 1280 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]);
1281 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); 1281 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]);
1282 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); 1282 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]);
@@ -1292,7 +1292,7 @@ namespace OpenSim.Data.MySQL
1292 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); 1292 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
1293 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); 1293 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
1294 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); 1294 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
1295 newSettings.Covenant = new LLUUID((String) row["covenant"]); 1295 newSettings.Covenant = new UUID((String) row["covenant"]);
1296 1296
1297 return newSettings; 1297 return newSettings;
1298 } 1298 }
@@ -1306,7 +1306,7 @@ namespace OpenSim.Data.MySQL
1306 { 1306 {
1307 LandData newData = new LandData(); 1307 LandData newData = new LandData();
1308 1308
1309 newData.GlobalID = new LLUUID((String) row["UUID"]); 1309 newData.GlobalID = new UUID((String) row["UUID"]);
1310 newData.LocalID = Convert.ToInt32(row["LocalLandID"]); 1310 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
1311 1311
1312 // Bitmap is a byte[512] 1312 // Bitmap is a byte[512]
@@ -1322,39 +1322,39 @@ namespace OpenSim.Data.MySQL
1322 //Enum libsecondlife.Parcel.ParcelCategory 1322 //Enum libsecondlife.Parcel.ParcelCategory
1323 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); 1323 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
1324 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 1324 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
1325 newData.GroupID = new LLUUID((String) row["GroupUUID"]); 1325 newData.GroupID = new UUID((String) row["GroupUUID"]);
1326 newData.SalePrice = Convert.ToInt32(row["SalePrice"]); 1326 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
1327 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); 1327 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
1328 //Enum. libsecondlife.Parcel.ParcelStatus 1328 //Enum. libsecondlife.Parcel.ParcelStatus
1329 newData.Flags = Convert.ToUInt32(row["LandFlags"]); 1329 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
1330 newData.LandingType = Convert.ToByte(row["LandingType"]); 1330 newData.LandingType = Convert.ToByte(row["LandingType"]);
1331 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 1331 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
1332 newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); 1332 newData.MediaID = new UUID((String) row["MediaTextureUUID"]);
1333 newData.MediaURL = (String) row["MediaURL"]; 1333 newData.MediaURL = (String) row["MediaURL"];
1334 newData.MusicURL = (String) row["MusicURL"]; 1334 newData.MusicURL = (String) row["MusicURL"];
1335 newData.PassHours = Convert.ToSingle(row["PassHours"]); 1335 newData.PassHours = Convert.ToSingle(row["PassHours"]);
1336 newData.PassPrice = Convert.ToInt32(row["PassPrice"]); 1336 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
1337 LLUUID authedbuyer = LLUUID.Zero; 1337 UUID authedbuyer = UUID.Zero;
1338 LLUUID snapshotID = LLUUID.Zero; 1338 UUID snapshotID = UUID.Zero;
1339 1339
1340 Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer); 1340 UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer);
1341 Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID); 1341 UUID.TryParse((string)row["SnapshotUUID"], out snapshotID);
1342 1342
1343 newData.AuthBuyerID = authedbuyer; 1343 newData.AuthBuyerID = authedbuyer;
1344 newData.SnapshotID = snapshotID; 1344 newData.SnapshotID = snapshotID;
1345 try 1345 try
1346 { 1346 {
1347 newData.UserLocation = 1347 newData.UserLocation =
1348 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1348 new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1349 Convert.ToSingle(row["UserLocationZ"])); 1349 Convert.ToSingle(row["UserLocationZ"]));
1350 newData.UserLookAt = 1350 newData.UserLookAt =
1351 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1351 new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1352 Convert.ToSingle(row["UserLookAtZ"])); 1352 Convert.ToSingle(row["UserLookAtZ"]));
1353 } 1353 }
1354 catch (InvalidCastException) 1354 catch (InvalidCastException)
1355 { 1355 {
1356 newData.UserLocation = LLVector3.Zero; 1356 newData.UserLocation = Vector3.Zero;
1357 newData.UserLookAt = LLVector3.Zero; 1357 newData.UserLookAt = Vector3.Zero;
1358 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 1358 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
1359 } 1359 }
1360 1360
@@ -1371,7 +1371,7 @@ namespace OpenSim.Data.MySQL
1371 private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) 1371 private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
1372 { 1372 {
1373 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 1373 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
1374 entry.AgentID = new LLUUID((string) row["AccessUUID"]); 1374 entry.AgentID = new UUID((string) row["AccessUUID"]);
1375 entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]); 1375 entry.Flags = (ParcelManager.AccessList) Convert.ToInt32(row["Flags"]);
1376 entry.Time = new DateTime(); 1376 entry.Time = new DateTime();
1377 return entry; 1377 return entry;
@@ -1408,7 +1408,7 @@ namespace OpenSim.Data.MySQL
1408 /// <param name="prim"></param> 1408 /// <param name="prim"></param>
1409 /// <param name="sceneGroupID"></param> 1409 /// <param name="sceneGroupID"></param>
1410 /// <param name="regionUUID"></param> 1410 /// <param name="regionUUID"></param>
1411 private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1411 private void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1412 { 1412 {
1413 row["UUID"] = Util.ToRawUuidString(prim.UUID); 1413 row["UUID"] = Util.ToRawUuidString(prim.UUID);
1414 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1414 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1456,12 +1456,12 @@ namespace OpenSim.Data.MySQL
1456 row["RotationW"] = prim.RotationOffset.W; 1456 row["RotationW"] = prim.RotationOffset.W;
1457 1457
1458 // Sit target 1458 // Sit target
1459 LLVector3 sitTargetPos = prim.SitTargetPositionLL; 1459 Vector3 sitTargetPos = prim.SitTargetPositionLL;
1460 row["SitTargetOffsetX"] = sitTargetPos.X; 1460 row["SitTargetOffsetX"] = sitTargetPos.X;
1461 row["SitTargetOffsetY"] = sitTargetPos.Y; 1461 row["SitTargetOffsetY"] = sitTargetPos.Y;
1462 row["SitTargetOffsetZ"] = sitTargetPos.Z; 1462 row["SitTargetOffsetZ"] = sitTargetPos.Z;
1463 1463
1464 LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; 1464 Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
1465 row["SitTargetOrientW"] = sitTargetOrient.W; 1465 row["SitTargetOrientW"] = sitTargetOrient.W;
1466 row["SitTargetOrientX"] = sitTargetOrient.X; 1466 row["SitTargetOrientX"] = sitTargetOrient.X;
1467 row["SitTargetOrientY"] = sitTargetOrient.Y; 1467 row["SitTargetOrientY"] = sitTargetOrient.Y;
@@ -1480,7 +1480,7 @@ namespace OpenSim.Data.MySQL
1480 } 1480 }
1481 else 1481 else
1482 { 1482 {
1483 row["LoopedSound"] = LLUUID.Zero; 1483 row["LoopedSound"] = UUID.Zero;
1484 row["LoopedSoundGain"] = 0.0f; 1484 row["LoopedSoundGain"] = 0.0f;
1485 } 1485 }
1486 1486
@@ -1597,7 +1597,7 @@ namespace OpenSim.Data.MySQL
1597 /// <param name="row"></param> 1597 /// <param name="row"></param>
1598 /// <param name="land"></param> 1598 /// <param name="land"></param>
1599 /// <param name="regionUUID"></param> 1599 /// <param name="regionUUID"></param>
1600 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1600 private static void fillLandRow(DataRow row, LandData land, UUID regionUUID)
1601 { 1601 {
1602 row["UUID"] = Util.ToRawUuidString(land.GlobalID); 1602 row["UUID"] = Util.ToRawUuidString(land.GlobalID);
1603 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1603 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1642,7 +1642,7 @@ namespace OpenSim.Data.MySQL
1642 /// <param name="row"></param> 1642 /// <param name="row"></param>
1643 /// <param name="entry"></param> 1643 /// <param name="entry"></param>
1644 /// <param name="parcelID"></param> 1644 /// <param name="parcelID"></param>
1645 private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) 1645 private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
1646 { 1646 {
1647 row["LandUUID"] = Util.ToRawUuidString(parcelID); 1647 row["LandUUID"] = Util.ToRawUuidString(parcelID);
1648 row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); 1648 row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
@@ -1657,7 +1657,7 @@ namespace OpenSim.Data.MySQL
1657 private PrimitiveBaseShape buildShape(DataRow row) 1657 private PrimitiveBaseShape buildShape(DataRow row)
1658 { 1658 {
1659 PrimitiveBaseShape s = new PrimitiveBaseShape(); 1659 PrimitiveBaseShape s = new PrimitiveBaseShape();
1660 s.Scale = new LLVector3( 1660 s.Scale = new Vector3(
1661 Convert.ToSingle(row["ScaleX"]), 1661 Convert.ToSingle(row["ScaleX"]),
1662 Convert.ToSingle(row["ScaleY"]), 1662 Convert.ToSingle(row["ScaleY"]),
1663 Convert.ToSingle(row["ScaleZ"]) 1663 Convert.ToSingle(row["ScaleZ"])
@@ -1778,7 +1778,7 @@ namespace OpenSim.Data.MySQL
1778 /// <param name="prim"></param> 1778 /// <param name="prim"></param>
1779 /// <param name="sceneGroupID"></param> 1779 /// <param name="sceneGroupID"></param>
1780 /// <param name="regionUUID"></param> 1780 /// <param name="regionUUID"></param>
1781 private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1781 private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1782 { 1782 {
1783 lock (m_dataSet) 1783 lock (m_dataSet)
1784 { 1784 {
@@ -1816,7 +1816,7 @@ namespace OpenSim.Data.MySQL
1816 /// </summary> 1816 /// </summary>
1817 /// <param name="primID"></param> 1817 /// <param name="primID"></param>
1818 /// <param name="items"></param> 1818 /// <param name="items"></param>
1819 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 1819 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
1820 { 1820 {
1821 m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); 1821 m_log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
1822 1822
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 8d0b177..42983b1 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using MySql.Data.MySqlClient; 37using MySql.Data.MySqlClient;
@@ -221,15 +221,15 @@ namespace OpenSim.Data.MySQL
221 221
222 #region User Friends List Data 222 #region User Friends List Data
223 223
224 public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 224 public override void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
225 { 225 {
226 MySQLSuperManager dbm = GetLockedConnection(); 226 MySQLSuperManager dbm = GetLockedConnection();
227 227
228 int dtvalue = Util.UnixTimeSinceEpoch(); 228 int dtvalue = Util.UnixTimeSinceEpoch();
229 229
230 Dictionary<string, string> param = new Dictionary<string, string>(); 230 Dictionary<string, string> param = new Dictionary<string, string>();
231 param["?ownerID"] = friendlistowner.UUID.ToString(); 231 param["?ownerID"] = friendlistowner.ToString();
232 param["?friendID"] = friend.UUID.ToString(); 232 param["?friendID"] = friend.ToString();
233 param["?friendPerms"] = perms.ToString(); 233 param["?friendPerms"] = perms.ToString();
234 param["?datetimestamp"] = dtvalue.ToString(); 234 param["?datetimestamp"] = dtvalue.ToString();
235 235
@@ -265,13 +265,13 @@ namespace OpenSim.Data.MySQL
265 } 265 }
266 } 266 }
267 267
268 public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 268 public override void RemoveUserFriend(UUID friendlistowner, UUID friend)
269 { 269 {
270 MySQLSuperManager dbm = GetLockedConnection(); 270 MySQLSuperManager dbm = GetLockedConnection();
271 271
272 Dictionary<string, string> param = new Dictionary<string, string>(); 272 Dictionary<string, string> param = new Dictionary<string, string>();
273 param["?ownerID"] = friendlistowner.UUID.ToString(); 273 param["?ownerID"] = friendlistowner.ToString();
274 param["?friendID"] = friend.UUID.ToString(); 274 param["?friendID"] = friend.ToString();
275 275
276 try 276 try
277 { 277 {
@@ -299,13 +299,13 @@ namespace OpenSim.Data.MySQL
299 } 299 }
300 } 300 }
301 301
302 public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 302 public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
303 { 303 {
304 MySQLSuperManager dbm = GetLockedConnection(); 304 MySQLSuperManager dbm = GetLockedConnection();
305 305
306 Dictionary<string, string> param = new Dictionary<string, string>(); 306 Dictionary<string, string> param = new Dictionary<string, string>();
307 param["?ownerID"] = friendlistowner.UUID.ToString(); 307 param["?ownerID"] = friendlistowner.ToString();
308 param["?friendID"] = friend.UUID.ToString(); 308 param["?friendID"] = friend.ToString();
309 param["?friendPerms"] = perms.ToString(); 309 param["?friendPerms"] = perms.ToString();
310 310
311 try 311 try
@@ -330,13 +330,13 @@ namespace OpenSim.Data.MySQL
330 } 330 }
331 } 331 }
332 332
333 public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 333 public override List<FriendListItem> GetUserFriendList(UUID friendlistowner)
334 { 334 {
335 MySQLSuperManager dbm = GetLockedConnection(); 335 MySQLSuperManager dbm = GetLockedConnection();
336 List<FriendListItem> Lfli = new List<FriendListItem>(); 336 List<FriendListItem> Lfli = new List<FriendListItem>();
337 337
338 Dictionary<string, string> param = new Dictionary<string, string>(); 338 Dictionary<string, string> param = new Dictionary<string, string>();
339 param["?ownerID"] = friendlistowner.UUID.ToString(); 339 param["?ownerID"] = friendlistowner.ToString();
340 340
341 try 341 try
342 { 342 {
@@ -352,8 +352,8 @@ namespace OpenSim.Data.MySQL
352 while (reader.Read()) 352 while (reader.Read())
353 { 353 {
354 FriendListItem fli = new FriendListItem(); 354 FriendListItem fli = new FriendListItem();
355 fli.FriendListOwner = new LLUUID((string) reader["ownerID"]); 355 fli.FriendListOwner = new UUID((string) reader["ownerID"]);
356 fli.Friend = new LLUUID((string) reader["friendID"]); 356 fli.Friend = new UUID((string) reader["friendID"]);
357 fli.FriendPerms = (uint) Convert.ToInt32(reader["friendPerms"]); 357 fli.FriendPerms = (uint) Convert.ToInt32(reader["friendPerms"]);
358 358
359 // This is not a real column in the database table, it's a joined column from the opposite record 359 // This is not a real column in the database table, it's a joined column from the opposite record
@@ -381,12 +381,12 @@ namespace OpenSim.Data.MySQL
381 381
382 #endregion 382 #endregion
383 383
384 public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 384 public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
385 { 385 {
386 //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called"); 386 //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
387 } 387 }
388 388
389 public override List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 389 public override List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
390 { 390 {
391 MySQLSuperManager dbm = GetLockedConnection(); 391 MySQLSuperManager dbm = GetLockedConnection();
392 392
@@ -413,7 +413,7 @@ namespace OpenSim.Data.MySQL
413 while (reader.Read()) 413 while (reader.Read())
414 { 414 {
415 AvatarPickerAvatar user = new AvatarPickerAvatar(); 415 AvatarPickerAvatar user = new AvatarPickerAvatar();
416 user.AvatarID = new LLUUID((string) reader["UUID"]); 416 user.AvatarID = new UUID((string) reader["UUID"]);
417 user.firstName = (string) reader["username"]; 417 user.firstName = (string) reader["username"];
418 user.lastName = (string) reader["lastname"]; 418 user.lastName = (string) reader["lastname"];
419 returnlist.Add(user); 419 returnlist.Add(user);
@@ -449,7 +449,7 @@ namespace OpenSim.Data.MySQL
449 while (reader.Read()) 449 while (reader.Read())
450 { 450 {
451 AvatarPickerAvatar user = new AvatarPickerAvatar(); 451 AvatarPickerAvatar user = new AvatarPickerAvatar();
452 user.AvatarID = new LLUUID((string) reader["UUID"]); 452 user.AvatarID = new UUID((string) reader["UUID"]);
453 user.firstName = (string) reader["username"]; 453 user.firstName = (string) reader["username"];
454 user.lastName = (string) reader["lastname"]; 454 user.lastName = (string) reader["lastname"];
455 returnlist.Add(user); 455 returnlist.Add(user);
@@ -476,7 +476,7 @@ namespace OpenSim.Data.MySQL
476 /// </summary> 476 /// </summary>
477 /// <param name="uuid">User UUID</param> 477 /// <param name="uuid">User UUID</param>
478 /// <returns>User profile data</returns> 478 /// <returns>User profile data</returns>
479 public override UserProfileData GetUserByUUID(LLUUID uuid) 479 public override UserProfileData GetUserByUUID(UUID uuid)
480 { 480 {
481 MySQLSuperManager dbm = GetLockedConnection(); 481 MySQLSuperManager dbm = GetLockedConnection();
482 try 482 try
@@ -533,13 +533,13 @@ namespace OpenSim.Data.MySQL
533 /// <param name="AgentID"></param> 533 /// <param name="AgentID"></param>
534 /// <param name="WebLoginKey"></param> 534 /// <param name="WebLoginKey"></param>
535 /// <remarks>is it still used ?</remarks> 535 /// <remarks>is it still used ?</remarks>
536 public override void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 536 public override void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
537 { 537 {
538 MySQLSuperManager dbm = GetLockedConnection(); 538 MySQLSuperManager dbm = GetLockedConnection();
539 539
540 Dictionary<string, string> param = new Dictionary<string, string>(); 540 Dictionary<string, string> param = new Dictionary<string, string>();
541 param["?UUID"] = AgentID.UUID.ToString(); 541 param["?UUID"] = AgentID.ToString();
542 param["?webLoginKey"] = WebLoginKey.UUID.ToString(); 542 param["?webLoginKey"] = WebLoginKey.ToString();
543 543
544 try 544 try
545 { 545 {
@@ -565,7 +565,7 @@ namespace OpenSim.Data.MySQL
565 /// </summary> 565 /// </summary>
566 /// <param name="uuid">The accounts UUID</param> 566 /// <param name="uuid">The accounts UUID</param>
567 /// <returns>The users session</returns> 567 /// <returns>The users session</returns>
568 public override UserAgentData GetAgentByUUID(LLUUID uuid) 568 public override UserAgentData GetAgentByUUID(UUID uuid)
569 { 569 {
570 MySQLSuperManager dbm = GetLockedConnection(); 570 MySQLSuperManager dbm = GetLockedConnection();
571 571
@@ -682,7 +682,7 @@ namespace OpenSim.Data.MySQL
682 /// <param name="to">The receivers account ID</param> 682 /// <param name="to">The receivers account ID</param>
683 /// <param name="amount">The amount to transfer</param> 683 /// <param name="amount">The amount to transfer</param>
684 /// <returns>Success?</returns> 684 /// <returns>Success?</returns>
685 public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) 685 public override bool MoneyTransferRequest(UUID from, UUID to, uint amount)
686 { 686 {
687 return false; 687 return false;
688 } 688 }
@@ -695,7 +695,7 @@ namespace OpenSim.Data.MySQL
695 /// <param name="to">The receivers account ID</param> 695 /// <param name="to">The receivers account ID</param>
696 /// <param name="item">The item to transfer</param> 696 /// <param name="item">The item to transfer</param>
697 /// <returns>Success?</returns> 697 /// <returns>Success?</returns>
698 public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 698 public override bool InventoryTransferRequest(UUID from, UUID to, UUID item)
699 { 699 {
700 return false; 700 return false;
701 } 701 }
@@ -705,7 +705,7 @@ namespace OpenSim.Data.MySQL
705 /// TODO: stubs for now to get us to a compiling state gently 705 /// TODO: stubs for now to get us to a compiling state gently
706 /// override 706 /// override
707 /// </summary> 707 /// </summary>
708 public override AvatarAppearance GetUserAppearance(LLUUID user) 708 public override AvatarAppearance GetUserAppearance(UUID user)
709 { 709 {
710 MySQLSuperManager dbm = GetLockedConnection(); 710 MySQLSuperManager dbm = GetLockedConnection();
711 try 711 try
@@ -744,7 +744,7 @@ namespace OpenSim.Data.MySQL
744 /// <param name="user">The user UUID</param> 744 /// <param name="user">The user UUID</param>
745 /// <param name="appearance">The avatar appearance</param> 745 /// <param name="appearance">The avatar appearance</param>
746 // override 746 // override
747 public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 747 public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
748 { 748 {
749 MySQLSuperManager dbm = GetLockedConnection(); 749 MySQLSuperManager dbm = GetLockedConnection();
750 try 750 try
@@ -783,7 +783,7 @@ namespace OpenSim.Data.MySQL
783 get { return "0.1"; } 783 get { return "0.1"; }
784 } 784 }
785 785
786 public Hashtable GetUserAttachments(LLUUID agentID) 786 public Hashtable GetUserAttachments(UUID agentID)
787 { 787 {
788 MySQLSuperManager dbm = GetLockedConnection(); 788 MySQLSuperManager dbm = GetLockedConnection();
789 789
@@ -814,7 +814,7 @@ namespace OpenSim.Data.MySQL
814 } 814 }
815 } 815 }
816 816
817 public void UpdateUserAttachments(LLUUID agentID, Hashtable data) 817 public void UpdateUserAttachments(UUID agentID, Hashtable data)
818 { 818 {
819 MySQLSuperManager dbm = GetLockedConnection(); 819 MySQLSuperManager dbm = GetLockedConnection();
820 try 820 try
@@ -827,7 +827,7 @@ namespace OpenSim.Data.MySQL
827 } 827 }
828 } 828 }
829 829
830 public override void ResetAttachments(LLUUID userID) 830 public override void ResetAttachments(UUID userID)
831 { 831 {
832 MySQLSuperManager dbm = GetLockedConnection(); 832 MySQLSuperManager dbm = GetLockedConnection();
833 833
@@ -847,4 +847,4 @@ namespace OpenSim.Data.MySQL
847 } 847 }
848 } 848 }
849 } 849 }
850} \ No newline at end of file 850}
diff --git a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
index 80fb9ff..7431433 100644
--- a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
+++ b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Data; 29using System.Data;
30using libsecondlife; 30using OpenMetaverse;
31using NHibernate; 31using NHibernate;
32using NHibernate.SqlTypes; 32using NHibernate.SqlTypes;
33using NHibernate.UserTypes; 33using NHibernate.UserTypes;
@@ -35,7 +35,7 @@ using NHibernate.UserTypes;
35namespace OpenSim.Data.NHibernate 35namespace OpenSim.Data.NHibernate
36{ 36{
37 [Serializable] 37 [Serializable]
38 public class LLQuaternionUserType: IUserType 38 public class QuaternionUserType: IUserType
39 { 39 {
40 public object Assemble(object cached, object owner) 40 public object Assemble(object cached, object owner)
41 { 41 {
@@ -49,9 +49,8 @@ namespace OpenSim.Data.NHibernate
49 49
50 public object DeepCopy(object quat) 50 public object DeepCopy(object quat)
51 { 51 {
52 // silly libsecondlife having no copy constructor 52 Quaternion q = (Quaternion)quat;
53 LLQuaternion q = (LLQuaternion) quat; 53 return new Quaternion(q);
54 return new LLQuaternion(q.X, q.Y, q.Z, q.W);
55 } 54 }
56 55
57 public object Disassemble(object quat) 56 public object Disassemble(object quat)
@@ -79,14 +78,14 @@ namespace OpenSim.Data.NHibernate
79 int w = rs.GetOrdinal(names[3]); 78 int w = rs.GetOrdinal(names[3]);
80 if (!rs.IsDBNull(x)) 79 if (!rs.IsDBNull(x))
81 { 80 {
82 quat = new LLQuaternion((Single)rs[x], (Single)rs[y], (Single)rs[z], (Single)rs[w]); 81 quat = new Quaternion((Single)rs[x], (Single)rs[y], (Single)rs[z], (Single)rs[w]);
83 } 82 }
84 return quat; 83 return quat;
85 } 84 }
86 85
87 public void NullSafeSet(IDbCommand cmd, object obj, int index) 86 public void NullSafeSet(IDbCommand cmd, object obj, int index)
88 { 87 {
89 LLQuaternion quat = (LLQuaternion)obj; 88 Quaternion quat = (Quaternion)obj;
90 ((IDataParameter)cmd.Parameters[index]).Value = quat.X; 89 ((IDataParameter)cmd.Parameters[index]).Value = quat.X;
91 ((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y; 90 ((IDataParameter)cmd.Parameters[index + 1]).Value = quat.Y;
92 ((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z; 91 ((IDataParameter)cmd.Parameters[index + 2]).Value = quat.Z;
@@ -100,7 +99,7 @@ namespace OpenSim.Data.NHibernate
100 99
101 public Type ReturnedType 100 public Type ReturnedType
102 { 101 {
103 get { return typeof(LLQuaternion); } 102 get { return typeof(Quaternion); }
104 } 103 }
105 104
106 public SqlType[] SqlTypes 105 public SqlType[] SqlTypes
diff --git a/OpenSim/Data/NHibernate/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/LLUUIDUserType.cs
index 0f10344..a7781a3 100644
--- a/OpenSim/Data/NHibernate/LLUUIDUserType.cs
+++ b/OpenSim/Data/NHibernate/LLUUIDUserType.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Data; 29using System.Data;
30using libsecondlife; 30using OpenMetaverse;
31using NHibernate; 31using NHibernate;
32using NHibernate.SqlTypes; 32using NHibernate.SqlTypes;
33using NHibernate.UserTypes; 33using NHibernate.UserTypes;
@@ -35,7 +35,7 @@ using NHibernate.UserTypes;
35namespace OpenSim.Data.NHibernate 35namespace OpenSim.Data.NHibernate
36{ 36{
37 [Serializable] 37 [Serializable]
38 public class LLUUIDUserType: IUserType 38 public class UUIDUserType: IUserType
39 { 39 {
40 public object Assemble(object cached, object owner) 40 public object Assemble(object cached, object owner)
41 { 41 {
@@ -75,7 +75,7 @@ namespace OpenSim.Data.NHibernate
75 if (!rs.IsDBNull(ord)) 75 if (!rs.IsDBNull(ord))
76 { 76 {
77 string first = (string)rs.GetString(ord); 77 string first = (string)rs.GetString(ord);
78 uuid = new LLUUID(first); 78 uuid = new UUID(first);
79 } 79 }
80 80
81 return uuid; 81 return uuid;
@@ -83,7 +83,7 @@ namespace OpenSim.Data.NHibernate
83 83
84 public void NullSafeSet(IDbCommand cmd, object obj, int index) 84 public void NullSafeSet(IDbCommand cmd, object obj, int index)
85 { 85 {
86 LLUUID uuid = (LLUUID)obj; 86 UUID uuid = (UUID)obj;
87 ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString(); 87 ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString();
88 } 88 }
89 89
@@ -94,7 +94,7 @@ namespace OpenSim.Data.NHibernate
94 94
95 public Type ReturnedType 95 public Type ReturnedType
96 { 96 {
97 get { return typeof(LLUUID); } 97 get { return typeof(UUID); }
98 } 98 }
99 99
100 public SqlType[] SqlTypes 100 public SqlType[] SqlTypes
diff --git a/OpenSim/Data/NHibernate/LLVector3UserType.cs b/OpenSim/Data/NHibernate/LLVector3UserType.cs
index d2df2c4..cdd15ec 100644
--- a/OpenSim/Data/NHibernate/LLVector3UserType.cs
+++ b/OpenSim/Data/NHibernate/LLVector3UserType.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Data; 29using System.Data;
30using libsecondlife; 30using OpenMetaverse;
31using NHibernate; 31using NHibernate;
32using NHibernate.SqlTypes; 32using NHibernate.SqlTypes;
33using NHibernate.UserTypes; 33using NHibernate.UserTypes;
@@ -35,7 +35,7 @@ using NHibernate.UserTypes;
35namespace OpenSim.Data.NHibernate 35namespace OpenSim.Data.NHibernate
36{ 36{
37 [Serializable] 37 [Serializable]
38 public class LLVector3UserType: IUserType 38 public class Vector3UserType: IUserType
39 { 39 {
40 public object Assemble(object cached, object owner) 40 public object Assemble(object cached, object owner)
41 { 41 {
@@ -49,7 +49,7 @@ namespace OpenSim.Data.NHibernate
49 49
50 public object DeepCopy(object vector) 50 public object DeepCopy(object vector)
51 { 51 {
52 return new LLVector3((LLVector3) vector); 52 return new Vector3((Vector3) vector);
53 } 53 }
54 54
55 public object Disassemble(object vector) 55 public object Disassemble(object vector)
@@ -76,14 +76,14 @@ namespace OpenSim.Data.NHibernate
76 int z = rs.GetOrdinal(names[2]); 76 int z = rs.GetOrdinal(names[2]);
77 if (!rs.IsDBNull(x)) 77 if (!rs.IsDBNull(x))
78 { 78 {
79 vector = new LLVector3((Single)rs[x], (Single)rs[y], (Single)rs[z]); 79 vector = new Vector3((Single)rs[x], (Single)rs[y], (Single)rs[z]);
80 } 80 }
81 return vector; 81 return vector;
82 } 82 }
83 83
84 public void NullSafeSet(IDbCommand cmd, object obj, int index) 84 public void NullSafeSet(IDbCommand cmd, object obj, int index)
85 { 85 {
86 LLVector3 vector = (LLVector3)obj; 86 Vector3 vector = (Vector3)obj;
87 ((IDataParameter)cmd.Parameters[index]).Value = vector.X; 87 ((IDataParameter)cmd.Parameters[index]).Value = vector.X;
88 ((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y; 88 ((IDataParameter)cmd.Parameters[index + 1]).Value = vector.Y;
89 ((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z; 89 ((IDataParameter)cmd.Parameters[index + 2]).Value = vector.Z;
@@ -96,7 +96,7 @@ namespace OpenSim.Data.NHibernate
96 96
97 public Type ReturnedType 97 public Type ReturnedType
98 { 98 {
99 get { return typeof(LLVector3); } 99 get { return typeof(Vector3); }
100 } 100 }
101 101
102 public SqlType[] SqlTypes 102 public SqlType[] SqlTypes
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 400451f..6ee527e 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -30,7 +30,7 @@ using System.Collections;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using NHibernate; 35using NHibernate;
36using NHibernate.Cfg; 36using NHibernate.Cfg;
@@ -101,7 +101,7 @@ namespace OpenSim.Data.NHibernate
101 101
102 } 102 }
103 103
104 override public AssetBase FetchAsset(LLUUID uuid) 104 override public AssetBase FetchAsset(UUID uuid)
105 { 105 {
106 try 106 try
107 { 107 {
@@ -163,13 +163,13 @@ namespace OpenSim.Data.NHibernate
163 // asset.InvType, temporary, local, assetLength)); 163 // asset.InvType, temporary, local, assetLength));
164 // } 164 // }
165 165
166 override public bool ExistsAsset(LLUUID uuid) 166 override public bool ExistsAsset(UUID uuid)
167 { 167 {
168 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid); 168 m_log.InfoFormat("[NHIBERNATE] ExistsAsset: {0}", uuid);
169 return (FetchAsset(uuid) != null); 169 return (FetchAsset(uuid) != null);
170 } 170 }
171 171
172 public void DeleteAsset(LLUUID uuid) 172 public void DeleteAsset(UUID uuid)
173 { 173 {
174 174
175 } 175 }
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index 657a7b2..20dad1a 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using NHibernate; 35using NHibernate;
36using NHibernate.Cfg; 36using NHibernate.Cfg;
@@ -105,7 +105,7 @@ namespace OpenSim.Data.NHibernate
105 /// </summary> 105 /// </summary>
106 /// <param name="item">The UUID of the item to be returned</param> 106 /// <param name="item">The UUID of the item to be returned</param>
107 /// <returns>A class containing item information</returns> 107 /// <returns>A class containing item information</returns>
108 public InventoryItemBase getInventoryItem(LLUUID item) 108 public InventoryItemBase getInventoryItem(UUID item)
109 { 109 {
110 try 110 try
111 { 111 {
@@ -163,7 +163,7 @@ namespace OpenSim.Data.NHibernate
163 /// 163 ///
164 /// </summary> 164 /// </summary>
165 /// <param name="item"></param> 165 /// <param name="item"></param>
166 public void deleteInventoryItem(LLUUID itemID) 166 public void deleteInventoryItem(UUID itemID)
167 { 167 {
168 using (ITransaction transaction = session.BeginTransaction()) 168 using (ITransaction transaction = session.BeginTransaction())
169 { 169 {
@@ -177,7 +177,7 @@ namespace OpenSim.Data.NHibernate
177 /// </summary> 177 /// </summary>
178 /// <param name="folder">The UUID of the folder to be returned</param> 178 /// <param name="folder">The UUID of the folder to be returned</param>
179 /// <returns>A class containing folder information</returns> 179 /// <returns>A class containing folder information</returns>
180 public InventoryFolderBase getInventoryFolder(LLUUID folder) 180 public InventoryFolderBase getInventoryFolder(UUID folder)
181 { 181 {
182 try 182 try
183 { 183 {
@@ -235,7 +235,7 @@ namespace OpenSim.Data.NHibernate
235 /// 235 ///
236 /// </summary> 236 /// </summary>
237 /// <param name="folder"></param> 237 /// <param name="folder"></param>
238 public void deleteInventoryFolder(LLUUID folderID) 238 public void deleteInventoryFolder(UUID folderID)
239 { 239 {
240 using (ITransaction transaction = session.BeginTransaction()) 240 using (ITransaction transaction = session.BeginTransaction())
241 { 241 {
@@ -245,12 +245,12 @@ namespace OpenSim.Data.NHibernate
245 } 245 }
246 246
247 // useful private methods 247 // useful private methods
248 private bool ExistsItem(LLUUID uuid) 248 private bool ExistsItem(UUID uuid)
249 { 249 {
250 return (getInventoryItem(uuid) != null) ? true : false; 250 return (getInventoryItem(uuid) != null) ? true : false;
251 } 251 }
252 252
253 private bool ExistsFolder(LLUUID uuid) 253 private bool ExistsFolder(UUID uuid)
254 { 254 {
255 return (getInventoryFolder(uuid) != null) ? true : false; 255 return (getInventoryFolder(uuid) != null) ? true : false;
256 } 256 }
@@ -314,7 +314,7 @@ namespace OpenSim.Data.NHibernate
314 /// </summary> 314 /// </summary>
315 /// <param name="folderID">The UUID of the target folder</param> 315 /// <param name="folderID">The UUID of the target folder</param>
316 /// <returns>A List of InventoryItemBase items</returns> 316 /// <returns>A List of InventoryItemBase items</returns>
317 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 317 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
318 { 318 {
319 // try { 319 // try {
320 ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase)); 320 ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase));
@@ -332,16 +332,16 @@ namespace OpenSim.Data.NHibernate
332 // } 332 // }
333 } 333 }
334 334
335 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 335 public List<InventoryFolderBase> getUserRootFolders(UUID user)
336 { 336 {
337 return new List<InventoryFolderBase>(); 337 return new List<InventoryFolderBase>();
338 } 338 }
339 339
340 // see InventoryItemBase.getUserRootFolder 340 // see InventoryItemBase.getUserRootFolder
341 public InventoryFolderBase getUserRootFolder(LLUUID user) 341 public InventoryFolderBase getUserRootFolder(UUID user)
342 { 342 {
343 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); 343 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
344 criteria.Add(Expression.Eq("ParentID", LLUUID.Zero)); 344 criteria.Add(Expression.Eq("ParentID", UUID.Zero));
345 criteria.Add(Expression.Eq("Owner", user)); 345 criteria.Add(Expression.Eq("Owner", user));
346 foreach (InventoryFolderBase folder in criteria.List()) 346 foreach (InventoryFolderBase folder in criteria.List())
347 { 347 {
@@ -356,7 +356,7 @@ namespace OpenSim.Data.NHibernate
356 /// </summary> 356 /// </summary>
357 /// <param name="folders">list where folders will be appended</param> 357 /// <param name="folders">list where folders will be appended</param>
358 /// <param name="parentID">ID of parent</param> 358 /// <param name="parentID">ID of parent</param>
359 private void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) 359 private void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
360 { 360 {
361 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); 361 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
362 criteria.Add(Expression.Eq("ParentID", parentID)); 362 criteria.Add(Expression.Eq("ParentID", parentID));
@@ -371,7 +371,7 @@ namespace OpenSim.Data.NHibernate
371 /// </summary> 371 /// </summary>
372 /// <param name="parentID">The folder to get subfolders for</param> 372 /// <param name="parentID">The folder to get subfolders for</param>
373 /// <returns>A list of inventory folders</returns> 373 /// <returns>A list of inventory folders</returns>
374 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 374 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
375 { 375 {
376 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 376 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
377 getInventoryFolders(ref folders, parentID); 377 getInventoryFolders(ref folders, parentID);
@@ -379,7 +379,7 @@ namespace OpenSim.Data.NHibernate
379 } 379 }
380 380
381 // See IInventoryDataPlugin 381 // See IInventoryDataPlugin
382 public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) 382 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
383 { 383 {
384 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 384 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
385 getInventoryFolders(ref folders, parentID); 385 getInventoryFolders(ref folders, parentID);
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
index 9682d87..07bf05c 100644
--- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using NHibernate; 36using NHibernate;
37using NHibernate.Cfg; 37using NHibernate.Cfg;
@@ -109,7 +109,7 @@ namespace OpenSim.Data.NHibernate
109 { 109 {
110 } 110 }
111 111
112 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 112 public RegionSettings LoadRegionSettings(UUID regionUUID)
113 { 113 {
114 return null; 114 return null;
115 } 115 }
@@ -162,7 +162,7 @@ namespace OpenSim.Data.NHibernate
162 /// </summary> 162 /// </summary>
163 /// <param name="obj">the object</param> 163 /// <param name="obj">the object</param>
164 /// <param name="regionUUID">the region UUID</param> 164 /// <param name="regionUUID">the region UUID</param>
165 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 165 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
166 { 166 {
167 try 167 try
168 { 168 {
@@ -179,7 +179,7 @@ namespace OpenSim.Data.NHibernate
179 } 179 }
180 } 180 }
181 181
182 private SceneObjectGroup LoadObject(LLUUID uuid, LLUUID region) 182 private SceneObjectGroup LoadObject(UUID uuid, UUID region)
183 { 183 {
184 SceneObjectGroup group = new SceneObjectGroup(); 184 SceneObjectGroup group = new SceneObjectGroup();
185 185
@@ -210,7 +210,7 @@ namespace OpenSim.Data.NHibernate
210 /// </summary> 210 /// </summary>
211 /// <param name="obj">the object</param> 211 /// <param name="obj">the object</param>
212 /// <param name="regionUUID">the region UUID</param> 212 /// <param name="regionUUID">the region UUID</param>
213 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 213 public void RemoveObject(UUID obj, UUID regionUUID)
214 { 214 {
215 SceneObjectGroup g = LoadObject(obj, regionUUID); 215 SceneObjectGroup g = LoadObject(obj, regionUUID);
216 foreach (SceneObjectPart p in g.Children.Values) 216 foreach (SceneObjectPart p in g.Children.Values)
@@ -219,7 +219,7 @@ namespace OpenSim.Data.NHibernate
219 } 219 }
220 session.Flush(); 220 session.Flush();
221 221
222 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 222 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
223 223
224 } 224 }
225 225
@@ -228,9 +228,9 @@ namespace OpenSim.Data.NHibernate
228 /// </summary> 228 /// </summary>
229 /// <param name="regionUUID">The region UUID</param> 229 /// <param name="regionUUID">The region UUID</param>
230 /// <returns>List of loaded groups</returns> 230 /// <returns>List of loaded groups</returns>
231 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 231 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
232 { 232 {
233 Dictionary<LLUUID, SceneObjectGroup> SOG = new Dictionary<LLUUID, SceneObjectGroup>(); 233 Dictionary<UUID, SceneObjectGroup> SOG = new Dictionary<UUID, SceneObjectGroup>();
234 List<SceneObjectGroup> ret = new List<SceneObjectGroup>(); 234 List<SceneObjectGroup> ret = new List<SceneObjectGroup>();
235 235
236 ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart)); 236 ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart));
@@ -276,7 +276,7 @@ namespace OpenSim.Data.NHibernate
276 /// </summary> 276 /// </summary>
277 /// <param name="ter">terrain heightfield</param> 277 /// <param name="ter">terrain heightfield</param>
278 /// <param name="regionID">region UUID</param> 278 /// <param name="regionID">region UUID</param>
279 public void StoreTerrain(double[,] ter, LLUUID regionID) 279 public void StoreTerrain(double[,] ter, UUID regionID)
280 { 280 {
281 lock (this) { 281 lock (this) {
282 Terrain t = new Terrain(regionID, ter); 282 Terrain t = new Terrain(regionID, ter);
@@ -289,7 +289,7 @@ namespace OpenSim.Data.NHibernate
289 /// </summary> 289 /// </summary>
290 /// <param name="regionID">the region UUID</param> 290 /// <param name="regionID">the region UUID</param>
291 /// <returns>Heightfield data</returns> 291 /// <returns>Heightfield data</returns>
292 public double[,] LoadTerrain(LLUUID regionID) 292 public double[,] LoadTerrain(UUID regionID)
293 { 293 {
294 try 294 try
295 { 295 {
@@ -307,7 +307,7 @@ namespace OpenSim.Data.NHibernate
307 /// 307 ///
308 /// </summary> 308 /// </summary>
309 /// <param name="globalID"></param> 309 /// <param name="globalID"></param>
310 public void RemoveLandObject(LLUUID globalID) 310 public void RemoveLandObject(UUID globalID)
311 { 311 {
312 312
313 } 313 }
@@ -326,7 +326,7 @@ namespace OpenSim.Data.NHibernate
326 /// </summary> 326 /// </summary>
327 /// <param name="regionUUID"></param> 327 /// <param name="regionUUID"></param>
328 /// <returns></returns> 328 /// <returns></returns>
329 public List<LandData> LoadLandObjects(LLUUID regionUUID) 329 public List<LandData> LoadLandObjects(UUID regionUUID)
330 { 330 {
331 List<LandData> landDataForRegion = new List<LandData>(); 331 List<LandData> landDataForRegion = new List<LandData>();
332 332
@@ -347,7 +347,7 @@ namespace OpenSim.Data.NHibernate
347 /// </summary> 347 /// </summary>
348 /// <param name="regionUUID">the region UUID</param> 348 /// <param name="regionUUID">the region UUID</param>
349 /// <returns>The banlist</returns> 349 /// <returns>The banlist</returns>
350 public List<EstateBan> LoadRegionBanList(LLUUID regionUUID) 350 public List<EstateBan> LoadRegionBanList(UUID regionUUID)
351 { 351 {
352 List<EstateBan> regionbanlist = new List<EstateBan>(); 352 List<EstateBan> regionbanlist = new List<EstateBan>();
353 353
@@ -395,7 +395,7 @@ namespace OpenSim.Data.NHibernate
395 /// </summary> 395 /// </summary>
396 /// <param name="primID"></param> 396 /// <param name="primID"></param>
397 /// <param name="items"></param> 397 /// <param name="items"></param>
398 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 398 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
399 { 399 {
400 ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem)); 400 ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem));
401 criteria.Add(Expression.Eq("ParentPartID", primID)); 401 criteria.Add(Expression.Eq("ParentPartID", primID));
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 8435762..459b8e7 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using NHibernate; 35using NHibernate;
36using NHibernate.Cfg; 36using NHibernate.Cfg;
@@ -90,7 +90,7 @@ namespace OpenSim.Data.NHibernate
90 m.Update(); 90 m.Update();
91 } 91 }
92 92
93 private bool ExistsUser(LLUUID uuid) 93 private bool ExistsUser(UUID uuid)
94 { 94 {
95 UserProfileData user = null; 95 UserProfileData user = null;
96 try 96 try
@@ -105,7 +105,7 @@ namespace OpenSim.Data.NHibernate
105 return (user != null); 105 return (user != null);
106 } 106 }
107 107
108 override public UserProfileData GetUserByUUID(LLUUID uuid) 108 override public UserProfileData GetUserByUUID(UUID uuid)
109 { 109 {
110 UserProfileData user; 110 UserProfileData user;
111 // TODO: I'm sure I'll have to do something silly here 111 // TODO: I'm sure I'll have to do something silly here
@@ -136,7 +136,7 @@ namespace OpenSim.Data.NHibernate
136 } 136 }
137 } 137 }
138 138
139 private void SetAgentData(LLUUID uuid, UserAgentData agent) 139 private void SetAgentData(UUID uuid, UserAgentData agent)
140 { 140 {
141 if (agent == null) 141 if (agent == null)
142 { 142 {
@@ -190,7 +190,7 @@ namespace OpenSim.Data.NHibernate
190 session.Update(agent); 190 session.Update(agent);
191 } 191 }
192 192
193 override public UserAgentData GetAgentByUUID(LLUUID uuid) 193 override public UserAgentData GetAgentByUUID(UUID uuid)
194 { 194 {
195 try 195 try
196 { 196 {
@@ -225,7 +225,7 @@ namespace OpenSim.Data.NHibernate
225 return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); 225 return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
226 } 226 }
227 227
228 override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 228 override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
229 { 229 {
230 List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>(); 230 List<AvatarPickerAvatar> results = new List<AvatarPickerAvatar>();
231 string[] querysplit; 231 string[] querysplit;
@@ -249,18 +249,18 @@ namespace OpenSim.Data.NHibernate
249 } 249 }
250 250
251 // TODO: actually implement these 251 // TODO: actually implement these
252 public override void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { return; } 252 public override void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle) { return; }
253 public override void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) { return; } 253 public override void StoreWebLoginKey(UUID agentID, UUID webLoginKey) { return; }
254 public override void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } 254 public override void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) { return; }
255 public override void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { return; } 255 public override void RemoveUserFriend(UUID friendlistowner, UUID friend) { return; }
256 public override void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) { return; } 256 public override void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) { return; }
257 public override List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) { return new List<FriendListItem>(); } 257 public override List<FriendListItem> GetUserFriendList(UUID friendlistowner) { return new List<FriendListItem>(); }
258 public override bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return true; } 258 public override bool MoneyTransferRequest(UUID from, UUID to, uint amount) { return true; }
259 public override bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory) { return true; } 259 public override bool InventoryTransferRequest(UUID from, UUID to, UUID inventory) { return true; }
260 260
261 /// Appearance 261 /// Appearance
262 /// TODO: stubs for now to get us to a compiling state gently 262 /// TODO: stubs for now to get us to a compiling state gently
263 public override AvatarAppearance GetUserAppearance(LLUUID user) 263 public override AvatarAppearance GetUserAppearance(UUID user)
264 { 264 {
265 AvatarAppearance appearance; 265 AvatarAppearance appearance;
266 // TODO: I'm sure I'll have to do something silly here 266 // TODO: I'm sure I'll have to do something silly here
@@ -272,7 +272,7 @@ namespace OpenSim.Data.NHibernate
272 return appearance; 272 return appearance;
273 } 273 }
274 274
275 private bool ExistsAppearance(LLUUID uuid) 275 private bool ExistsAppearance(UUID uuid)
276 { 276 {
277 AvatarAppearance appearance; 277 AvatarAppearance appearance;
278 try { 278 try {
@@ -285,7 +285,7 @@ namespace OpenSim.Data.NHibernate
285 } 285 }
286 286
287 287
288 public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 288 public override void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
289 { 289 {
290 if (appearance == null) 290 if (appearance == null)
291 return; 291 return;
@@ -303,7 +303,7 @@ namespace OpenSim.Data.NHibernate
303 } 303 }
304 } 304 }
305 305
306 public override void ResetAttachments(LLUUID userID) 306 public override void ResetAttachments(UUID userID)
307 { 307 {
308 } 308 }
309 309
diff --git a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
index f6b648a..7c3d8cf 100644
--- a/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/AssetBase.hbm.xml
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false"> 3 <class name="OpenSim.Framework.AssetBase, OpenSim.Framework" table="Assets" lazy="false">
4 <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="FullID" column="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="Type" type="System.SByte" /> 7 <property name="Type" type="System.SByte" />
@@ -11,4 +11,4 @@
11 <property name="Temporary" type="boolean" /> 11 <property name="Temporary" type="boolean" />
12 <property name="Data" type="binary" /> 12 <property name="Data" type="binary" />
13 </class> 13 </class>
14</hibernate-mapping> \ No newline at end of file 14</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml
index 6d918fe..6afe9fa 100644
--- a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml
@@ -1,13 +1,13 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false"> 3 <class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="Type" type="Int16" /> 7 <property name="Type" type="Int16" />
8 <property name="Version" type="System.UInt16" /> 8 <property name="Version" type="System.UInt16" />
9 <property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 9 <property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 10 <property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="Name" type="String" length="64" /> 11 <property name="Name" type="String" length="64" />
12 </class> 12 </class>
13</hibernate-mapping> \ No newline at end of file 13</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml
index f1b4007..9a4d7ca 100644
--- a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml
@@ -1,26 +1,26 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false"> 3 <class name="OpenSim.Framework.InventoryItemBase, OpenSim.Framework" table="InventoryItems" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="InvType" type="System.Int32" /> 7 <property name="InvType" type="System.Int32" />
8 <property name="AssetType" type="System.Int32" /> 8 <property name="AssetType" type="System.Int32" />
9 <property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 9 <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 10 <property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 11 <property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="Creator" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 12 <property name="Creator" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
13 <property name="Name" type="String" length="64" /> 13 <property name="Name" type="String" length="64" />
14 <property name="Description" type="String" length="64" /> 14 <property name="Description" type="String" length="64" />
15 <property name="NextPermissions" type="System.UInt32" /> 15 <property name="NextPermissions" type="System.UInt32" />
16 <property name="CurrentPermissions" type="System.UInt32" /> 16 <property name="CurrentPermissions" type="System.UInt32" />
17 <property name="BasePermissions" type="System.UInt32" /> 17 <property name="BasePermissions" type="System.UInt32" />
18 <property name="EveryOnePermissions" type="System.UInt32" /> 18 <property name="EveryOnePermissions" type="System.UInt32" />
19 <property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 19 <property name="GroupID" index="item_group_id" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="GroupOwned" type="boolean" /> 20 <property name="GroupOwned" type="boolean" />
21 <property name="SalePrice" type="System.Int32" /> 21 <property name="SalePrice" type="System.Int32" />
22 <property name="SaleType" type="System.Byte" /> 22 <property name="SaleType" type="System.Byte" />
23 <property name="Flags" type="System.UInt32" /> 23 <property name="Flags" type="System.UInt32" />
24 <property name="CreationDate" type="System.Int32" /> 24 <property name="CreationDate" type="System.Int32" />
25 </class> 25 </class>
26</hibernate-mapping> \ No newline at end of file 26</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
index ef3ab9b..fe055bb 100644
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
@@ -1,12 +1,12 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Region.Environment.Scenes.SceneObjectPart, OpenSim.Region.Environment" table="Prims" lazy="false"> 3 <class name="OpenSim.Region.Environment.Scenes.SceneObjectPart, OpenSim.Region.Environment" table="Prims" lazy="false">
4 <id name="UUID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="UUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="ParentID" type="System.UInt32"/> 7 <property name="ParentID" type="System.UInt32"/>
8 <property name="ParentUUID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 8 <property name="ParentUUID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="RegionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 9 <property name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="CreationDate" type="System.Int32" /> 10 <property name="CreationDate" type="System.Int32" />
11 <property name="Name" type="String" length="255" /> 11 <property name="Name" type="String" length="255" />
12 <property name="Text" type="String" length="255" /> 12 <property name="Text" type="String" length="255" />
@@ -15,10 +15,10 @@
15 <property name="TouchName" type="String" length="255" /> 15 <property name="TouchName" type="String" length="255" />
16 16
17 <property name="ObjectFlags" type="System.UInt32" /> 17 <property name="ObjectFlags" type="System.UInt32" />
18 <property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 18 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
19 <property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 19 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 20 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
21 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 21 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
22 22
23 <property name="OwnerMask" type="System.UInt32" /> 23 <property name="OwnerMask" type="System.UInt32" />
24 <property name="NextOwnerMask" type="System.UInt32" /> 24 <property name="NextOwnerMask" type="System.UInt32" />
@@ -26,50 +26,50 @@
26 <property name="EveryoneMask" type="System.UInt32" /> 26 <property name="EveryoneMask" type="System.UInt32" />
27 <property name="BaseMask" type="System.UInt32" /> 27 <property name="BaseMask" type="System.UInt32" />
28 28
29 <property name="OffsetPosition" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 29 <property name="OffsetPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
30 <column name="PositionX" /> 30 <column name="PositionX" />
31 <column name="PositionY" /> 31 <column name="PositionY" />
32 <column name="PositionZ" /> 32 <column name="PositionZ" />
33 </property> 33 </property>
34 34
35 <property name="GroupPosition" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 35 <property name="GroupPosition" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
36 <column name="GroupPositionX" /> 36 <column name="GroupPositionX" />
37 <column name="GroupPositionY" /> 37 <column name="GroupPositionY" />
38 <column name="GroupPositionZ" /> 38 <column name="GroupPositionZ" />
39 </property> 39 </property>
40 40
41 <property name="Velocity" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 41 <property name="Velocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
42 <column name="VelocityX" /> 42 <column name="VelocityX" />
43 <column name="VelocityY" /> 43 <column name="VelocityY" />
44 <column name="VelocityZ" /> 44 <column name="VelocityZ" />
45 </property> 45 </property>
46 46
47 <property name="AngularVelocity" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 47 <property name="AngularVelocity" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
48 <column name="AngularVelocityX" /> 48 <column name="AngularVelocityX" />
49 <column name="AngularVelocityY" /> 49 <column name="AngularVelocityY" />
50 <column name="AngularVelocityZ" /> 50 <column name="AngularVelocityZ" />
51 </property> 51 </property>
52 52
53 <property name="Acceleration" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 53 <property name="Acceleration" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
54 <column name="AccelerationX" /> 54 <column name="AccelerationX" />
55 <column name="AccelerationY" /> 55 <column name="AccelerationY" />
56 <column name="AccelerationZ" /> 56 <column name="AccelerationZ" />
57 </property> 57 </property>
58 58
59 <property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 59 <property name="SitTargetPositionLL" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
60 <column name="SitTargetOffsetX" /> 60 <column name="SitTargetOffsetX" />
61 <column name="SitTargetOffsetY" /> 61 <column name="SitTargetOffsetY" />
62 <column name="SitTargetOffsetZ" /> 62 <column name="SitTargetOffsetZ" />
63 </property> 63 </property>
64 64
65 <property name="RotationOffset" type="OpenSim.Data.NHibernate.LLQuaternionUserType, OpenSim.Data.NHibernate" > 65 <property name="RotationOffset" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
66 <column name="RotationX" /> 66 <column name="RotationX" />
67 <column name="RotationY" /> 67 <column name="RotationY" />
68 <column name="RotationZ" /> 68 <column name="RotationZ" />
69 <column name="RotationW" /> 69 <column name="RotationW" />
70 </property> 70 </property>
71 71
72 <property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.LLQuaternionUserType, OpenSim.Data.NHibernate" > 72 <property name="SitTargetOrientationLL" type="OpenSim.Data.NHibernate.QuaternionUserType, OpenSim.Data.NHibernate" >
73 <column name="SitTargetOrientX" /> 73 <column name="SitTargetOrientX" />
74 <column name="SitTargetOrientY" /> 74 <column name="SitTargetOrientY" />
75 <column name="SitTargetOrientZ" /> 75 <column name="SitTargetOrientZ" />
@@ -77,7 +77,7 @@
77 </property> 77 </property>
78 78
79 <component name="Shape"> 79 <component name="Shape">
80 <property name="Scale" type="OpenSim.Data.NHibernate.LLVector3UserType, OpenSim.Data.NHibernate" > 80 <property name="Scale" type="OpenSim.Data.NHibernate.Vector3UserType, OpenSim.Data.NHibernate" >
81 <column name="ScaleX" /> 81 <column name="ScaleX" />
82 <column name="ScaleY" /> 82 <column name="ScaleY" />
83 <column name="ScaleZ" /> 83 <column name="ScaleZ" />
@@ -105,22 +105,22 @@
105 </component> 105 </component>
106 </class> 106 </class>
107 <class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false"> 107 <class name="OpenSim.Data.NHibernate.Terrain, OpenSim.Data.NHibernate" table="Terrain" lazy="false">
108 <id name="RegionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 108 <id name="RegionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
109 <generator class="assigned" /> 109 <generator class="assigned" />
110 </id> 110 </id>
111 <property name="Map" type="System.Byte[]" /> 111 <property name="Map" type="System.Byte[]" />
112 </class> 112 </class>
113 <class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false"> 113 <class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
114 <id name="ItemID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 114 <id name="ItemID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
115 <generator class="assigned" /> 115 <generator class="assigned" />
116 </id> 116 </id>
117 <property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 117 <property name="ParentPartID" column="PrimID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
118 <property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 118 <property name="AssetID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
119 <property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 119 <property name="ParentID" column="ParentFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
120 <property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 120 <property name="CreatorID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
121 <property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 121 <property name="OwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
122 <property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 122 <property name="GroupID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
123 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/> 123 <property name="LastOwnerID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate"/>
124 <property name="CurrentPermissions" type="System.UInt32" /> 124 <property name="CurrentPermissions" type="System.UInt32" />
125 <property name="BasePermissions" type="System.UInt32" /> 125 <property name="BasePermissions" type="System.UInt32" />
126 <property name="EveryonePermissions" type="System.UInt32" /> 126 <property name="EveryonePermissions" type="System.UInt32" />
@@ -132,4 +132,4 @@
132 <property name="Flags" type="System.UInt32" /> 132 <property name="Flags" type="System.UInt32" />
133 <property name="InvType" type="System.Int32" /> 133 <property name="InvType" type="System.Int32" />
134 </class> 134 </class>
135</hibernate-mapping> \ No newline at end of file 135</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
index 718cb98..0beddaf 100644
--- a/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserAgentData.hbm.xml
@@ -1,16 +1,16 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false"> 3 <class name="OpenSim.Framework.UserAgentData, OpenSim.Framework" table="UserAgents" lazy="false">
4 <id name="ProfileID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ProfileID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="AgentIP" type="String" length="24" /> 7 <property name="AgentIP" type="String" length="24" />
8 <property name="AgentPort" type="Int32" /> 8 <property name="AgentPort" type="Int32" />
9 <property name="AgentOnline" type="boolean" /> 9 <property name="AgentOnline" type="boolean" />
10 <property name="SessionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 10 <property name="SessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="SecureSessionID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 11 <property name="SecureSessionID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="InitialRegion" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 12 <property name="InitialRegion" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
13 <property name="Region" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 13 <property name="Region" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
14 <property name="LoginTime" type="Int32" /> 14 <property name="LoginTime" type="Int32" />
15 <property name="LogoutTime" type="Int32" /> 15 <property name="LogoutTime" type="Int32" />
16 <property name="Handle" type="Int64" /> 16 <property name="Handle" type="Int64" />
@@ -18,4 +18,4 @@
18 <property name="PositionY" type="Single" /> 18 <property name="PositionY" type="Single" />
19 <property name="PositionZ" type="Single" /> 19 <property name="PositionZ" type="Single" />
20 </class> 20 </class>
21</hibernate-mapping> \ No newline at end of file 21</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
index 06e9c1a..b633c34 100644
--- a/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserAppearance.hbm.xml
@@ -1,37 +1,37 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false"> 3 <class name="OpenSim.Framework.AvatarAppearance, OpenSim.Framework" table="UserAppearances" lazy="false">
4 <id name="Owner" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="Owner" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="BodyItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 7 <property name="BodyItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
8 <property name="BodyAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 8 <property name="BodyAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
9 <property name="SkinItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 9 <property name="SkinItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
10 <property name="SkinAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 10 <property name="SkinAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
11 <property name="HairItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 11 <property name="HairItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="HairAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 12 <property name="HairAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
13 <property name="EyesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 13 <property name="EyesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
14 <property name="EyesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 14 <property name="EyesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
15 <property name="ShirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 15 <property name="ShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
16 <property name="ShirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 16 <property name="ShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
17 <property name="PantsItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 17 <property name="PantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
18 <property name="PantsAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 18 <property name="PantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
19 <property name="ShoesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 19 <property name="ShoesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
20 <property name="ShoesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 20 <property name="ShoesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
21 <property name="SocksItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 21 <property name="SocksItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
22 <property name="SocksAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 22 <property name="SocksAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="JacketItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 23 <property name="JacketItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
24 <property name="JacketAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 24 <property name="JacketAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
25 <property name="GlovesItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 25 <property name="GlovesItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="GlovesAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 26 <property name="GlovesAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="UnderShirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 27 <property name="UnderShirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
28 <property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 28 <property name="UnderShirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
29 <property name="UnderPantsItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 29 <property name="UnderPantsItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
30 <property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 30 <property name="UnderPantsAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
31 <property name="SkirtItem" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 31 <property name="SkirtItem" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
32 <property name="SkirtAsset" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 32 <property name="SkirtAsset" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
33 <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" /> 33 <property name="Texture" type="OpenSim.Data.NHibernate.TextureUserType, OpenSim.Data.NHibernate" />
34 <property name="VisualParams" type="binary" /> 34 <property name="VisualParams" type="binary" />
35 <property name="Serial" type="Int32" /> 35 <property name="Serial" type="Int32" />
36 </class> 36 </class>
37</hibernate-mapping> \ No newline at end of file 37</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
index 4003628..873930b 100644
--- a/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/UserProfileData.hbm.xml
@@ -1,14 +1,14 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> 2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false"> 3 <class name="OpenSim.Framework.UserProfileData, OpenSim.Framework" table="UserProfiles" lazy="false">
4 <id name="ID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"> 4 <id name="ID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate">
5 <generator class="assigned" /> 5 <generator class="assigned" />
6 </id> 6 </id>
7 <property name="FirstName" index="user_firstname" type="String" length="32" /> 7 <property name="FirstName" index="user_firstname" type="String" length="32" />
8 <property name="SurName" index="user_surname" type="String" length="32" /> 8 <property name="SurName" index="user_surname" type="String" length="32" />
9 <property name="PasswordHash" type="String" length="32" /> 9 <property name="PasswordHash" type="String" length="32" />
10 <property name="PasswordSalt" type="String" length="32" /> 10 <property name="PasswordSalt" type="String" length="32" />
11 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 11 <property name="WebLoginKey" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
12 <property name="HomeRegionX" type="System.UInt32" /> 12 <property name="HomeRegionX" type="System.UInt32" />
13 <property name="HomeRegionY" type="System.UInt32" /> 13 <property name="HomeRegionY" type="System.UInt32" />
14 <property name="HomeLocationX" type="Single" /> 14 <property name="HomeLocationX" type="Single" />
@@ -19,12 +19,12 @@
19 <property name="HomeLookAtZ" type="Single" /> 19 <property name="HomeLookAtZ" type="Single" />
20 <property name="Created" type="Int32" /> 20 <property name="Created" type="Int32" />
21 <property name="LastLogin" type="Int32" /> 21 <property name="LastLogin" type="Int32" />
22 <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 22 <property name="RootInventoryFolderID" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
23 <property name="UserInventoryURI" type="String" length="255"/> 23 <property name="UserInventoryURI" type="String" length="255"/>
24 <property name="UserAssetURI" type="String" length="255"/> 24 <property name="UserAssetURI" type="String" length="255"/>
25 <property name="Image" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 25 <property name="Image" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
26 <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate" /> 26 <property name="FirstLifeImage" type="OpenSim.Data.NHibernate.UUIDUserType, OpenSim.Data.NHibernate" />
27 <property name="AboutText" type="String" length="255" /> 27 <property name="AboutText" type="String" length="255" />
28 <property name="FirstLifeAboutText" type="String" length="255" /> 28 <property name="FirstLifeAboutText" type="String" length="255" />
29 </class> 29 </class>
30</hibernate-mapping> \ No newline at end of file 30</hibernate-mapping>
diff --git a/OpenSim/Data/NHibernate/Terrain.cs b/OpenSim/Data/NHibernate/Terrain.cs
index 608f03e..dd0da44 100644
--- a/OpenSim/Data/NHibernate/Terrain.cs
+++ b/OpenSim/Data/NHibernate/Terrain.cs
@@ -30,7 +30,7 @@ using System.IO;
30using System.Reflection; 30using System.Reflection;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using log4net; 32using log4net;
33using libsecondlife; 33using OpenMetaverse;
34 34
35namespace OpenSim.Data.NHibernate 35namespace OpenSim.Data.NHibernate
36{ 36{
@@ -39,9 +39,9 @@ namespace OpenSim.Data.NHibernate
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 private double[,] map; 41 private double[,] map;
42 private LLUUID regionID; 42 private UUID regionID;
43 43
44 public Terrain(LLUUID Region, double[,] array) 44 public Terrain(UUID Region, double[,] array)
45 { 45 {
46 map = array; 46 map = array;
47 regionID = Region; 47 regionID = Region;
@@ -51,10 +51,10 @@ namespace OpenSim.Data.NHibernate
51 { 51 {
52 map = new double[Constants.RegionSize, Constants.RegionSize]; 52 map = new double[Constants.RegionSize, Constants.RegionSize];
53 map.Initialize(); 53 map.Initialize();
54 regionID = LLUUID.Zero; 54 regionID = UUID.Zero;
55 } 55 }
56 56
57 public LLUUID RegionID 57 public UUID RegionID
58 { 58 {
59 get { return regionID; } 59 get { return regionID; }
60 set { regionID = value; } 60 set { regionID = value; }
diff --git a/OpenSim/Data/NHibernate/TextureUserType.cs b/OpenSim/Data/NHibernate/TextureUserType.cs
index f8aa704..ff949d4 100644
--- a/OpenSim/Data/NHibernate/TextureUserType.cs
+++ b/OpenSim/Data/NHibernate/TextureUserType.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Data; 29using System.Data;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using NHibernate; 32using NHibernate;
33using NHibernate.SqlTypes; 33using NHibernate.SqlTypes;
@@ -53,12 +53,12 @@ namespace OpenSim.Data.NHibernate
53 if (texture == null) 53 if (texture == null)
54 { 54 {
55 // TODO: should parametrize this texture out 55 // TODO: should parametrize this texture out
56 return new LLObject.TextureEntry(new LLUUID(Constants.DefaultTexture)); 56 return new Primitive.TextureEntry(new UUID(Constants.DefaultTexture));
57 } 57 }
58 else 58 else
59 { 59 {
60 byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes(); 60 byte[] bytes = ((Primitive.TextureEntry)texture).ToBytes();
61 return new LLObject.TextureEntry(bytes, 0, bytes.Length); 61 return new Primitive.TextureEntry(bytes, 0, bytes.Length);
62 } 62 }
63 } 63 }
64 64
@@ -85,7 +85,7 @@ namespace OpenSim.Data.NHibernate
85 if (!rs.IsDBNull(ord)) 85 if (!rs.IsDBNull(ord))
86 { 86 {
87 byte[] bytes = (byte[])rs[ord]; 87 byte[] bytes = (byte[])rs[ord];
88 texture = new LLObject.TextureEntry(bytes, 0, bytes.Length); 88 texture = new Primitive.TextureEntry(bytes, 0, bytes.Length);
89 } 89 }
90 90
91 return texture; 91 return texture;
@@ -93,7 +93,7 @@ namespace OpenSim.Data.NHibernate
93 93
94 public void NullSafeSet(IDbCommand cmd, object obj, int index) 94 public void NullSafeSet(IDbCommand cmd, object obj, int index)
95 { 95 {
96 LLObject.TextureEntry texture = (LLObject.TextureEntry)obj; 96 Primitive.TextureEntry texture = (Primitive.TextureEntry)obj;
97 ((IDataParameter)cmd.Parameters[index]).Value = texture.ToBytes(); 97 ((IDataParameter)cmd.Parameters[index]).Value = texture.ToBytes();
98 } 98 }
99 99
@@ -104,7 +104,7 @@ namespace OpenSim.Data.NHibernate
104 104
105 public Type ReturnedType 105 public Type ReturnedType
106 { 106 {
107 get { return typeof(LLObject.TextureEntry); } 107 get { return typeof(Primitive.TextureEntry); }
108 } 108 }
109 109
110 public SqlType[] SqlTypes 110 public SqlType[] SqlTypes
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs
index 76369bd..aea03d6 100644
--- a/OpenSim/Data/Null/NullDataStore.cs
+++ b/OpenSim/Data/Null/NullDataStore.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.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
@@ -47,39 +47,39 @@ namespace OpenSim.Data.Null
47 { 47 {
48 } 48 }
49 49
50 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 50 public RegionSettings LoadRegionSettings(UUID regionUUID)
51 { 51 {
52 return null; 52 return null;
53 } 53 }
54 54
55 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 55 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
56 { 56 {
57 } 57 }
58 58
59 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 59 public void RemoveObject(UUID obj, UUID regionUUID)
60 { 60 {
61 } 61 }
62 62
63 // see IRegionDatastore 63 // see IRegionDatastore
64 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 64 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
65 { 65 {
66 } 66 }
67 67
68 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 68 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
69 { 69 {
70 return new List<SceneObjectGroup>(); 70 return new List<SceneObjectGroup>();
71 } 71 }
72 72
73 public void StoreTerrain(double[,] ter, LLUUID regionID) 73 public void StoreTerrain(double[,] ter, UUID regionID)
74 { 74 {
75 } 75 }
76 76
77 public double[,] LoadTerrain(LLUUID regionID) 77 public double[,] LoadTerrain(UUID regionID)
78 { 78 {
79 return null; 79 return null;
80 } 80 }
81 81
82 public void RemoveLandObject(LLUUID globalID) 82 public void RemoveLandObject(UUID globalID)
83 { 83 {
84 } 84 }
85 85
@@ -87,7 +87,7 @@ namespace OpenSim.Data.Null
87 { 87 {
88 } 88 }
89 89
90 public List<LandData> LoadLandObjects(LLUUID regionUUID) 90 public List<LandData> LoadLandObjects(UUID regionUUID)
91 { 91 {
92 return new List<LandData>(); 92 return new List<LandData>();
93 } 93 }
diff --git a/OpenSim/Data/OpenSimDataReader.cs b/OpenSim/Data/OpenSimDataReader.cs
index cb613c1..f584855 100644
--- a/OpenSim/Data/OpenSimDataReader.cs
+++ b/OpenSim/Data/OpenSimDataReader.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Data; 28using System.Data;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31 31
32namespace OpenSim.Data 32namespace OpenSim.Data
@@ -37,25 +37,25 @@ namespace OpenSim.Data
37 { 37 {
38 } 38 }
39 39
40 public LLVector3 GetVector(string s) 40 public Vector3 GetVector(string s)
41 { 41 {
42 float x = GetFloat(s + "X"); 42 float x = GetFloat(s + "X");
43 float y = GetFloat(s + "Y"); 43 float y = GetFloat(s + "Y");
44 float z = GetFloat(s + "Z"); 44 float z = GetFloat(s + "Z");
45 45
46 LLVector3 vector = new LLVector3(x, y, z); 46 Vector3 vector = new Vector3(x, y, z);
47 47
48 return vector; 48 return vector;
49 } 49 }
50 50
51 public LLQuaternion GetQuaternion(string s) 51 public Quaternion GetQuaternion(string s)
52 { 52 {
53 float x = GetFloat(s + "X"); 53 float x = GetFloat(s + "X");
54 float y = GetFloat(s + "Y"); 54 float y = GetFloat(s + "Y");
55 float z = GetFloat(s + "Z"); 55 float z = GetFloat(s + "Z");
56 float w = GetFloat(s + "W"); 56 float w = GetFloat(s + "W");
57 57
58 LLQuaternion quaternion = new LLQuaternion(x, y, z, w); 58 Quaternion quaternion = new Quaternion(x, y, z, w);
59 59
60 return quaternion; 60 return quaternion;
61 } 61 }
diff --git a/OpenSim/Data/OpenSimDatabaseConnector.cs b/OpenSim/Data/OpenSimDatabaseConnector.cs
index ee54f4f..68a4ee4 100644
--- a/OpenSim/Data/OpenSimDatabaseConnector.cs
+++ b/OpenSim/Data/OpenSimDatabaseConnector.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Data; 28using System.Data;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31 31
32namespace OpenSim.Data 32namespace OpenSim.Data
@@ -39,9 +39,9 @@ namespace OpenSim.Data
39 39
40 public override object ConvertToDbType(object value) 40 public override object ConvertToDbType(object value)
41 { 41 {
42 if (value is LLUUID) 42 if (value is UUID)
43 { 43 {
44 return ((LLUUID) value).UUID.ToString(); 44 return ((UUID)value).ToString();
45 } 45 }
46 46
47 return base.ConvertToDbType(value); 47 return base.ConvertToDbType(value);
diff --git a/OpenSim/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Data/OpenSimObjectFieldMapper.cs
index ff375fb..a342494 100644
--- a/OpenSim/Data/OpenSimObjectFieldMapper.cs
+++ b/OpenSim/Data/OpenSimObjectFieldMapper.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data.Common; 30using System.Data.Common;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Data.Base; 32using OpenSim.Data.Base;
33 33
34namespace OpenSim.Data 34namespace OpenSim.Data
@@ -47,17 +47,17 @@ namespace OpenSim.Data
47 string fieldName = FieldName; 47 string fieldName = FieldName;
48 object value = GetParamValue(obj); 48 object value = GetParamValue(obj);
49 49
50 if (ValueType == typeof(LLVector3)) 50 if (ValueType == typeof(Vector3))
51 { 51 {
52 LLVector3 vector = (LLVector3)value; 52 Vector3 vector = (Vector3)value;
53 53
54 RawAddParam(command, fieldNames, fieldName + "X", vector.X); 54 RawAddParam(command, fieldNames, fieldName + "X", vector.X);
55 RawAddParam(command, fieldNames, fieldName + "Y", vector.Y); 55 RawAddParam(command, fieldNames, fieldName + "Y", vector.Y);
56 RawAddParam(command, fieldNames, fieldName + "Z", vector.Z); 56 RawAddParam(command, fieldNames, fieldName + "Z", vector.Z);
57 } 57 }
58 else if (ValueType == typeof(LLQuaternion)) 58 else if (ValueType == typeof(Quaternion))
59 { 59 {
60 LLQuaternion quaternion = (LLQuaternion)value; 60 Quaternion quaternion = (Quaternion)value;
61 61
62 RawAddParam(command, fieldNames, fieldName + "X", quaternion.X); 62 RawAddParam(command, fieldNames, fieldName + "X", quaternion.X);
63 RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y); 63 RawAddParam(command, fieldNames, fieldName + "Y", quaternion.Y);
@@ -76,18 +76,18 @@ namespace OpenSim.Data
76 76
77 OpenSimDataReader osreader = (OpenSimDataReader) reader; 77 OpenSimDataReader osreader = (OpenSimDataReader) reader;
78 78
79 if (ValueType == typeof(LLVector3)) 79 if (ValueType == typeof(Vector3))
80 { 80 {
81 value = osreader.GetVector(FieldName); 81 value = osreader.GetVector(FieldName);
82 } 82 }
83 else if (ValueType == typeof(LLQuaternion)) 83 else if (ValueType == typeof(Quaternion))
84 { 84 {
85 value = osreader.GetQuaternion(FieldName); 85 value = osreader.GetQuaternion(FieldName);
86 } 86 }
87 else if (ValueType == typeof(LLUUID)) 87 else if (ValueType == typeof(UUID))
88 { 88 {
89 Guid guid = reader.GetGuid(FieldName); 89 Guid guid = reader.GetGuid(FieldName);
90 value = new LLUUID(guid); 90 value = new UUID(guid);
91 } 91 }
92 else 92 else
93 { 93 {
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
index a4e39a1..5a6b3db 100644
--- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
+++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31using OpenSim.Framework; 31using OpenSim.Framework;
32 32
@@ -89,9 +89,9 @@ namespace OpenSim.Data
89 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; }, 89 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.ProfileEnd; },
90 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; }); 90 delegate(PrimitiveBaseShapeRowMapper shape, ushort value) { shape.Object.ProfileEnd = value; });
91 91
92 rowMapperSchema.AddMapping<LLVector3>("Scale", 92 rowMapperSchema.AddMapping<Vector3>("Scale",
93 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; }, 93 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.Scale; },
94 delegate(PrimitiveBaseShapeRowMapper shape, LLVector3 value) { shape.Object.Scale = value; }); 94 delegate(PrimitiveBaseShapeRowMapper shape, Vector3 value) { shape.Object.Scale = value; });
95 95
96 rowMapperSchema.AddMapping<sbyte>("PathTaperX", 96 rowMapperSchema.AddMapping<sbyte>("PathTaperX",
97 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; }, 97 delegate(PrimitiveBaseShapeRowMapper shape) { return shape.Object.PathTaperX; },
@@ -143,7 +143,7 @@ namespace OpenSim.Data
143 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 143 PrimitiveBaseShape shape = new PrimitiveBaseShape();
144 144
145 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape); 145 PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape);
146 mapper.FillObject(reader); 146 mapper.FiPrimitive(reader);
147 147
148 return mapper; 148 return mapper;
149 } 149 }
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs
index 9549b80..b4c7b3c 100644
--- a/OpenSim/Data/RegionProfileData.cs
+++ b/OpenSim/Data/RegionProfileData.cs
@@ -27,9 +27,10 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using libsecondlife; 30using OpenMetaverse;
31using Nwc.XmlRpc; 31using Nwc.XmlRpc;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenMetaverse;
33 34
34namespace OpenSim.Data 35namespace OpenSim.Data
35{ 36{
@@ -51,7 +52,7 @@ namespace OpenSim.Data
51 /// <summary> 52 /// <summary>
52 /// OGS/OpenSim Specific ID for a region 53 /// OGS/OpenSim Specific ID for a region
53 /// </summary> 54 /// </summary>
54 public LLUUID UUID; 55 public UUID UUID;
55 56
56 /// <summary> 57 /// <summary>
57 /// Coordinates of the region 58 /// Coordinates of the region
@@ -117,18 +118,18 @@ namespace OpenSim.Data
117 /// <summary> 118 /// <summary>
118 /// Region Map Texture Asset 119 /// Region Map Texture Asset
119 /// </summary> 120 /// </summary>
120 public LLUUID regionMapTextureID = new LLUUID("00000000-0000-1111-9999-000000000006"); 121 public UUID regionMapTextureID = new UUID("00000000-0000-1111-9999-000000000006");
121 122
122 /// <summary> 123 /// <summary>
123 /// this particular mod to the file provides support within the spec for RegionProfileData for the 124 /// this particular mod to the file provides support within the spec for RegionProfileData for the
124 /// owner_uuid for the region 125 /// owner_uuid for the region
125 /// </summary> 126 /// </summary>
126 public LLUUID owner_uuid = LLUUID.Zero; 127 public UUID owner_uuid = UUID.Zero;
127 128
128 /// <summary> 129 /// <summary>
129 /// OGS/OpenSim Specific original ID for a region after move/split 130 /// OGS/OpenSim Specific original ID for a region after move/split
130 /// </summary> 131 /// </summary>
131 public LLUUID originUUID; 132 public UUID originUUID;
132 133
133 /// <summary> 134 /// <summary>
134 /// Request sim data based on arbitrary key/value 135 /// Request sim data based on arbitrary key/value
@@ -161,7 +162,7 @@ namespace OpenSim.Data
161 simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); 162 simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
162 simData.serverURI = (string) responseData["server_uri"]; 163 simData.serverURI = (string) responseData["server_uri"];
163 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; 164 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
164 simData.UUID = new LLUUID((string) responseData["region_UUID"]); 165 simData.UUID = new UUID((string) responseData["region_UUID"]);
165 simData.regionName = (string) responseData["region_name"]; 166 simData.regionName = (string) responseData["region_name"];
166 } 167 }
167 168
@@ -177,10 +178,10 @@ namespace OpenSim.Data
177 /// <param name="gridserver_recvkey"></param> 178 /// <param name="gridserver_recvkey"></param>
178 /// <returns>The sim profile. Null if there was a request failure</returns> 179 /// <returns>The sim profile. Null if there was a request failure</returns>
179 /// <remarks>This method should be statics</remarks> 180 /// <remarks>This method should be statics</remarks>
180 public static RegionProfileData RequestSimProfileData(LLUUID region_uuid, Uri gridserver_url, 181 public static RegionProfileData RequestSimProfileData(UUID region_uuid, Uri gridserver_url,
181 string gridserver_sendkey, string gridserver_recvkey) 182 string gridserver_sendkey, string gridserver_recvkey)
182 { 183 {
183 return RequestSimData(gridserver_url, gridserver_sendkey, "region_UUID", region_uuid.UUID.ToString()); 184 return RequestSimData(gridserver_url, gridserver_sendkey, "region_UUID", region_uuid.Guid.ToString());
184 } 185 }
185 186
186 /// <summary> 187 /// <summary>
diff --git a/OpenSim/Data/ReservationData.cs b/OpenSim/Data/ReservationData.cs
index 43fb299..dac1b7b 100644
--- a/OpenSim/Data/ReservationData.cs
+++ b/OpenSim/Data/ReservationData.cs
@@ -26,13 +26,13 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Data 31namespace OpenSim.Data
32{ 32{
33 public class ReservationData 33 public class ReservationData
34 { 34 {
35 public LLUUID userUUID = LLUUID.Zero; 35 public UUID userUUID = UUID.Zero;
36 public int reservationMinX = 0; 36 public int reservationMinX = 0;
37 public int reservationMinY = 0; 37 public int reservationMinY = 0;
38 public int reservationMaxX = 65536; 38 public int reservationMaxX = 65536;
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 220cebf..8b14f09 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Data; 29using System.Data;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Mono.Data.SqliteClient; 33using Mono.Data.SqliteClient;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -87,7 +87,7 @@ namespace OpenSim.Data.SQLite
87 /// </summary> 87 /// </summary>
88 /// <param name="uuid">UUID of ... ?</param> 88 /// <param name="uuid">UUID of ... ?</param>
89 /// <returns>Asset base</returns> 89 /// <returns>Asset base</returns>
90 override public AssetBase FetchAsset(LLUUID uuid) 90 override public AssetBase FetchAsset(UUID uuid)
91 { 91 {
92 lock (this) 92 lock (this)
93 { 93 {
@@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite
190 /// </summary> 190 /// </summary>
191 /// <param name="uuid">The asset UUID</param> 191 /// <param name="uuid">The asset UUID</param>
192 /// <returns>True if exist, or false.</returns> 192 /// <returns>True if exist, or false.</returns>
193 override public bool ExistsAsset(LLUUID uuid) 193 override public bool ExistsAsset(UUID uuid)
194 { 194 {
195 lock (this) { 195 lock (this) {
196 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) 196 using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn))
@@ -217,7 +217,7 @@ namespace OpenSim.Data.SQLite
217 /// Delete an asset from database 217 /// Delete an asset from database
218 /// </summary> 218 /// </summary>
219 /// <param name="uuid"></param> 219 /// <param name="uuid"></param>
220 public void DeleteAsset(LLUUID uuid) 220 public void DeleteAsset(UUID uuid)
221 { 221 {
222 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) 222 using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn))
223 { 223 {
@@ -239,7 +239,7 @@ namespace OpenSim.Data.SQLite
239 // back out. Not enough time to figure it out yet. 239 // back out. Not enough time to figure it out yet.
240 AssetBase asset = new AssetBase(); 240 AssetBase asset = new AssetBase();
241 241
242 asset.FullID = new LLUUID((String) row["UUID"]); 242 asset.FullID = new UUID((String) row["UUID"]);
243 asset.Name = (String) row["Name"]; 243 asset.Name = (String) row["Name"];
244 asset.Description = (String) row["Description"]; 244 asset.Description = (String) row["Description"];
245 asset.Type = Convert.ToSByte(row["Type"]); 245 asset.Type = Convert.ToSByte(row["Type"]);
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index ffe7644..1245caa 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using Mono.Data.SqliteClient; 35using Mono.Data.SqliteClient;
36using log4net; 36using log4net;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -83,7 +83,7 @@ namespace OpenSim.Data.SQLite
83 get { return new List<string>(m_FieldMap.Keys).ToArray(); } 83 get { return new List<string>(m_FieldMap.Keys).ToArray(); }
84 } 84 }
85 85
86 public EstateSettings LoadEstateSettings(LLUUID regionID) 86 public EstateSettings LoadEstateSettings(UUID regionID)
87 { 87 {
88 EstateSettings es = new EstateSettings(); 88 EstateSettings es = new EstateSettings();
89 es.OnSave += StoreEstateSettings; 89 es.OnSave += StoreEstateSettings;
@@ -109,11 +109,11 @@ namespace OpenSim.Data.SQLite
109 else 109 else
110 m_FieldMap[name].SetValue(es, false); 110 m_FieldMap[name].SetValue(es, false);
111 } 111 }
112 else if (m_FieldMap[name].GetValue(es) is libsecondlife.LLUUID) 112 else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
113 { 113 {
114 LLUUID uuid = LLUUID.Zero; 114 UUID uuid = UUID.Zero;
115 115
116 LLUUID.TryParse(r[name].ToString(), out uuid); 116 UUID.TryParse(r[name].ToString(), out uuid);
117 m_FieldMap[name].SetValue(es, uuid); 117 m_FieldMap[name].SetValue(es, uuid);
118 } 118 }
119 else 119 else
@@ -258,8 +258,8 @@ namespace OpenSim.Data.SQLite
258 { 258 {
259 EstateBan eb = new EstateBan(); 259 EstateBan eb = new EstateBan();
260 260
261 LLUUID uuid = new LLUUID(); 261 UUID uuid = new UUID();
262 LLUUID.TryParse(r["bannedUUID"].ToString(), out uuid); 262 UUID.TryParse(r["bannedUUID"].ToString(), out uuid);
263 263
264 eb.bannedUUID = uuid; 264 eb.bannedUUID = uuid;
265 eb.bannedIP = "0.0.0.0"; 265 eb.bannedIP = "0.0.0.0";
@@ -292,7 +292,7 @@ namespace OpenSim.Data.SQLite
292 } 292 }
293 } 293 }
294 294
295 void SaveUUIDList(uint EstateID, string table, LLUUID[] data) 295 void SaveUUIDList(uint EstateID, string table, UUID[] data)
296 { 296 {
297 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 297 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
298 298
@@ -305,7 +305,7 @@ namespace OpenSim.Data.SQLite
305 305
306 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; 306 cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )";
307 307
308 foreach (LLUUID uuid in data) 308 foreach (UUID uuid in data)
309 { 309 {
310 cmd.Parameters.Add(":EstateID", EstateID.ToString()); 310 cmd.Parameters.Add(":EstateID", EstateID.ToString());
311 cmd.Parameters.Add(":uuid", uuid.ToString()); 311 cmd.Parameters.Add(":uuid", uuid.ToString());
@@ -315,9 +315,9 @@ namespace OpenSim.Data.SQLite
315 } 315 }
316 } 316 }
317 317
318 LLUUID[] LoadUUIDList(uint EstateID, string table) 318 UUID[] LoadUUIDList(uint EstateID, string table)
319 { 319 {
320 List<LLUUID> uuids = new List<LLUUID>(); 320 List<UUID> uuids = new List<UUID>();
321 321
322 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 322 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
323 323
@@ -330,8 +330,8 @@ namespace OpenSim.Data.SQLite
330 { 330 {
331 // EstateBan eb = new EstateBan(); 331 // EstateBan eb = new EstateBan();
332 332
333 LLUUID uuid = new LLUUID(); 333 UUID uuid = new UUID();
334 LLUUID.TryParse(r["uuid"].ToString(), out uuid); 334 UUID.TryParse(r["uuid"].ToString(), out uuid);
335 335
336 uuids.Add(uuid); 336 uuids.Add(uuid);
337 } 337 }
diff --git a/OpenSim/Data/SQLite/SQLiteGridData.cs b/OpenSim/Data/SQLite/SQLiteGridData.cs
index 8c4574e..f715c0e 100644
--- a/OpenSim/Data/SQLite/SQLiteGridData.cs
+++ b/OpenSim/Data/SQLite/SQLiteGridData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Reflection; 31using System.Reflection;
32using System.Security.Cryptography; 32using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37 37
@@ -162,7 +162,7 @@ namespace OpenSim.Data.SQLite
162 /// </summary> 162 /// </summary>
163 /// <param name="uuid">The region UUID</param> 163 /// <param name="uuid">The region UUID</param>
164 /// <returns>The sim profile</returns> 164 /// <returns>The sim profile</returns>
165 override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) 165 override public RegionProfileData GetProfileByUUID(UUID uuid)
166 { 166 {
167 Dictionary<string, string> param = new Dictionary<string, string>(); 167 Dictionary<string, string> param = new Dictionary<string, string>();
168 param["uuid"] = uuid.ToString(); 168 param["uuid"] = uuid.ToString();
@@ -181,7 +181,7 @@ namespace OpenSim.Data.SQLite
181 /// Returns a list of avatar and UUIDs that match the query 181 /// Returns a list of avatar and UUIDs that match the query
182 /// </summary> 182 /// </summary>
183 /// <remarks>do nothing yet</remarks> 183 /// <remarks>do nothing yet</remarks>
184 public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 184 public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
185 { 185 {
186 //Do nothing yet 186 //Do nothing yet
187 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); 187 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
@@ -217,14 +217,14 @@ namespace OpenSim.Data.SQLite
217 /// <param name="handle">The attempted regionHandle of the challenger</param> 217 /// <param name="handle">The attempted regionHandle of the challenger</param>
218 /// <param name="authkey">The secret</param> 218 /// <param name="authkey">The secret</param>
219 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 219 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
220 override public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 220 override public bool AuthenticateSim(UUID uuid, ulong handle, string authkey)
221 { 221 {
222 bool throwHissyFit = false; // Should be true by 1.0 222 bool throwHissyFit = false; // Should be true by 1.0
223 223
224 if (throwHissyFit) 224 if (throwHissyFit)
225 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 225 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
226 226
227 RegionProfileData data = GetProfileByLLUUID(uuid); 227 RegionProfileData data = GetProfileByUUID(uuid);
228 228
229 return (handle == data.regionHandle && authkey == data.regionSecret); 229 return (handle == data.regionHandle && authkey == data.regionSecret);
230 } 230 }
@@ -238,7 +238,7 @@ namespace OpenSim.Data.SQLite
238 /// <param name="authhash"></param> 238 /// <param name="authhash"></param>
239 /// <param name="challenge"></param> 239 /// <param name="challenge"></param>
240 /// <returns></returns> 240 /// <returns></returns>
241 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 241 public bool AuthenticateSim(UUID uuid, ulong handle, string authhash, string challenge)
242 { 242 {
243 // SHA512Managed HashProvider = new SHA512Managed(); 243 // SHA512Managed HashProvider = new SHA512Managed();
244 // Encoding TextProvider = new UTF8Encoding(); 244 // Encoding TextProvider = new UTF8Encoding();
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 4c35ac2..ca7e612 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Mono.Data.SqliteClient; 34using Mono.Data.SqliteClient;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -109,13 +109,13 @@ namespace OpenSim.Data.SQLite
109 public InventoryItemBase buildItem(DataRow row) 109 public InventoryItemBase buildItem(DataRow row)
110 { 110 {
111 InventoryItemBase item = new InventoryItemBase(); 111 InventoryItemBase item = new InventoryItemBase();
112 item.ID = new LLUUID((string) row["UUID"]); 112 item.ID = new UUID((string) row["UUID"]);
113 item.AssetID = new LLUUID((string) row["assetID"]); 113 item.AssetID = new UUID((string) row["assetID"]);
114 item.AssetType = Convert.ToInt32(row["assetType"]); 114 item.AssetType = Convert.ToInt32(row["assetType"]);
115 item.InvType = Convert.ToInt32(row["invType"]); 115 item.InvType = Convert.ToInt32(row["invType"]);
116 item.Folder = new LLUUID((string) row["parentFolderID"]); 116 item.Folder = new UUID((string) row["parentFolderID"]);
117 item.Owner = new LLUUID((string) row["avatarID"]); 117 item.Owner = new UUID((string) row["avatarID"]);
118 item.Creator = new LLUUID((string) row["creatorsID"]); 118 item.Creator = new UUID((string) row["creatorsID"]);
119 item.Name = (string) row["inventoryName"]; 119 item.Name = (string) row["inventoryName"];
120 item.Description = (string) row["inventoryDescription"]; 120 item.Description = (string) row["inventoryDescription"];
121 121
@@ -135,7 +135,7 @@ namespace OpenSim.Data.SQLite
135 item.CreationDate = Convert.ToInt32(row["creationDate"]); 135 item.CreationDate = Convert.ToInt32(row["creationDate"]);
136 136
137 if (!Convert.IsDBNull(row["groupID"])) 137 if (!Convert.IsDBNull(row["groupID"]))
138 item.GroupID = new LLUUID((string)row["groupID"]); 138 item.GroupID = new UUID((string)row["groupID"]);
139 139
140 if (!Convert.IsDBNull(row["groupOwned"])) 140 if (!Convert.IsDBNull(row["groupOwned"]))
141 item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); 141 item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
@@ -317,7 +317,7 @@ namespace OpenSim.Data.SQLite
317 /// </summary> 317 /// </summary>
318 /// <param name="folderID">The UUID of the target folder</param> 318 /// <param name="folderID">The UUID of the target folder</param>
319 /// <returns>A List of InventoryItemBase items</returns> 319 /// <returns>A List of InventoryItemBase items</returns>
320 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 320 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
321 { 321 {
322 lock (ds) 322 lock (ds)
323 { 323 {
@@ -339,20 +339,20 @@ namespace OpenSim.Data.SQLite
339 /// </summary> 339 /// </summary>
340 /// <param name="user">The user whos inventory is to be searched</param> 340 /// <param name="user">The user whos inventory is to be searched</param>
341 /// <returns>A list of folder objects</returns> 341 /// <returns>A list of folder objects</returns>
342 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 342 public List<InventoryFolderBase> getUserRootFolders(UUID user)
343 { 343 {
344 return new List<InventoryFolderBase>(); 344 return new List<InventoryFolderBase>();
345 } 345 }
346 346
347 // see InventoryItemBase.getUserRootFolder 347 // see InventoryItemBase.getUserRootFolder
348 public InventoryFolderBase getUserRootFolder(LLUUID user) 348 public InventoryFolderBase getUserRootFolder(UUID user)
349 { 349 {
350 lock (ds) 350 lock (ds)
351 { 351 {
352 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 352 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
353 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; 353 DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
354 string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" + 354 string selectExp = "agentID = '" + Util.ToRawUuidString(user) + "' AND parentID = '" +
355 Util.ToRawUuidString(LLUUID.Zero) + "'"; 355 Util.ToRawUuidString(UUID.Zero) + "'";
356 DataRow[] rows = inventoryFolderTable.Select(selectExp); 356 DataRow[] rows = inventoryFolderTable.Select(selectExp);
357 foreach (DataRow row in rows) 357 foreach (DataRow row in rows)
358 { 358 {
@@ -378,7 +378,7 @@ namespace OpenSim.Data.SQLite
378 /// </summary> 378 /// </summary>
379 /// <param name="folders">list where folders will be appended</param> 379 /// <param name="folders">list where folders will be appended</param>
380 /// <param name="parentID">ID of parent</param> 380 /// <param name="parentID">ID of parent</param>
381 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) 381 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
382 { 382 {
383 lock (ds) 383 lock (ds)
384 { 384 {
@@ -398,7 +398,7 @@ namespace OpenSim.Data.SQLite
398 /// </summary> 398 /// </summary>
399 /// <param name="parentID">The folder to get subfolders for</param> 399 /// <param name="parentID">The folder to get subfolders for</param>
400 /// <returns>A list of inventory folders</returns> 400 /// <returns>A list of inventory folders</returns>
401 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 401 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
402 { 402 {
403 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 403 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
404 getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); 404 getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
@@ -410,7 +410,7 @@ namespace OpenSim.Data.SQLite
410 /// </summary> 410 /// </summary>
411 /// <param name="parentID"></param> 411 /// <param name="parentID"></param>
412 /// <returns></returns> 412 /// <returns></returns>
413 public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) 413 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
414 { 414 {
415 /* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one 415 /* Note: There are subtle changes between this implementation of getFolderHierarchy and the previous one
416 * - We will only need to hit the database twice instead of n times. 416 * - We will only need to hit the database twice instead of n times.
@@ -441,7 +441,7 @@ namespace OpenSim.Data.SQLite
441 if (parentRow.GetLength(0) >= 1) // No result means parent folder does not exist 441 if (parentRow.GetLength(0) >= 1) // No result means parent folder does not exist
442 { 442 {
443 parentFolder = buildFolder(parentRow[0]); 443 parentFolder = buildFolder(parentRow[0]);
444 LLUUID agentID = parentFolder.Owner; 444 UUID agentID = parentFolder.Owner;
445 selectExp = "agentID = '" + Util.ToRawUuidString(agentID) + "'"; 445 selectExp = "agentID = '" + Util.ToRawUuidString(agentID) + "'";
446 folderRows = inventoryFolderTable.Select(selectExp); 446 folderRows = inventoryFolderTable.Select(selectExp);
447 } 447 }
@@ -451,7 +451,7 @@ namespace OpenSim.Data.SQLite
451 /* if we're querying the root folder, just return an unordered list of all folders in the user's 451 /* if we're querying the root folder, just return an unordered list of all folders in the user's
452 * inventory 452 * inventory
453 */ 453 */
454 if (parentFolder.ParentID == LLUUID.Zero) 454 if (parentFolder.ParentID == UUID.Zero)
455 { 455 {
456 foreach (DataRow row in folderRows) 456 foreach (DataRow row in folderRows)
457 { 457 {
@@ -470,13 +470,13 @@ namespace OpenSim.Data.SQLite
470 { // Querying a non-root folder 470 { // Querying a non-root folder
471 471
472 // Build a hash table of all user's inventory folders, indexed by each folder's parent ID 472 // Build a hash table of all user's inventory folders, indexed by each folder's parent ID
473 Dictionary<LLUUID, List<InventoryFolderBase>> hashtable = 473 Dictionary<UUID, List<InventoryFolderBase>> hashtable =
474 new Dictionary<LLUUID, List<InventoryFolderBase>>(folderRows.GetLength(0)); 474 new Dictionary<UUID, List<InventoryFolderBase>>(folderRows.GetLength(0));
475 475
476 foreach (DataRow row in folderRows) 476 foreach (DataRow row in folderRows)
477 { 477 {
478 InventoryFolderBase curFolder = buildFolder(row); 478 InventoryFolderBase curFolder = buildFolder(row);
479 if (curFolder.ParentID != LLUUID.Zero) // Discard root of tree - not needed 479 if (curFolder.ParentID != UUID.Zero) // Discard root of tree - not needed
480 { 480 {
481 if (hashtable.ContainsKey(curFolder.ParentID)) 481 if (hashtable.ContainsKey(curFolder.ParentID))
482 { 482 {
@@ -514,7 +514,7 @@ namespace OpenSim.Data.SQLite
514 /// </summary> 514 /// </summary>
515 /// <param name="item">The UUID of the item to be returned</param> 515 /// <param name="item">The UUID of the item to be returned</param>
516 /// <returns>A class containing item information</returns> 516 /// <returns>A class containing item information</returns>
517 public InventoryItemBase getInventoryItem(LLUUID item) 517 public InventoryItemBase getInventoryItem(UUID item)
518 { 518 {
519 lock (ds) 519 lock (ds)
520 { 520 {
@@ -535,7 +535,7 @@ namespace OpenSim.Data.SQLite
535 /// </summary> 535 /// </summary>
536 /// <param name="folder">The UUID of the folder to be returned</param> 536 /// <param name="folder">The UUID of the folder to be returned</param>
537 /// <returns>A class containing folder information</returns> 537 /// <returns>A class containing folder information</returns>
538 public InventoryFolderBase getInventoryFolder(LLUUID folder) 538 public InventoryFolderBase getInventoryFolder(UUID folder)
539 { 539 {
540 // TODO: Deep voodoo here. If you enable this code then 540 // TODO: Deep voodoo here. If you enable this code then
541 // multi region breaks. No idea why, but I figured it was 541 // multi region breaks. No idea why, but I figured it was
@@ -578,7 +578,7 @@ namespace OpenSim.Data.SQLite
578 /// Delete an inventory item 578 /// Delete an inventory item
579 /// </summary> 579 /// </summary>
580 /// <param name="item">The item UUID</param> 580 /// <param name="item">The item UUID</param>
581 public void deleteInventoryItem(LLUUID itemID) 581 public void deleteInventoryItem(UUID itemID)
582 { 582 {
583 lock (ds) 583 lock (ds)
584 { 584 {
@@ -599,7 +599,7 @@ namespace OpenSim.Data.SQLite
599 /// </summary> 599 /// </summary>
600 /// <param name="folderId">id of the folder, whose item content should be deleted</param> 600 /// <param name="folderId">id of the folder, whose item content should be deleted</param>
601 /// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo> 601 /// <todo>this is horribly inefficient, but I don't want to ruin the overall structure of this implementation</todo>
602 private void deleteItemsInFolder(LLUUID folderId) 602 private void deleteItemsInFolder(UUID folderId)
603 { 603 {
604 List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId)); 604 List<InventoryItemBase> items = getInventoryInFolder(Util.ToRawUuidString(folderId));
605 605
@@ -641,7 +641,7 @@ namespace OpenSim.Data.SQLite
641 /// This will clean-up any child folders and child items as well 641 /// This will clean-up any child folders and child items as well
642 /// </remarks> 642 /// </remarks>
643 /// <param name="folderID">the folder UUID</param> 643 /// <param name="folderID">the folder UUID</param>
644 public void deleteInventoryFolder(LLUUID folderID) 644 public void deleteInventoryFolder(UUID folderID)
645 { 645 {
646 lock (ds) 646 lock (ds)
647 { 647 {
@@ -791,10 +791,10 @@ namespace OpenSim.Data.SQLite
791 private static InventoryFolderBase buildFolder(DataRow row) 791 private static InventoryFolderBase buildFolder(DataRow row)
792 { 792 {
793 InventoryFolderBase folder = new InventoryFolderBase(); 793 InventoryFolderBase folder = new InventoryFolderBase();
794 folder.ID = new LLUUID((string) row["UUID"]); 794 folder.ID = new UUID((string) row["UUID"]);
795 folder.Name = (string) row["name"]; 795 folder.Name = (string) row["name"];
796 folder.Owner = new LLUUID((string) row["agentID"]); 796 folder.Owner = new UUID((string) row["agentID"]);
797 folder.ParentID = new LLUUID((string) row["parentID"]); 797 folder.ParentID = new UUID((string) row["parentID"]);
798 folder.Type = Convert.ToInt16(row["type"]); 798 folder.Type = Convert.ToInt16(row["type"]);
799 folder.Version = Convert.ToUInt16(row["version"]); 799 folder.Version = Convert.ToUInt16(row["version"]);
800 return folder; 800 return folder;
diff --git a/OpenSim/Data/SQLite/SQLiteManager.cs b/OpenSim/Data/SQLite/SQLiteManager.cs
index 46c40e5..4a7e910 100644
--- a/OpenSim/Data/SQLite/SQLiteManager.cs
+++ b/OpenSim/Data/SQLite/SQLiteManager.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SQLite; 31using System.Data.SQLite;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35 35
36namespace OpenSim.Data.SQLite 36namespace OpenSim.Data.SQLite
@@ -118,7 +118,7 @@ namespace OpenSim.Data.SQLite
118 // Region Main 118 // Region Main
119 retval.regionHandle = (ulong) reader["regionHandle"]; 119 retval.regionHandle = (ulong) reader["regionHandle"];
120 retval.regionName = (string) reader["regionName"]; 120 retval.regionName = (string) reader["regionName"];
121 retval.UUID = new LLUUID((string) reader["uuid"]); 121 retval.UUID = new UUID((string) reader["uuid"]);
122 122
123 // Secrets 123 // Secrets
124 retval.regionRecvKey = (string) reader["regionRecvKey"]; 124 retval.regionRecvKey = (string) reader["regionRecvKey"];
@@ -182,7 +182,7 @@ namespace OpenSim.Data.SQLite
182 182
183 parameters["regionHandle"] = profile.regionHandle.ToString(); 183 parameters["regionHandle"] = profile.regionHandle.ToString();
184 parameters["regionName"] = profile.regionName; 184 parameters["regionName"] = profile.regionName;
185 parameters["uuid"] = profile.UUID.ToString(); 185 parameters["uuid"] = profile.ToString();
186 parameters["regionRecvKey"] = profile.regionRecvKey; 186 parameters["regionRecvKey"] = profile.regionRecvKey;
187 parameters["regionSendKey"] = profile.regionSendKey; 187 parameters["regionSendKey"] = profile.regionSendKey;
188 parameters["regionDataURI"] = profile.regionDataURI; 188 parameters["regionDataURI"] = profile.regionDataURI;
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index dd88751..bb441f6 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Mono.Data.SqliteClient; 36using Mono.Data.SqliteClient;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -190,7 +190,7 @@ namespace OpenSim.Data.SQLite
190 { 190 {
191 } 191 }
192 192
193 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 193 public RegionSettings LoadRegionSettings(UUID regionUUID)
194 { 194 {
195 return null; 195 return null;
196 } 196 }
@@ -200,15 +200,15 @@ namespace OpenSim.Data.SQLite
200 /// </summary> 200 /// </summary>
201 /// <param name="obj">the object</param> 201 /// <param name="obj">the object</param>
202 /// <param name="regionUUID">the region UUID</param> 202 /// <param name="regionUUID">the region UUID</param>
203 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 203 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
204 { 204 {
205 lock (ds) 205 lock (ds)
206 { 206 {
207 foreach (SceneObjectPart prim in obj.Children.Values) 207 foreach (SceneObjectPart prim in obj.Children.Values)
208 { 208 {
209 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 209 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
210 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 210 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
211 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) 211 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
212 { 212 {
213 //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 213 //m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
214 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 214 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
@@ -235,9 +235,9 @@ namespace OpenSim.Data.SQLite
235 /// </summary> 235 /// </summary>
236 /// <param name="obj">the object</param> 236 /// <param name="obj">the object</param>
237 /// <param name="regionUUID">the region UUID</param> 237 /// <param name="regionUUID">the region UUID</param>
238 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 238 public void RemoveObject(UUID obj, UUID regionUUID)
239 { 239 {
240 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 240 m_log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", obj.Guid, regionUUID);
241 241
242 DataTable prims = ds.Tables["prims"]; 242 DataTable prims = ds.Tables["prims"];
243 DataTable shapes = ds.Tables["primshapes"]; 243 DataTable shapes = ds.Tables["primshapes"];
@@ -249,7 +249,7 @@ namespace OpenSim.Data.SQLite
249 foreach (DataRow row in primRows) 249 foreach (DataRow row in primRows)
250 { 250 {
251 // Remove shape rows 251 // Remove shape rows
252 LLUUID uuid = new LLUUID((string) row["UUID"]); 252 UUID uuid = new UUID((string) row["UUID"]);
253 DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid)); 253 DataRow shapeRow = shapes.Rows.Find(Util.ToRawUuidString(uuid));
254 if (shapeRow != null) 254 if (shapeRow != null)
255 { 255 {
@@ -271,7 +271,7 @@ namespace OpenSim.Data.SQLite
271 /// The caller must acquire the necessrary synchronization locks and commit or rollback changes. 271 /// The caller must acquire the necessrary synchronization locks and commit or rollback changes.
272 /// </summary> 272 /// </summary>
273 /// <param name="uuid">The item UUID</param> 273 /// <param name="uuid">The item UUID</param>
274 private void RemoveItems(LLUUID uuid) 274 private void RemoveItems(UUID uuid)
275 { 275 {
276 DataTable items = ds.Tables["primitems"]; 276 DataTable items = ds.Tables["primitems"];
277 277
@@ -289,9 +289,9 @@ namespace OpenSim.Data.SQLite
289 /// </summary> 289 /// </summary>
290 /// <param name="regionUUID">The region UUID</param> 290 /// <param name="regionUUID">The region UUID</param>
291 /// <returns>List of loaded groups</returns> 291 /// <returns>List of loaded groups</returns>
292 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 292 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
293 { 293 {
294 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 294 Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
295 295
296 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); 296 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
297 297
@@ -350,7 +350,7 @@ namespace OpenSim.Data.SQLite
350 "[REGION DB]: No shape found for prim in storage, so setting default box shape"); 350 "[REGION DB]: No shape found for prim in storage, so setting default box shape");
351 prim.Shape = PrimitiveBaseShape.Default; 351 prim.Shape = PrimitiveBaseShape.Default;
352 } 352 }
353 createdObjects[new LLUUID(objID)].AddPart(prim); 353 createdObjects[new UUID(objID)].AddPart(prim);
354 } 354 }
355 355
356 LoadItems(prim); 356 LoadItems(prim);
@@ -379,7 +379,7 @@ namespace OpenSim.Data.SQLite
379 379
380 DataTable dbItems = ds.Tables["primitems"]; 380 DataTable dbItems = ds.Tables["primitems"];
381 381
382 String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); 382 String sql = String.Format("primID = '{0}'", prim.ToString());
383 DataRow[] dbItemRows = dbItems.Select(sql); 383 DataRow[] dbItemRows = dbItems.Select(sql);
384 384
385 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); 385 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
@@ -407,7 +407,7 @@ namespace OpenSim.Data.SQLite
407 /// </summary> 407 /// </summary>
408 /// <param name="ter">terrain heightfield</param> 408 /// <param name="ter">terrain heightfield</param>
409 /// <param name="regionID">region UUID</param> 409 /// <param name="regionID">region UUID</param>
410 public void StoreTerrain(double[,] ter, LLUUID regionID) 410 public void StoreTerrain(double[,] ter, UUID regionID)
411 { 411 {
412 lock (ds) 412 lock (ds)
413 { 413 {
@@ -451,7 +451,7 @@ namespace OpenSim.Data.SQLite
451 /// </summary> 451 /// </summary>
452 /// <param name="regionID">the region UUID</param> 452 /// <param name="regionID">the region UUID</param>
453 /// <returns>Heightfield data</returns> 453 /// <returns>Heightfield data</returns>
454 public double[,] LoadTerrain(LLUUID regionID) 454 public double[,] LoadTerrain(UUID regionID)
455 { 455 {
456 lock (ds) 456 lock (ds)
457 { 457 {
@@ -499,7 +499,7 @@ namespace OpenSim.Data.SQLite
499 /// 499 ///
500 /// </summary> 500 /// </summary>
501 /// <param name="globalID"></param> 501 /// <param name="globalID"></param>
502 public void RemoveLandObject(LLUUID globalID) 502 public void RemoveLandObject(UUID globalID)
503 { 503 {
504 lock (ds) 504 lock (ds)
505 { 505 {
@@ -563,7 +563,7 @@ namespace OpenSim.Data.SQLite
563 /// </summary> 563 /// </summary>
564 /// <param name="regionUUID"></param> 564 /// <param name="regionUUID"></param>
565 /// <returns></returns> 565 /// <returns></returns>
566 public List<LandData> LoadLandObjects(LLUUID regionUUID) 566 public List<LandData> LoadLandObjects(UUID regionUUID)
567 { 567 {
568 List<LandData> landDataForRegion = new List<LandData>(); 568 List<LandData> landDataForRegion = new List<LandData>();
569 lock (ds) 569 lock (ds)
@@ -821,12 +821,12 @@ namespace OpenSim.Data.SQLite
821 createCol(land, "IsGroupOwned", typeof (Boolean)); 821 createCol(land, "IsGroupOwned", typeof (Boolean));
822 createCol(land, "Area", typeof (Int32)); 822 createCol(land, "Area", typeof (Int32));
823 createCol(land, "AuctionID", typeof (Int32)); //Unemplemented 823 createCol(land, "AuctionID", typeof (Int32)); //Unemplemented
824 createCol(land, "Category", typeof (Int32)); //Enum libsecondlife.Parcel.ParcelCategory 824 createCol(land, "Category", typeof (Int32)); //Enum OpenMetaverse.Parcel.ParcelCategory
825 createCol(land, "ClaimDate", typeof (Int32)); 825 createCol(land, "ClaimDate", typeof (Int32));
826 createCol(land, "ClaimPrice", typeof (Int32)); 826 createCol(land, "ClaimPrice", typeof (Int32));
827 createCol(land, "GroupUUID", typeof (string)); 827 createCol(land, "GroupUUID", typeof (string));
828 createCol(land, "SalePrice", typeof (Int32)); 828 createCol(land, "SalePrice", typeof (Int32));
829 createCol(land, "LandStatus", typeof (Int32)); //Enum. libsecondlife.Parcel.ParcelStatus 829 createCol(land, "LandStatus", typeof (Int32)); //Enum. OpenMetaverse.Parcel.ParcelStatus
830 createCol(land, "LandFlags", typeof (UInt32)); 830 createCol(land, "LandFlags", typeof (UInt32));
831 createCol(land, "LandingType", typeof (Byte)); 831 createCol(land, "LandingType", typeof (Byte));
832 createCol(land, "MediaAutoScale", typeof (Byte)); 832 createCol(land, "MediaAutoScale", typeof (Byte));
@@ -882,7 +882,7 @@ namespace OpenSim.Data.SQLite
882 // interesting has to be done to actually get these values 882 // interesting has to be done to actually get these values
883 // back out. Not enough time to figure it out yet. 883 // back out. Not enough time to figure it out yet.
884 SceneObjectPart prim = new SceneObjectPart(); 884 SceneObjectPart prim = new SceneObjectPart();
885 prim.UUID = new LLUUID((String) row["UUID"]); 885 prim.UUID = new UUID((String) row["UUID"]);
886 // explicit conversion of integers is required, which sort 886 // explicit conversion of integers is required, which sort
887 // of sucks. No idea if there is a shortcut here or not. 887 // of sucks. No idea if there is a shortcut here or not.
888 prim.ParentID = Convert.ToUInt32(row["ParentID"]); 888 prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@@ -895,43 +895,43 @@ namespace OpenSim.Data.SQLite
895 prim.TouchName = (String) row["TouchName"]; 895 prim.TouchName = (String) row["TouchName"];
896 // permissions 896 // permissions
897 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); 897 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
898 prim.CreatorID = new LLUUID((String) row["CreatorID"]); 898 prim.CreatorID = new UUID((String) row["CreatorID"]);
899 prim.OwnerID = new LLUUID((String) row["OwnerID"]); 899 prim.OwnerID = new UUID((String) row["OwnerID"]);
900 prim.GroupID = new LLUUID((String) row["GroupID"]); 900 prim.GroupID = new UUID((String) row["GroupID"]);
901 prim.LastOwnerID = new LLUUID((String) row["LastOwnerID"]); 901 prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
902 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); 902 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
903 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); 903 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
904 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); 904 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
905 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); 905 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
906 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); 906 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
907 // vectors 907 // vectors
908 prim.OffsetPosition = new LLVector3( 908 prim.OffsetPosition = new Vector3(
909 Convert.ToSingle(row["PositionX"]), 909 Convert.ToSingle(row["PositionX"]),
910 Convert.ToSingle(row["PositionY"]), 910 Convert.ToSingle(row["PositionY"]),
911 Convert.ToSingle(row["PositionZ"]) 911 Convert.ToSingle(row["PositionZ"])
912 ); 912 );
913 prim.GroupPosition = new LLVector3( 913 prim.GroupPosition = new Vector3(
914 Convert.ToSingle(row["GroupPositionX"]), 914 Convert.ToSingle(row["GroupPositionX"]),
915 Convert.ToSingle(row["GroupPositionY"]), 915 Convert.ToSingle(row["GroupPositionY"]),
916 Convert.ToSingle(row["GroupPositionZ"]) 916 Convert.ToSingle(row["GroupPositionZ"])
917 ); 917 );
918 prim.Velocity = new LLVector3( 918 prim.Velocity = new Vector3(
919 Convert.ToSingle(row["VelocityX"]), 919 Convert.ToSingle(row["VelocityX"]),
920 Convert.ToSingle(row["VelocityY"]), 920 Convert.ToSingle(row["VelocityY"]),
921 Convert.ToSingle(row["VelocityZ"]) 921 Convert.ToSingle(row["VelocityZ"])
922 ); 922 );
923 prim.AngularVelocity = new LLVector3( 923 prim.AngularVelocity = new Vector3(
924 Convert.ToSingle(row["AngularVelocityX"]), 924 Convert.ToSingle(row["AngularVelocityX"]),
925 Convert.ToSingle(row["AngularVelocityY"]), 925 Convert.ToSingle(row["AngularVelocityY"]),
926 Convert.ToSingle(row["AngularVelocityZ"]) 926 Convert.ToSingle(row["AngularVelocityZ"])
927 ); 927 );
928 prim.Acceleration = new LLVector3( 928 prim.Acceleration = new Vector3(
929 Convert.ToSingle(row["AccelerationX"]), 929 Convert.ToSingle(row["AccelerationX"]),
930 Convert.ToSingle(row["AccelerationY"]), 930 Convert.ToSingle(row["AccelerationY"]),
931 Convert.ToSingle(row["AccelerationZ"]) 931 Convert.ToSingle(row["AccelerationZ"])
932 ); 932 );
933 // quaternions 933 // quaternions
934 prim.RotationOffset = new LLQuaternion( 934 prim.RotationOffset = new Quaternion(
935 Convert.ToSingle(row["RotationX"]), 935 Convert.ToSingle(row["RotationX"]),
936 Convert.ToSingle(row["RotationY"]), 936 Convert.ToSingle(row["RotationY"]),
937 Convert.ToSingle(row["RotationZ"]), 937 Convert.ToSingle(row["RotationZ"]),
@@ -940,11 +940,11 @@ namespace OpenSim.Data.SQLite
940 940
941 try 941 try
942 { 942 {
943 prim.SitTargetPositionLL = new LLVector3( 943 prim.SitTargetPositionLL = new Vector3(
944 Convert.ToSingle(row["SitTargetOffsetX"]), 944 Convert.ToSingle(row["SitTargetOffsetX"]),
945 Convert.ToSingle(row["SitTargetOffsetY"]), 945 Convert.ToSingle(row["SitTargetOffsetY"]),
946 Convert.ToSingle(row["SitTargetOffsetZ"])); 946 Convert.ToSingle(row["SitTargetOffsetZ"]));
947 prim.SitTargetOrientationLL = new LLQuaternion( 947 prim.SitTargetOrientationLL = new Quaternion(
948 Convert.ToSingle( 948 Convert.ToSingle(
949 row["SitTargetOrientX"]), 949 row["SitTargetOrientX"]),
950 Convert.ToSingle( 950 Convert.ToSingle(
@@ -993,10 +993,10 @@ namespace OpenSim.Data.SQLite
993 { 993 {
994 TaskInventoryItem taskItem = new TaskInventoryItem(); 994 TaskInventoryItem taskItem = new TaskInventoryItem();
995 995
996 taskItem.ItemID = new LLUUID((String)row["itemID"]); 996 taskItem.ItemID = new UUID((String)row["itemID"]);
997 taskItem.ParentPartID = new LLUUID((String)row["primID"]); 997 taskItem.ParentPartID = new UUID((String)row["primID"]);
998 taskItem.AssetID = new LLUUID((String)row["assetID"]); 998 taskItem.AssetID = new UUID((String)row["assetID"]);
999 taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); 999 taskItem.ParentID = new UUID((String)row["parentFolderID"]);
1000 1000
1001 taskItem.InvType = Convert.ToInt32(row["invType"]); 1001 taskItem.InvType = Convert.ToInt32(row["invType"]);
1002 taskItem.Type = Convert.ToInt32(row["assetType"]); 1002 taskItem.Type = Convert.ToInt32(row["assetType"]);
@@ -1004,10 +1004,10 @@ namespace OpenSim.Data.SQLite
1004 taskItem.Name = (String)row["name"]; 1004 taskItem.Name = (String)row["name"];
1005 taskItem.Description = (String)row["description"]; 1005 taskItem.Description = (String)row["description"];
1006 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1006 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1007 taskItem.CreatorID = new LLUUID((String)row["creatorID"]); 1007 taskItem.CreatorID = new UUID((String)row["creatorID"]);
1008 taskItem.OwnerID = new LLUUID((String)row["ownerID"]); 1008 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1009 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1009 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1010 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1010 taskItem.GroupID = new UUID((String)row["groupID"]);
1011 1011
1012 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); 1012 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1013 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); 1013 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@@ -1028,7 +1028,7 @@ namespace OpenSim.Data.SQLite
1028 { 1028 {
1029 LandData newData = new LandData(); 1029 LandData newData = new LandData();
1030 1030
1031 newData.GlobalID = new LLUUID((String) row["UUID"]); 1031 newData.GlobalID = new UUID((String) row["UUID"]);
1032 newData.LocalID = Convert.ToInt32(row["LocalLandID"]); 1032 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
1033 1033
1034 // Bitmap is a byte[512] 1034 // Bitmap is a byte[512]
@@ -1041,17 +1041,17 @@ namespace OpenSim.Data.SQLite
1041 newData.Area = Convert.ToInt32(row["Area"]); 1041 newData.Area = Convert.ToInt32(row["Area"]);
1042 newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented 1042 newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
1043 newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); 1043 newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
1044 //Enum libsecondlife.Parcel.ParcelCategory 1044 //Enum OpenMetaverse.Parcel.ParcelCategory
1045 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); 1045 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
1046 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 1046 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
1047 newData.GroupID = new LLUUID((String) row["GroupUUID"]); 1047 newData.GroupID = new UUID((String) row["GroupUUID"]);
1048 newData.SalePrice = Convert.ToInt32(row["SalePrice"]); 1048 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
1049 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); 1049 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
1050 //Enum. libsecondlife.Parcel.ParcelStatus 1050 //Enum. OpenMetaverse.Parcel.ParcelStatus
1051 newData.Flags = Convert.ToUInt32(row["LandFlags"]); 1051 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
1052 newData.LandingType = (Byte) row["LandingType"]; 1052 newData.LandingType = (Byte) row["LandingType"];
1053 newData.MediaAutoScale = (Byte) row["MediaAutoScale"]; 1053 newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
1054 newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]); 1054 newData.MediaID = new UUID((String) row["MediaTextureUUID"]);
1055 newData.MediaURL = (String) row["MediaURL"]; 1055 newData.MediaURL = (String) row["MediaURL"];
1056 newData.MusicURL = (String) row["MusicURL"]; 1056 newData.MusicURL = (String) row["MusicURL"];
1057 newData.PassHours = Convert.ToSingle(row["PassHours"]); 1057 newData.PassHours = Convert.ToSingle(row["PassHours"]);
@@ -1061,25 +1061,25 @@ namespace OpenSim.Data.SQLite
1061 { 1061 {
1062 1062
1063 newData.UserLocation = 1063 newData.UserLocation =
1064 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1064 new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1065 Convert.ToSingle(row["UserLocationZ"])); 1065 Convert.ToSingle(row["UserLocationZ"]));
1066 newData.UserLookAt = 1066 newData.UserLookAt =
1067 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1067 new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1068 Convert.ToSingle(row["UserLookAtZ"])); 1068 Convert.ToSingle(row["UserLookAtZ"]));
1069 1069
1070 } 1070 }
1071 catch (InvalidCastException) 1071 catch (InvalidCastException)
1072 { 1072 {
1073 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 1073 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
1074 newData.UserLocation = LLVector3.Zero; 1074 newData.UserLocation = Vector3.Zero;
1075 newData.UserLookAt = LLVector3.Zero; 1075 newData.UserLookAt = Vector3.Zero;
1076 } 1076 }
1077 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1077 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1078 LLUUID authBuyerID = LLUUID.Zero; 1078 UUID authBuyerID = UUID.Zero;
1079 1079
1080 try 1080 try
1081 { 1081 {
1082 Helpers.TryParse((string)row["AuthbuyerID"], out authBuyerID); 1082 UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
1083 } 1083 }
1084 catch (InvalidCastException) 1084 catch (InvalidCastException)
1085 { 1085 {
@@ -1120,7 +1120,7 @@ namespace OpenSim.Data.SQLite
1120 private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) 1120 private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
1121 { 1121 {
1122 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 1122 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
1123 entry.AgentID = new LLUUID((string) row["AccessUUID"]); 1123 entry.AgentID = new UUID((string) row["AccessUUID"]);
1124 entry.Flags = (ParcelManager.AccessList) row["Flags"]; 1124 entry.Flags = (ParcelManager.AccessList) row["Flags"];
1125 entry.Time = new DateTime(); 1125 entry.Time = new DateTime();
1126 return entry; 1126 return entry;
@@ -1144,7 +1144,7 @@ namespace OpenSim.Data.SQLite
1144 return str.ToArray(); 1144 return str.ToArray();
1145 } 1145 }
1146 1146
1147// private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val) 1147// private void fillTerrainRow(DataRow row, UUID regionUUID, int rev, double[,] val)
1148// { 1148// {
1149// row["RegionUUID"] = regionUUID; 1149// row["RegionUUID"] = regionUUID;
1150// row["Revision"] = rev; 1150// row["Revision"] = rev;
@@ -1167,7 +1167,7 @@ namespace OpenSim.Data.SQLite
1167 /// <param name="prim"></param> 1167 /// <param name="prim"></param>
1168 /// <param name="sceneGroupID"></param> 1168 /// <param name="sceneGroupID"></param>
1169 /// <param name="regionUUID"></param> 1169 /// <param name="regionUUID"></param>
1170 private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1170 private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1171 { 1171 {
1172 row["UUID"] = Util.ToRawUuidString(prim.UUID); 1172 row["UUID"] = Util.ToRawUuidString(prim.UUID);
1173 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1173 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1215,12 +1215,12 @@ namespace OpenSim.Data.SQLite
1215 row["RotationW"] = prim.RotationOffset.W; 1215 row["RotationW"] = prim.RotationOffset.W;
1216 1216
1217 // Sit target 1217 // Sit target
1218 LLVector3 sitTargetPos = prim.SitTargetPositionLL; 1218 Vector3 sitTargetPos = prim.SitTargetPositionLL;
1219 row["SitTargetOffsetX"] = sitTargetPos.X; 1219 row["SitTargetOffsetX"] = sitTargetPos.X;
1220 row["SitTargetOffsetY"] = sitTargetPos.Y; 1220 row["SitTargetOffsetY"] = sitTargetPos.Y;
1221 row["SitTargetOffsetZ"] = sitTargetPos.Z; 1221 row["SitTargetOffsetZ"] = sitTargetPos.Z;
1222 1222
1223 LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; 1223 Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
1224 row["SitTargetOrientW"] = sitTargetOrient.W; 1224 row["SitTargetOrientW"] = sitTargetOrient.W;
1225 row["SitTargetOrientX"] = sitTargetOrient.X; 1225 row["SitTargetOrientX"] = sitTargetOrient.X;
1226 row["SitTargetOrientY"] = sitTargetOrient.Y; 1226 row["SitTargetOrientY"] = sitTargetOrient.Y;
@@ -1263,7 +1263,7 @@ namespace OpenSim.Data.SQLite
1263 /// <param name="row"></param> 1263 /// <param name="row"></param>
1264 /// <param name="land"></param> 1264 /// <param name="land"></param>
1265 /// <param name="regionUUID"></param> 1265 /// <param name="regionUUID"></param>
1266 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1266 private static void fillLandRow(DataRow row, LandData land, UUID regionUUID)
1267 { 1267 {
1268 row["UUID"] = Util.ToRawUuidString(land.GlobalID); 1268 row["UUID"] = Util.ToRawUuidString(land.GlobalID);
1269 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1269 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1278,12 +1278,12 @@ namespace OpenSim.Data.SQLite
1278 row["IsGroupOwned"] = land.IsGroupOwned; 1278 row["IsGroupOwned"] = land.IsGroupOwned;
1279 row["Area"] = land.Area; 1279 row["Area"] = land.Area;
1280 row["AuctionID"] = land.AuctionID; //Unemplemented 1280 row["AuctionID"] = land.AuctionID; //Unemplemented
1281 row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory 1281 row["Category"] = land.Category; //Enum OpenMetaverse.Parcel.ParcelCategory
1282 row["ClaimDate"] = land.ClaimDate; 1282 row["ClaimDate"] = land.ClaimDate;
1283 row["ClaimPrice"] = land.ClaimPrice; 1283 row["ClaimPrice"] = land.ClaimPrice;
1284 row["GroupUUID"] = Util.ToRawUuidString(land.GroupID); 1284 row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
1285 row["SalePrice"] = land.SalePrice; 1285 row["SalePrice"] = land.SalePrice;
1286 row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus 1286 row["LandStatus"] = land.Status; //Enum. OpenMetaverse.Parcel.ParcelStatus
1287 row["LandFlags"] = land.Flags; 1287 row["LandFlags"] = land.Flags;
1288 row["LandingType"] = land.LandingType; 1288 row["LandingType"] = land.LandingType;
1289 row["MediaAutoScale"] = land.MediaAutoScale; 1289 row["MediaAutoScale"] = land.MediaAutoScale;
@@ -1308,7 +1308,7 @@ namespace OpenSim.Data.SQLite
1308 /// <param name="row"></param> 1308 /// <param name="row"></param>
1309 /// <param name="entry"></param> 1309 /// <param name="entry"></param>
1310 /// <param name="parcelID"></param> 1310 /// <param name="parcelID"></param>
1311 private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) 1311 private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, UUID parcelID)
1312 { 1312 {
1313 row["LandUUID"] = Util.ToRawUuidString(parcelID); 1313 row["LandUUID"] = Util.ToRawUuidString(parcelID);
1314 row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); 1314 row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
@@ -1323,7 +1323,7 @@ namespace OpenSim.Data.SQLite
1323 private PrimitiveBaseShape buildShape(DataRow row) 1323 private PrimitiveBaseShape buildShape(DataRow row)
1324 { 1324 {
1325 PrimitiveBaseShape s = new PrimitiveBaseShape(); 1325 PrimitiveBaseShape s = new PrimitiveBaseShape();
1326 s.Scale = new LLVector3( 1326 s.Scale = new Vector3(
1327 Convert.ToSingle(row["ScaleX"]), 1327 Convert.ToSingle(row["ScaleX"]),
1328 Convert.ToSingle(row["ScaleY"]), 1328 Convert.ToSingle(row["ScaleY"]),
1329 Convert.ToSingle(row["ScaleZ"]) 1329 Convert.ToSingle(row["ScaleZ"])
@@ -1418,7 +1418,7 @@ namespace OpenSim.Data.SQLite
1418 /// <param name="prim"></param> 1418 /// <param name="prim"></param>
1419 /// <param name="sceneGroupID"></param> 1419 /// <param name="sceneGroupID"></param>
1420 /// <param name="regionUUID"></param> 1420 /// <param name="regionUUID"></param>
1421 private void addPrim(SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1421 private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1422 { 1422 {
1423 DataTable prims = ds.Tables["prims"]; 1423 DataTable prims = ds.Tables["prims"];
1424 DataTable shapes = ds.Tables["primshapes"]; 1424 DataTable shapes = ds.Tables["primshapes"];
@@ -1453,7 +1453,7 @@ namespace OpenSim.Data.SQLite
1453 /// </summary> 1453 /// </summary>
1454 /// <param name="primID"></param> 1454 /// <param name="primID"></param>
1455 /// <param name="items"></param> 1455 /// <param name="items"></param>
1456 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 1456 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
1457 { 1457 {
1458 m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID); 1458 m_log.InfoFormat("[REGION DB]: Entered StorePrimInventory with prim ID {0}", primID);
1459 1459
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index ae3cb72..7f1fd62 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Mono.Data.SqliteClient; 34using Mono.Data.SqliteClient;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
59 private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname"; 59 private const string AvatarPickerAndSQL = "select * from users where username like :username and surname like :surname";
60 private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname"; 60 private const string AvatarPickerOrSQL = "select * from users where username like :username or surname like :surname";
61 61
62 private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); 62 private Dictionary<UUID, AvatarAppearance> aplist = new Dictionary<UUID, AvatarAppearance>();
63 private DataSet ds; 63 private DataSet ds;
64 private SqliteDataAdapter da; 64 private SqliteDataAdapter da;
65 private SqliteDataAdapter daf; 65 private SqliteDataAdapter daf;
@@ -124,7 +124,7 @@ namespace OpenSim.Data.SQLite
124 /// </summary> 124 /// </summary>
125 /// <param name="uuid">User UUID</param> 125 /// <param name="uuid">User UUID</param>
126 /// <returns>user profile data</returns> 126 /// <returns>user profile data</returns>
127 override public UserProfileData GetUserByUUID(LLUUID uuid) 127 override public UserProfileData GetUserByUUID(UUID uuid)
128 { 128 {
129 lock (ds) 129 lock (ds)
130 { 130 {
@@ -184,21 +184,21 @@ namespace OpenSim.Data.SQLite
184 /// <param name="friendlistowner">UUID of the friendlist owner</param> 184 /// <param name="friendlistowner">UUID of the friendlist owner</param>
185 /// <param name="friend">UUID of the friend to add</param> 185 /// <param name="friend">UUID of the friend to add</param>
186 /// <param name="perms">permission flag</param> 186 /// <param name="perms">permission flag</param>
187 override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 187 override public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
188 { 188 {
189 string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)"; 189 string InsertFriends = "insert into userfriends(ownerID, friendID, friendPerms) values(:ownerID, :friendID, :perms)";
190 190
191 using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) 191 using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn))
192 { 192 {
193 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); 193 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
194 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); 194 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
195 cmd.Parameters.Add(new SqliteParameter(":perms", perms)); 195 cmd.Parameters.Add(new SqliteParameter(":perms", perms));
196 cmd.ExecuteNonQuery(); 196 cmd.ExecuteNonQuery();
197 } 197 }
198 using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn)) 198 using (SqliteCommand cmd = new SqliteCommand(InsertFriends, g_conn))
199 { 199 {
200 cmd.Parameters.Add(new SqliteParameter(":ownerID", friend.UUID.ToString())); 200 cmd.Parameters.Add(new SqliteParameter(":ownerID", friend.ToString()));
201 cmd.Parameters.Add(new SqliteParameter(":friendID", friendlistowner.UUID.ToString())); 201 cmd.Parameters.Add(new SqliteParameter(":friendID", friendlistowner.ToString()));
202 cmd.Parameters.Add(new SqliteParameter(":perms", perms)); 202 cmd.Parameters.Add(new SqliteParameter(":perms", perms));
203 cmd.ExecuteNonQuery(); 203 cmd.ExecuteNonQuery();
204 } 204 }
@@ -209,13 +209,13 @@ namespace OpenSim.Data.SQLite
209 /// </summary> 209 /// </summary>
210 /// <param name="friendlistowner">UUID of the friendlist owner</param> 210 /// <param name="friendlistowner">UUID of the friendlist owner</param>
211 /// <param name="friend">UUID of the friend to remove</param> 211 /// <param name="friend">UUID of the friend to remove</param>
212 override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 212 override public void RemoveUserFriend(UUID friendlistowner, UUID friend)
213 { 213 {
214 string DeletePerms = "delete from friendlist where (ownerID=:ownerID and friendID=:friendID) or (ownerID=:friendID and friendID=:ownerID)"; 214 string DeletePerms = "delete from friendlist where (ownerID=:ownerID and friendID=:friendID) or (ownerID=:friendID and friendID=:ownerID)";
215 using (SqliteCommand cmd = new SqliteCommand(DeletePerms, g_conn)) 215 using (SqliteCommand cmd = new SqliteCommand(DeletePerms, g_conn))
216 { 216 {
217 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); 217 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
218 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); 218 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
219 cmd.ExecuteNonQuery(); 219 cmd.ExecuteNonQuery();
220 } 220 }
221 } 221 }
@@ -226,14 +226,14 @@ namespace OpenSim.Data.SQLite
226 /// <param name="friendlistowner">UUID of the friendlist owner</param> 226 /// <param name="friendlistowner">UUID of the friendlist owner</param>
227 /// <param name="friend">UUID of the friend to modify</param> 227 /// <param name="friend">UUID of the friend to modify</param>
228 /// <param name="perms">updated permission flag</param> 228 /// <param name="perms">updated permission flag</param>
229 override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 229 override public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
230 { 230 {
231 string UpdatePerms = "update friendlist set perms=:perms where ownerID=:ownerID and friendID=:friendID"; 231 string UpdatePerms = "update friendlist set perms=:perms where ownerID=:ownerID and friendID=:friendID";
232 using (SqliteCommand cmd = new SqliteCommand(UpdatePerms, g_conn)) 232 using (SqliteCommand cmd = new SqliteCommand(UpdatePerms, g_conn))
233 { 233 {
234 cmd.Parameters.Add(new SqliteParameter(":perms", perms)); 234 cmd.Parameters.Add(new SqliteParameter(":perms", perms));
235 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); 235 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
236 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.UUID.ToString())); 236 cmd.Parameters.Add(new SqliteParameter(":friendID", friend.ToString()));
237 cmd.ExecuteNonQuery(); 237 cmd.ExecuteNonQuery();
238 } 238 }
239 } 239 }
@@ -243,13 +243,13 @@ namespace OpenSim.Data.SQLite
243 /// </summary> 243 /// </summary>
244 /// <param name="friendlistowner">UUID of the friendlist owner</param> 244 /// <param name="friendlistowner">UUID of the friendlist owner</param>
245 /// <returns>The friendlist list</returns> 245 /// <returns>The friendlist list</returns>
246 override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 246 override public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
247 { 247 {
248 List<FriendListItem> returnlist = new List<FriendListItem>(); 248 List<FriendListItem> returnlist = new List<FriendListItem>();
249 249
250 using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn)) 250 using (SqliteCommand cmd = new SqliteCommand(SelectFriendsByUUID, g_conn))
251 { 251 {
252 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.UUID.ToString())); 252 cmd.Parameters.Add(new SqliteParameter(":ownerID", friendlistowner.ToString()));
253 253
254 try 254 try
255 { 255 {
@@ -259,7 +259,7 @@ namespace OpenSim.Data.SQLite
259 { 259 {
260 FriendListItem user = new FriendListItem(); 260 FriendListItem user = new FriendListItem();
261 user.FriendListOwner = friendlistowner; 261 user.FriendListOwner = friendlistowner;
262 user.Friend = new LLUUID((string)reader[0]); 262 user.Friend = new UUID((string)reader[0]);
263 user.FriendPerms = Convert.ToUInt32(reader[1]); 263 user.FriendPerms = Convert.ToUInt32(reader[1]);
264 user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]); 264 user.FriendListOwnerPerms = Convert.ToUInt32(reader[2]);
265 returnlist.Add(user); 265 returnlist.Add(user);
@@ -288,7 +288,7 @@ namespace OpenSim.Data.SQLite
288 /// <param name="regionuuid">UUID of the region</param> 288 /// <param name="regionuuid">UUID of the region</param>
289 /// <param name="regionhandle">region handle</param> 289 /// <param name="regionhandle">region handle</param>
290 /// <remarks>DO NOTHING</remarks> 290 /// <remarks>DO NOTHING</remarks>
291 override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 291 override public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
292 { 292 {
293 //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called"); 293 //m_log.Info("[USER DB]: Stub UpdateUserCUrrentRegion called");
294 } 294 }
@@ -299,7 +299,7 @@ namespace OpenSim.Data.SQLite
299 /// <param name="queryID"></param> 299 /// <param name="queryID"></param>
300 /// <param name="query"></param> 300 /// <param name="query"></param>
301 /// <returns></returns> 301 /// <returns></returns>
302 override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 302 override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
303 { 303 {
304 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); 304 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
305 string[] querysplit; 305 string[] querysplit;
@@ -316,7 +316,7 @@ namespace OpenSim.Data.SQLite
316 while (reader.Read()) 316 while (reader.Read())
317 { 317 {
318 AvatarPickerAvatar user = new AvatarPickerAvatar(); 318 AvatarPickerAvatar user = new AvatarPickerAvatar();
319 user.AvatarID = new LLUUID((string) reader["UUID"]); 319 user.AvatarID = new UUID((string) reader["UUID"]);
320 user.firstName = (string) reader["username"]; 320 user.firstName = (string) reader["username"];
321 user.lastName = (string) reader["surname"]; 321 user.lastName = (string) reader["surname"];
322 returnlist.Add(user); 322 returnlist.Add(user);
@@ -337,7 +337,7 @@ namespace OpenSim.Data.SQLite
337 while (reader.Read()) 337 while (reader.Read())
338 { 338 {
339 AvatarPickerAvatar user = new AvatarPickerAvatar(); 339 AvatarPickerAvatar user = new AvatarPickerAvatar();
340 user.AvatarID = new LLUUID((string) reader["UUID"]); 340 user.AvatarID = new UUID((string) reader["UUID"]);
341 user.firstName = (string) reader["username"]; 341 user.firstName = (string) reader["username"];
342 user.lastName = (string) reader["surname"]; 342 user.lastName = (string) reader["surname"];
343 returnlist.Add(user); 343 returnlist.Add(user);
@@ -354,7 +354,7 @@ namespace OpenSim.Data.SQLite
354 /// </summary> 354 /// </summary>
355 /// <param name="uuid">The user's account ID</param> 355 /// <param name="uuid">The user's account ID</param>
356 /// <returns>A matching user profile</returns> 356 /// <returns>A matching user profile</returns>
357 override public UserAgentData GetAgentByUUID(LLUUID uuid) 357 override public UserAgentData GetAgentByUUID(UUID uuid)
358 { 358 {
359 try 359 try
360 { 360 {
@@ -399,7 +399,7 @@ namespace OpenSim.Data.SQLite
399 /// </summary> 399 /// </summary>
400 /// <param name="AgentID">UUID of the user</param> 400 /// <param name="AgentID">UUID of the user</param>
401 /// <param name="WebLoginKey">UUID of the weblogin</param> 401 /// <param name="WebLoginKey">UUID of the weblogin</param>
402 override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 402 override public void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
403 { 403 {
404 DataTable users = ds.Tables["users"]; 404 DataTable users = ds.Tables["users"];
405 lock (ds) 405 lock (ds)
@@ -520,7 +520,7 @@ namespace OpenSim.Data.SQLite
520 /// <param name="to">End account</param> 520 /// <param name="to">End account</param>
521 /// <param name="amount">The amount to move</param> 521 /// <param name="amount">The amount to move</param>
522 /// <returns>Success?</returns> 522 /// <returns>Success?</returns>
523 override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) 523 override public bool MoneyTransferRequest(UUID from, UUID to, uint amount)
524 { 524 {
525 return true; 525 return true;
526 } 526 }
@@ -533,7 +533,7 @@ namespace OpenSim.Data.SQLite
533 /// <param name="to">Receivers account</param> 533 /// <param name="to">Receivers account</param>
534 /// <param name="item">Inventory item</param> 534 /// <param name="item">Inventory item</param>
535 /// <returns>Success?</returns> 535 /// <returns>Success?</returns>
536 override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 536 override public bool InventoryTransferRequest(UUID from, UUID to, UUID item)
537 { 537 {
538 return true; 538 return true;
539 } 539 }
@@ -545,7 +545,7 @@ namespace OpenSim.Data.SQLite
545 /// </summary> 545 /// </summary>
546 /// <param name="user">The user UUID</param> 546 /// <param name="user">The user UUID</param>
547 /// <returns>Avatar Appearence</returns> 547 /// <returns>Avatar Appearence</returns>
548 override public AvatarAppearance GetUserAppearance(LLUUID user) 548 override public AvatarAppearance GetUserAppearance(UUID user)
549 { 549 {
550 AvatarAppearance aa = null; 550 AvatarAppearance aa = null;
551 try { 551 try {
@@ -562,7 +562,7 @@ namespace OpenSim.Data.SQLite
562 /// </summary> 562 /// </summary>
563 /// <param name="user">the user UUID</param> 563 /// <param name="user">the user UUID</param>
564 /// <param name="appearance">appearence</param> 564 /// <param name="appearance">appearence</param>
565 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 565 override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
566 { 566 {
567 appearance.Owner = user; 567 appearance.Owner = user;
568 aplist[user] = appearance; 568 aplist[user] = appearance;
@@ -707,8 +707,8 @@ namespace OpenSim.Data.SQLite
707 private static UserProfileData buildUserProfile(DataRow row) 707 private static UserProfileData buildUserProfile(DataRow row)
708 { 708 {
709 UserProfileData user = new UserProfileData(); 709 UserProfileData user = new UserProfileData();
710 LLUUID tmp; 710 UUID tmp;
711 LLUUID.TryParse((String)row["UUID"], out tmp); 711 UUID.TryParse((String)row["UUID"], out tmp);
712 user.ID = tmp; 712 user.ID = tmp;
713 user.FirstName = (String) row["username"]; 713 user.FirstName = (String) row["username"];
714 user.SurName = (String) row["surname"]; 714 user.SurName = (String) row["surname"];
@@ -717,39 +717,39 @@ namespace OpenSim.Data.SQLite
717 717
718 user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]); 718 user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]);
719 user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]); 719 user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]);
720 user.HomeLocation = new LLVector3( 720 user.HomeLocation = new Vector3(
721 Convert.ToSingle(row["homeLocationX"]), 721 Convert.ToSingle(row["homeLocationX"]),
722 Convert.ToSingle(row["homeLocationY"]), 722 Convert.ToSingle(row["homeLocationY"]),
723 Convert.ToSingle(row["homeLocationZ"]) 723 Convert.ToSingle(row["homeLocationZ"])
724 ); 724 );
725 user.HomeLookAt = new LLVector3( 725 user.HomeLookAt = new Vector3(
726 Convert.ToSingle(row["homeLookAtX"]), 726 Convert.ToSingle(row["homeLookAtX"]),
727 Convert.ToSingle(row["homeLookAtY"]), 727 Convert.ToSingle(row["homeLookAtY"]),
728 Convert.ToSingle(row["homeLookAtZ"]) 728 Convert.ToSingle(row["homeLookAtZ"])
729 ); 729 );
730 730
731 LLUUID regionID = LLUUID.Zero; 731 UUID regionID = UUID.Zero;
732 LLUUID.TryParse(row["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero 732 UUID.TryParse(row["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use UUID.Zero
733 user.HomeRegionID = regionID; 733 user.HomeRegionID = regionID;
734 734
735 user.Created = Convert.ToInt32(row["created"]); 735 user.Created = Convert.ToInt32(row["created"]);
736 user.LastLogin = Convert.ToInt32(row["lastLogin"]); 736 user.LastLogin = Convert.ToInt32(row["lastLogin"]);
737 user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); 737 user.RootInventoryFolderID = new UUID((String) row["rootInventoryFolderID"]);
738 user.UserInventoryURI = (String) row["userInventoryURI"]; 738 user.UserInventoryURI = (String) row["userInventoryURI"];
739 user.UserAssetURI = (String) row["userAssetURI"]; 739 user.UserAssetURI = (String) row["userAssetURI"];
740 user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); 740 user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
741 user.WantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); 741 user.WantDoMask = Convert.ToUInt32(row["profileWantDoMask"]);
742 user.AboutText = (String) row["profileAboutText"]; 742 user.AboutText = (String) row["profileAboutText"];
743 user.FirstLifeAboutText = (String) row["profileFirstText"]; 743 user.FirstLifeAboutText = (String) row["profileFirstText"];
744 LLUUID.TryParse((String)row["profileImage"], out tmp); 744 UUID.TryParse((String)row["profileImage"], out tmp);
745 user.Image = tmp; 745 user.Image = tmp;
746 LLUUID.TryParse((String)row["profileFirstImage"], out tmp); 746 UUID.TryParse((String)row["profileFirstImage"], out tmp);
747 user.FirstLifeImage = tmp; 747 user.FirstLifeImage = tmp;
748 user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); 748 user.WebLoginKey = new UUID((String) row["webLoginKey"]);
749 user.UserFlags = Convert.ToInt32(row["userFlags"]); 749 user.UserFlags = Convert.ToInt32(row["userFlags"]);
750 user.GodLevel = Convert.ToInt32(row["godLevel"]); 750 user.GodLevel = Convert.ToInt32(row["godLevel"]);
751 user.CustomType = row["customType"].ToString(); 751 user.CustomType = row["customType"].ToString();
752 user.Partner = new LLUUID((String) row["partner"]); 752 user.Partner = new UUID((String) row["partner"]);
753 753
754 return user; 754 return user;
755 } 755 }
@@ -814,18 +814,18 @@ namespace OpenSim.Data.SQLite
814 { 814 {
815 UserAgentData ua = new UserAgentData(); 815 UserAgentData ua = new UserAgentData();
816 816
817 ua.ProfileID = new LLUUID((String) row["UUID"]); 817 ua.ProfileID = new UUID((String) row["UUID"]);
818 ua.AgentIP = (String) row["agentIP"]; 818 ua.AgentIP = (String) row["agentIP"];
819 ua.AgentPort = Convert.ToUInt32(row["agentPort"]); 819 ua.AgentPort = Convert.ToUInt32(row["agentPort"]);
820 ua.AgentOnline = Convert.ToBoolean(row["agentOnline"]); 820 ua.AgentOnline = Convert.ToBoolean(row["agentOnline"]);
821 ua.SessionID = new LLUUID((String) row["sessionID"]); 821 ua.SessionID = new UUID((String) row["sessionID"]);
822 ua.SecureSessionID = new LLUUID((String) row["secureSessionID"]); 822 ua.SecureSessionID = new UUID((String) row["secureSessionID"]);
823 ua.InitialRegion = new LLUUID((String) row["regionID"]); 823 ua.InitialRegion = new UUID((String) row["regionID"]);
824 ua.LoginTime = Convert.ToInt32(row["loginTime"]); 824 ua.LoginTime = Convert.ToInt32(row["loginTime"]);
825 ua.LogoutTime = Convert.ToInt32(row["logoutTime"]); 825 ua.LogoutTime = Convert.ToInt32(row["logoutTime"]);
826 ua.Region = new LLUUID((String) row["currentRegion"]); 826 ua.Region = new UUID((String) row["currentRegion"]);
827 ua.Handle = Convert.ToUInt64(row["currentHandle"]); 827 ua.Handle = Convert.ToUInt64(row["currentHandle"]);
828 ua.Position = new LLVector3( 828 ua.Position = new Vector3(
829 Convert.ToSingle(row["currentPosX"]), 829 Convert.ToSingle(row["currentPosX"]),
830 Convert.ToSingle(row["currentPosY"]), 830 Convert.ToSingle(row["currentPosY"]),
831 Convert.ToSingle(row["currentPosZ"]) 831 Convert.ToSingle(row["currentPosZ"])
@@ -906,7 +906,7 @@ namespace OpenSim.Data.SQLite
906 906
907 } 907 }
908 908
909 override public void ResetAttachments(LLUUID userID) 909 override public void ResetAttachments(UUID userID)
910 { 910 {
911 } 911 }
912 } 912 }
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index e57c8f8..33b8a94 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -27,7 +27,7 @@
27 27
28using System.Reflection; 28using System.Reflection;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33 33
@@ -37,28 +37,28 @@ namespace OpenSim.Data
37 { 37 {
38 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 38 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
39 39
40 // private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>(); 40 // private Dictionary<UUID, AvatarAppearance> aplist = new Dictionary<UUID, AvatarAppearance>();
41 41
42 public abstract UserProfileData GetUserByUUID(LLUUID user); 42 public abstract UserProfileData GetUserByUUID(UUID user);
43 public abstract UserProfileData GetUserByName(string fname, string lname); 43 public abstract UserProfileData GetUserByName(string fname, string lname);
44 public abstract UserAgentData GetAgentByUUID(LLUUID user); 44 public abstract UserAgentData GetAgentByUUID(UUID user);
45 public abstract UserAgentData GetAgentByName(string name); 45 public abstract UserAgentData GetAgentByName(string name);
46 public abstract UserAgentData GetAgentByName(string fname, string lname); 46 public abstract UserAgentData GetAgentByName(string fname, string lname);
47 public abstract void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); 47 public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
48 public abstract void AddNewUserProfile(UserProfileData user); 48 public abstract void AddNewUserProfile(UserProfileData user);
49 public abstract bool UpdateUserProfile(UserProfileData user); 49 public abstract bool UpdateUserProfile(UserProfileData user);
50 public abstract void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle); 50 public abstract void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle);
51 public abstract void AddNewUserAgent(UserAgentData agent); 51 public abstract void AddNewUserAgent(UserAgentData agent);
52 public abstract void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms); 52 public abstract void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
53 public abstract void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend); 53 public abstract void RemoveUserFriend(UUID friendlistowner, UUID friend);
54 public abstract void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms); 54 public abstract void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
55 public abstract List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); 55 public abstract List<FriendListItem> GetUserFriendList(UUID friendlistowner);
56 public abstract bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); 56 public abstract bool MoneyTransferRequest(UUID from, UUID to, uint amount);
57 public abstract bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); 57 public abstract bool InventoryTransferRequest(UUID from, UUID to, UUID inventory);
58 public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); 58 public abstract List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query);
59 public abstract AvatarAppearance GetUserAppearance(LLUUID user); 59 public abstract AvatarAppearance GetUserAppearance(UUID user);
60 public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 60 public abstract void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
61 // public virtual AvatarAppearance GetUserAppearance(LLUUID user) { 61 // public virtual AvatarAppearance GetUserAppearance(UUID user) {
62 // AvatarAppearance aa = null; 62 // AvatarAppearance aa = null;
63 // try { 63 // try {
64 // aa = aplist[user]; 64 // aa = aplist[user];
@@ -68,11 +68,11 @@ namespace OpenSim.Data
68 // } 68 // }
69 // return aa; 69 // return aa;
70 // } 70 // }
71 // public virtual void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { 71 // public virtual void UpdateUserAppearance(UUID user, AvatarAppearance appearance) {
72 // aplist[user] = appearance; 72 // aplist[user] = appearance;
73 // m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString()); 73 // m_log.Info("[APPEARANCE] Setting appearance for " + user.ToString() + appearance.ToString());
74 // } 74 // }
75 public abstract void ResetAttachments(LLUUID userID); 75 public abstract void ResetAttachments(UUID userID);
76 76
77 public abstract string Version {get;} 77 public abstract string Version {get;}
78 public abstract string Name {get;} 78 public abstract string Name {get;}
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index 8c184c4..045bd00 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -26,23 +26,23 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
33 public class AgentCircuitData 33 public class AgentCircuitData
34 { 34 {
35 public LLUUID AgentID; 35 public UUID AgentID;
36 public LLUUID BaseFolder; 36 public UUID BaseFolder;
37 public string CapsPath = String.Empty; 37 public string CapsPath = String.Empty;
38 public bool child; 38 public bool child;
39 public uint circuitcode; 39 public uint circuitcode;
40 public string firstname; 40 public string firstname;
41 public LLUUID InventoryFolder; 41 public UUID InventoryFolder;
42 public string lastname; 42 public string lastname;
43 public LLUUID SecureSessionID; 43 public UUID SecureSessionID;
44 public LLUUID SessionID; 44 public UUID SessionID;
45 public LLVector3 startpos; 45 public Vector3 startpos;
46 46
47 public AgentCircuitData() 47 public AgentCircuitData()
48 { 48 {
@@ -50,16 +50,16 @@ namespace OpenSim.Framework
50 50
51 public AgentCircuitData(sAgentCircuitData cAgent) 51 public AgentCircuitData(sAgentCircuitData cAgent)
52 { 52 {
53 AgentID = new LLUUID(cAgent.AgentID); 53 AgentID = new UUID(cAgent.AgentID);
54 SessionID = new LLUUID(cAgent.SessionID); 54 SessionID = new UUID(cAgent.SessionID);
55 SecureSessionID = new LLUUID(cAgent.SecureSessionID); 55 SecureSessionID = new UUID(cAgent.SecureSessionID);
56 startpos = new LLVector3(cAgent.startposx, cAgent.startposy, cAgent.startposz); 56 startpos = new Vector3(cAgent.startposx, cAgent.startposy, cAgent.startposz);
57 firstname = cAgent.firstname; 57 firstname = cAgent.firstname;
58 lastname = cAgent.lastname; 58 lastname = cAgent.lastname;
59 circuitcode = cAgent.circuitcode; 59 circuitcode = cAgent.circuitcode;
60 child = cAgent.child; 60 child = cAgent.child;
61 InventoryFolder = new LLUUID(cAgent.InventoryFolder); 61 InventoryFolder = new UUID(cAgent.InventoryFolder);
62 BaseFolder = new LLUUID(cAgent.BaseFolder); 62 BaseFolder = new UUID(cAgent.BaseFolder);
63 CapsPath = cAgent.CapsPath; 63 CapsPath = cAgent.CapsPath;
64 } 64 }
65 } 65 }
@@ -87,9 +87,9 @@ namespace OpenSim.Framework
87 87
88 public sAgentCircuitData(AgentCircuitData cAgent) 88 public sAgentCircuitData(AgentCircuitData cAgent)
89 { 89 {
90 AgentID = cAgent.AgentID.UUID; 90 AgentID = cAgent.AgentID.Guid;
91 SessionID = cAgent.SessionID.UUID; 91 SessionID = cAgent.SessionID.Guid;
92 SecureSessionID = cAgent.SecureSessionID.UUID; 92 SecureSessionID = cAgent.SecureSessionID.Guid;
93 startposx = cAgent.startpos.X; 93 startposx = cAgent.startpos.X;
94 startposy = cAgent.startpos.Y; 94 startposy = cAgent.startpos.Y;
95 startposz = cAgent.startpos.Z; 95 startposz = cAgent.startpos.Z;
@@ -97,9 +97,9 @@ namespace OpenSim.Framework
97 lastname = cAgent.lastname; 97 lastname = cAgent.lastname;
98 circuitcode = cAgent.circuitcode; 98 circuitcode = cAgent.circuitcode;
99 child = cAgent.child; 99 child = cAgent.child;
100 InventoryFolder = cAgent.InventoryFolder.UUID; 100 InventoryFolder = cAgent.InventoryFolder.Guid;
101 BaseFolder = cAgent.BaseFolder.UUID; 101 BaseFolder = cAgent.BaseFolder.Guid;
102 CapsPath = cAgent.CapsPath; 102 CapsPath = cAgent.CapsPath;
103 } 103 }
104 } 104 }
105} \ No newline at end of file 105}
diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs
index a235688..96a7816 100644
--- a/OpenSim/Framework/AgentCircuitManager.cs
+++ b/OpenSim/Framework/AgentCircuitManager.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.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -38,7 +38,7 @@ namespace OpenSim.Framework
38 { 38 {
39 } 39 }
40 40
41 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) 41 public virtual AuthenticateResponse AuthenticateSession(UUID sessionID, UUID agentID, uint circuitcode)
42 { 42 {
43 AgentCircuitData validcircuit = null; 43 AgentCircuitData validcircuit = null;
44 if (AgentCircuits.ContainsKey(circuitcode)) 44 if (AgentCircuits.ContainsKey(circuitcode))
@@ -86,9 +86,9 @@ namespace OpenSim.Framework
86 } 86 }
87 } 87 }
88 88
89 public LLVector3 GetPosition(uint circuitCode) 89 public Vector3 GetPosition(uint circuitCode)
90 { 90 {
91 LLVector3 vec = new LLVector3(); 91 Vector3 vec = new Vector3();
92 if (AgentCircuits.ContainsKey(circuitCode)) 92 if (AgentCircuits.ContainsKey(circuitCode))
93 { 93 {
94 vec = AgentCircuits[circuitCode].startpos; 94 vec = AgentCircuits[circuitCode].startpos;
diff --git a/OpenSim/Framework/AgentUpdateArgs.cs b/OpenSim/Framework/AgentUpdateArgs.cs
index 9e83ae1..d9dee13 100644
--- a/OpenSim/Framework/AgentUpdateArgs.cs
+++ b/OpenSim/Framework/AgentUpdateArgs.cs
@@ -1,21 +1,21 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
6 public class AgentUpdateArgs : EventArgs 6 public class AgentUpdateArgs : EventArgs
7 { 7 {
8 public LLUUID AgentID; 8 public UUID AgentID;
9 public LLQuaternion BodyRotation; 9 public Quaternion BodyRotation;
10 public LLVector3 CameraAtAxis; 10 public Vector3 CameraAtAxis;
11 public LLVector3 CameraCenter; 11 public Vector3 CameraCenter;
12 public LLVector3 CameraLeftAxis; 12 public Vector3 CameraLeftAxis;
13 public LLVector3 CameraUpAxis; 13 public Vector3 CameraUpAxis;
14 public uint ControlFlags; 14 public uint ControlFlags;
15 public float Far; 15 public float Far;
16 public byte Flags; 16 public byte Flags;
17 public LLQuaternion HeadRotation; 17 public Quaternion HeadRotation;
18 public LLUUID SessionID; 18 public UUID SessionID;
19 public byte State; 19 public byte State;
20 } 20 }
21} \ No newline at end of file 21}
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 6296067..48ef2ff 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -35,7 +35,7 @@ namespace OpenSim.Framework
35 { 35 {
36 private byte[] _data; 36 private byte[] _data;
37 private string _description = String.Empty; 37 private string _description = String.Empty;
38 private LLUUID _fullid; 38 private UUID _fullid;
39 private bool _local = false; 39 private bool _local = false;
40 private string _name = String.Empty; 40 private string _name = String.Empty;
41 private bool _temporary = false; 41 private bool _temporary = false;
@@ -45,13 +45,13 @@ namespace OpenSim.Framework
45 { 45 {
46 } 46 }
47 47
48 public AssetBase(LLUUID assetId, string name) 48 public AssetBase(UUID assetId, string name)
49 { 49 {
50 FullID = assetId; 50 FullID = assetId;
51 Name = name; 51 Name = name;
52 } 52 }
53 53
54 public virtual LLUUID FullID 54 public virtual UUID FullID
55 { 55 {
56 get { return _fullid; } 56 get { return _fullid; }
57 set { _fullid = value; } 57 set { _fullid = value; }
@@ -60,7 +60,7 @@ namespace OpenSim.Framework
60 public virtual string ID 60 public virtual string ID
61 { 61 {
62 get { return _fullid.ToString(); } 62 get { return _fullid.ToString(); }
63 set { _fullid = new LLUUID(value); } 63 set { _fullid = new UUID(value); }
64 } 64 }
65 65
66 public virtual byte[] Data 66 public virtual byte[] Data
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index 004e472..cf663ee 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -26,15 +26,15 @@
26 */ 26 */
27 27
28using System.Text; 28using System.Text;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
33 public class AssetLandmark : AssetBase 33 public class AssetLandmark : AssetBase
34 { 34 {
35 public LLVector3 Position; 35 public Vector3 Position;
36 public ulong RegionHandle; 36 public ulong RegionHandle;
37 public LLUUID RegionID; 37 public UUID RegionID;
38 public int Version; 38 public int Version;
39 39
40 public AssetLandmark(AssetBase a) 40 public AssetLandmark(AssetBase a)
@@ -52,8 +52,8 @@ namespace OpenSim.Framework
52 string temp = Encoding.UTF8.GetString(Data).Trim(); 52 string temp = Encoding.UTF8.GetString(Data).Trim();
53 string[] parts = temp.Split('\n'); 53 string[] parts = temp.Split('\n');
54 int.TryParse(parts[0].Substring(17, 1), out Version); 54 int.TryParse(parts[0].Substring(17, 1), out Version);
55 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); 55 UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
56 LLVector3.TryParse(parts[2].Substring(10, parts[2].Length - 10), out Position); 56 Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10), out Position);
57 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); 57 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle);
58 } 58 }
59 } 59 }
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 7f0e2d6..73489ec 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.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 Nini.Config; 35using Nini.Config;
36 36
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
46 protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) 46 protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
47 { 47 {
48 AssetBase asset = new AssetBase( 48 AssetBase asset = new AssetBase(
49 new LLUUID(assetIdStr), 49 new UUID(assetIdStr),
50 name 50 name
51 ); 51 );
52 52
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
88 88
89 public void ForEachDefaultXmlAsset(Action<AssetBase> action) 89 public void ForEachDefaultXmlAsset(Action<AssetBase> action)
90 { 90 {
91 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); 91 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.Xml");
92 92
93 ForEachDefaultXmlAsset(assetSetFilename, action); 93 ForEachDefaultXmlAsset(assetSetFilename, action);
94 } 94 }
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
118 } 118 }
119 else 119 else
120 { 120 {
121 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); 121 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.Xml does not exist! No assets loaded.");
122 } 122 }
123 123
124 assets.ForEach(action); 124 assets.ForEach(action);
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
142 142
143 for (int i = 0; i < source.Configs.Count; i++) 143 for (int i = 0; i < source.Configs.Count; i++)
144 { 144 {
145 string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); 145 string assetIdStr = source.Configs[i].GetString("assetID", UUID.Random().ToString());
146 string name = source.Configs[i].GetString("name", String.Empty); 146 string name = source.Configs[i].GetString("name", String.Empty);
147 sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); 147 sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0);
148 string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); 148 string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty));
diff --git a/OpenSim/Framework/AssetRequest.cs b/OpenSim/Framework/AssetRequest.cs
index 71d5298..f6c184a 100644
--- a/OpenSim/Framework/AssetRequest.cs
+++ b/OpenSim/Framework/AssetRequest.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
32 public struct AssetRequest 32 public struct AssetRequest
33 { 33 {
34 public LLUUID AssetID; 34 public UUID AssetID;
35 public bool IsTexture; 35 public bool IsTexture;
36 } 36 }
37} \ No newline at end of file 37}
diff --git a/OpenSim/Framework/AssetRequestToClient.cs b/OpenSim/Framework/AssetRequestToClient.cs
index 916b9f5..2bf3d3e 100644
--- a/OpenSim/Framework/AssetRequestToClient.cs
+++ b/OpenSim/Framework/AssetRequestToClient.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; 31using OpenMetaverse;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
@@ -42,10 +42,10 @@ namespace OpenSim.Framework
42 /// </summary> 42 /// </summary>
43 public class AssetRequestToClient 43 public class AssetRequestToClient
44 { 44 {
45 public LLUUID RequestAssetID; 45 public UUID RequestAssetID;
46 public AssetBase AssetInf; 46 public AssetBase AssetInf;
47 public AssetBase ImageInfo; 47 public AssetBase ImageInfo;
48 public LLUUID TransferRequestID; 48 public UUID TransferRequestID;
49 public long DataPointer = 0; 49 public long DataPointer = 0;
50 public int NumPackets = 0; 50 public int NumPackets = 0;
51 public int PacketCounter = 0; 51 public int PacketCounter = 0;
diff --git a/OpenSim/Framework/AssetStorage.cs b/OpenSim/Framework/AssetStorage.cs
index d58d866..df02a97 100644
--- a/OpenSim/Framework/AssetStorage.cs
+++ b/OpenSim/Framework/AssetStorage.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
@@ -34,15 +34,15 @@ namespace OpenSim.Framework
34 public byte[] Data; 34 public byte[] Data;
35 public string Name; 35 public string Name;
36 public sbyte Type; 36 public sbyte Type;
37 public LLUUID UUID; 37 public UUID UUID;
38 38
39 public AssetStorage() 39 public AssetStorage()
40 { 40 {
41 } 41 }
42 42
43 public AssetStorage(LLUUID assetUUID) 43 public AssetStorage(UUID assetUUID)
44 { 44 {
45 UUID = assetUUID; 45 UUID = assetUUID;
46 } 46 }
47 } 47 }
48} \ No newline at end of file 48}
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index a287201..0c0cfd5 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -30,8 +30,8 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Runtime.Serialization; 31using System.Runtime.Serialization;
32using System.Security.Permissions; 32using System.Security.Permissions;
33using libsecondlife; 33using OpenMetaverse;
34using libsecondlife.Packets; 34using OpenMetaverse.Packets;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
37namespace OpenSim.Framework 37namespace OpenSim.Framework
@@ -58,20 +58,20 @@ namespace OpenSim.Framework
58 58
59 private readonly static int MAX_WEARABLES = 13; 59 private readonly static int MAX_WEARABLES = 13;
60 60
61 private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 61 private static UUID BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
62 private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 62 private static UUID BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
63 private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); 63 private static UUID SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
64 private static LLUUID SKIN_ITEM = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); 64 private static UUID SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
65 private static LLUUID SHIRT_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111110"); 65 private static UUID SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110");
66 private static LLUUID SHIRT_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); 66 private static UUID SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
67 private static LLUUID PANTS_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111120"); 67 private static UUID PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
68 private static LLUUID PANTS_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); 68 private static UUID PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
69 69
70 public readonly static int VISUALPARAM_COUNT = 218; 70 public readonly static int VISUALPARAM_COUNT = 218;
71 71
72 protected LLUUID m_owner; 72 protected UUID m_owner;
73 73
74 public virtual LLUUID Owner 74 public virtual UUID Owner
75 { 75 {
76 get { return m_owner; } 76 get { return m_owner; }
77 set { m_owner = value; } 77 set { m_owner = value; }
@@ -100,107 +100,107 @@ namespace OpenSim.Framework
100 set { m_wearables = value; } 100 set { m_wearables = value; }
101 } 101 }
102 102
103 public virtual LLUUID BodyItem { 103 public virtual UUID BodyItem {
104 get { return m_wearables[BODY].ItemID; } 104 get { return m_wearables[BODY].ItemID; }
105 set { m_wearables[BODY].ItemID = value; } 105 set { m_wearables[BODY].ItemID = value; }
106 } 106 }
107 public virtual LLUUID BodyAsset { 107 public virtual UUID BodyAsset {
108 get { return m_wearables[BODY].AssetID; } 108 get { return m_wearables[BODY].AssetID; }
109 set { m_wearables[BODY].AssetID = value; } 109 set { m_wearables[BODY].AssetID = value; }
110 } 110 }
111 public virtual LLUUID SkinItem { 111 public virtual UUID SkinItem {
112 get { return m_wearables[SKIN].ItemID; } 112 get { return m_wearables[SKIN].ItemID; }
113 set { m_wearables[SKIN].ItemID = value; } 113 set { m_wearables[SKIN].ItemID = value; }
114 } 114 }
115 public virtual LLUUID SkinAsset { 115 public virtual UUID SkinAsset {
116 get { return m_wearables[SKIN].AssetID; } 116 get { return m_wearables[SKIN].AssetID; }
117 set { m_wearables[SKIN].AssetID = value; } 117 set { m_wearables[SKIN].AssetID = value; }
118 } 118 }
119 public virtual LLUUID HairItem { 119 public virtual UUID HairItem {
120 get { return m_wearables[HAIR].ItemID; } 120 get { return m_wearables[HAIR].ItemID; }
121 set { m_wearables[HAIR].ItemID = value; } 121 set { m_wearables[HAIR].ItemID = value; }
122 } 122 }
123 public virtual LLUUID HairAsset { 123 public virtual UUID HairAsset {
124 get { return m_wearables[HAIR].AssetID; } 124 get { return m_wearables[HAIR].AssetID; }
125 set { m_wearables[HAIR].AssetID = value; } 125 set { m_wearables[HAIR].AssetID = value; }
126 } 126 }
127 public virtual LLUUID EyesItem { 127 public virtual UUID EyesItem {
128 get { return m_wearables[EYES].ItemID; } 128 get { return m_wearables[EYES].ItemID; }
129 set { m_wearables[EYES].ItemID = value; } 129 set { m_wearables[EYES].ItemID = value; }
130 } 130 }
131 public virtual LLUUID EyesAsset { 131 public virtual UUID EyesAsset {
132 get { return m_wearables[EYES].AssetID; } 132 get { return m_wearables[EYES].AssetID; }
133 set { m_wearables[EYES].AssetID = value; } 133 set { m_wearables[EYES].AssetID = value; }
134 } 134 }
135 public virtual LLUUID ShirtItem { 135 public virtual UUID ShirtItem {
136 get { return m_wearables[SHIRT].ItemID; } 136 get { return m_wearables[SHIRT].ItemID; }
137 set { m_wearables[SHIRT].ItemID = value; } 137 set { m_wearables[SHIRT].ItemID = value; }
138 } 138 }
139 public virtual LLUUID ShirtAsset { 139 public virtual UUID ShirtAsset {
140 get { return m_wearables[SHIRT].AssetID; } 140 get { return m_wearables[SHIRT].AssetID; }
141 set { m_wearables[SHIRT].AssetID = value; } 141 set { m_wearables[SHIRT].AssetID = value; }
142 } 142 }
143 public virtual LLUUID PantsItem { 143 public virtual UUID PantsItem {
144 get { return m_wearables[PANTS].ItemID; } 144 get { return m_wearables[PANTS].ItemID; }
145 set { m_wearables[PANTS].ItemID = value; } 145 set { m_wearables[PANTS].ItemID = value; }
146 } 146 }
147 public virtual LLUUID PantsAsset { 147 public virtual UUID PantsAsset {
148 get { return m_wearables[PANTS].AssetID; } 148 get { return m_wearables[PANTS].AssetID; }
149 set { m_wearables[PANTS].AssetID = value; } 149 set { m_wearables[PANTS].AssetID = value; }
150 } 150 }
151 public virtual LLUUID ShoesItem { 151 public virtual UUID ShoesItem {
152 get { return m_wearables[SHOES].ItemID; } 152 get { return m_wearables[SHOES].ItemID; }
153 set { m_wearables[SHOES].ItemID = value; } 153 set { m_wearables[SHOES].ItemID = value; }
154 } 154 }
155 public virtual LLUUID ShoesAsset { 155 public virtual UUID ShoesAsset {
156 get { return m_wearables[SHOES].AssetID; } 156 get { return m_wearables[SHOES].AssetID; }
157 set { m_wearables[SHOES].AssetID = value; } 157 set { m_wearables[SHOES].AssetID = value; }
158 } 158 }
159 public virtual LLUUID SocksItem { 159 public virtual UUID SocksItem {
160 get { return m_wearables[SOCKS].ItemID; } 160 get { return m_wearables[SOCKS].ItemID; }
161 set { m_wearables[SOCKS].ItemID = value; } 161 set { m_wearables[SOCKS].ItemID = value; }
162 } 162 }
163 public virtual LLUUID SocksAsset { 163 public virtual UUID SocksAsset {
164 get { return m_wearables[SOCKS].AssetID; } 164 get { return m_wearables[SOCKS].AssetID; }
165 set { m_wearables[SOCKS].AssetID = value; } 165 set { m_wearables[SOCKS].AssetID = value; }
166 } 166 }
167 public virtual LLUUID JacketItem { 167 public virtual UUID JacketItem {
168 get { return m_wearables[JACKET].ItemID; } 168 get { return m_wearables[JACKET].ItemID; }
169 set { m_wearables[JACKET].ItemID = value; } 169 set { m_wearables[JACKET].ItemID = value; }
170 } 170 }
171 public virtual LLUUID JacketAsset { 171 public virtual UUID JacketAsset {
172 get { return m_wearables[JACKET].AssetID; } 172 get { return m_wearables[JACKET].AssetID; }
173 set { m_wearables[JACKET].AssetID = value; } 173 set { m_wearables[JACKET].AssetID = value; }
174 } 174 }
175 public virtual LLUUID GlovesItem { 175 public virtual UUID GlovesItem {
176 get { return m_wearables[GLOVES].ItemID; } 176 get { return m_wearables[GLOVES].ItemID; }
177 set { m_wearables[GLOVES].ItemID = value; } 177 set { m_wearables[GLOVES].ItemID = value; }
178 } 178 }
179 public virtual LLUUID GlovesAsset { 179 public virtual UUID GlovesAsset {
180 get { return m_wearables[GLOVES].AssetID; } 180 get { return m_wearables[GLOVES].AssetID; }
181 set { m_wearables[GLOVES].AssetID = value; } 181 set { m_wearables[GLOVES].AssetID = value; }
182 } 182 }
183 public virtual LLUUID UnderShirtItem { 183 public virtual UUID UnderShirtItem {
184 get { return m_wearables[UNDERSHIRT].ItemID; } 184 get { return m_wearables[UNDERSHIRT].ItemID; }
185 set { m_wearables[UNDERSHIRT].ItemID = value; } 185 set { m_wearables[UNDERSHIRT].ItemID = value; }
186 } 186 }
187 public virtual LLUUID UnderShirtAsset { 187 public virtual UUID UnderShirtAsset {
188 get { return m_wearables[UNDERSHIRT].AssetID; } 188 get { return m_wearables[UNDERSHIRT].AssetID; }
189 set { m_wearables[UNDERSHIRT].AssetID = value; } 189 set { m_wearables[UNDERSHIRT].AssetID = value; }
190 } 190 }
191 public virtual LLUUID UnderPantsItem { 191 public virtual UUID UnderPantsItem {
192 get { return m_wearables[UNDERPANTS].ItemID; } 192 get { return m_wearables[UNDERPANTS].ItemID; }
193 set { m_wearables[UNDERPANTS].ItemID = value; } 193 set { m_wearables[UNDERPANTS].ItemID = value; }
194 } 194 }
195 public virtual LLUUID UnderPantsAsset { 195 public virtual UUID UnderPantsAsset {
196 get { return m_wearables[UNDERPANTS].AssetID; } 196 get { return m_wearables[UNDERPANTS].AssetID; }
197 set { m_wearables[UNDERPANTS].AssetID = value; } 197 set { m_wearables[UNDERPANTS].AssetID = value; }
198 } 198 }
199 public virtual LLUUID SkirtItem { 199 public virtual UUID SkirtItem {
200 get { return m_wearables[SKIRT].ItemID; } 200 get { return m_wearables[SKIRT].ItemID; }
201 set { m_wearables[SKIRT].ItemID = value; } 201 set { m_wearables[SKIRT].ItemID = value; }
202 } 202 }
203 public virtual LLUUID SkirtAsset { 203 public virtual UUID SkirtAsset {
204 get { return m_wearables[SKIRT].AssetID; } 204 get { return m_wearables[SKIRT].AssetID; }
205 set { m_wearables[SKIRT].AssetID = value; } 205 set { m_wearables[SKIRT].AssetID = value; }
206 } 206 }
@@ -217,9 +217,9 @@ namespace OpenSim.Framework
217 m_wearables[PANTS].ItemID = PANTS_ITEM; 217 m_wearables[PANTS].ItemID = PANTS_ITEM;
218 } 218 }
219 219
220 protected LLObject.TextureEntry m_texture; 220 protected Primitive.TextureEntry m_texture;
221 221
222 public virtual LLObject.TextureEntry Texture 222 public virtual Primitive.TextureEntry Texture
223 { 223 {
224 get { return m_texture; } 224 get { return m_texture; }
225 set { m_texture = value; } 225 set { m_texture = value; }
@@ -242,13 +242,13 @@ namespace OpenSim.Framework
242 m_wearables[i] = new AvatarWearable(); 242 m_wearables[i] = new AvatarWearable();
243 } 243 }
244 m_serial = 0; 244 m_serial = 0;
245 m_owner = LLUUID.Zero; 245 m_owner = UUID.Zero;
246 m_visualparams = new byte[VISUALPARAM_COUNT]; 246 m_visualparams = new byte[VISUALPARAM_COUNT];
247 SetDefaultWearables(); 247 SetDefaultWearables();
248 m_texture = GetDefaultTexture(); 248 m_texture = GetDefaultTexture();
249 } 249 }
250 250
251 public AvatarAppearance(LLUUID avatarID, AvatarWearable[] wearables, byte[] visualParams) 251 public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
252 { 252 {
253 m_owner = avatarID; 253 m_owner = avatarID;
254 m_serial = 1; 254 m_serial = 1;
@@ -264,7 +264,7 @@ namespace OpenSim.Framework
264 /// <param name="visualParam"></param> 264 /// <param name="visualParam"></param>
265 public virtual void SetAppearance(byte[] texture, List<byte> visualParam) 265 public virtual void SetAppearance(byte[] texture, List<byte> visualParam)
266 { 266 {
267 LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length); 267 Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
268 m_texture = textureEnt; 268 m_texture = textureEnt;
269 269
270 m_visualparams = visualParam.ToArray(); 270 m_visualparams = visualParam.ToArray();
@@ -281,16 +281,16 @@ namespace OpenSim.Framework
281 m_wearables[wearableId] = wearable; 281 m_wearables[wearableId] = wearable;
282 } 282 }
283 283
284 public static LLObject.TextureEntry GetDefaultTexture() 284 public static Primitive.TextureEntry GetDefaultTexture()
285 { 285 {
286 LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); 286 Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
287 textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); 287 textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012");
288 textu.CreateFace(1).TextureID = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); 288 textu.CreateFace(1).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
289 textu.CreateFace(2).TextureID = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); 289 textu.CreateFace(2).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
290 textu.CreateFace(3).TextureID = new LLUUID("6522E74D-1660-4E7F-B601-6F48C1659A77"); 290 textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77");
291 textu.CreateFace(4).TextureID = new LLUUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B"); 291 textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B");
292 textu.CreateFace(5).TextureID = new LLUUID("00000000-0000-1111-9999-000000000010"); 292 textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010");
293 textu.CreateFace(6).TextureID = new LLUUID("00000000-0000-1111-9999-000000000011"); 293 textu.CreateFace(6).TextureID = new UUID("00000000-0000-1111-9999-000000000011");
294 return textu; 294 return textu;
295 } 295 }
296 296
@@ -313,13 +313,13 @@ namespace OpenSim.Framework
313 throw new ArgumentNullException("info"); 313 throw new ArgumentNullException("info");
314 } 314 }
315 315
316 m_owner = new LLUUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid))); 316 m_owner = new UUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid)));
317 m_serial = (int)info.GetValue("m_wearablesSerial", typeof(int)); 317 m_serial = (int)info.GetValue("m_wearablesSerial", typeof(int));
318 m_visualparams = (byte[])info.GetValue("m_visualParams", typeof(byte[])); 318 m_visualparams = (byte[])info.GetValue("m_visualParams", typeof(byte[]));
319 m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[])); 319 m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[]));
320 320
321 byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[])); 321 byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[]));
322 m_texture = new LLObject.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length); 322 m_texture = new Primitive.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length);
323 323
324 m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float)); 324 m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float));
325 325
@@ -371,10 +371,10 @@ namespace OpenSim.Framework
371 371
372 public AvatarAppearance(Hashtable h) 372 public AvatarAppearance(Hashtable h)
373 { 373 {
374 Owner = new LLUUID((string)h["owner"]); 374 Owner = new UUID((string)h["owner"]);
375 Serial = Convert.ToInt32((string)h["serial"]); 375 Serial = Convert.ToInt32((string)h["serial"]);
376 VisualParams = (byte[])h["visual_params"]; 376 VisualParams = (byte[])h["visual_params"];
377 Texture = new LLObject.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length); 377 Texture = new Primitive.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length);
378 AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); 378 AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]);
379 379
380 m_wearables = new AvatarWearable[MAX_WEARABLES]; 380 m_wearables = new AvatarWearable[MAX_WEARABLES];
@@ -384,32 +384,32 @@ namespace OpenSim.Framework
384 m_wearables[i] = new AvatarWearable(); 384 m_wearables[i] = new AvatarWearable();
385 } 385 }
386 386
387 BodyItem = new LLUUID((string)h["body_item"]); 387 BodyItem = new UUID((string)h["body_item"]);
388 BodyAsset = new LLUUID((string)h["body_asset"]); 388 BodyAsset = new UUID((string)h["body_asset"]);
389 SkinItem = new LLUUID((string)h["skin_item"]); 389 SkinItem = new UUID((string)h["skin_item"]);
390 SkinAsset = new LLUUID((string)h["skin_asset"]); 390 SkinAsset = new UUID((string)h["skin_asset"]);
391 HairItem = new LLUUID((string)h["hair_item"]); 391 HairItem = new UUID((string)h["hair_item"]);
392 HairAsset = new LLUUID((string)h["hair_asset"]); 392 HairAsset = new UUID((string)h["hair_asset"]);
393 EyesItem = new LLUUID((string)h["eyes_item"]); 393 EyesItem = new UUID((string)h["eyes_item"]);
394 EyesAsset = new LLUUID((string)h["eyes_asset"]); 394 EyesAsset = new UUID((string)h["eyes_asset"]);
395 ShirtItem = new LLUUID((string)h["shirt_item"]); 395 ShirtItem = new UUID((string)h["shirt_item"]);
396 ShirtAsset = new LLUUID((string)h["shirt_asset"]); 396 ShirtAsset = new UUID((string)h["shirt_asset"]);
397 PantsItem = new LLUUID((string)h["pants_item"]); 397 PantsItem = new UUID((string)h["pants_item"]);
398 PantsAsset = new LLUUID((string)h["pants_asset"]); 398 PantsAsset = new UUID((string)h["pants_asset"]);
399 ShoesItem = new LLUUID((string)h["shoes_item"]); 399 ShoesItem = new UUID((string)h["shoes_item"]);
400 ShoesAsset = new LLUUID((string)h["shoes_asset"]); 400 ShoesAsset = new UUID((string)h["shoes_asset"]);
401 SocksItem = new LLUUID((string)h["socks_item"]); 401 SocksItem = new UUID((string)h["socks_item"]);
402 SocksAsset = new LLUUID((string)h["socks_asset"]); 402 SocksAsset = new UUID((string)h["socks_asset"]);
403 JacketItem = new LLUUID((string)h["jacket_item"]); 403 JacketItem = new UUID((string)h["jacket_item"]);
404 JacketAsset = new LLUUID((string)h["jacket_asset"]); 404 JacketAsset = new UUID((string)h["jacket_asset"]);
405 GlovesItem = new LLUUID((string)h["gloves_item"]); 405 GlovesItem = new UUID((string)h["gloves_item"]);
406 GlovesAsset = new LLUUID((string)h["gloves_asset"]); 406 GlovesAsset = new UUID((string)h["gloves_asset"]);
407 UnderShirtItem = new LLUUID((string)h["undershirt_item"]); 407 UnderShirtItem = new UUID((string)h["undershirt_item"]);
408 UnderShirtAsset = new LLUUID((string)h["undershirt_asset"]); 408 UnderShirtAsset = new UUID((string)h["undershirt_asset"]);
409 UnderPantsItem = new LLUUID((string)h["underpants_item"]); 409 UnderPantsItem = new UUID((string)h["underpants_item"]);
410 UnderPantsAsset = new LLUUID((string)h["underpants_asset"]); 410 UnderPantsAsset = new UUID((string)h["underpants_asset"]);
411 SkirtItem = new LLUUID((string)h["skirt_item"]); 411 SkirtItem = new UUID((string)h["skirt_item"]);
412 SkirtAsset = new LLUUID((string)h["skirt_asset"]); 412 SkirtAsset = new UUID((string)h["skirt_asset"]);
413 413
414 if (h.ContainsKey("attachments")) 414 if (h.ContainsKey("attachments"))
415 { 415 {
@@ -427,7 +427,7 @@ namespace OpenSim.Framework
427 throw new ArgumentNullException("info"); 427 throw new ArgumentNullException("info");
428 } 428 }
429 429
430 info.AddValue("m_scenePresenceID", m_owner.UUID); 430 info.AddValue("m_scenePresenceID", m_owner.Guid);
431 info.AddValue("m_wearablesSerial", m_serial); 431 info.AddValue("m_wearablesSerial", m_serial);
432 info.AddValue("m_visualParams", m_visualparams); 432 info.AddValue("m_visualParams", m_visualparams);
433 info.AddValue("m_wearables", m_wearables); 433 info.AddValue("m_wearables", m_wearables);
@@ -435,7 +435,7 @@ namespace OpenSim.Framework
435 info.AddValue("m_avatarHeight", m_avatarHeight); 435 info.AddValue("m_avatarHeight", m_avatarHeight);
436 } 436 }
437 437
438 private Dictionary<int, LLUUID[]> m_attachments = new Dictionary<int, LLUUID[]>(); 438 private Dictionary<int, UUID[]> m_attachments = new Dictionary<int, UUID[]>();
439 439
440 public void SetAttachments(Hashtable data) 440 public void SetAttachments(Hashtable data)
441 { 441 {
@@ -451,14 +451,14 @@ namespace OpenSim.Framework
451 if (m_attachments.ContainsKey(attachpoint)) 451 if (m_attachments.ContainsKey(attachpoint))
452 continue; 452 continue;
453 453
454 LLUUID item; 454 UUID item;
455 LLUUID asset; 455 UUID asset;
456 456
457 Hashtable uuids = (Hashtable) e.Value; 457 Hashtable uuids = (Hashtable) e.Value;
458 LLUUID.TryParse(uuids["item"].ToString(), out item); 458 UUID.TryParse(uuids["item"].ToString(), out item);
459 LLUUID.TryParse(uuids["asset"].ToString(), out asset); 459 UUID.TryParse(uuids["asset"].ToString(), out asset);
460 460
461 LLUUID[] attachment = new LLUUID[2]; 461 UUID[] attachment = new UUID[2];
462 attachment[0] = item; 462 attachment[0] = item;
463 attachment[1] = asset; 463 attachment[1] = asset;
464 464
@@ -473,10 +473,10 @@ namespace OpenSim.Framework
473 473
474 Hashtable ret = new Hashtable(); 474 Hashtable ret = new Hashtable();
475 475
476 foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments) 476 foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
477 { 477 {
478 int attachpoint = kvp.Key; 478 int attachpoint = kvp.Key;
479 LLUUID[] uuids = kvp.Value; 479 UUID[] uuids = kvp.Value;
480 480
481 Hashtable data = new Hashtable(); 481 Hashtable data = new Hashtable();
482 data["item"] = uuids[0].ToString(); 482 data["item"] = uuids[0].ToString();
@@ -493,28 +493,28 @@ namespace OpenSim.Framework
493 return new List<int>(m_attachments.Keys); 493 return new List<int>(m_attachments.Keys);
494 } 494 }
495 495
496 public LLUUID GetAttachedItem(int attachpoint) 496 public UUID GetAttachedItem(int attachpoint)
497 { 497 {
498 if (!m_attachments.ContainsKey(attachpoint)) 498 if (!m_attachments.ContainsKey(attachpoint))
499 return LLUUID.Zero; 499 return UUID.Zero;
500 500
501 return m_attachments[attachpoint][0]; 501 return m_attachments[attachpoint][0];
502 } 502 }
503 503
504 public LLUUID GetAttachedAsset(int attachpoint) 504 public UUID GetAttachedAsset(int attachpoint)
505 { 505 {
506 if (!m_attachments.ContainsKey(attachpoint)) 506 if (!m_attachments.ContainsKey(attachpoint))
507 return LLUUID.Zero; 507 return UUID.Zero;
508 508
509 return m_attachments[attachpoint][1]; 509 return m_attachments[attachpoint][1];
510 } 510 }
511 511
512 public void SetAttachment(int attachpoint, LLUUID item, LLUUID asset) 512 public void SetAttachment(int attachpoint, UUID item, UUID asset)
513 { 513 {
514 if (attachpoint == 0) 514 if (attachpoint == 0)
515 return; 515 return;
516 516
517 if (item == LLUUID.Zero) 517 if (item == UUID.Zero)
518 { 518 {
519 if (m_attachments.ContainsKey(attachpoint)) 519 if (m_attachments.ContainsKey(attachpoint))
520 m_attachments.Remove(attachpoint); 520 m_attachments.Remove(attachpoint);
@@ -522,15 +522,15 @@ namespace OpenSim.Framework
522 } 522 }
523 523
524 if (!m_attachments.ContainsKey(attachpoint)) 524 if (!m_attachments.ContainsKey(attachpoint))
525 m_attachments[attachpoint] = new LLUUID[2]; 525 m_attachments[attachpoint] = new UUID[2];
526 526
527 m_attachments[attachpoint][0] = item; 527 m_attachments[attachpoint][0] = item;
528 m_attachments[attachpoint][1] = asset; 528 m_attachments[attachpoint][1] = asset;
529 } 529 }
530 530
531 public int GetAttachpoint(LLUUID itemID) 531 public int GetAttachpoint(UUID itemID)
532 { 532 {
533 foreach (KeyValuePair<int, LLUUID[]> kvp in m_attachments) 533 foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
534 { 534 {
535 if (kvp.Value[0] == itemID) 535 if (kvp.Value[0] == itemID)
536 { 536 {
@@ -540,7 +540,7 @@ namespace OpenSim.Framework
540 return 0; 540 return 0;
541 } 541 }
542 542
543 public void DetachAttachment(LLUUID itemID) 543 public void DetachAttachment(UUID itemID)
544 { 544 {
545 int attachpoint = GetAttachpoint(itemID); 545 int attachpoint = GetAttachpoint(itemID);
546 546
@@ -552,7 +552,7 @@ namespace OpenSim.Framework
552 { 552 {
553 List<string> strings = new List<string>(); 553 List<string> strings = new List<string>();
554 554
555 foreach (KeyValuePair<int, LLUUID[]> e in m_attachments) 555 foreach (KeyValuePair<int, UUID[]> e in m_attachments)
556 { 556 {
557 strings.Add(e.Key.ToString()); 557 strings.Add(e.Key.ToString());
558 strings.Add(e.Value[0].ToString()); 558 strings.Add(e.Value[0].ToString());
@@ -572,13 +572,13 @@ namespace OpenSim.Framework
572 while (strings.Length - i > 2) 572 while (strings.Length - i > 2)
573 { 573 {
574 int attachpoint = Int32.Parse(strings[i]); 574 int attachpoint = Int32.Parse(strings[i]);
575 LLUUID item = new LLUUID(strings[i+1]); 575 UUID item = new UUID(strings[i+1]);
576 LLUUID asset = new LLUUID(strings[i+2]); 576 UUID asset = new UUID(strings[i+2]);
577 i += 3; 577 i += 3;
578 578
579 if (!m_attachments.ContainsKey(attachpoint)) 579 if (!m_attachments.ContainsKey(attachpoint))
580 { 580 {
581 m_attachments[attachpoint] = new LLUUID[2]; 581 m_attachments[attachpoint] = new UUID[2];
582 m_attachments[attachpoint][0] = item; 582 m_attachments[attachpoint][0] = item;
583 m_attachments[attachpoint][1] = asset; 583 m_attachments[attachpoint][1] = asset;
584 } 584 }
diff --git a/OpenSim/Framework/AvatarPickerAvatar.cs b/OpenSim/Framework/AvatarPickerAvatar.cs
index a7e986f..8aa4aa6 100644
--- a/OpenSim/Framework/AvatarPickerAvatar.cs
+++ b/OpenSim/Framework/AvatarPickerAvatar.cs
@@ -25,14 +25,14 @@
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.Framework 30namespace OpenSim.Framework
31{ 31{
32 public class AvatarPickerAvatar 32 public class AvatarPickerAvatar
33 { 33 {
34 public LLUUID AvatarID; 34 public UUID AvatarID;
35 public string firstName; 35 public string firstName;
36 public string lastName; 36 public string lastName;
37 } 37 }
38} \ No newline at end of file 38}
diff --git a/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs b/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs
index 5fb06eb..04ed570 100644
--- a/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs
+++ b/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs
@@ -1,11 +1,11 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
6 public class AvatarPickerReplyAgentDataArgs : EventArgs 6 public class AvatarPickerReplyAgentDataArgs : EventArgs
7 { 7 {
8 public LLUUID AgentID; 8 public UUID AgentID;
9 public LLUUID QueryID; 9 public UUID QueryID;
10 } 10 }
11} \ No newline at end of file 11}
diff --git a/OpenSim/Framework/AvatarPickerReplyDataArgs.cs b/OpenSim/Framework/AvatarPickerReplyDataArgs.cs
index b15e4a5..723732b 100644
--- a/OpenSim/Framework/AvatarPickerReplyDataArgs.cs
+++ b/OpenSim/Framework/AvatarPickerReplyDataArgs.cs
@@ -1,12 +1,12 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
6 public class AvatarPickerReplyDataArgs : EventArgs 6 public class AvatarPickerReplyDataArgs : EventArgs
7 { 7 {
8 public LLUUID AvatarID; 8 public UUID AvatarID;
9 public byte[] FirstName; 9 public byte[] FirstName;
10 public byte[] LastName; 10 public byte[] LastName;
11 } 11 }
12} \ No newline at end of file 12}
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index fdcc776..59e6a1b 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -28,21 +28,21 @@
28using System; 28using System;
29using System.Runtime.Serialization; 29using System.Runtime.Serialization;
30using System.Security.Permissions; 30using System.Security.Permissions;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 [Serializable] 35 [Serializable]
36 public class AvatarWearable : ISerializable 36 public class AvatarWearable : ISerializable
37 { 37 {
38 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); 38 public UUID AssetID = new UUID("00000000-0000-0000-0000-000000000000");
39 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); 39 public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
40 40
41 public AvatarWearable() 41 public AvatarWearable()
42 { 42 {
43 } 43 }
44 44
45 public AvatarWearable(LLUUID itemId, LLUUID assetId) 45 public AvatarWearable(UUID itemId, UUID assetId)
46 { 46 {
47 AssetID = assetId; 47 AssetID = assetId;
48 ItemID = itemId; 48 ItemID = itemId;
@@ -56,8 +56,8 @@ namespace OpenSim.Framework
56 throw new ArgumentNullException("info"); 56 throw new ArgumentNullException("info");
57 } 57 }
58 58
59 AssetID = new LLUUID((Guid) info.GetValue("AssetID", typeof (Guid))); 59 AssetID = new UUID((Guid) info.GetValue("AssetID", typeof (Guid)));
60 ItemID = new LLUUID((Guid) info.GetValue("ItemID", typeof (Guid))); 60 ItemID = new UUID((Guid) info.GetValue("ItemID", typeof (Guid)));
61 61
62 //System.Console.WriteLine("AvatarWearable Deserialize END"); 62 //System.Console.WriteLine("AvatarWearable Deserialize END");
63 } 63 }
@@ -71,17 +71,17 @@ namespace OpenSim.Framework
71 { 71 {
72 defaultWearables[i] = new AvatarWearable(); 72 defaultWearables[i] = new AvatarWearable();
73 } 73 }
74 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 74 defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
75 defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 75 defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
76 76
77 defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); 77 defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
78 defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); 78 defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
79 79
80 defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); 80 defaultWearables[4].ItemID = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
81 defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); 81 defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110");
82 82
83 defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); 83 defaultWearables[5].ItemID = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
84 defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); 84 defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120");
85 return defaultWearables; 85 return defaultWearables;
86 } 86 }
87 } 87 }
@@ -98,10 +98,10 @@ namespace OpenSim.Framework
98 throw new ArgumentNullException("info"); 98 throw new ArgumentNullException("info");
99 } 99 }
100 100
101 info.AddValue("AssetID", AssetID.UUID); 101 info.AddValue("AssetID", AssetID.Guid);
102 info.AddValue("ItemID", ItemID.UUID); 102 info.AddValue("ItemID", ItemID.Guid);
103 } 103 }
104 104
105 #endregion 105 #endregion
106 } 106 }
107} \ No newline at end of file 107}
diff --git a/OpenSim/Framework/AvatarWearingArgs.cs b/OpenSim/Framework/AvatarWearingArgs.cs
index e85df1c..dde74f9 100644
--- a/OpenSim/Framework/AvatarWearingArgs.cs
+++ b/OpenSim/Framework/AvatarWearingArgs.cs
@@ -1,6 +1,6 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using libsecondlife; 3using OpenMetaverse;
4 4
5namespace OpenSim.Framework 5namespace OpenSim.Framework
6{ 6{
@@ -21,10 +21,10 @@ namespace OpenSim.Framework
21 21
22 public class Wearable 22 public class Wearable
23 { 23 {
24 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); 24 public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
25 public byte Type = 0; 25 public byte Type = 0;
26 26
27 public Wearable(LLUUID itemId, byte type) 27 public Wearable(UUID itemId, byte type)
28 { 28 {
29 ItemID = itemId; 29 ItemID = itemId;
30 Type = type; 30 Type = type;
@@ -33,4 +33,4 @@ namespace OpenSim.Framework
33 33
34 #endregion 34 #endregion
35 } 35 }
36} \ No newline at end of file 36}
diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs
index 427072d..261e0f9 100644
--- a/OpenSim/Framework/Cache.cs
+++ b/OpenSim/Framework/Cache.cs
@@ -1,13 +1,13 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using libsecondlife; 3using OpenMetaverse;
4 4
5namespace Opensim.Framework 5namespace Opensim.Framework
6{ 6{
7 // The delegate we will use for performing fetch from backing store 7 // The delegate we will use for performing fetch from backing store
8 // 8 //
9 public delegate Object FetchDelegate(LLUUID index); 9 public delegate Object FetchDelegate(UUID index);
10 public delegate bool ExpireDelegate(LLUUID index); 10 public delegate bool ExpireDelegate(UUID index);
11 11
12 // Strategy 12 // Strategy
13 // 13 //
@@ -37,14 +37,14 @@ namespace Opensim.Framework
37 } 37 }
38 38
39 // The base class of all cache objects. Implements comparison and sorting 39 // The base class of all cache objects. Implements comparison and sorting
40 // by the LLUUID member. 40 // by the UUID member.
41 // 41 //
42 // This is not abstract because we need to instantiate it briefly as a 42 // This is not abstract because we need to instantiate it briefly as a
43 // method parameter 43 // method parameter
44 // 44 //
45 public class CacheItemBase : IEquatable<CacheItemBase>, IComparable<CacheItemBase> 45 public class CacheItemBase : IEquatable<CacheItemBase>, IComparable<CacheItemBase>
46 { 46 {
47 public LLUUID uuid; 47 public UUID uuid;
48 public DateTime entered; 48 public DateTime entered;
49 public DateTime lastUsed; 49 public DateTime lastUsed;
50 public DateTime expires = new DateTime(0); 50 public DateTime expires = new DateTime(0);
@@ -59,14 +59,14 @@ namespace Opensim.Framework
59 { 59 {
60 } 60 }
61 61
62 public CacheItemBase(LLUUID index) 62 public CacheItemBase(UUID index)
63 { 63 {
64 uuid = index; 64 uuid = index;
65 entered = DateTime.Now; 65 entered = DateTime.Now;
66 lastUsed = entered; 66 lastUsed = entered;
67 } 67 }
68 68
69 public CacheItemBase(LLUUID index, DateTime ttl) 69 public CacheItemBase(UUID index, DateTime ttl)
70 { 70 {
71 uuid = index; 71 uuid = index;
72 entered = DateTime.Now; 72 entered = DateTime.Now;
@@ -96,23 +96,23 @@ namespace Opensim.Framework
96 { 96 {
97 private Object m_Data; 97 private Object m_Data;
98 98
99 public MemoryCacheItem(LLUUID index) : 99 public MemoryCacheItem(UUID index) :
100 base(index) 100 base(index)
101 { 101 {
102 } 102 }
103 103
104 public MemoryCacheItem(LLUUID index, DateTime ttl) : 104 public MemoryCacheItem(UUID index, DateTime ttl) :
105 base(index, ttl) 105 base(index, ttl)
106 { 106 {
107 } 107 }
108 108
109 public MemoryCacheItem(LLUUID index, Object data) : 109 public MemoryCacheItem(UUID index, Object data) :
110 base(index) 110 base(index)
111 { 111 {
112 Store(data); 112 Store(data);
113 } 113 }
114 114
115 public MemoryCacheItem(LLUUID index, DateTime ttl, Object data) : 115 public MemoryCacheItem(UUID index, DateTime ttl, Object data) :
116 base(index, ttl) 116 base(index, ttl)
117 { 117 {
118 Store(data); 118 Store(data);
@@ -133,23 +133,23 @@ namespace Opensim.Framework
133 // 133 //
134 public class FileCacheItem : CacheItemBase 134 public class FileCacheItem : CacheItemBase
135 { 135 {
136 public FileCacheItem(LLUUID index) : 136 public FileCacheItem(UUID index) :
137 base(index) 137 base(index)
138 { 138 {
139 } 139 }
140 140
141 public FileCacheItem(LLUUID index, DateTime ttl) : 141 public FileCacheItem(UUID index, DateTime ttl) :
142 base(index, ttl) 142 base(index, ttl)
143 { 143 {
144 } 144 }
145 145
146 public FileCacheItem(LLUUID index, Object data) : 146 public FileCacheItem(UUID index, Object data) :
147 base(index) 147 base(index)
148 { 148 {
149 Store(data); 149 Store(data);
150 } 150 }
151 151
152 public FileCacheItem(LLUUID index, DateTime ttl, Object data) : 152 public FileCacheItem(UUID index, DateTime ttl, Object data) :
153 base(index, ttl) 153 base(index, ttl)
154 { 154 {
155 Store(data); 155 Store(data);
@@ -173,8 +173,8 @@ namespace Opensim.Framework
173 public class Cache 173 public class Cache
174 { 174 {
175 private List<CacheItemBase> m_Index = new List<CacheItemBase>(); 175 private List<CacheItemBase> m_Index = new List<CacheItemBase>();
176 private Dictionary<LLUUID, CacheItemBase> m_Lookup = 176 private Dictionary<UUID, CacheItemBase> m_Lookup =
177 new Dictionary<LLUUID, CacheItemBase>(); 177 new Dictionary<UUID, CacheItemBase>();
178 178
179 private CacheStrategy m_Strategy; 179 private CacheStrategy m_Strategy;
180 private CacheMedium m_Medium; 180 private CacheMedium m_Medium;
@@ -285,7 +285,7 @@ namespace Opensim.Framework
285 285
286 // Get an item from cache. Return the raw item, not it's data 286 // Get an item from cache. Return the raw item, not it's data
287 // 287 //
288 protected virtual CacheItemBase GetItem(LLUUID index) 288 protected virtual CacheItemBase GetItem(UUID index)
289 { 289 {
290 CacheItemBase item = null; 290 CacheItemBase item = null;
291 291
@@ -312,7 +312,7 @@ namespace Opensim.Framework
312 // Get an item from cache. Do not try to fetch from source if not 312 // Get an item from cache. Do not try to fetch from source if not
313 // present. Just return null 313 // present. Just return null
314 // 314 //
315 public virtual Object Get(LLUUID index) 315 public virtual Object Get(UUID index)
316 { 316 {
317 CacheItemBase item = GetItem(index); 317 CacheItemBase item = GetItem(index);
318 318
@@ -325,7 +325,7 @@ namespace Opensim.Framework
325 // Fetch an object from backing store if not cached, serve from 325 // Fetch an object from backing store if not cached, serve from
326 // cache if it is. 326 // cache if it is.
327 // 327 //
328 public virtual Object Get(LLUUID index, FetchDelegate fetch) 328 public virtual Object Get(UUID index, FetchDelegate fetch)
329 { 329 {
330 Object item = Get(index); 330 Object item = Get(index);
331 if (item != null) 331 if (item != null)
@@ -366,7 +366,7 @@ namespace Opensim.Framework
366 return item.Retrieve(); 366 return item.Retrieve();
367 } 367 }
368 368
369 public virtual void Store(LLUUID index, Object data) 369 public virtual void Store(UUID index, Object data)
370 { 370 {
371 Type container; 371 Type container;
372 372
@@ -384,12 +384,12 @@ namespace Opensim.Framework
384 Store(index, data, container); 384 Store(index, data, container);
385 } 385 }
386 386
387 public virtual void Store(LLUUID index, Object data, Type container) 387 public virtual void Store(UUID index, Object data, Type container)
388 { 388 {
389 Store(index, data, container, new Object[] { index }); 389 Store(index, data, container, new Object[] { index });
390 } 390 }
391 391
392 public virtual void Store(LLUUID index, Object data, Type container, 392 public virtual void Store(UUID index, Object data, Type container,
393 Object[] parameters) 393 Object[] parameters)
394 { 394 {
395 Expire(false); 395 Expire(false);
@@ -493,7 +493,7 @@ namespace Opensim.Framework
493 } 493 }
494 } 494 }
495 495
496 public void Invalidate(LLUUID uuid) 496 public void Invalidate(UUID uuid)
497 { 497 {
498 if (!m_Lookup.ContainsKey(uuid)) 498 if (!m_Lookup.ContainsKey(uuid))
499 return; 499 return;
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 423a208..ef40d94 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using OpenMetaverse;
29 30
30namespace OpenSim.Framework 31namespace OpenSim.Framework
31{ 32{
@@ -36,17 +37,17 @@ namespace OpenSim.Framework
36 public Guid AgentID; 37 public Guid AgentID;
37 public bool alwaysrun; 38 public bool alwaysrun;
38 public float AVHeight; 39 public float AVHeight;
39 public sLLVector3 cameraPosition; 40 public Vector3 cameraPosition;
40 public float drawdistance; 41 public float drawdistance;
41 public float godlevel; 42 public float godlevel;
42 public uint GroupAccess; 43 public uint GroupAccess;
43 public sLLVector3 Position; 44 public Vector3 Position;
44 public ulong regionHandle; 45 public ulong regionHandle;
45 public byte[] throttles; 46 public byte[] throttles;
46 public sLLVector3 Velocity; 47 public Vector3 Velocity;
47 48
48 public ChildAgentDataUpdate() 49 public ChildAgentDataUpdate()
49 { 50 {
50 } 51 }
51 } 52 }
52} \ No newline at end of file 53}
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 091f308..e99001b 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
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;
34 34
35namespace OpenSim.Framework 35namespace OpenSim.Framework
@@ -117,7 +117,7 @@ namespace OpenSim.Framework
117 } 117 }
118 } 118 }
119 119
120 public void CloseAllCircuits(LLUUID agentId) 120 public void CloseAllCircuits(UUID agentId)
121 { 121 {
122 uint[] circuits = GetAllCircuits(agentId); 122 uint[] circuits = GetAllCircuits(agentId);
123 // We're using a for loop here so changes to the circuits don't cause it to completely fail. 123 // We're using a for loop here so changes to the circuits don't cause it to completely fail.
@@ -144,7 +144,7 @@ namespace OpenSim.Framework
144 } 144 }
145 145
146 // [Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")] 146 // [Obsolete("Using Obsolete to drive development is invalid. Obsolete presumes that something new has already been created to replace this.")]
147 public uint[] GetAllCircuits(LLUUID agentId) 147 public uint[] GetAllCircuits(UUID agentId)
148 { 148 {
149 List<uint> circuits = new List<uint>(); 149 List<uint> circuits = new List<uint>();
150 // Wasteful, I know 150 // Wasteful, I know
diff --git a/OpenSim/Framework/ColliderData.cs b/OpenSim/Framework/ColliderData.cs
index 075a4e0..4e94d6d 100644
--- a/OpenSim/Framework/ColliderData.cs
+++ b/OpenSim/Framework/ColliderData.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using libsecondlife; 30using OpenMetaverse;
31using System.Collections.Generic; 31using System.Collections.Generic;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
@@ -35,12 +35,12 @@ namespace OpenSim.Framework
35 public class DetectedObject 35 public class DetectedObject
36 { 36 {
37 public DetectedObject() { } 37 public DetectedObject() { }
38 public LLUUID groupUUID = LLUUID.Zero; 38 public UUID groupUUID = UUID.Zero;
39 public LLUUID ownerUUID = LLUUID.Zero; 39 public UUID ownerUUID = UUID.Zero;
40 public LLUUID keyUUID = LLUUID.Zero; 40 public UUID keyUUID = UUID.Zero;
41 public LLVector3 posVector = LLVector3.Zero; 41 public Vector3 posVector = Vector3.Zero;
42 public LLQuaternion rotQuat = LLQuaternion.Identity; 42 public Quaternion rotQuat = Quaternion.Identity;
43 public LLVector3 velVector = LLVector3.Zero; 43 public Vector3 velVector = Vector3.Zero;
44 public string nameStr = String.Empty; 44 public string nameStr = String.Empty;
45 public int colliderType = 0; 45 public int colliderType = 0;
46 } 46 }
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index e924b3f..3e88eba 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -29,14 +29,14 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using libsecondlife.Packets; 33using OpenMetaverse.Packets;
34using log4net; 34using log4net;
35using OpenSim.Framework.Statistics; 35using OpenSim.Framework.Statistics;
36 36
37namespace OpenSim.Framework.Communications.Cache 37namespace OpenSim.Framework.Communications.Cache
38{ 38{
39 public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset); 39 public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
40 40
41 /// <summary> 41 /// <summary>
42 /// Manages local cache of assets and their sending to viewers. 42 /// Manages local cache of assets and their sending to viewers.
@@ -58,17 +58,17 @@ namespace OpenSim.Framework.Communications.Cache
58 /// <summary> 58 /// <summary>
59 /// The cache of assets. This does not include textures. 59 /// The cache of assets. This does not include textures.
60 /// </summary> 60 /// </summary>
61 private Dictionary<LLUUID, AssetInfo> Assets; 61 private Dictionary<UUID, AssetInfo> Assets;
62 62
63 /// <summary> 63 /// <summary>
64 /// The cache of textures. 64 /// The cache of textures.
65 /// </summary> 65 /// </summary>
66 private Dictionary<LLUUID, TextureImage> Textures; 66 private Dictionary<UUID, TextureImage> Textures;
67 67
68 /// <summary> 68 /// <summary>
69 /// Assets requests which are waiting for asset server data. This includes texture requests 69 /// Assets requests which are waiting for asset server data. This includes texture requests
70 /// </summary> 70 /// </summary>
71 private Dictionary<LLUUID, AssetRequest> RequestedAssets; 71 private Dictionary<UUID, AssetRequest> RequestedAssets;
72 72
73 /// <summary> 73 /// <summary>
74 /// Asset requests with data which are ready to be sent back to requesters. This includes textures. 74 /// Asset requests with data which are ready to be sent back to requesters. This includes textures.
@@ -78,7 +78,7 @@ namespace OpenSim.Framework.Communications.Cache
78 /// <summary> 78 /// <summary>
79 /// Until the asset request is fulfilled, each asset request is associated with a list of requesters 79 /// Until the asset request is fulfilled, each asset request is associated with a list of requesters
80 /// </summary> 80 /// </summary>
81 private Dictionary<LLUUID, AssetRequestsList> RequestLists; 81 private Dictionary<UUID, AssetRequestsList> RequestLists;
82 82
83 private readonly IAssetServer m_assetServer; 83 private readonly IAssetServer m_assetServer;
84 84
@@ -155,12 +155,12 @@ namespace OpenSim.Framework.Communications.Cache
155 /// </summary> 155 /// </summary>
156 private void Initialize() 156 private void Initialize()
157 { 157 {
158 Assets = new Dictionary<LLUUID, AssetInfo>(); 158 Assets = new Dictionary<UUID, AssetInfo>();
159 Textures = new Dictionary<LLUUID, TextureImage>(); 159 Textures = new Dictionary<UUID, TextureImage>();
160 AssetRequests = new List<AssetRequest>(); 160 AssetRequests = new List<AssetRequest>();
161 161
162 RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); 162 RequestedAssets = new Dictionary<UUID, AssetRequest>();
163 RequestLists = new Dictionary<LLUUID, AssetRequestsList>(); 163 RequestLists = new Dictionary<UUID, AssetRequestsList>();
164 } 164 }
165 165
166 /// <summary> 166 /// <summary>
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Communications.Cache
207 /// </summary> 207 /// </summary>
208 /// <param name="assetId"></param></param> 208 /// <param name="assetId"></param></param>
209 /// <returns></returns> 209 /// <returns></returns>
210 //private AssetBase GetCachedAsset(LLUUID assetId) 210 //private AssetBase GetCachedAsset(UUID assetId)
211 //{ 211 //{
212 // AssetBase asset = null; 212 // AssetBase asset = null;
213 213
@@ -223,7 +223,7 @@ namespace OpenSim.Framework.Communications.Cache
223 // return asset; 223 // return asset;
224 //} 224 //}
225 225
226 private bool TryGetCachedAsset(LLUUID assetId, out AssetBase asset) 226 private bool TryGetCachedAsset(UUID assetId, out AssetBase asset)
227 { 227 {
228 if (Textures.ContainsKey(assetId)) 228 if (Textures.ContainsKey(assetId))
229 { 229 {
@@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache
248 /// A callback invoked when the asset has either been found or not found. 248 /// A callback invoked when the asset has either been found or not found.
249 /// If the asset was found this is called with the asset UUID and the asset data 249 /// If the asset was found this is called with the asset UUID and the asset data
250 /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> 250 /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param>
251 public void GetAsset(LLUUID assetId, AssetRequestCallback callback, bool isTexture) 251 public void GetAsset(UUID assetId, AssetRequestCallback callback, bool isTexture)
252 { 252 {
253 //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId); 253 //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId);
254 254
@@ -308,7 +308,7 @@ namespace OpenSim.Framework.Communications.Cache
308 /// <param name="assetID"></param> 308 /// <param name="assetID"></param>
309 /// <param name="isTexture"></param> 309 /// <param name="isTexture"></param>
310 /// <returns>null if the asset could not be retrieved</returns> 310 /// <returns>null if the asset could not be retrieved</returns>
311 public AssetBase GetAsset(LLUUID assetID, bool isTexture) 311 public AssetBase GetAsset(UUID assetID, bool isTexture)
312 { 312 {
313 // I'm not going over 3 seconds since this will be blocking processing of all the other inbound 313 // I'm not going over 3 seconds since this will be blocking processing of all the other inbound
314 // packets from the client. 314 // packets from the client.
@@ -390,7 +390,7 @@ namespace OpenSim.Framework.Communications.Cache
390 /// this is a stop gap measure until we have such a thing. 390 /// this is a stop gap measure until we have such a thing.
391 /// </summary> 391 /// </summary>
392 392
393 public void ExpireAsset(LLUUID uuid) 393 public void ExpireAsset(UUID uuid)
394 { 394 {
395 // uuid is unique, so no need to worry about it showing up 395 // uuid is unique, so no need to worry about it showing up
396 // in the 2 caches differently. Also, locks are probably 396 // in the 2 caches differently. Also, locks are probably
@@ -495,7 +495,7 @@ namespace OpenSim.Framework.Communications.Cache
495 } 495 }
496 496
497 // See IAssetReceiver 497 // See IAssetReceiver
498 public void AssetNotFound(LLUUID assetID, bool IsTexture) 498 public void AssetNotFound(UUID assetID, bool IsTexture)
499 { 499 {
500 //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); 500 //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
501 501
@@ -567,17 +567,17 @@ namespace OpenSim.Framework.Communications.Cache
567 /// <param name="transferRequest"></param> 567 /// <param name="transferRequest"></param>
568 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) 568 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
569 { 569 {
570 LLUUID requestID = null; 570 UUID requestID = null;
571 byte source = 2; 571 byte source = 2;
572 if (transferRequest.TransferInfo.SourceType == 2) 572 if (transferRequest.TransferInfo.SourceType == 2)
573 { 573 {
574 //direct asset request 574 //direct asset request
575 requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); 575 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
576 } 576 }
577 else if (transferRequest.TransferInfo.SourceType == 3) 577 else if (transferRequest.TransferInfo.SourceType == 3)
578 { 578 {
579 //inventory asset request 579 //inventory asset request
580 requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); 580 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
581 source = 3; 581 source = 3;
582 //Console.WriteLine("asset request " + requestID); 582 //Console.WriteLine("asset request " + requestID);
583 } 583 }
@@ -678,10 +678,10 @@ namespace OpenSim.Framework.Communications.Cache
678 public class AssetRequest 678 public class AssetRequest
679 { 679 {
680 public IClientAPI RequestUser; 680 public IClientAPI RequestUser;
681 public LLUUID RequestAssetID; 681 public UUID RequestAssetID;
682 public AssetInfo AssetInf; 682 public AssetInfo AssetInf;
683 public TextureImage ImageInfo; 683 public TextureImage ImageInfo;
684 public LLUUID TransferRequestID; 684 public UUID TransferRequestID;
685 public long DataPointer = 0; 685 public long DataPointer = 0;
686 public int NumPackets = 0; 686 public int NumPackets = 0;
687 public int PacketCounter = 0; 687 public int PacketCounter = 0;
@@ -731,10 +731,10 @@ namespace OpenSim.Framework.Communications.Cache
731 731
732 public class AssetRequestsList 732 public class AssetRequestsList
733 { 733 {
734 public LLUUID AssetID; 734 public UUID AssetID;
735 public List<NewAssetRequest> Requests = new List<NewAssetRequest>(); 735 public List<NewAssetRequest> Requests = new List<NewAssetRequest>();
736 736
737 public AssetRequestsList(LLUUID assetID) 737 public AssetRequestsList(UUID assetID)
738 { 738 {
739 AssetID = assetID; 739 AssetID = assetID;
740 } 740 }
@@ -742,10 +742,10 @@ namespace OpenSim.Framework.Communications.Cache
742 742
743 public class NewAssetRequest 743 public class NewAssetRequest
744 { 744 {
745 public LLUUID AssetID; 745 public UUID AssetID;
746 public AssetRequestCallback Callback; 746 public AssetRequestCallback Callback;
747 747
748 public NewAssetRequest(LLUUID assetID, AssetRequestCallback callback) 748 public NewAssetRequest(UUID assetID, AssetRequestCallback callback)
749 { 749 {
750 AssetID = assetID; 750 AssetID = assetID;
751 Callback = callback; 751 Callback = callback;
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 2c8e685..9f4f480 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Threading; 30using System.Threading;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework.AssetLoader.Filesystem; 33using OpenSim.Framework.AssetLoader.Filesystem;
34using OpenSim.Framework.Statistics; 34using OpenSim.Framework.Statistics;
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache
146 m_receiver = receiver; 146 m_receiver = receiver;
147 } 147 }
148 148
149 public void RequestAsset(LLUUID assetID, bool isTexture) 149 public void RequestAsset(UUID assetID, bool isTexture)
150 { 150 {
151 AssetRequest req = new AssetRequest(); 151 AssetRequest req = new AssetRequest();
152 req.AssetID = assetID; 152 req.AssetID = assetID;
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 8e3be81..339bb31 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -30,24 +30,24 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32 32
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35 35
36namespace OpenSim.Framework.Communications.Cache 36namespace OpenSim.Framework.Communications.Cache
37{ 37{
38 internal delegate void AddItemDelegate(InventoryItemBase itemInfo); 38 internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
39 internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); 39 internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
40 internal delegate void DeleteItemDelegate(LLUUID itemID); 40 internal delegate void DeleteItemDelegate(UUID itemID);
41 41
42 internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); 42 internal delegate void CreateFolderDelegate(string folderName, UUID folderID, ushort folderType, UUID parentID);
43 internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); 43 internal delegate void MoveFolderDelegate(UUID folderID, UUID parentID);
44 internal delegate void PurgeFolderDelegate(LLUUID folderID); 44 internal delegate void PurgeFolderDelegate(UUID folderID);
45 internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); 45 internal delegate void UpdateFolderDelegate(string name, UUID folderID, ushort type, UUID parentID);
46 46
47 internal delegate void SendInventoryDescendentsDelegate( 47 internal delegate void SendInventoryDescendentsDelegate(
48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); 48 IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems);
49 49
50 public delegate void OnItemReceivedDelegate(LLUUID itemID); 50 public delegate void OnItemReceivedDelegate(UUID itemID);
51 51
52 /// <summary> 52 /// <summary>
53 /// Stores user profile and inventory data received from backend services for a particular user. 53 /// Stores user profile and inventory data received from backend services for a particular user.
@@ -84,12 +84,12 @@ namespace OpenSim.Framework.Communications.Cache
84 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } 84 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
85 private InventoryFolderImpl m_rootFolder; 85 private InventoryFolderImpl m_rootFolder;
86 86
87 public LLUUID SessionID 87 public UUID SessionID
88 { 88 {
89 get { return m_session_id; } 89 get { return m_session_id; }
90 set { m_session_id = value; } 90 set { m_session_id = value; }
91 } 91 }
92 private LLUUID m_session_id = LLUUID.Zero; 92 private UUID m_session_id = UUID.Zero;
93 93
94 /// <summary> 94 /// <summary>
95 /// Constructor 95 /// Constructor
@@ -127,9 +127,9 @@ namespace OpenSim.Framework.Communications.Cache
127 /// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list 127 /// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list
128 /// </summary> 128 /// </summary>
129 /// <param name="folder"></param> 129 /// <param name="folder"></param>
130 private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<LLUUID, IList<InventoryFolderImpl>> dictionary) 130 private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<UUID, IList<InventoryFolderImpl>> dictionary)
131 { 131 {
132 LLUUID parentFolderId = folder.ParentID; 132 UUID parentFolderId = folder.ParentID;
133 133
134 if (dictionary.ContainsKey(parentFolderId)) 134 if (dictionary.ContainsKey(parentFolderId))
135 dictionary[parentFolderId].Add(folder); 135 dictionary[parentFolderId].Add(folder);
@@ -148,9 +148,9 @@ namespace OpenSim.Framework.Communications.Cache
148 /// heirarchy 148 /// heirarchy
149 /// </summary> 149 /// </summary>
150 /// <param name="parentId"> 150 /// <param name="parentId">
151 /// A <see cref="LLUUID"/> 151 /// A <see cref="UUID"/>
152 /// </param> 152 /// </param>
153 private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<LLUUID, IList<InventoryFolderImpl>> folderDictionary) 153 private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<UUID, IList<InventoryFolderImpl>> folderDictionary)
154 { 154 {
155 if (folderDictionary.ContainsKey(parentFolder.ID)) 155 if (folderDictionary.ContainsKey(parentFolder.ID))
156 { 156 {
@@ -208,19 +208,19 @@ namespace OpenSim.Framework.Communications.Cache
208 try 208 try
209 { 209 {
210 // collection of all received folders, indexed by their parent ID 210 // collection of all received folders, indexed by their parent ID
211 IDictionary<LLUUID, IList<InventoryFolderImpl>> receivedFolders = 211 IDictionary<UUID, IList<InventoryFolderImpl>> receivedFolders =
212 new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); 212 new Dictionary<UUID, IList<InventoryFolderImpl>>();
213 213
214 // Take all received folders, find the root folder, and put ther rest into 214 // Take all received folders, find the root folder, and put ther rest into
215 // the pendingCategorizationFolders collection 215 // the pendingCategorizationFolders collection
216 foreach (InventoryFolderImpl folder in folders) 216 foreach (InventoryFolderImpl folder in folders)
217 AddFolderToDictionary(folder, receivedFolders); 217 AddFolderToDictionary(folder, receivedFolders);
218 218
219 if (!receivedFolders.ContainsKey(LLUUID.Zero)) 219 if (!receivedFolders.ContainsKey(UUID.Zero))
220 throw new Exception("Database did not return a root inventory folder"); 220 throw new Exception("Database did not return a root inventory folder");
221 else 221 else
222 { 222 {
223 IList<InventoryFolderImpl> rootFolderList = receivedFolders[LLUUID.Zero]; 223 IList<InventoryFolderImpl> rootFolderList = receivedFolders[UUID.Zero];
224 m_rootFolder = rootFolderList[0]; 224 m_rootFolder = rootFolderList[0];
225 if (rootFolderList.Count > 1) 225 if (rootFolderList.Count > 1)
226 { 226 {
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
231 rootFolderList[i].ID, RootFolder.ID); 231 rootFolderList[i].ID, RootFolder.ID);
232 } 232 }
233 } 233 }
234 receivedFolders.Remove(LLUUID.Zero); 234 receivedFolders.Remove(UUID.Zero);
235 } 235 }
236 236
237 // Now take the pendingCategorizationFolders collection, and turn that into a tree, 237 // Now take the pendingCategorizationFolders collection, and turn that into a tree,
@@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications.Cache
240 ResolveReceivedFolders(RootFolder, receivedFolders); 240 ResolveReceivedFolders(RootFolder, receivedFolders);
241 241
242 // Generate a warning for folders that are not part of the heirarchy 242 // Generate a warning for folders that are not part of the heirarchy
243 foreach (KeyValuePair<LLUUID, IList<InventoryFolderImpl>> folderList in receivedFolders) 243 foreach (KeyValuePair<UUID, IList<InventoryFolderImpl>> folderList in receivedFolders)
244 { 244 {
245 foreach (InventoryFolderImpl folder in folderList.Value) 245 foreach (InventoryFolderImpl folder in folderList.Value)
246 m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name); 246 m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name);
@@ -314,7 +314,7 @@ namespace OpenSim.Framework.Communications.Cache
314 /// </summary> 314 /// </summary>
315 /// <param name="parentID"></param> 315 /// <param name="parentID"></param>
316 /// <returns></returns> 316 /// <returns></returns>
317 public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID) 317 public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
318 { 318 {
319 // m_log.DebugFormat( 319 // m_log.DebugFormat(
320 // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); 320 // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
@@ -389,7 +389,7 @@ namespace OpenSim.Framework.Communications.Cache
389 /// <param name="type"></param> 389 /// <param name="type"></param>
390 /// <param name="name"></param> 390 /// <param name="name"></param>
391 /// <param name="parentID"></param> 391 /// <param name="parentID"></param>
392 public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) 392 public bool UpdateFolder(string name, UUID folderID, ushort type, UUID parentID)
393 { 393 {
394 // m_log.DebugFormat( 394 // m_log.DebugFormat(
395 // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 395 // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Cache
440 /// 440 ///
441 /// <param name="folderID"></param> 441 /// <param name="folderID"></param>
442 /// <param name="parentID"></param> 442 /// <param name="parentID"></param>
443 public bool MoveFolder(LLUUID folderID, LLUUID parentID) 443 public bool MoveFolder(UUID folderID, UUID parentID)
444 { 444 {
445 // m_log.DebugFormat( 445 // m_log.DebugFormat(
446 // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", 446 // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Communications.Cache
487 /// </summary> 487 /// </summary>
488 /// 488 ///
489 /// <param name="folderID"></param> 489 /// <param name="folderID"></param>
490 public bool PurgeFolder(LLUUID folderID) 490 public bool PurgeFolder(UUID folderID)
491 { 491 {
492 // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", 492 // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
493 // folderID, remoteClient.Name, remoteClient.AgentId); 493 // folderID, remoteClient.Name, remoteClient.AgentId);
@@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
542 { 542 {
543 if (m_hasReceivedInventory) 543 if (m_hasReceivedInventory)
544 { 544 {
545 if (item.Folder == LLUUID.Zero) 545 if (item.Folder == UUID.Zero)
546 { 546 {
547 InventoryFolderImpl f = FindFolderForType(item.AssetType); 547 InventoryFolderImpl f = FindFolderForType(item.AssetType);
548 if (f != null) 548 if (f != null)
@@ -607,7 +607,7 @@ namespace OpenSim.Framework.Communications.Cache
607 /// true on a successful delete or a if the request is queued. 607 /// true on a successful delete or a if the request is queued.
608 /// Returns false on an immediate failure 608 /// Returns false on an immediate failure
609 /// </returns> 609 /// </returns>
610 public bool DeleteItem(LLUUID itemID) 610 public bool DeleteItem(UUID itemID)
611 { 611 {
612 if (m_hasReceivedInventory) 612 if (m_hasReceivedInventory)
613 { 613 {
@@ -655,7 +655,7 @@ namespace OpenSim.Framework.Communications.Cache
655 /// <param name="fetchFolders"></param> 655 /// <param name="fetchFolders"></param>
656 /// <param name="fetchItems"></param> 656 /// <param name="fetchItems"></param>
657 /// <returns>true if the request was queued or successfully processed, false otherwise</returns> 657 /// <returns>true if the request was queued or successfully processed, false otherwise</returns>
658 public bool SendInventoryDecendents(IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems) 658 public bool SendInventoryDecendents(IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems)
659 { 659 {
660 if (m_hasReceivedInventory) 660 if (m_hasReceivedInventory)
661 { 661 {
diff --git a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
index 3c74d4d..e793feb 100644
--- a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
@@ -18,11 +18,13 @@ namespace OpenSim.Framework.Communications.Cache
18 } 18 }
19 public override void StoreAsset(AssetBase asset) 19 public override void StoreAsset(AssetBase asset)
20 { 20 {
21 string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0] 21 byte[] idBytes = asset.FullID.Guid.ToByteArray();
22 + Path.DirectorySeparatorChar + asset.FullID.Data[1];
23 22
24 if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0])) 23 string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
25 Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]); 24 + Path.DirectorySeparatorChar + idBytes[1];
25
26 if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0]))
27 Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]);
26 28
27 if (!Directory.Exists(cdir)) 29 if (!Directory.Exists(cdir))
28 Directory.CreateDirectory(cdir); 30 Directory.CreateDirectory(cdir);
@@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache
41 43
42 protected override AssetBase GetAsset(AssetRequest req) 44 protected override AssetBase GetAsset(AssetRequest req)
43 { 45 {
44 string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0] 46 byte[] idBytes = req.AssetID.Guid.ToByteArray();
45 + Path.DirectorySeparatorChar + req.AssetID.Data[1]; 47
48 string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
49 + Path.DirectorySeparatorChar + idBytes[1];
46 if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) 50 if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"))
47 { 51 {
48 FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"); 52 FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml");
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index 61cfc1a..debcbfb 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31//using System.Reflection; 31//using System.Reflection;
32 32
33//using log4net; 33//using log4net;
@@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications.Cache
43 /// <summary> 43 /// <summary>
44 /// Items that are contained in this folder 44 /// Items that are contained in this folder
45 /// </summary> 45 /// </summary>
46 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); 46 public Dictionary<UUID, InventoryItemBase> Items = new Dictionary<UUID, InventoryItemBase>();
47 47
48 /// <summary> 48 /// <summary>
49 /// Child folders that are contained in this folder 49 /// Child folders that are contained in this folder
50 /// </summary> 50 /// </summary>
51 public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); 51 public Dictionary<UUID, InventoryFolderImpl> SubFolders = new Dictionary<UUID, InventoryFolderImpl>();
52 52
53 // Constructors 53 // Constructors
54 public InventoryFolderImpl(InventoryFolderBase folderbase) 54 public InventoryFolderImpl(InventoryFolderBase folderbase)
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
72 /// <param name="folderName"></param> 72 /// <param name="folderName"></param>
73 /// <param name="type"></param> 73 /// <param name="type"></param>
74 /// <returns>The newly created subfolder. Returns null if the folder already exists</returns> 74 /// <returns>The newly created subfolder. Returns null if the folder already exists</returns>
75 public InventoryFolderImpl CreateChildFolder(LLUUID folderID, string folderName, ushort type) 75 public InventoryFolderImpl CreateChildFolder(UUID folderID, string folderName, ushort type)
76 { 76 {
77 lock (SubFolders) 77 lock (SubFolders)
78 { 78 {
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications.Cache
112 /// </summary> 112 /// </summary>
113 /// <param name="itemID"></param> 113 /// <param name="itemID"></param>
114 /// <returns>null if the item is not found</returns> 114 /// <returns>null if the item is not found</returns>
115 public InventoryItemBase FindItem(LLUUID itemID) 115 public InventoryItemBase FindItem(UUID itemID)
116 { 116 {
117 lock (Items) 117 lock (Items)
118 { 118 {
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
143 /// </summary> 143 /// </summary>
144 /// <param name="folderID"></param> 144 /// <param name="folderID"></param>
145 /// <returns></returns> 145 /// <returns></returns>
146 public bool DeleteItem(LLUUID itemID) 146 public bool DeleteItem(UUID itemID)
147 { 147 {
148 bool found = false; 148 bool found = false;
149 149
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications.Cache
177 /// first. 177 /// first.
178 /// </summary> 178 /// </summary>
179 /// <returns>The requested folder if it exists, null if it does not.</returns> 179 /// <returns>The requested folder if it exists, null if it does not.</returns>
180 public InventoryFolderImpl FindFolder(LLUUID folderID) 180 public InventoryFolderImpl FindFolder(UUID folderID)
181 { 181 {
182 if (folderID == ID) 182 if (folderID == ID)
183 return this; 183 return this;
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 1ff6350..7e561b5 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.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 Nini.Config; 35using Nini.Config;
36 36
@@ -44,29 +44,29 @@ namespace OpenSim.Framework.Communications.Cache
44 { 44 {
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 LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); 47 private UUID libOwner = new UUID("11111111-1111-0000-0000-000100bba000");
48 48
49 /// <summary> 49 /// <summary>
50 /// Holds the root library folder and all its descendents. This is really only used during inventory 50 /// Holds the root library folder and all its descendents. This is really only used during inventory
51 /// setup so that we don't have to repeatedly search the tree of library folders. 51 /// setup so that we don't have to repeatedly search the tree of library folders.
52 /// </summary> 52 /// </summary>
53 protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders 53 protected Dictionary<UUID, InventoryFolderImpl> libraryFolders
54 = new Dictionary<LLUUID, InventoryFolderImpl>(); 54 = new Dictionary<UUID, InventoryFolderImpl>();
55 55
56 public LibraryRootFolder() 56 public LibraryRootFolder()
57 { 57 {
58 m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); 58 m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
59 59
60 Owner = libOwner; 60 Owner = libOwner;
61 ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); 61 ID = new UUID("00000112-000f-0000-0000-000100bba000");
62 Name = "OpenSim Library"; 62 Name = "OpenSim Library";
63 ParentID = LLUUID.Zero; 63 ParentID = UUID.Zero;
64 Type = (short) 8; 64 Type = (short) 8;
65 Version = (ushort) 1; 65 Version = (ushort) 1;
66 66
67 libraryFolders.Add(ID, this); 67 libraryFolders.Add(ID, this);
68 68
69 LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); 69 LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.Xml"));
70 70
71 // CreateLibraryItems(); 71 // CreateLibraryItems();
72 } 72 }
@@ -81,40 +81,40 @@ namespace OpenSim.Framework.Communications.Cache
81 //private void CreateLibraryItems() 81 //private void CreateLibraryItems()
82 //{ 82 //{
83 // InventoryItemBase item = 83 // InventoryItemBase item =
84 // CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), 84 // CreateItem(new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"),
85 // new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", 85 // new UUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape",
86 // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); 86 // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
87 // item.inventoryCurrentPermissions = 0; 87 // item.inventoryCurrentPermissions = 0;
88 // item.inventoryNextPermissions = 0; 88 // item.inventoryNextPermissions = 0;
89 // Items.Add(item.inventoryID, item); 89 // Items.Add(item.inventoryID, item);
90 90
91 // item = 91 // item =
92 // CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), 92 // CreateItem(new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"),
93 // new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", 93 // new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin",
94 // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); 94 // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
95 // item.inventoryCurrentPermissions = 0; 95 // item.inventoryCurrentPermissions = 0;
96 // item.inventoryNextPermissions = 0; 96 // item.inventoryNextPermissions = 0;
97 // Items.Add(item.inventoryID, item); 97 // Items.Add(item.inventoryID, item);
98 98
99 // item = 99 // item =
100 // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), 100 // CreateItem(new UUID("77c41e39-38f9-f75a-0000-585989bf0000"),
101 // new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", 101 // new UUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt",
102 // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); 102 // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
103 // item.inventoryCurrentPermissions = 0; 103 // item.inventoryCurrentPermissions = 0;
104 // item.inventoryNextPermissions = 0; 104 // item.inventoryNextPermissions = 0;
105 // Items.Add(item.inventoryID, item); 105 // Items.Add(item.inventoryID, item);
106 106
107 // item = 107 // item =
108 // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), 108 // CreateItem(new UUID("77c41e39-38f9-f75a-0000-5859892f1111"),
109 // new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", 109 // new UUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants",
110 // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); 110 // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
111 // item.inventoryCurrentPermissions = 0; 111 // item.inventoryCurrentPermissions = 0;
112 // item.inventoryNextPermissions = 0; 112 // item.inventoryNextPermissions = 0;
113 // Items.Add(item.inventoryID, item); 113 // Items.Add(item.inventoryID, item);
114 //} 114 //}
115 115
116 public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, 116 public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
117 int assetType, int invType, LLUUID parentFolderID) 117 int assetType, int invType, UUID parentFolderID)
118 { 118 {
119 InventoryItemBase item = new InventoryItemBase(); 119 InventoryItemBase item = new InventoryItemBase();
120 item.Owner = libOwner; 120 item.Owner = libOwner;
@@ -173,9 +173,9 @@ namespace OpenSim.Framework.Communications.Cache
173 { 173 {
174 InventoryFolderImpl folderInfo = new InventoryFolderImpl(); 174 InventoryFolderImpl folderInfo = new InventoryFolderImpl();
175 175
176 folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); 176 folderInfo.ID = new UUID(config.GetString("folderID", ID.ToString()));
177 folderInfo.Name = config.GetString("name", "unknown"); 177 folderInfo.Name = config.GetString("name", "unknown");
178 folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); 178 folderInfo.ParentID = new UUID(config.GetString("parentFolderID", ID.ToString()));
179 folderInfo.Type = (short)config.GetInt("type", 8); 179 folderInfo.Type = (short)config.GetInt("type", 8);
180 180
181 folderInfo.Owner = libOwner; 181 folderInfo.Owner = libOwner;
@@ -207,9 +207,9 @@ namespace OpenSim.Framework.Communications.Cache
207 InventoryItemBase item = new InventoryItemBase(); 207 InventoryItemBase item = new InventoryItemBase();
208 item.Owner = libOwner; 208 item.Owner = libOwner;
209 item.Creator = libOwner; 209 item.Creator = libOwner;
210 item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString())); 210 item.ID = new UUID(config.GetString("inventoryID", ID.ToString()));
211 item.AssetID = new LLUUID(config.GetString("assetID", item.ID.ToString())); 211 item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString()));
212 item.Folder = new LLUUID(config.GetString("folderID", ID.ToString())); 212 item.Folder = new UUID(config.GetString("folderID", ID.ToString()));
213 item.Name = config.GetString("name", String.Empty); 213 item.Name = config.GetString("name", String.Empty);
214 item.Description = config.GetString("description", item.Name); 214 item.Description = config.GetString("description", item.Name);
215 item.InvType = config.GetInt("inventoryType", 0); 215 item.InvType = config.GetInt("inventoryType", 0);
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Communications.Cache
270 /// methods in the superclass 270 /// methods in the superclass
271 /// </summary> 271 /// </summary>
272 /// <returns></returns> 272 /// <returns></returns>
273 public Dictionary<LLUUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() 273 public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders()
274 { 274 {
275 return libraryFolders; 275 return libraryFolders;
276 } 276 }
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 45f6c7e..3675053 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34 34
35namespace OpenSim.Framework.Communications.Cache 35namespace OpenSim.Framework.Communications.Cache
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Communications.Cache
49 /// <summary> 49 /// <summary>
50 /// Each user has a cached profile. 50 /// Each user has a cached profile.
51 /// </summary> 51 /// </summary>
52 private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); 52 private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>();
53 53
54 public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder(); 54 public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder();
55 55
@@ -63,9 +63,9 @@ namespace OpenSim.Framework.Communications.Cache
63 /// A new user has moved into a region in this instance so retrieve their profile from the user service. 63 /// A new user has moved into a region in this instance so retrieve their profile from the user service.
64 /// </summary> 64 /// </summary>
65 /// <param name="userID"></param> 65 /// <param name="userID"></param>
66 public void AddNewUser(LLUUID userID) 66 public void AddNewUser(UUID userID)
67 { 67 {
68 if (userID == LLUUID.Zero) 68 if (userID == UUID.Zero)
69 return; 69 return;
70 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); 70 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
71 GetUserDetails(userID); 71 GetUserDetails(userID);
@@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Cache
76 /// </summary> 76 /// </summary>
77 /// <param name="userID"></param> 77 /// <param name="userID"></param>
78 /// <returns>true if the user was successfully removed, false otherwise</returns> 78 /// <returns>true if the user was successfully removed, false otherwise</returns>
79 public bool RemoveUser(LLUUID userId) 79 public bool RemoveUser(UUID userId)
80 { 80 {
81 lock (m_userProfiles) 81 lock (m_userProfiles)
82 { 82 {
@@ -99,7 +99,7 @@ namespace OpenSim.Framework.Communications.Cache
99 /// </summary> 99 /// </summary>
100 /// <param name="userID"></param> 100 /// <param name="userID"></param>
101 /// <param name="userInfo"></param> 101 /// <param name="userInfo"></param>
102 public void RequestInventoryForUser(LLUUID userID) 102 public void RequestInventoryForUser(UUID userID)
103 { 103 {
104 CachedUserInfo userInfo = GetUserDetails(userID); 104 CachedUserInfo userInfo = GetUserDetails(userID);
105 if (userInfo != null) 105 if (userInfo != null)
@@ -130,9 +130,9 @@ namespace OpenSim.Framework.Communications.Cache
130 /// </summary> 130 /// </summary>
131 /// <param name="userID"></param> 131 /// <param name="userID"></param>
132 /// <returns>null if no user details are found</returns> 132 /// <returns>null if no user details are found</returns>
133 public CachedUserInfo GetUserDetails(LLUUID userID) 133 public CachedUserInfo GetUserDetails(UUID userID)
134 { 134 {
135 if (userID == LLUUID.Zero) 135 if (userID == UUID.Zero)
136 return null; 136 return null;
137 137
138 lock (m_userProfiles) 138 lock (m_userProfiles)
@@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications.Cache
164 /// </summary> 164 /// </summary>
165 /// <param name="userID"></param> 165 /// <param name="userID"></param>
166 /// <param name="userData"></param> 166 /// <param name="userData"></param>
167 public void PreloadUserCache(LLUUID userID, UserProfileData userData) 167 public void PreloadUserCache(UUID userID, UserProfileData userData)
168 { 168 {
169 if (userID == LLUUID.Zero) 169 if (userID == UUID.Zero)
170 return; 170 return;
171 171
172 lock (m_userProfiles) 172 lock (m_userProfiles)
@@ -192,8 +192,8 @@ namespace OpenSim.Framework.Communications.Cache
192 /// <param name="folderType"></param> 192 /// <param name="folderType"></param>
193 /// <param name="folderName"></param> 193 /// <param name="folderName"></param>
194 /// <param name="parentID"></param> 194 /// <param name="parentID"></param>
195 public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, 195 public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType,
196 string folderName, LLUUID parentID) 196 string folderName, UUID parentID)
197 { 197 {
198 CachedUserInfo userProfile; 198 CachedUserInfo userProfile;
199 199
@@ -226,8 +226,8 @@ namespace OpenSim.Framework.Communications.Cache
226 /// <param name="type"></param> 226 /// <param name="type"></param>
227 /// <param name="name"></param> 227 /// <param name="name"></param>
228 /// <param name="parentID"></param> 228 /// <param name="parentID"></param>
229 public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, 229 public void HandleUpdateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort type, string name,
230 LLUUID parentID) 230 UUID parentID)
231 { 231 {
232// m_log.DebugFormat( 232// m_log.DebugFormat(
233// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 233// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@@ -257,7 +257,7 @@ namespace OpenSim.Framework.Communications.Cache
257 /// <param name="remoteClient"></param> 257 /// <param name="remoteClient"></param>
258 /// <param name="folderID"></param> 258 /// <param name="folderID"></param>
259 /// <param name="parentID"></param> 259 /// <param name="parentID"></param>
260 public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID) 260 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
261 { 261 {
262 CachedUserInfo userProfile; 262 CachedUserInfo userProfile;
263 263
@@ -287,7 +287,7 @@ namespace OpenSim.Framework.Communications.Cache
287 /// <param name="fetchFolders"></param> 287 /// <param name="fetchFolders"></param>
288 /// <param name="fetchItems"></param> 288 /// <param name="fetchItems"></param>
289 /// <param name="sortOrder"></param> 289 /// <param name="sortOrder"></param>
290 public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, 290 public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID,
291 bool fetchFolders, bool fetchItems, int sortOrder) 291 bool fetchFolders, bool fetchItems, int sortOrder)
292 { 292 {
293 // FIXME MAYBE: We're not handling sortOrder! 293 // FIXME MAYBE: We're not handling sortOrder!
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Cache
327 /// <param name="fetchItems"></param> 327 /// <param name="fetchItems"></param>
328 /// <param name="sortOrder"></param> 328 /// <param name="sortOrder"></param>
329 /// <returns>null if the inventory look up failed</returns> 329 /// <returns>null if the inventory look up failed</returns>
330 public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, 330 public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
331 bool fetchFolders, bool fetchItems, int sortOrder) 331 bool fetchFolders, bool fetchItems, int sortOrder)
332 { 332 {
333// m_log.DebugFormat( 333// m_log.DebugFormat(
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Cache
405 /// </summary> 405 /// </summary>
406 /// <param name="remoteClient"></param> 406 /// <param name="remoteClient"></param>
407 /// <param name="folderID"></param> 407 /// <param name="folderID"></param>
408 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) 408 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
409 { 409 {
410 CachedUserInfo userProfile; 410 CachedUserInfo userProfile;
411 411
@@ -426,7 +426,7 @@ namespace OpenSim.Framework.Communications.Cache
426 } 426 }
427 } 427 }
428 428
429 public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) 429 public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
430 { 430 {
431 if (ownerID == libraryRoot.Owner) 431 if (ownerID == libraryRoot.Owner)
432 { 432 {
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index a7486d6..e82a5e9 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -30,7 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
36using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
@@ -40,21 +40,21 @@ using OpenSim.Region.Interfaces;
40namespace OpenSim.Framework.Communications.Capabilities 40namespace OpenSim.Framework.Communications.Capabilities
41{ 41{
42 public delegate void UpLoadedAsset( 42 public delegate void UpLoadedAsset(
43 string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, 43 string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
44 byte[] data, string inventoryType, string assetType); 44 byte[] data, string inventoryType, string assetType);
45 45
46 public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); 46 public delegate UUID UpdateItem(UUID itemID, byte[] data);
47 47
48 public delegate void UpdateTaskScript(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data); 48 public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data);
49 49
50 public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); 50 public delegate void NewInventoryItem(UUID userID, InventoryItemBase item);
51 51
52 public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); 52 public delegate UUID ItemUpdatedCallback(UUID userID, UUID itemID, byte[] data);
53 53
54 public delegate void TaskScriptUpdatedCallback(LLUUID userID, LLUUID itemID, LLUUID primID, 54 public delegate void TaskScriptUpdatedCallback(UUID userID, UUID itemID, UUID primID,
55 bool isScriptRunning, byte[] data); 55 bool isScriptRunning, byte[] data);
56 56
57 public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, 57 public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
58 bool fetchFolders, bool fetchItems, int sortOrder); 58 bool fetchFolders, bool fetchItems, int sortOrder);
59 59
60 /// <summary> 60 /// <summary>
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities
62 /// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want 62 /// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want
63 /// to just pass the whole Scene into CAPS. 63 /// to just pass the whole Scene into CAPS.
64 /// </summary> 64 /// </summary>
65 public delegate IClientAPI GetClientDelegate(LLUUID agentID); 65 public delegate IClientAPI GetClientDelegate(UUID agentID);
66 66
67 public class Caps 67 public class Caps
68 { 68 {
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Capabilities
97 97
98 //private string eventQueue = "0100/"; 98 //private string eventQueue = "0100/";
99 private BaseHttpServer m_httpListener; 99 private BaseHttpServer m_httpListener;
100 private LLUUID m_agentID; 100 private UUID m_agentID;
101 private AssetCache m_assetCache; 101 private AssetCache m_assetCache;
102 private int m_eventQueueCount = 1; 102 private int m_eventQueueCount = 1;
103 private Queue<string> m_capsEventQueue = new Queue<string>(); 103 private Queue<string> m_capsEventQueue = new Queue<string>();
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.Communications.Capabilities
113 public GetClientDelegate GetClient = null; 113 public GetClientDelegate GetClient = null;
114 114
115 public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, 115 public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
116 LLUUID agent, bool dumpAssetsToFile, string regionName) 116 UUID agent, bool dumpAssetsToFile, string regionName)
117 { 117 {
118 m_assetCache = assetCache; 118 m_assetCache = assetCache;
119 m_capsObjectPath = capsPath; 119 m_capsObjectPath = capsPath;
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities
258 Hashtable hash = new Hashtable(); 258 Hashtable hash = new Hashtable();
259 try 259 try
260 { 260 {
261 hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); 261 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
262 } 262 }
263 catch (LLSD.LLSDParseException pe) 263 catch (LLSD.LLSDParseException pe)
264 { 264 {
@@ -388,7 +388,7 @@ namespace OpenSim.Framework.Communications.Capabilities
388 llsdItem.permissions.creator_id = invItem.Creator; 388 llsdItem.permissions.creator_id = invItem.Creator;
389 llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; 389 llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
390 llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; 390 llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
391 llsdItem.permissions.group_id = LLUUID.Zero; 391 llsdItem.permissions.group_id = UUID.Zero;
392 llsdItem.permissions.group_mask = 0; 392 llsdItem.permissions.group_mask = 0;
393 llsdItem.permissions.is_owner_group = false; 393 llsdItem.permissions.is_owner_group = false;
394 llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions; 394 llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions;
@@ -423,7 +423,7 @@ namespace OpenSim.Framework.Communications.Capabilities
423 LLSDMapLayer mapLayer = new LLSDMapLayer(); 423 LLSDMapLayer mapLayer = new LLSDMapLayer();
424 mapLayer.Right = 5000; 424 mapLayer.Right = 5000;
425 mapLayer.Top = 5000; 425 mapLayer.Top = 5000;
426 mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); 426 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
427 427
428 return mapLayer; 428 return mapLayer;
429 } 429 }
@@ -522,7 +522,7 @@ namespace OpenSim.Framework.Communications.Capabilities
522 m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); 522 m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName);
523 //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); 523 //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
524 524
525 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); 525 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
526 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); 526 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
527 LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); 527 LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
528 528
@@ -573,8 +573,8 @@ namespace OpenSim.Framework.Communications.Capabilities
573 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 573 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
574 { 574 {
575 m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); 575 m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
576 //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); 576 //OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
577 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); 577 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
578 LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); 578 LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
579 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 579 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
580 580
@@ -636,9 +636,9 @@ namespace OpenSim.Framework.Communications.Capabilities
636 string assetName = llsdRequest.name; 636 string assetName = llsdRequest.name;
637 string assetDes = llsdRequest.description; 637 string assetDes = llsdRequest.description;
638 string capsBase = "/CAPS/" + m_capsObjectPath; 638 string capsBase = "/CAPS/" + m_capsObjectPath;
639 LLUUID newAsset = LLUUID.Random(); 639 UUID newAsset = UUID.Random();
640 LLUUID newInvItem = LLUUID.Random(); 640 UUID newInvItem = UUID.Random();
641 LLUUID parentFolder = llsdRequest.folder_id; 641 UUID parentFolder = llsdRequest.folder_id;
642 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 642 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
643 643
644 AssetUploader uploader = 644 AssetUploader uploader =
@@ -662,8 +662,8 @@ namespace OpenSim.Framework.Communications.Capabilities
662 /// <param name="assetID"></param> 662 /// <param name="assetID"></param>
663 /// <param name="inventoryItem"></param> 663 /// <param name="inventoryItem"></param>
664 /// <param name="data"></param> 664 /// <param name="data"></param>
665 public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, 665 public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID,
666 LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, 666 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
667 string assetType) 667 string assetType)
668 { 668 {
669 sbyte assType = 0; 669 sbyte assType = 0;
@@ -728,14 +728,14 @@ namespace OpenSim.Framework.Communications.Capabilities
728 /// <param name="itemID">Item to update</param> 728 /// <param name="itemID">Item to update</param>
729 /// <param name="data">New asset data</param> 729 /// <param name="data">New asset data</param>
730 /// <returns></returns> 730 /// <returns></returns>
731 public LLUUID ItemUpdated(LLUUID itemID, byte[] data) 731 public UUID ItemUpdated(UUID itemID, byte[] data)
732 { 732 {
733 if (ItemUpdatedCall != null) 733 if (ItemUpdatedCall != null)
734 { 734 {
735 return ItemUpdatedCall(m_agentID, itemID, data); 735 return ItemUpdatedCall(m_agentID, itemID, data);
736 } 736 }
737 737
738 return LLUUID.Zero; 738 return UUID.Zero;
739 } 739 }
740 740
741 /// <summary> 741 /// <summary>
@@ -745,7 +745,7 @@ namespace OpenSim.Framework.Communications.Capabilities
745 /// <param name="primID">Prim containing item to update</param> 745 /// <param name="primID">Prim containing item to update</param>
746 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> 746 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param>
747 /// <param name="data">New asset data</param> 747 /// <param name="data">New asset data</param>
748 public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) 748 public void TaskScriptUpdated(UUID itemID, UUID primID, bool isScriptRunning, byte[] data)
749 { 749 {
750 if (TaskScriptUpdatedCall != null) 750 if (TaskScriptUpdatedCall != null)
751 { 751 {
@@ -759,9 +759,9 @@ namespace OpenSim.Framework.Communications.Capabilities
759 private UpLoadedAsset handlerUpLoad = null; 759 private UpLoadedAsset handlerUpLoad = null;
760 760
761 private string uploaderPath = String.Empty; 761 private string uploaderPath = String.Empty;
762 private LLUUID newAssetID; 762 private UUID newAssetID;
763 private LLUUID inventoryItemID; 763 private UUID inventoryItemID;
764 private LLUUID parentFolder; 764 private UUID parentFolder;
765 private BaseHttpServer httpListener; 765 private BaseHttpServer httpListener;
766 private bool m_dumpAssetsToFile; 766 private bool m_dumpAssetsToFile;
767 private string m_assetName = String.Empty; 767 private string m_assetName = String.Empty;
@@ -770,8 +770,8 @@ namespace OpenSim.Framework.Communications.Capabilities
770 private string m_invType = String.Empty; 770 private string m_invType = String.Empty;
771 private string m_assetType = String.Empty; 771 private string m_assetType = String.Empty;
772 772
773 public AssetUploader(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, 773 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
774 LLUUID parentFolderID, string invType, string assetType, string path, 774 UUID parentFolderID, string invType, string assetType, string path,
775 BaseHttpServer httpServer, bool dumpAssetsToFile) 775 BaseHttpServer httpServer, bool dumpAssetsToFile)
776 { 776 {
777 m_assetName = assetName; 777 m_assetName = assetName;
@@ -795,7 +795,7 @@ namespace OpenSim.Framework.Communications.Capabilities
795 /// <returns></returns> 795 /// <returns></returns>
796 public string uploaderCaps(byte[] data, string path, string param) 796 public string uploaderCaps(byte[] data, string path, string param)
797 { 797 {
798 LLUUID inv = inventoryItemID; 798 UUID inv = inventoryItemID;
799 string res = String.Empty; 799 string res = String.Empty;
800 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); 800 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
801 uploadComplete.new_asset = newAssetID.ToString(); 801 uploadComplete.new_asset = newAssetID.ToString();
@@ -860,11 +860,11 @@ namespace OpenSim.Framework.Communications.Capabilities
860 private UpdateItem handlerUpdateItem = null; 860 private UpdateItem handlerUpdateItem = null;
861 861
862 private string uploaderPath = String.Empty; 862 private string uploaderPath = String.Empty;
863 private LLUUID inventoryItemID; 863 private UUID inventoryItemID;
864 private BaseHttpServer httpListener; 864 private BaseHttpServer httpListener;
865 private bool m_dumpAssetToFile; 865 private bool m_dumpAssetToFile;
866 866
867 public ItemUpdater(LLUUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) 867 public ItemUpdater(UUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile)
868 { 868 {
869 m_dumpAssetToFile = dumpAssetToFile; 869 m_dumpAssetToFile = dumpAssetToFile;
870 870
@@ -882,10 +882,10 @@ namespace OpenSim.Framework.Communications.Capabilities
882 /// <returns></returns> 882 /// <returns></returns>
883 public string uploaderCaps(byte[] data, string path, string param) 883 public string uploaderCaps(byte[] data, string path, string param)
884 { 884 {
885 LLUUID inv = inventoryItemID; 885 UUID inv = inventoryItemID;
886 string res = String.Empty; 886 string res = String.Empty;
887 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); 887 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
888 LLUUID assetID = LLUUID.Zero; 888 UUID assetID = UUID.Zero;
889 handlerUpdateItem = OnUpLoad; 889 handlerUpdateItem = OnUpLoad;
890 if (handlerUpdateItem != null) 890 if (handlerUpdateItem != null)
891 { 891 {
@@ -942,13 +942,13 @@ namespace OpenSim.Framework.Communications.Capabilities
942 private UpdateTaskScript handlerUpdateTaskScript = null; 942 private UpdateTaskScript handlerUpdateTaskScript = null;
943 943
944 private string uploaderPath = String.Empty; 944 private string uploaderPath = String.Empty;
945 private LLUUID inventoryItemID; 945 private UUID inventoryItemID;
946 private LLUUID primID; 946 private UUID primID;
947 private bool isScriptRunning; 947 private bool isScriptRunning;
948 private BaseHttpServer httpListener; 948 private BaseHttpServer httpListener;
949 private bool m_dumpAssetToFile; 949 private bool m_dumpAssetToFile;
950 950
951 public TaskInventoryScriptUpdater(LLUUID inventoryItemID, LLUUID primID, int isScriptRunning, 951 public TaskInventoryScriptUpdater(UUID inventoryItemID, UUID primID, int isScriptRunning,
952 string path, BaseHttpServer httpServer, bool dumpAssetToFile) 952 string path, BaseHttpServer httpServer, bool dumpAssetToFile)
953 { 953 {
954 m_dumpAssetToFile = dumpAssetToFile; 954 m_dumpAssetToFile = dumpAssetToFile;
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
index aa9951c..44c4a05 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
@@ -32,7 +32,7 @@ using System.IO;
32using System.Security.Cryptography; 32using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using System.Xml; 34using System.Xml;
35using libsecondlife; 35using OpenMetaverse;
36 36
37namespace OpenSim.Framework.Communications.Capabilities 37namespace OpenSim.Framework.Communications.Capabilities
38{ 38{
@@ -158,9 +158,9 @@ namespace OpenSim.Framework.Communications.Capabilities
158 { 158 {
159 throw new Exception("ulong in LLSD is currently not implemented, fix me!"); 159 throw new Exception("ulong in LLSD is currently not implemented, fix me!");
160 } 160 }
161 else if (obj is LLUUID) 161 else if (obj is UUID)
162 { 162 {
163 LLUUID u = (LLUUID) obj; 163 UUID u = (UUID) obj;
164 writer.WriteStartElement(String.Empty, "uuid", String.Empty); 164 writer.WriteStartElement(String.Empty, "uuid", String.Empty);
165 writer.WriteString(u.ToString()); 165 writer.WriteString(u.ToString());
166 writer.WriteEndElement(); 166 writer.WriteEndElement();
@@ -294,11 +294,11 @@ namespace OpenSim.Framework.Communications.Capabilities
294 if (reader.IsEmptyElement) 294 if (reader.IsEmptyElement)
295 { 295 {
296 reader.Read(); 296 reader.Read();
297 return LLUUID.Zero; 297 return UUID.Zero;
298 } 298 }
299 299
300 reader.Read(); 300 reader.Read();
301 ret = new LLUUID(reader.ReadString().Trim()); 301 ret = new UUID(reader.ReadString().Trim());
302 break; 302 break;
303 } 303 }
304 case "string": 304 case "string":
@@ -476,9 +476,9 @@ namespace OpenSim.Framework.Communications.Capabilities
476 { 476 {
477 return GetSpaces(indent) + "- float " + obj.ToString() + "\n"; 477 return GetSpaces(indent) + "- float " + obj.ToString() + "\n";
478 } 478 }
479 else if (obj is LLUUID) 479 else if (obj is UUID)
480 { 480 {
481 return GetSpaces(indent) + "- uuid " + ((LLUUID) obj).ToString() + Environment.NewLine; 481 return GetSpaces(indent) + "- uuid " + ((UUID) obj).ToString() + Environment.NewLine;
482 } 482 }
483 else if (obj is Hashtable) 483 else if (obj is Hashtable)
484 { 484 {
@@ -509,7 +509,7 @@ namespace OpenSim.Framework.Communications.Capabilities
509 } 509 }
510 else if (obj is byte[]) 510 else if (obj is byte[])
511 { 511 {
512 return GetSpaces(indent) + "- binary\n" + Helpers.FieldToHexString((byte[]) obj, GetSpaces(indent)) + 512 return GetSpaces(indent) + "- binary\n" + Utils.BytesToHexString((byte[]) obj, GetSpaces(indent)) +
513 Environment.NewLine; 513 Environment.NewLine;
514 } 514 }
515 else 515 else
@@ -568,14 +568,14 @@ namespace OpenSim.Framework.Communications.Capabilities
568 } 568 }
569 case 'u': 569 case 'u':
570 { 570 {
571 if (llsd.Length < 17) throw new LLSDParseException("LLUUID value type with no value"); 571 if (llsd.Length < 17) throw new LLSDParseException("UUID value type with no value");
572 LLUUID value; 572 UUID value;
573 endPos = FindEnd(llsd, 1); 573 endPos = FindEnd(llsd, 1);
574 574
575 if (LLUUID.TryParse(llsd.Substring(1, endPos - 1), out value)) 575 if (UUID.TryParse(llsd.Substring(1, endPos - 1), out value))
576 return value; 576 return value;
577 else 577 else
578 throw new LLSDParseException("Failed to parse LLUUID value type"); 578 throw new LLSDParseException("Failed to parse UUID value type");
579 } 579 }
580 case 'b': 580 case 'b':
581 //byte[] value = new byte[llsd.Length - 1]; 581 //byte[] value = new byte[llsd.Length - 1];
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs
index 6c4db4b..680dcc8 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework.Communications.Capabilities 31namespace OpenSim.Framework.Communications.Capabilities
32{ 32{
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities
34 public class LLSDAssetUploadComplete 34 public class LLSDAssetUploadComplete
35 { 35 {
36 public string new_asset = String.Empty; 36 public string new_asset = String.Empty;
37 public LLUUID new_inventory_item = LLUUID.Zero; 37 public UUID new_inventory_item = UUID.Zero;
38 public string state = String.Empty; 38 public string state = String.Empty;
39 //public bool success = false; 39 //public bool success = false;
40 40
@@ -42,4 +42,4 @@ namespace OpenSim.Framework.Communications.Capabilities
42 { 42 {
43 } 43 }
44 } 44 }
45} \ No newline at end of file 45}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs
index 289cc93..5833b65 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework.Communications.Capabilities 31namespace OpenSim.Framework.Communications.Capabilities
32{ 32{
@@ -35,7 +35,7 @@ namespace OpenSim.Framework.Communications.Capabilities
35 { 35 {
36 public string asset_type = String.Empty; 36 public string asset_type = String.Empty;
37 public string description = String.Empty; 37 public string description = String.Empty;
38 public LLUUID folder_id = LLUUID.Zero; 38 public UUID folder_id = UUID.Zero;
39 public string inventory_type = String.Empty; 39 public string inventory_type = String.Empty;
40 public string name = String.Empty; 40 public string name = String.Empty;
41 41
@@ -43,4 +43,4 @@ namespace OpenSim.Framework.Communications.Capabilities
43 { 43 {
44 } 44 }
45 } 45 }
46} \ No newline at end of file 46}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 507f12b..b14bfdd 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -86,8 +86,8 @@ namespace OpenSim.Framework.Communications.Capabilities
86 writer.WriteString(fieldName); 86 writer.WriteString(fieldName);
87 writer.WriteEndElement(); 87 writer.WriteEndElement();
88 LLSD.LLSDWriteOne(writer, fieldValue); 88 LLSD.LLSDWriteOne(writer, fieldValue);
89 // libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( 89 // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
90 // writer, libsecondlife.StructuredData.LLSD.FromObject(fieldValue)); 90 // writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue));
91 } 91 }
92 } 92 }
93 writer.WriteEndElement(); 93 writer.WriteEndElement();
@@ -111,8 +111,8 @@ namespace OpenSim.Framework.Communications.Capabilities
111 else 111 else
112 { 112 {
113 LLSD.LLSDWriteOne(writer, obj); 113 LLSD.LLSDWriteOne(writer, obj);
114 //libsecondlife.StructuredData.LLSDParser.SerializeXmlElement( 114 //OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
115 // writer, libsecondlife.StructuredData.LLSD.FromObject(obj)); 115 // writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj));
116 } 116 }
117 } 117 }
118 118
@@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities
133 FieldInfo field = myType.GetField(keyName); 133 FieldInfo field = myType.GetField(keyName);
134 if (field != null) 134 if (field != null)
135 { 135 {
136 // if (enumerator.Value is libsecondlife.StructuredData.LLSDMap) 136 // if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap)
137 if (enumerator.Value is Hashtable) 137 if (enumerator.Value is Hashtable)
138 { 138 {
139 object fieldValue = field.GetValue(obj); 139 object fieldValue = field.GetValue(obj);
140 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); 140 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
141 // DeserialiseLLSDMap((libsecondlife.StructuredData.LLSDMap) enumerator.Value, fieldValue); 141 // DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue);
142 } 142 }
143 else if (enumerator.Value is ArrayList) 143 else if (enumerator.Value is ArrayList)
144 { 144 {
@@ -160,4 +160,4 @@ namespace OpenSim.Framework.Communications.Capabilities
160 return obj; 160 return obj;
161 } 161 }
162 } 162 }
163} \ No newline at end of file 163}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
index 1a75aba..ff36821 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.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.Framework.Communications.Capabilities 30namespace OpenSim.Framework.Communications.Capabilities
31{ 31{
32 [LLSDMap] 32 [LLSDMap]
33 public class LLSDInventoryItem 33 public class LLSDInventoryItem
34 { 34 {
35 public LLUUID parent_id; 35 public UUID parent_id;
36 36
37 public LLUUID asset_id; 37 public UUID asset_id;
38 public LLUUID item_id; 38 public UUID item_id;
39 public LLSDPermissions permissions; 39 public LLSDPermissions permissions;
40 public string type; 40 public string type;
41 public string inv_type; 41 public string inv_type;
@@ -50,9 +50,9 @@ namespace OpenSim.Framework.Communications.Capabilities
50 [LLSDMap] 50 [LLSDMap]
51 public class LLSDPermissions 51 public class LLSDPermissions
52 { 52 {
53 public LLUUID creator_id; 53 public UUID creator_id;
54 public LLUUID owner_id; 54 public UUID owner_id;
55 public LLUUID group_id; 55 public UUID group_id;
56 public int base_mask; 56 public int base_mask;
57 public int owner_mask; 57 public int owner_mask;
58 public int group_mask; 58 public int group_mask;
@@ -77,8 +77,8 @@ namespace OpenSim.Framework.Communications.Capabilities
77 [LLSDMap] 77 [LLSDMap]
78 public class LLSDFetchInventoryDescendents 78 public class LLSDFetchInventoryDescendents
79 { 79 {
80 public LLUUID folder_id; 80 public UUID folder_id;
81 public LLUUID owner_id; 81 public UUID owner_id;
82 public int sort_order; 82 public int sort_order;
83 public bool fetch_folders; 83 public bool fetch_folders;
84 public bool fetch_items; 84 public bool fetch_items;
@@ -87,11 +87,11 @@ namespace OpenSim.Framework.Communications.Capabilities
87 [LLSDMap] 87 [LLSDMap]
88 public class LLSDInventoryFolderContents 88 public class LLSDInventoryFolderContents
89 { 89 {
90 public LLUUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-" 90 public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-"
91 public int descendents; 91 public int descendents;
92 public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names 92 public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
93 public LLSDArray items = new LLSDArray(); 93 public LLSDArray items = new LLSDArray();
94 public LLUUID owner___id; // and of course we can't have field names with "-" in 94 public UUID owner___id; // and of course we can't have field names with "-" in
95 public int version; 95 public int version;
96 } 96 }
97} \ No newline at end of file 97}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs
index 2c4b68f..c147bd3 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.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.Framework.Communications.Capabilities 30namespace OpenSim.Framework.Communications.Capabilities
31{ 31{
32 [LLSDMap] 32 [LLSDMap]
33 public class LLSDItemUpdate 33 public class LLSDItemUpdate
34 { 34 {
35 public LLUUID item_id; 35 public UUID item_id;
36 36
37 public LLSDItemUpdate() 37 public LLSDItemUpdate()
38 { 38 {
39 } 39 }
40 } 40 }
41} \ No newline at end of file 41}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs
index 50f5241..fc381e4 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.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;
29 29
30namespace OpenSim.Framework.Communications.Capabilities 30namespace OpenSim.Framework.Communications.Capabilities
31{ 31{
@@ -36,10 +36,10 @@ namespace OpenSim.Framework.Communications.Capabilities
36 public int Right = 0; 36 public int Right = 0;
37 public int Top = 0; 37 public int Top = 0;
38 public int Bottom = 0; 38 public int Bottom = 0;
39 public LLUUID ImageID = LLUUID.Zero; 39 public UUID ImageID = UUID.Zero;
40 40
41 public LLSDMapLayer() 41 public LLSDMapLayer()
42 { 42 {
43 } 43 }
44 } 44 }
45} \ No newline at end of file 45}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs
index b0e2b8f..1220089 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs
@@ -26,14 +26,14 @@
26* 26*
27*/ 27*/
28 28
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework.Communications.Capabilities 31namespace OpenSim.Framework.Communications.Capabilities
32{ 32{
33 [LLSDType("MAP")] 33 [LLSDType("MAP")]
34 public class LLSDRemoteParcelResponse 34 public class LLSDRemoteParcelResponse
35 { 35 {
36 public LLUUID parcel_id; 36 public UUID parcel_id;
37 37
38 public LLSDRemoteParcelResponse() 38 public LLSDRemoteParcelResponse()
39 { 39 {
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index 36090e1..7fcbb81 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -53,8 +53,8 @@ namespace OpenSim.Framework.Communications.Capabilities
53 //string requestBody = streamReader.ReadToEnd(); 53 //string requestBody = streamReader.ReadToEnd();
54 //streamReader.Close(); 54 //streamReader.Close();
55 55
56 // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) 56 // OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)
57 // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); 57 // OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
58 58
59 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); 59 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
60 TRequest llsdRequest = new TRequest(); 60 TRequest llsdRequest = new TRequest();
@@ -67,4 +67,4 @@ namespace OpenSim.Framework.Communications.Capabilities
67 return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); 67 return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response));
68 } 68 }
69 } 69 }
70} \ No newline at end of file 70}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
index 8bfd20c..b34cbf9 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.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;
29 29
30namespace OpenSim.Framework.Communications.Capabilities 30namespace OpenSim.Framework.Communications.Capabilities
31{ 31{
@@ -35,16 +35,16 @@ namespace OpenSim.Framework.Communications.Capabilities
35 /// <summary> 35 /// <summary>
36 /// The task inventory item that was updated 36 /// The task inventory item that was updated
37 /// </summary> 37 /// </summary>
38 public LLUUID item_id; 38 public UUID item_id;
39 39
40 /// <summary> 40 /// <summary>
41 /// The task that was updated 41 /// The task that was updated
42 /// </summary> 42 /// </summary>
43 public LLUUID task_id; 43 public UUID task_id;
44 44
45 /// <summary> 45 /// <summary>
46 /// State of the upload. So far have only even seen this set to "complete" 46 /// State of the upload. So far have only even seen this set to "complete"
47 /// </summary> 47 /// </summary>
48 public string state; 48 public string state;
49 } 49 }
50} \ No newline at end of file 50}
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
index e45d9de..730e95b 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.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;
29 29
30namespace OpenSim.Framework.Communications.Capabilities 30namespace OpenSim.Framework.Communications.Capabilities
31{ 31{
@@ -35,16 +35,16 @@ namespace OpenSim.Framework.Communications.Capabilities
35 /// <summary> 35 /// <summary>
36 /// The item containing the script to update 36 /// The item containing the script to update
37 /// </summary> 37 /// </summary>
38 public LLUUID item_id; 38 public UUID item_id;
39 39
40 /// <summary> 40 /// <summary>
41 /// The task containing the script 41 /// The task containing the script
42 /// </summary> 42 /// </summary>
43 public LLUUID task_id; 43 public UUID task_id;
44 44
45 /// <summary> 45 /// <summary>
46 /// Signals whether the script is currently active 46 /// Signals whether the script is currently active
47 /// </summary> 47 /// </summary>
48 public int is_script_running; 48 public int is_script_running;
49 } 49 }
50} \ No newline at end of file 50}
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 08dbc80..e6413e8 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.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.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
34using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 protected Dictionary<LLUUID, string[]> m_nameRequestCache = new Dictionary<LLUUID, string[]>(); 45 protected Dictionary<UUID, string[]> m_nameRequestCache = new Dictionary<UUID, string[]>();
46 46
47 public IUserService UserService 47 public IUserService UserService
48 { 48 {
@@ -238,8 +238,8 @@ namespace OpenSim.Framework.Communications
238 /// <param name="password"></param> 238 /// <param name="password"></param>
239 /// <param name="regX"></param> 239 /// <param name="regX"></param>
240 /// <param name="regY"></param> 240 /// <param name="regY"></param>
241 /// <returns>The UUID of the added user. Returns LLUUID.Zero if the add was unsuccessful</returns> 241 /// <returns>The UUID of the added user. Returns UUID.Zero if the add was unsuccessful</returns>
242 public LLUUID AddUser(string firstName, string lastName, string password, uint regX, uint regY) 242 public UUID AddUser(string firstName, string lastName, string password, uint regX, uint regY)
243 { 243 {
244 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); 244 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
245 245
@@ -247,7 +247,7 @@ namespace OpenSim.Framework.Communications
247 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); 247 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
248 if (userProf == null) 248 if (userProf == null)
249 { 249 {
250 return LLUUID.Zero; 250 return UUID.Zero;
251 } 251 }
252 else 252 else
253 { 253 {
@@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
265 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 265 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
266 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 266 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
267 /// <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> 267 /// <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>
268 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 268 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
269 { 269 {
270 m_userService.AddNewUserFriend(friendlistowner, friend, perms); 270 m_userService.AddNewUserFriend(friendlistowner, friend, perms);
271 } 271 }
@@ -279,7 +279,7 @@ namespace OpenSim.Framework.Communications
279 /// <param name="posx"></param> 279 /// <param name="posx"></param>
280 /// <param name="posy"></param> 280 /// <param name="posy"></param>
281 /// <param name="posz"></param> 281 /// <param name="posz"></param>
282 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 282 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
283 { 283 {
284 m_userService.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); 284 m_userService.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
285 285
@@ -290,7 +290,7 @@ namespace OpenSim.Framework.Communications
290 /// </summary> 290 /// </summary>
291 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 291 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
292 /// <param name="friend">The Ex-friend agent</param> 292 /// <param name="friend">The Ex-friend agent</param>
293 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 293 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
294 { 294 {
295 m_userService.RemoveUserFriend(friendlistowner, friend); 295 m_userService.RemoveUserFriend(friendlistowner, friend);
296 } 296 }
@@ -301,16 +301,16 @@ namespace OpenSim.Framework.Communications
301 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 301 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
302 /// <param name="friend">The agent that is getting or loosing permissions</param> 302 /// <param name="friend">The agent that is getting or loosing permissions</param>
303 /// <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> 303 /// <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>
304 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 304 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
305 { 305 {
306 m_userService.UpdateUserFriendPerms(friendlistowner, friend, perms); 306 m_userService.UpdateUserFriendPerms(friendlistowner, friend, perms);
307 } 307 }
308 308
309 /// <summary> 309 /// <summary>
310 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 310 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
311 /// </summary> 311 /// </summary>
312 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 312 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
313 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 313 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
314 { 314 {
315 return m_userService.GetUserFriendList(friendlistowner); 315 return m_userService.GetUserFriendList(friendlistowner);
316 } 316 }
@@ -325,7 +325,7 @@ namespace OpenSim.Framework.Communications
325 return; 325 return;
326 } 326 }
327 327
328 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) 328 public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
329 { 329 {
330 if (uuid == m_userProfileCacheService.libraryRoot.Owner) 330 if (uuid == m_userProfileCacheService.libraryRoot.Owner)
331 { 331 {
@@ -342,7 +342,7 @@ namespace OpenSim.Framework.Communications
342 } 342 }
343 } 343 }
344 344
345 private string[] doUUIDNameRequest(LLUUID uuid) 345 private string[] doUUIDNameRequest(UUID uuid)
346 { 346 {
347 string[] returnstring = new string[0]; 347 string[] returnstring = new string[0];
348 bool doLookup = false; 348 bool doLookup = false;
@@ -366,7 +366,7 @@ namespace OpenSim.Framework.Communications
366 if (profileData != null) 366 if (profileData != null)
367 { 367 {
368 returnstring = new string[2]; 368 returnstring = new string[2];
369 // LLUUID profileId = profileData.ID; 369 // UUID profileId = profileData.ID;
370 returnstring[0] = profileData.FirstName; 370 returnstring[0] = profileData.FirstName;
371 returnstring[1] = profileData.SurName; 371 returnstring[1] = profileData.SurName;
372 lock (m_nameRequestCache) 372 lock (m_nameRequestCache)
@@ -380,13 +380,13 @@ namespace OpenSim.Framework.Communications
380 380
381 } 381 }
382 382
383 public bool UUIDNameCachedTest(LLUUID uuid) 383 public bool UUIDNameCachedTest(UUID uuid)
384 { 384 {
385 lock (m_nameRequestCache) 385 lock (m_nameRequestCache)
386 return m_nameRequestCache.ContainsKey(uuid); 386 return m_nameRequestCache.ContainsKey(uuid);
387 } 387 }
388 388
389 public string UUIDNameRequestString(LLUUID uuid) 389 public string UUIDNameRequestString(UUID uuid)
390 { 390 {
391 string[] names = doUUIDNameRequest(uuid); 391 string[] names = doUUIDNameRequest(uuid);
392 if (names.Length == 2) 392 if (names.Length == 2)
@@ -400,7 +400,7 @@ namespace OpenSim.Framework.Communications
400 return "(hippos)"; 400 return "(hippos)";
401 } 401 }
402 402
403 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 403 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
404 { 404 {
405 List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query); 405 List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query);
406 return pickerlist; 406 return pickerlist;
diff --git a/OpenSim/Framework/Communications/IAvatarService.cs b/OpenSim/Framework/Communications/IAvatarService.cs
index 6c033e1..25b26dd 100644
--- a/OpenSim/Framework/Communications/IAvatarService.cs
+++ b/OpenSim/Framework/Communications/IAvatarService.cs
@@ -28,16 +28,16 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Framework.Communications 33namespace OpenSim.Framework.Communications
34{ 34{
35 public interface IAvatarService 35 public interface IAvatarService
36 { 36 {
37 /// Get's the User Appearance 37 /// Get's the User Appearance
38 AvatarAppearance GetUserAppearance(LLUUID user); 38 AvatarAppearance GetUserAppearance(UUID user);
39 39
40 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 40 void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
41 41
42 } 42 }
43} 43}
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index fcc0db5..6c5d2e2 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.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.Framework.Communications 31namespace OpenSim.Framework.Communications
32{ 32{
@@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications
53 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y); 53 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
54 54
55 RegionInfo RequestNeighbourInfo(ulong regionHandle); 55 RegionInfo RequestNeighbourInfo(ulong regionHandle);
56 RegionInfo RequestNeighbourInfo(LLUUID regionID); 56 RegionInfo RequestNeighbourInfo(UUID regionID);
57 RegionInfo RequestClosestRegion(string regionName); 57 RegionInfo RequestClosestRegion(string regionName);
58 Dictionary<string, string> GetGridSettings(); 58 Dictionary<string, string> GetGridSettings();
59 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); 59 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
diff --git a/OpenSim/Framework/Communications/IInterRegionCommunications.cs b/OpenSim/Framework/Communications/IInterRegionCommunications.cs
index 57fb82d..3dd5561 100644
--- a/OpenSim/Framework/Communications/IInterRegionCommunications.cs
+++ b/OpenSim/Framework/Communications/IInterRegionCommunications.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;
29 29
30namespace OpenSim.Framework.Communications 30namespace OpenSim.Framework.Communications
31{ 31{
@@ -35,16 +35,16 @@ namespace OpenSim.Framework.Communications
35 35
36 bool CheckRegion(string address, uint port); 36 bool CheckRegion(string address, uint port);
37 bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); 37 bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
38 bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData, int XMLMethod); 38 bool InformRegionOfPrimCrossing(ulong regionHandle, UUID primID, string objData, int XMLMethod);
39 bool RegionUp(SerializableRegionInfo region, ulong regionhandle); 39 bool RegionUp(SerializableRegionInfo region, ulong regionhandle);
40 bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); 40 bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
41 41
42 bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); 42 bool ExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying);
43 bool ExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isFlying); 43 bool ExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isFlying);
44 44
45 bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentId); 45 bool AcknowledgeAgentCrossed(ulong regionHandle, UUID agentId);
46 bool AcknowledgePrimCrossed(ulong regionHandle, LLUUID primID); 46 bool AcknowledgePrimCrossed(ulong regionHandle, UUID primID);
47 47
48 bool TellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID); 48 bool TellRegionToCloseChildConnection(ulong regionHandle, UUID agentID);
49 } 49 }
50} 50}
diff --git a/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs b/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs
index a1f4c2e..5900f4e 100644
--- a/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInterServiceInventoryServices.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.Framework.Communications 31namespace OpenSim.Framework.Communications
32{ 32{
@@ -40,7 +40,7 @@ namespace OpenSim.Framework.Communications
40 /// </summary> 40 /// </summary>
41 /// <param name="user"></param> 41 /// <param name="user"></param>
42 /// <returns>true if the inventory was successfully created, false otherwise</returns> 42 /// <returns>true if the inventory was successfully created, false otherwise</returns>
43 bool CreateNewUserInventory(LLUUID user); 43 bool CreateNewUserInventory(UUID user);
44 44
45 /// <summary> 45 /// <summary>
46 /// Returns a list of all the folders in a given user's inventory. 46 /// Returns a list of all the folders in a given user's inventory.
@@ -48,6 +48,6 @@ namespace OpenSim.Framework.Communications
48 /// <param name="userId"></param> 48 /// <param name="userId"></param>
49 /// <returns>A flat list of the user's inventory folder tree, 49 /// <returns>A flat list of the user's inventory folder tree,
50 /// null if there is no inventory for this user</returns> 50 /// null if there is no inventory for this user</returns>
51 List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId); 51 List<InventoryFolderBase> GetInventorySkeleton(UUID userId);
52 } 52 }
53} 53}
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
index b00b1bf..aead3be 100644
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInventoryServices.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework.Communications.Cache; 30using OpenSim.Framework.Communications.Cache;
31 31
32namespace OpenSim.Framework.Communications 32namespace OpenSim.Framework.Communications
@@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications
53 /// </summary> 53 /// </summary>
54 /// <param name="userID"></param> 54 /// <param name="userID"></param>
55 /// <param name="callback"></param> 55 /// <param name="callback"></param>
56 void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); 56 void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback);
57 57
58 /// <summary> 58 /// <summary>
59 /// Add a new folder to the user's inventory 59 /// Add a new folder to the user's inventory
@@ -109,13 +109,13 @@ namespace OpenSim.Framework.Communications
109 /// </summary> 109 /// </summary>
110 /// <param name="userID"></param> 110 /// <param name="userID"></param>
111 /// <returns></returns> 111 /// <returns></returns>
112 bool HasInventoryForUser(LLUUID userID); 112 bool HasInventoryForUser(UUID userID);
113 113
114 /// <summary> 114 /// <summary>
115 /// Retrieve the root inventory folder for the given user. 115 /// Retrieve the root inventory folder for the given user.
116 /// </summary> 116 /// </summary>
117 /// <param name="userID"></param> 117 /// <param name="userID"></param>
118 /// <returns>null if no root folder was found</returns> 118 /// <returns>null if no root folder was found</returns>
119 InventoryFolderBase RequestRootFolder(LLUUID userID); 119 InventoryFolderBase RequestRootFolder(UUID userID);
120 } 120 }
121} 121}
diff --git a/OpenSim/Framework/Communications/ISecureInventoryService.cs b/OpenSim/Framework/Communications/ISecureInventoryService.cs
index bd962d1..6d4ce46 100644
--- a/OpenSim/Framework/Communications/ISecureInventoryService.cs
+++ b/OpenSim/Framework/Communications/ISecureInventoryService.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Framework.Communications.Cache; 30using OpenSim.Framework.Communications.Cache;
31 31
32namespace OpenSim.Framework.Communications 32namespace OpenSim.Framework.Communications
@@ -47,69 +47,69 @@ namespace OpenSim.Framework.Communications
47 /// </summary> 47 /// </summary>
48 /// <param name="userID"></param> 48 /// <param name="userID"></param>
49 /// <param name="callback"></param> 49 /// <param name="callback"></param>
50 void RequestInventoryForUser(LLUUID userID, LLUUID session_id, InventoryReceiptCallback callback); 50 void RequestInventoryForUser(UUID userID, UUID session_id, InventoryReceiptCallback callback);
51 51
52 /// <summary> 52 /// <summary>
53 /// Add a new folder to the user's inventory 53 /// Add a new folder to the user's inventory
54 /// </summary> 54 /// </summary>
55 /// <param name="folder"></param> 55 /// <param name="folder"></param>
56 /// <returns>true if the folder was successfully added</returns> 56 /// <returns>true if the folder was successfully added</returns>
57 bool AddFolder(InventoryFolderBase folder, LLUUID session_id); 57 bool AddFolder(InventoryFolderBase folder, UUID session_id);
58 58
59 /// <summary> 59 /// <summary>
60 /// Update a folder in the user's inventory 60 /// Update a folder in the user's inventory
61 /// </summary> 61 /// </summary>
62 /// <param name="folder"></param> 62 /// <param name="folder"></param>
63 /// <returns>true if the folder was successfully updated</returns> 63 /// <returns>true if the folder was successfully updated</returns>
64 bool UpdateFolder(InventoryFolderBase folder, LLUUID session_id); 64 bool UpdateFolder(InventoryFolderBase folder, UUID session_id);
65 65
66 /// <summary> 66 /// <summary>
67 /// Move an inventory folder to a new location 67 /// Move an inventory folder to a new location
68 /// </summary> 68 /// </summary>
69 /// <param name="folder">A folder containing the details of the new location</param> 69 /// <param name="folder">A folder containing the details of the new location</param>
70 /// <returns>true if the folder was successfully moved</returns> 70 /// <returns>true if the folder was successfully moved</returns>
71 bool MoveFolder(InventoryFolderBase folder, LLUUID session_id); 71 bool MoveFolder(InventoryFolderBase folder, UUID session_id);
72 72
73 /// <summary> 73 /// <summary>
74 /// Purge an inventory folder of all its items and subfolders. 74 /// Purge an inventory folder of all its items and subfolders.
75 /// </summary> 75 /// </summary>
76 /// <param name="folder"></param> 76 /// <param name="folder"></param>
77 /// <returns>true if the folder was successfully purged</returns> 77 /// <returns>true if the folder was successfully purged</returns>
78 bool PurgeFolder(InventoryFolderBase folder, LLUUID session_id); 78 bool PurgeFolder(InventoryFolderBase folder, UUID session_id);
79 79
80 /// <summary> 80 /// <summary>
81 /// Add a new item to the user's inventory 81 /// Add a new item to the user's inventory
82 /// </summary> 82 /// </summary>
83 /// <param name="item"></param> 83 /// <param name="item"></param>
84 /// <returns>true if the item was successfully added</returns> 84 /// <returns>true if the item was successfully added</returns>
85 bool AddItem(InventoryItemBase item, LLUUID session_id); 85 bool AddItem(InventoryItemBase item, UUID session_id);
86 86
87 /// <summary> 87 /// <summary>
88 /// Update an item in the user's inventory 88 /// Update an item in the user's inventory
89 /// </summary> 89 /// </summary>
90 /// <param name="item"></param> 90 /// <param name="item"></param>
91 /// <returns>true if the item was successfully updated</returns> 91 /// <returns>true if the item was successfully updated</returns>
92 bool UpdateItem(InventoryItemBase item, LLUUID session_id); 92 bool UpdateItem(InventoryItemBase item, UUID session_id);
93 93
94 /// <summary> 94 /// <summary>
95 /// Delete an item from the user's inventory 95 /// Delete an item from the user's inventory
96 /// </summary> 96 /// </summary>
97 /// <param name="item"></param> 97 /// <param name="item"></param>
98 /// <returns>true if the item was successfully deleted</returns> 98 /// <returns>true if the item was successfully deleted</returns>
99 bool DeleteItem(InventoryItemBase item, LLUUID session_id); 99 bool DeleteItem(InventoryItemBase item, UUID session_id);
100 100
101 /// <summary> 101 /// <summary>
102 /// Does the given user have an inventory structure? 102 /// Does the given user have an inventory structure?
103 /// </summary> 103 /// </summary>
104 /// <param name="userID"></param> 104 /// <param name="userID"></param>
105 /// <returns></returns> 105 /// <returns></returns>
106 bool HasInventoryForUser(LLUUID userID); 106 bool HasInventoryForUser(UUID userID);
107 107
108 /// <summary> 108 /// <summary>
109 /// Retrieve the root inventory folder for the given user. 109 /// Retrieve the root inventory folder for the given user.
110 /// </summary> 110 /// </summary>
111 /// <param name="userID"></param> 111 /// <param name="userID"></param>
112 /// <returns>null if no root folder was found</returns> 112 /// <returns>null if no root folder was found</returns>
113 InventoryFolderBase RequestRootFolder(LLUUID userID); 113 InventoryFolderBase RequestRootFolder(UUID userID);
114 } 114 }
115} 115}
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index c1ae0e2..07ea437 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.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.Framework.Communications 31namespace OpenSim.Framework.Communications
32{ 32{
@@ -47,22 +47,22 @@ namespace OpenSim.Framework.Communications
47 /// </summary> 47 /// </summary>
48 /// <param name="uuid">The target UUID</param> 48 /// <param name="uuid">The target UUID</param>
49 /// <returns>A user profile. Returns null if no user profile is found.</returns> 49 /// <returns>A user profile. Returns null if no user profile is found.</returns>
50 UserProfileData GetUserProfile(LLUUID userId); 50 UserProfileData GetUserProfile(UUID userId);
51 51
52 UserAgentData GetAgentByUUID(LLUUID userId); 52 UserAgentData GetAgentByUUID(UUID userId);
53 53
54 void ClearUserAgent(LLUUID avatarID); 54 void ClearUserAgent(UUID avatarID);
55 List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID QueryID, string Query); 55 List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID QueryID, string Query);
56 56
57 UserProfileData SetupMasterUser(string firstName, string lastName); 57 UserProfileData SetupMasterUser(string firstName, string lastName);
58 UserProfileData SetupMasterUser(string firstName, string lastName, string password); 58 UserProfileData SetupMasterUser(string firstName, string lastName, string password);
59 UserProfileData SetupMasterUser(LLUUID userId); 59 UserProfileData SetupMasterUser(UUID userId);
60 60
61 /// <summary> 61 /// <summary>
62 /// 62 ///
63 /// </summary> 63 /// </summary>
64 /// <param name="user"></param> 64 /// <param name="user"></param>
65 LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); 65 UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
66 66
67 /// <summary> 67 /// <summary>
68 /// Update the user's profile. 68 /// Update the user's profile.
@@ -78,14 +78,14 @@ namespace OpenSim.Framework.Communications
78 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 78 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
79 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 79 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
80 /// <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> 80 /// <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>
81 void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms); 81 void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
82 82
83 /// <summary> 83 /// <summary>
84 /// Delete friend on friendlistowner's friendlist. 84 /// Delete friend on friendlistowner's friendlist.
85 /// </summary> 85 /// </summary>
86 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 86 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
87 /// <param name="friend">The Ex-friend agent</param> 87 /// <param name="friend">The Ex-friend agent</param>
88 void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend); 88 void RemoveUserFriend(UUID friendlistowner, UUID friend);
89 89
90 /// <summary> 90 /// <summary>
91 /// Update permissions for friend on friendlistowner's friendlist. 91 /// Update permissions for friend on friendlistowner's friendlist.
@@ -93,7 +93,7 @@ namespace OpenSim.Framework.Communications
93 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 93 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
94 /// <param name="friend">The agent that is getting or loosing permissions</param> 94 /// <param name="friend">The agent that is getting or loosing permissions</param>
95 /// <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> 95 /// <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>
96 void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms); 96 void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
97 97
98 /// <summary> 98 /// <summary>
99 /// Updates a user profile 99 /// Updates a user profile
@@ -110,31 +110,31 @@ namespace OpenSim.Framework.Communications
110 /// <param name="posx">final position x</param> 110 /// <param name="posx">final position x</param>
111 /// <param name="posy">final position y</param> 111 /// <param name="posy">final position y</param>
112 /// <param name="posz">final position z</param> 112 /// <param name="posz">final position z</param>
113 void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz); 113 void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz);
114 114
115 /// <summary> 115 /// <summary>
116 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 116 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
117 /// </summary> 117 /// </summary>
118 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 118 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
119 List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); 119 List<FriendListItem> GetUserFriendList(UUID friendlistowner);
120 120
121 /// <summary> 121 /// <summary>
122 /// Updates the current region the User is in 122 /// Updates the current region the User is in
123 /// </summary> 123 /// </summary>
124 /// <param name="avatarid">User Region the Avatar is IN</param> 124 /// <param name="avatarid">User Region the Avatar is IN</param>
125 /// <param name="retionuuid">User Region the Avatar is IN</param> 125 /// <param name="retionuuid">User Region the Avatar is IN</param>
126 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle); 126 void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle);
127 127
128 /// <summary> 128 /// <summary>
129 /// Get's the User Appearance 129 /// Get's the User Appearance
130 // AvatarAppearance GetUserAppearance(LLUUID user); 130 // AvatarAppearance GetUserAppearance(UUID user);
131 131
132 // void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 132 // void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
133 133
134 // void AddAttachment(LLUUID user, LLUUID attach); 134 // void AddAttachment(UUID user, UUID attach);
135 135
136 // void RemoveAttachment(LLUUID user, LLUUID attach); 136 // void RemoveAttachment(UUID user, UUID attach);
137 137
138 // List<LLUUID> GetAttachments(LLUUID user); 138 // List<UUID> GetAttachments(UUID user);
139 } 139 }
140} \ No newline at end of file 140}
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index c76c078..3239268 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32 32
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35 35
36namespace OpenSim.Framework.Communications 36namespace OpenSim.Framework.Communications
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications
57 new PluginLoader<IInventoryDataPlugin> (new InventoryDataInitialiser (connect)); 57 new PluginLoader<IInventoryDataPlugin> (new InventoryDataInitialiser (connect));
58 58
59 // loader will try to load all providers (MySQL, MSSQL, etc) 59 // loader will try to load all providers (MySQL, MSSQL, etc)
60 // unless it is constrainted to the correct "Provider" entry in the addin.xml 60 // unless it is constrainted to the correct "Provider" entry in the addin.Xml
61 loader.Add ("/OpenSim/InventoryData", new PluginProviderFilter (provider)); 61 loader.Add ("/OpenSim/InventoryData", new PluginProviderFilter (provider));
62 loader.Load(); 62 loader.Load();
63 63
@@ -74,7 +74,7 @@ namespace OpenSim.Framework.Communications
74 } 74 }
75 75
76 // See IInventoryServices 76 // See IInventoryServices
77 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) 77 public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
78 { 78 {
79// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); 79// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
80 80
@@ -105,13 +105,13 @@ namespace OpenSim.Framework.Communications
105 } 105 }
106 106
107 // See IInventoryServices 107 // See IInventoryServices
108 public virtual bool HasInventoryForUser(LLUUID userID) 108 public virtual bool HasInventoryForUser(UUID userID)
109 { 109 {
110 return false; 110 return false;
111 } 111 }
112 112
113 // See IInventoryServices 113 // See IInventoryServices
114 public InventoryFolderBase RequestRootFolder(LLUUID userID) 114 public InventoryFolderBase RequestRootFolder(UUID userID)
115 { 115 {
116 // FIXME: Probably doesn't do what was originally intended - only ever queries the first plugin 116 // FIXME: Probably doesn't do what was originally intended - only ever queries the first plugin
117 foreach (IInventoryDataPlugin plugin in m_plugins) 117 foreach (IInventoryDataPlugin plugin in m_plugins)
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Communications
122 } 122 }
123 123
124 // See IInventoryServices 124 // See IInventoryServices
125 public bool CreateNewUserInventory(LLUUID user) 125 public bool CreateNewUserInventory(UUID user)
126 { 126 {
127 InventoryFolderBase existingRootFolder = RequestRootFolder(user); 127 InventoryFolderBase existingRootFolder = RequestRootFolder(user);
128 128
@@ -146,13 +146,13 @@ namespace OpenSim.Framework.Communications
146 } 146 }
147 147
148 // See IInventoryServices 148 // See IInventoryServices
149 public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); 149 public abstract void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback);
150 150
151 #endregion 151 #endregion
152 152
153 #region Methods used by GridInventoryService 153 #region Methods used by GridInventoryService
154 154
155 public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID) 155 public List<InventoryFolderBase> RequestSubFolders(UUID parentFolderID)
156 { 156 {
157 List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); 157 List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
158 foreach (IInventoryDataPlugin plugin in m_plugins) 158 foreach (IInventoryDataPlugin plugin in m_plugins)
@@ -162,7 +162,7 @@ namespace OpenSim.Framework.Communications
162 return inventoryList; 162 return inventoryList;
163 } 163 }
164 164
165 public List<InventoryItemBase> RequestFolderItems(LLUUID folderID) 165 public List<InventoryItemBase> RequestFolderItems(UUID folderID)
166 { 166 {
167 List<InventoryItemBase> itemsList = new List<InventoryItemBase>(); 167 List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
168 foreach (IInventoryDataPlugin plugin in m_plugins) 168 foreach (IInventoryDataPlugin plugin in m_plugins)
@@ -313,27 +313,27 @@ namespace OpenSim.Framework.Communications
313 /// </summary> 313 /// </summary>
314 private class UsersInventory 314 private class UsersInventory
315 { 315 {
316 public Dictionary<LLUUID, InventoryFolderBase> Folders = new Dictionary<LLUUID, InventoryFolderBase>(); 316 public Dictionary<UUID, InventoryFolderBase> Folders = new Dictionary<UUID, InventoryFolderBase>();
317 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); 317 public Dictionary<UUID, InventoryItemBase> Items = new Dictionary<UUID, InventoryItemBase>();
318 318
319 public virtual void CreateNewInventorySet(LLUUID user) 319 public virtual void CreateNewInventorySet(UUID user)
320 { 320 {
321 InventoryFolderBase folder = new InventoryFolderBase(); 321 InventoryFolderBase folder = new InventoryFolderBase();
322 322
323 folder.ParentID = LLUUID.Zero; 323 folder.ParentID = UUID.Zero;
324 folder.Owner = user; 324 folder.Owner = user;
325 folder.ID = LLUUID.Random(); 325 folder.ID = UUID.Random();
326 folder.Name = "My Inventory"; 326 folder.Name = "My Inventory";
327 folder.Type = (short)AssetType.Folder; 327 folder.Type = (short)AssetType.Folder;
328 folder.Version = 1; 328 folder.Version = 1;
329 Folders.Add(folder.ID, folder); 329 Folders.Add(folder.ID, folder);
330 330
331 LLUUID rootFolder = folder.ID; 331 UUID rootFolder = folder.ID;
332 332
333 folder = new InventoryFolderBase(); 333 folder = new InventoryFolderBase();
334 folder.ParentID = rootFolder; 334 folder.ParentID = rootFolder;
335 folder.Owner = user; 335 folder.Owner = user;
336 folder.ID = LLUUID.Random(); 336 folder.ID = UUID.Random();
337 folder.Name = "Animations"; 337 folder.Name = "Animations";
338 folder.Type = (short)AssetType.Animation; 338 folder.Type = (short)AssetType.Animation;
339 folder.Version = 1; 339 folder.Version = 1;
@@ -342,7 +342,7 @@ namespace OpenSim.Framework.Communications
342 folder = new InventoryFolderBase(); 342 folder = new InventoryFolderBase();
343 folder.ParentID = rootFolder; 343 folder.ParentID = rootFolder;
344 folder.Owner = user; 344 folder.Owner = user;
345 folder.ID = LLUUID.Random(); 345 folder.ID = UUID.Random();
346 folder.Name = "Body Parts"; 346 folder.Name = "Body Parts";
347 folder.Type = (short)AssetType.Bodypart; 347 folder.Type = (short)AssetType.Bodypart;
348 folder.Version = 1; 348 folder.Version = 1;
@@ -351,7 +351,7 @@ namespace OpenSim.Framework.Communications
351 folder = new InventoryFolderBase(); 351 folder = new InventoryFolderBase();
352 folder.ParentID = rootFolder; 352 folder.ParentID = rootFolder;
353 folder.Owner = user; 353 folder.Owner = user;
354 folder.ID = LLUUID.Random(); 354 folder.ID = UUID.Random();
355 folder.Name = "Calling Cards"; 355 folder.Name = "Calling Cards";
356 folder.Type = (short)AssetType.CallingCard; 356 folder.Type = (short)AssetType.CallingCard;
357 folder.Version = 1; 357 folder.Version = 1;
@@ -360,7 +360,7 @@ namespace OpenSim.Framework.Communications
360 folder = new InventoryFolderBase(); 360 folder = new InventoryFolderBase();
361 folder.ParentID = rootFolder; 361 folder.ParentID = rootFolder;
362 folder.Owner = user; 362 folder.Owner = user;
363 folder.ID = LLUUID.Random(); 363 folder.ID = UUID.Random();
364 folder.Name = "Clothing"; 364 folder.Name = "Clothing";
365 folder.Type = (short)AssetType.Clothing; 365 folder.Type = (short)AssetType.Clothing;
366 folder.Version = 1; 366 folder.Version = 1;
@@ -369,7 +369,7 @@ namespace OpenSim.Framework.Communications
369 folder = new InventoryFolderBase(); 369 folder = new InventoryFolderBase();
370 folder.ParentID = rootFolder; 370 folder.ParentID = rootFolder;
371 folder.Owner = user; 371 folder.Owner = user;
372 folder.ID = LLUUID.Random(); 372 folder.ID = UUID.Random();
373 folder.Name = "Gestures"; 373 folder.Name = "Gestures";
374 folder.Type = (short)AssetType.Gesture; 374 folder.Type = (short)AssetType.Gesture;
375 folder.Version = 1; 375 folder.Version = 1;
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications
378 folder = new InventoryFolderBase(); 378 folder = new InventoryFolderBase();
379 folder.ParentID = rootFolder; 379 folder.ParentID = rootFolder;
380 folder.Owner = user; 380 folder.Owner = user;
381 folder.ID = LLUUID.Random(); 381 folder.ID = UUID.Random();
382 folder.Name = "Landmarks"; 382 folder.Name = "Landmarks";
383 folder.Type = (short)AssetType.Landmark; 383 folder.Type = (short)AssetType.Landmark;
384 folder.Version = 1; 384 folder.Version = 1;
@@ -387,7 +387,7 @@ namespace OpenSim.Framework.Communications
387 folder = new InventoryFolderBase(); 387 folder = new InventoryFolderBase();
388 folder.ParentID = rootFolder; 388 folder.ParentID = rootFolder;
389 folder.Owner = user; 389 folder.Owner = user;
390 folder.ID = LLUUID.Random(); 390 folder.ID = UUID.Random();
391 folder.Name = "Lost And Found"; 391 folder.Name = "Lost And Found";
392 folder.Type = (short)AssetType.LostAndFoundFolder; 392 folder.Type = (short)AssetType.LostAndFoundFolder;
393 folder.Version = 1; 393 folder.Version = 1;
@@ -396,7 +396,7 @@ namespace OpenSim.Framework.Communications
396 folder = new InventoryFolderBase(); 396 folder = new InventoryFolderBase();
397 folder.ParentID = rootFolder; 397 folder.ParentID = rootFolder;
398 folder.Owner = user; 398 folder.Owner = user;
399 folder.ID = LLUUID.Random(); 399 folder.ID = UUID.Random();
400 folder.Name = "Notecards"; 400 folder.Name = "Notecards";
401 folder.Type = (short)AssetType.Notecard; 401 folder.Type = (short)AssetType.Notecard;
402 folder.Version = 1; 402 folder.Version = 1;
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications
405 folder = new InventoryFolderBase(); 405 folder = new InventoryFolderBase();
406 folder.ParentID = rootFolder; 406 folder.ParentID = rootFolder;
407 folder.Owner = user; 407 folder.Owner = user;
408 folder.ID = LLUUID.Random(); 408 folder.ID = UUID.Random();
409 folder.Name = "Objects"; 409 folder.Name = "Objects";
410 folder.Type = (short)AssetType.Object; 410 folder.Type = (short)AssetType.Object;
411 folder.Version = 1; 411 folder.Version = 1;
@@ -414,7 +414,7 @@ namespace OpenSim.Framework.Communications
414 folder = new InventoryFolderBase(); 414 folder = new InventoryFolderBase();
415 folder.ParentID = rootFolder; 415 folder.ParentID = rootFolder;
416 folder.Owner = user; 416 folder.Owner = user;
417 folder.ID = LLUUID.Random(); 417 folder.ID = UUID.Random();
418 folder.Name = "Photo Album"; 418 folder.Name = "Photo Album";
419 folder.Type = (short)AssetType.SnapshotFolder; 419 folder.Type = (short)AssetType.SnapshotFolder;
420 folder.Version = 1; 420 folder.Version = 1;
@@ -423,7 +423,7 @@ namespace OpenSim.Framework.Communications
423 folder = new InventoryFolderBase(); 423 folder = new InventoryFolderBase();
424 folder.ParentID = rootFolder; 424 folder.ParentID = rootFolder;
425 folder.Owner = user; 425 folder.Owner = user;
426 folder.ID = LLUUID.Random(); 426 folder.ID = UUID.Random();
427 folder.Name = "Scripts"; 427 folder.Name = "Scripts";
428 folder.Type = (short)AssetType.LSLText; 428 folder.Type = (short)AssetType.LSLText;
429 folder.Version = 1; 429 folder.Version = 1;
@@ -432,7 +432,7 @@ namespace OpenSim.Framework.Communications
432 folder = new InventoryFolderBase(); 432 folder = new InventoryFolderBase();
433 folder.ParentID = rootFolder; 433 folder.ParentID = rootFolder;
434 folder.Owner = user; 434 folder.Owner = user;
435 folder.ID = LLUUID.Random(); 435 folder.ID = UUID.Random();
436 folder.Name = "Sounds"; 436 folder.Name = "Sounds";
437 folder.Type = (short)AssetType.Sound; 437 folder.Type = (short)AssetType.Sound;
438 folder.Version = 1; 438 folder.Version = 1;
@@ -441,7 +441,7 @@ namespace OpenSim.Framework.Communications
441 folder = new InventoryFolderBase(); 441 folder = new InventoryFolderBase();
442 folder.ParentID = rootFolder; 442 folder.ParentID = rootFolder;
443 folder.Owner = user; 443 folder.Owner = user;
444 folder.ID = LLUUID.Random(); 444 folder.ID = UUID.Random();
445 folder.Name = "Textures"; 445 folder.Name = "Textures";
446 folder.Type = (short)AssetType.Texture; 446 folder.Type = (short)AssetType.Texture;
447 folder.Version = 1; 447 folder.Version = 1;
@@ -450,7 +450,7 @@ namespace OpenSim.Framework.Communications
450 folder = new InventoryFolderBase(); 450 folder = new InventoryFolderBase();
451 folder.ParentID = rootFolder; 451 folder.ParentID = rootFolder;
452 folder.Owner = user; 452 folder.Owner = user;
453 folder.ID = LLUUID.Random(); 453 folder.ID = UUID.Random();
454 folder.Name = "Trash"; 454 folder.Name = "Trash";
455 folder.Type = (short)AssetType.TrashFolder; 455 folder.Type = (short)AssetType.TrashFolder;
456 folder.Version = 1; 456 folder.Version = 1;
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index 686d1bb..16be2b7 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -29,8 +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 libsecondlife; 32using OpenMetaverse;
33using libsecondlife.StructuredData; 33using OpenMetaverse.StructuredData;
34using log4net; 34using log4net;
35using Nwc.XmlRpc; 35using Nwc.XmlRpc;
36 36
@@ -63,9 +63,9 @@ namespace OpenSim.Framework.Communications
63 63
64 private UserInfo userProfile; 64 private UserInfo userProfile;
65 65
66 private LLUUID agentID; 66 private UUID agentID;
67 private LLUUID sessionID; 67 private UUID sessionID;
68 private LLUUID secureSessionID; 68 private UUID secureSessionID;
69 69
70 // Login Flags 70 // Login Flags
71 private string dst; 71 private string dst;
@@ -171,9 +171,9 @@ namespace OpenSim.Framework.Communications
171 AddClassifiedCategory((Int32) 8, "Service"); 171 AddClassifiedCategory((Int32) 8, "Service");
172 AddClassifiedCategory((Int32) 9, "Personal"); 172 AddClassifiedCategory((Int32) 9, "Personal");
173 173
174 SessionID = LLUUID.Random(); 174 SessionID = UUID.Random();
175 SecureSessionID = LLUUID.Random(); 175 SecureSessionID = UUID.Random();
176 AgentID = LLUUID.Random(); 176 AgentID = UUID.Random();
177 177
178 Hashtable InitialOutfitHash = new Hashtable(); 178 Hashtable InitialOutfitHash = new Hashtable();
179 InitialOutfitHash["folder_name"] = "Nightclub Female"; 179 InitialOutfitHash["folder_name"] = "Nightclub Female";
@@ -567,19 +567,19 @@ namespace OpenSim.Framework.Communications
567 set { simAddress = value; } 567 set { simAddress = value; }
568 } 568 }
569 569
570 public LLUUID AgentID 570 public UUID AgentID
571 { 571 {
572 get { return agentID; } 572 get { return agentID; }
573 set { agentID = value; } 573 set { agentID = value; }
574 } 574 }
575 575
576 public LLUUID SessionID 576 public UUID SessionID
577 { 577 {
578 get { return sessionID; } 578 get { return sessionID; }
579 set { sessionID = value; } 579 set { sessionID = value; }
580 } 580 }
581 581
582 public LLUUID SecureSessionID 582 public UUID SecureSessionID
583 { 583 {
584 get { return secureSessionID; } 584 get { return secureSessionID; }
585 set { secureSessionID = value; } 585 set { secureSessionID = value; }
@@ -724,8 +724,8 @@ namespace OpenSim.Framework.Communications
724 public string firstname; 724 public string firstname;
725 public string lastname; 725 public string lastname;
726 public ulong homeregionhandle; 726 public ulong homeregionhandle;
727 public LLVector3 homepos; 727 public Vector3 homepos;
728 public LLVector3 homelookat; 728 public Vector3 homelookat;
729 } 729 }
730 730
731 public class BuddyList 731 public class BuddyList
@@ -754,14 +754,14 @@ namespace OpenSim.Framework.Communications
754 { 754 {
755 public int BuddyRightsHave = 1; 755 public int BuddyRightsHave = 1;
756 public int BuddyRightsGiven = 1; 756 public int BuddyRightsGiven = 1;
757 public LLUUID BuddyID; 757 public UUID BuddyID;
758 758
759 public BuddyInfo(string buddyID) 759 public BuddyInfo(string buddyID)
760 { 760 {
761 BuddyID = new LLUUID(buddyID); 761 BuddyID = new UUID(buddyID);
762 } 762 }
763 763
764 public BuddyInfo(LLUUID buddyID) 764 public BuddyInfo(UUID buddyID)
765 { 765 {
766 BuddyID = buddyID; 766 BuddyID = buddyID;
767 } 767 }
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 73fba1e..d8d0fa2 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -33,8 +33,8 @@ using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using System.Web; 35using System.Web;
36using libsecondlife; 36using OpenMetaverse;
37using libsecondlife.StructuredData; 37using OpenMetaverse.StructuredData;
38using log4net; 38using log4net;
39using Nwc.XmlRpc; 39using Nwc.XmlRpc;
40using OpenSim.Framework.Communications.Cache; 40using OpenSim.Framework.Communications.Cache;
@@ -94,7 +94,7 @@ namespace OpenSim.Framework.Communications
94 /// <param name="userID"></param> 94 /// <param name="userID"></param>
95 /// <returns></returns> 95 /// <returns></returns>
96 /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> 96 /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception>
97 protected abstract InventoryData GetInventorySkeleton(LLUUID userID); 97 protected abstract InventoryData GetInventorySkeleton(UUID userID);
98 98
99 /// <summary> 99 /// <summary>
100 /// Called when we receive the client's initial XMLRPC login_to_simulator request message 100 /// Called when we receive the client's initial XMLRPC login_to_simulator request message
@@ -163,10 +163,10 @@ namespace OpenSim.Framework.Communications
163 } 163 }
164 else if (requestData.Contains("web_login_key")) 164 else if (requestData.Contains("web_login_key"))
165 { 165 {
166 LLUUID webloginkey = null; 166 UUID webloginkey = null;
167 try 167 try
168 { 168 {
169 webloginkey = new LLUUID((string)requestData["web_login_key"]); 169 webloginkey = new UUID((string)requestData["web_login_key"]);
170 } 170 }
171 catch (Exception e) 171 catch (Exception e)
172 { 172 {
@@ -227,7 +227,7 @@ namespace OpenSim.Framework.Communications
227 227
228 try 228 try
229 { 229 {
230 LLUUID agentID = userProfile.ID; 230 UUID agentID = userProfile.ID;
231 InventoryData inventData = null; 231 InventoryData inventData = null;
232 232
233 try 233 try
@@ -400,7 +400,7 @@ namespace OpenSim.Framework.Communications
400 400
401 try 401 try
402 { 402 {
403 LLUUID agentID = userProfile.ID; 403 UUID agentID = userProfile.ID;
404 404
405 //InventoryData inventData = GetInventorySkeleton(agentID); 405 //InventoryData inventData = GetInventorySkeleton(agentID);
406 InventoryData inventData = null; 406 InventoryData inventData = null;
@@ -566,7 +566,7 @@ namespace OpenSim.Framework.Communications
566 566
567 if (goodweblogin) 567 if (goodweblogin)
568 { 568 {
569 LLUUID webloginkey = LLUUID.Random(); 569 UUID webloginkey = UUID.Random();
570 m_userManager.StoreWebLoginKey(user.ID, webloginkey); 570 m_userManager.StoreWebLoginKey(user.ID, webloginkey);
571 statuscode = 301; 571 statuscode = 301;
572 572
@@ -737,13 +737,13 @@ namespace OpenSim.Framework.Communications
737 return passwordSuccess; 737 return passwordSuccess;
738 } 738 }
739 739
740 public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) 740 public virtual bool AuthenticateUser(UserProfileData profile, UUID webloginkey)
741 { 741 {
742 bool passwordSuccess = false; 742 bool passwordSuccess = false;
743 m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID); 743 m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID);
744 744
745 // Match web login key unless it's the default weblogin key LLUUID.Zero 745 // Match web login key unless it's the default weblogin key UUID.Zero
746 passwordSuccess = ((profile.WebLoginKey==webloginkey) && profile.WebLoginKey != LLUUID.Zero); 746 passwordSuccess = ((profile.WebLoginKey==webloginkey) && profile.WebLoginKey != UUID.Zero);
747 747
748 return passwordSuccess; 748 return passwordSuccess;
749 } 749 }
@@ -803,7 +803,7 @@ namespace OpenSim.Framework.Communications
803 /// <returns></returns> 803 /// <returns></returns>
804 protected virtual ArrayList GetInventoryLibrary() 804 protected virtual ArrayList GetInventoryLibrary()
805 { 805 {
806 Dictionary<LLUUID, InventoryFolderImpl> rootFolders 806 Dictionary<UUID, InventoryFolderImpl> rootFolders
807 = m_libraryRootFolder.RequestSelfAndDescendentFolders(); 807 = m_libraryRootFolder.RequestSelfAndDescendentFolders();
808 ArrayList folderHashes = new ArrayList(); 808 ArrayList folderHashes = new ArrayList();
809 809
@@ -838,9 +838,9 @@ namespace OpenSim.Framework.Communications
838 public class InventoryData 838 public class InventoryData
839 { 839 {
840 public ArrayList InventoryArray = null; 840 public ArrayList InventoryArray = null;
841 public LLUUID RootFolderID = LLUUID.Zero; 841 public UUID RootFolderID = UUID.Zero;
842 842
843 public InventoryData(ArrayList invList, LLUUID rootID) 843 public InventoryData(ArrayList invList, UUID rootID)
844 { 844 {
845 InventoryArray = invList; 845 InventoryArray = invList;
846 RootFolderID = rootID; 846 RootFolderID = rootID;
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index a35ed72..5a63e70 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -31,8 +31,8 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Security.Cryptography; 33using System.Security.Cryptography;
34using libsecondlife; 34using OpenMetaverse;
35using libsecondlife.StructuredData; 35using OpenMetaverse.StructuredData;
36using log4net; 36using log4net;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
38using OpenSim.Framework.Statistics; 38using OpenSim.Framework.Statistics;
@@ -59,7 +59,7 @@ namespace OpenSim.Framework.Communications
59 new PluginLoader<IUserDataPlugin> (new UserDataInitialiser (connect)); 59 new PluginLoader<IUserDataPlugin> (new UserDataInitialiser (connect));
60 60
61 // loader will try to load all providers (MySQL, MSSQL, etc) 61 // loader will try to load all providers (MySQL, MSSQL, etc)
62 // unless it is constrainted to the correct "Provider" entry in the addin.xml 62 // unless it is constrainted to the correct "Provider" entry in the addin.Xml
63 loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider)); 63 loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider));
64 loader.Load(); 64 loader.Load();
65 65
@@ -84,14 +84,14 @@ namespace OpenSim.Framework.Communications
84 84
85 return null; 85 return null;
86 } 86 }
87 public void ResetAttachments(LLUUID userID) 87 public void ResetAttachments(UUID userID)
88 { 88 {
89 foreach (IUserDataPlugin plugin in _plugins) 89 foreach (IUserDataPlugin plugin in _plugins)
90 { 90 {
91 plugin.ResetAttachments(userID); 91 plugin.ResetAttachments(userID);
92 } 92 }
93 } 93 }
94 public UserAgentData GetAgentByUUID(LLUUID userId) 94 public UserAgentData GetAgentByUUID(UUID userId)
95 { 95 {
96 foreach (IUserDataPlugin plugin in _plugins) 96 foreach (IUserDataPlugin plugin in _plugins)
97 { 97 {
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Communications
106 return null; 106 return null;
107 } 107 }
108 // see IUserService 108 // see IUserService
109 public UserProfileData GetUserProfile(LLUUID uuid) 109 public UserProfileData GetUserProfile(UUID uuid)
110 { 110 {
111 foreach (IUserDataPlugin plugin in _plugins) 111 foreach (IUserDataPlugin plugin in _plugins)
112 { 112 {
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Communications
122 return null; 122 return null;
123 } 123 }
124 124
125 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 125 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
126 { 126 {
127 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 127 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
128 foreach (IUserDataPlugin plugin in _plugins) 128 foreach (IUserDataPlugin plugin in _plugins)
@@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications
172 /// </summary> 172 /// </summary>
173 /// <param name="uuid">The agent's UUID</param> 173 /// <param name="uuid">The agent's UUID</param>
174 /// <returns>Agent profiles</returns> 174 /// <returns>Agent profiles</returns>
175 public UserAgentData GetUserAgent(LLUUID uuid) 175 public UserAgentData GetUserAgent(UUID uuid)
176 { 176 {
177 foreach (IUserDataPlugin plugin in _plugins) 177 foreach (IUserDataPlugin plugin in _plugins)
178 { 178 {
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications
234 return null; 234 return null;
235 } 235 }
236 236
237 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 237 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
238 { 238 {
239 foreach (IUserDataPlugin plugin in _plugins) 239 foreach (IUserDataPlugin plugin in _plugins)
240 { 240 {
@@ -254,7 +254,7 @@ namespace OpenSim.Framework.Communications
254 /// </summary> 254 /// </summary>
255 /// <param name="name">the UUID of the friend list owner</param> 255 /// <param name="name">the UUID of the friend list owner</param>
256 /// <returns>A List of FriendListItems that contains info about the user's friends</returns> 256 /// <returns>A List of FriendListItems that contains info about the user's friends</returns>
257 public List<FriendListItem> GetUserFriendList(LLUUID ownerID) 257 public List<FriendListItem> GetUserFriendList(UUID ownerID)
258 { 258 {
259 foreach (IUserDataPlugin plugin in _plugins) 259 foreach (IUserDataPlugin plugin in _plugins)
260 { 260 {
@@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications
271 return null; 271 return null;
272 } 272 }
273 273
274 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) 274 public void StoreWebLoginKey(UUID agentID, UUID webLoginKey)
275 { 275 {
276 foreach (IUserDataPlugin plugin in _plugins) 276 foreach (IUserDataPlugin plugin in _plugins)
277 { 277 {
@@ -286,7 +286,7 @@ namespace OpenSim.Framework.Communications
286 } 286 }
287 } 287 }
288 288
289 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 289 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
290 { 290 {
291 foreach (IUserDataPlugin plugin in _plugins) 291 foreach (IUserDataPlugin plugin in _plugins)
292 { 292 {
@@ -301,7 +301,7 @@ namespace OpenSim.Framework.Communications
301 } 301 }
302 } 302 }
303 303
304 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 304 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
305 { 305 {
306 foreach (IUserDataPlugin plugin in _plugins) 306 foreach (IUserDataPlugin plugin in _plugins)
307 { 307 {
@@ -316,7 +316,7 @@ namespace OpenSim.Framework.Communications
316 } 316 }
317 } 317 }
318 318
319 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 319 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
320 { 320 {
321 foreach (IUserDataPlugin plugin in _plugins) 321 foreach (IUserDataPlugin plugin in _plugins)
322 { 322 {
@@ -336,7 +336,7 @@ namespace OpenSim.Framework.Communications
336 /// Resets the currentAgent in the user profile 336 /// Resets the currentAgent in the user profile
337 /// </summary> 337 /// </summary>
338 /// <param name="agentID">The agent's ID</param> 338 /// <param name="agentID">The agent's ID</param>
339 public void ClearUserAgent(LLUUID agentID) 339 public void ClearUserAgent(UUID agentID)
340 { 340 {
341 UserProfileData profile = GetUserProfile(agentID); 341 UserProfileData profile = GetUserProfile(agentID);
342 342
@@ -382,8 +382,8 @@ namespace OpenSim.Framework.Communications
382 rand.GetBytes(randDataS); 382 rand.GetBytes(randDataS);
383 rand.GetBytes(randDataSS); 383 rand.GetBytes(randDataSS);
384 384
385 agent.SecureSessionID = new LLUUID(randDataSS, 0); 385 agent.SecureSessionID = new UUID(randDataSS, 0);
386 agent.SessionID = new LLUUID(randDataS, 0); 386 agent.SessionID = new UUID(randDataS, 0);
387 387
388 // Profile UUID 388 // Profile UUID
389 agent.ProfileID = profile.ID; 389 agent.ProfileID = profile.ID;
@@ -434,8 +434,8 @@ namespace OpenSim.Framework.Communications
434 agent.LogoutTime = 0; 434 agent.LogoutTime = 0;
435 435
436 // Current location 436 // Current location
437 agent.InitialRegion = LLUUID.Zero; // Fill in later 437 agent.InitialRegion = UUID.Zero; // Fill in later
438 agent.Region = LLUUID.Zero; // Fill in later 438 agent.Region = UUID.Zero; // Fill in later
439 439
440 profile.CurrentAgent = agent; 440 profile.CurrentAgent = agent;
441 } 441 }
@@ -449,14 +449,14 @@ namespace OpenSim.Framework.Communications
449 /// <param name="posx"></param> 449 /// <param name="posx"></param>
450 /// <param name="posy"></param> 450 /// <param name="posy"></param>
451 /// <param name="posz"></param> 451 /// <param name="posz"></param>
452 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 452 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
453 { 453 {
454 if (StatsManager.UserStats != null) 454 if (StatsManager.UserStats != null)
455 StatsManager.UserStats.AddLogout(); 455 StatsManager.UserStats.AddLogout();
456 456
457 UserProfileData userProfile; 457 UserProfileData userProfile;
458 UserAgentData userAgent; 458 UserAgentData userAgent;
459 LLVector3 currentPos = new LLVector3(posx, posy, posz); 459 Vector3 currentPos = new Vector3(posx, posy, posz);
460 460
461 userProfile = GetUserProfile(userid); 461 userProfile = GetUserProfile(userid);
462 462
@@ -470,8 +470,8 @@ namespace OpenSim.Framework.Communications
470 { 470 {
471 userAgent.AgentOnline = false; 471 userAgent.AgentOnline = false;
472 userAgent.LogoutTime = Util.UnixTimeSinceEpoch(); 472 userAgent.LogoutTime = Util.UnixTimeSinceEpoch();
473 //userAgent.sessionID = LLUUID.Zero; 473 //userAgent.sessionID = UUID.Zero;
474 if (regionid != LLUUID.Zero) 474 if (regionid != UUID.Zero)
475 { 475 {
476 userAgent.Region = regionid; 476 userAgent.Region = regionid;
477 } 477 }
@@ -508,8 +508,8 @@ namespace OpenSim.Framework.Communications
508 rand.GetBytes(randDataS); 508 rand.GetBytes(randDataS);
509 rand.GetBytes(randDataSS); 509 rand.GetBytes(randDataSS);
510 510
511 agent.SecureSessionID = new LLUUID(randDataSS, 0); 511 agent.SecureSessionID = new UUID(randDataSS, 0);
512 agent.SessionID = new LLUUID(randDataS, 0); 512 agent.SessionID = new UUID(randDataS, 0);
513 513
514 // Profile UUID 514 // Profile UUID
515 agent.ProfileID = profile.ID; 515 agent.ProfileID = profile.ID;
@@ -523,8 +523,8 @@ namespace OpenSim.Framework.Communications
523 agent.LogoutTime = 0; 523 agent.LogoutTime = 0;
524 524
525 // Current location 525 // Current location
526 agent.InitialRegion = LLUUID.Zero; // Fill in later 526 agent.InitialRegion = UUID.Zero; // Fill in later
527 agent.Region = LLUUID.Zero; // Fill in later 527 agent.Region = UUID.Zero; // Fill in later
528 528
529 profile.CurrentAgent = agent; 529 profile.CurrentAgent = agent;
530 } 530 }
@@ -550,17 +550,17 @@ namespace OpenSim.Framework.Communications
550 /// 550 ///
551 /// </summary> 551 /// </summary>
552 /// <param name="user"></param> 552 /// <param name="user"></param>
553 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 553 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
554 { 554 {
555 UserProfileData user = new UserProfileData(); 555 UserProfileData user = new UserProfileData();
556 user.HomeLocation = new LLVector3(128, 128, 100); 556 user.HomeLocation = new Vector3(128, 128, 100);
557 user.ID = LLUUID.Random(); 557 user.ID = UUID.Random();
558 user.FirstName = firstName; 558 user.FirstName = firstName;
559 user.SurName = lastName; 559 user.SurName = lastName;
560 user.PasswordHash = pass; 560 user.PasswordHash = pass;
561 user.PasswordSalt = String.Empty; 561 user.PasswordSalt = String.Empty;
562 user.Created = Util.UnixTimeSinceEpoch(); 562 user.Created = Util.UnixTimeSinceEpoch();
563 user.HomeLookAt = new LLVector3(100, 100, 100); 563 user.HomeLookAt = new Vector3(100, 100, 100);
564 user.HomeRegionX = regX; 564 user.HomeRegionX = regX;
565 user.HomeRegionY = regY; 565 user.HomeRegionY = regY;
566 566
@@ -604,7 +604,7 @@ namespace OpenSim.Framework.Communications
604 604
605 public abstract UserProfileData SetupMasterUser(string firstName, string lastName); 605 public abstract UserProfileData SetupMasterUser(string firstName, string lastName);
606 public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); 606 public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password);
607 public abstract UserProfileData SetupMasterUser(LLUUID uuid); 607 public abstract UserProfileData SetupMasterUser(UUID uuid);
608 608
609 /// <summary> 609 /// <summary>
610 /// Add agent to DB 610 /// Add agent to DB
@@ -629,7 +629,7 @@ namespace OpenSim.Framework.Communications
629 629
630 /// Appearance 630 /// Appearance
631 /// TODO: stubs for now to get us to a compiling state gently 631 /// TODO: stubs for now to get us to a compiling state gently
632 public AvatarAppearance GetUserAppearance(LLUUID user) 632 public AvatarAppearance GetUserAppearance(UUID user)
633 { 633 {
634 foreach (IUserDataPlugin plugin in _plugins) 634 foreach (IUserDataPlugin plugin in _plugins)
635 { 635 {
@@ -645,7 +645,7 @@ namespace OpenSim.Framework.Communications
645 return null; 645 return null;
646 } 646 }
647 647
648 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 648 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
649 { 649 {
650 foreach (IUserDataPlugin plugin in _plugins) 650 foreach (IUserDataPlugin plugin in _plugins)
651 { 651 {
diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
index 4770017..0929172 100644
--- a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
+++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Configuration.HTTP
47 47
48 public HTTPConfiguration() 48 public HTTPConfiguration()
49 { 49 {
50 remoteConfigSettings = new RemoteConfigSettings("remoteconfig.xml"); 50 remoteConfigSettings = new RemoteConfigSettings("remoteconfig.Xml");
51 xmlConfig = new XmlConfiguration(); 51 xmlConfig = new XmlConfiguration();
52 } 52 }
53 53
diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
index 89f52cf..e3da962 100644
--- a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
+++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Configuration.XML
48 { 48 {
49 rootNode = doc.SelectSingleNode("Root"); 49 rootNode = doc.SelectSingleNode("Root");
50 if (null == rootNode) 50 if (null == rootNode)
51 throw new Exception("Error: Invalid .xml File. Missing <Root>"); 51 throw new Exception("Error: Invalid .Xml File. Missing <Root>");
52 52
53 configNode = rootNode.SelectSingleNode("Config"); 53 configNode = rootNode.SelectSingleNode("Config");
54 if (null == configNode) 54 if (null == configNode)
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index c363ec0..9fdb046 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -31,7 +31,7 @@ using System.Globalization;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Xml; 33using System.Xml;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37 37
@@ -359,36 +359,36 @@ namespace OpenSim.Framework
359 } 359 }
360 errorMessage = "an IP Address (IPAddress)"; 360 errorMessage = "an IP Address (IPAddress)";
361 break; 361 break;
362 case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID: 362 case ConfigurationOption.ConfigurationTypes.TYPE_UUID:
363 LLUUID uuidResult; 363 UUID uuidResult;
364 if (LLUUID.TryParse(console_result, out uuidResult)) 364 if (UUID.TryParse(console_result, out uuidResult))
365 { 365 {
366 convertSuccess = true; 366 convertSuccess = true;
367 return_result = uuidResult; 367 return_result = uuidResult;
368 } 368 }
369 errorMessage = "a UUID (LLUUID)"; 369 errorMessage = "a UUID (UUID)";
370 break; 370 break;
371 case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE: 371 case ConfigurationOption.ConfigurationTypes.TYPE_UUID_NULL_FREE:
372 LLUUID uuidResult2; 372 UUID uuidResult2;
373 if (LLUUID.TryParse(console_result, out uuidResult2)) 373 if (UUID.TryParse(console_result, out uuidResult2))
374 { 374 {
375 convertSuccess = true; 375 convertSuccess = true;
376 376
377 if (uuidResult2 == LLUUID.Zero) 377 if (uuidResult2 == UUID.Zero)
378 uuidResult2 = LLUUID.Random(); 378 uuidResult2 = UUID.Random();
379 379
380 return_result = uuidResult2; 380 return_result = uuidResult2;
381 } 381 }
382 errorMessage = "a non-null UUID (LLUUID)"; 382 errorMessage = "a non-null UUID (UUID)";
383 break; 383 break;
384 case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3: 384 case ConfigurationOption.ConfigurationTypes.TYPE_Vector3:
385 LLVector3 vectorResult; 385 Vector3 vectorResult;
386 if (LLVector3.TryParse(console_result, out vectorResult)) 386 if (Vector3.TryParse(console_result, out vectorResult))
387 { 387 {
388 convertSuccess = true; 388 convertSuccess = true;
389 return_result = vectorResult; 389 return_result = vectorResult;
390 } 390 }
391 errorMessage = "a vector (LLVector3)"; 391 errorMessage = "a vector (Vector3)";
392 break; 392 break;
393 case ConfigurationOption.ConfigurationTypes.TYPE_UINT16: 393 case ConfigurationOption.ConfigurationTypes.TYPE_UINT16:
394 ushort ushortResult; 394 ushort ushortResult;
diff --git a/OpenSim/Framework/ConfigurationOption.cs b/OpenSim/Framework/ConfigurationOption.cs
index 341d5e8..538ab62 100644
--- a/OpenSim/Framework/ConfigurationOption.cs
+++ b/OpenSim/Framework/ConfigurationOption.cs
@@ -53,9 +53,9 @@ namespace OpenSim.Framework
53 TYPE_CHARACTER, 53 TYPE_CHARACTER,
54 TYPE_BOOLEAN, 54 TYPE_BOOLEAN,
55 TYPE_BYTE, 55 TYPE_BYTE,
56 TYPE_LLUUID, 56 TYPE_UUID,
57 TYPE_LLUUID_NULL_FREE, 57 TYPE_UUID_NULL_FREE,
58 TYPE_LLVECTOR3, 58 TYPE_Vector3,
59 TYPE_FLOAT, 59 TYPE_FLOAT,
60 TYPE_DOUBLE 60 TYPE_DOUBLE
61 } ; 61 } ;
@@ -71,4 +71,4 @@ namespace OpenSim.Framework
71 public bool configurationUseDefaultNoPrompt = false; 71 public bool configurationUseDefaultNoPrompt = false;
72 public ConfigurationOptionShouldBeAsked shouldIBeAsked; //Should I be asked now? Based on previous answers 72 public ConfigurationOptionShouldBeAsked shouldIBeAsked; //Should I be asked now? Based on previous answers
73 } 73 }
74} \ No newline at end of file 74}
diff --git a/OpenSim/Framework/EstateBan.cs b/OpenSim/Framework/EstateBan.cs
index c213344..4d31514 100644
--- a/OpenSim/Framework/EstateBan.cs
+++ b/OpenSim/Framework/EstateBan.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; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
@@ -35,7 +35,7 @@ namespace OpenSim.Framework
35 public class EstateBan 35 public class EstateBan
36 { 36 {
37 public uint estateID = 1; 37 public uint estateID = 1;
38 public LLUUID bannedUUID = LLUUID.Zero; 38 public UUID bannedUUID = UUID.Zero;
39 public string bannedIP = string.Empty; 39 public string bannedIP = string.Empty;
40 public string bannedIPHostMask = string.Empty; 40 public string bannedIPHostMask = string.Empty;
41 public string bannedNameMask = string.Empty; 41 public string bannedNameMask = string.Empty;
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 8b076fe..83f911d 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -29,7 +29,7 @@ using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34 34
35namespace OpenSim.Framework 35namespace OpenSim.Framework
@@ -223,9 +223,9 @@ namespace OpenSim.Framework
223 set { m_AbuseEmail= value; } 223 set { m_AbuseEmail= value; }
224 } 224 }
225 225
226 private LLUUID m_EstateOwner = LLUUID.Zero; 226 private UUID m_EstateOwner = UUID.Zero;
227 227
228 public LLUUID EstateOwner 228 public UUID EstateOwner
229 { 229 {
230 get { return m_EstateOwner; } 230 get { return m_EstateOwner; }
231 set { m_EstateOwner = value; } 231 set { m_EstateOwner = value; }
@@ -241,12 +241,12 @@ namespace OpenSim.Framework
241 241
242 // All those lists... 242 // All those lists...
243 // 243 //
244 private List<LLUUID> l_EstateManagers = new List<LLUUID>(); 244 private List<UUID> l_EstateManagers = new List<UUID>();
245 245
246 public LLUUID[] EstateManagers 246 public UUID[] EstateManagers
247 { 247 {
248 get { return l_EstateManagers.ToArray(); } 248 get { return l_EstateManagers.ToArray(); }
249 set { l_EstateManagers = new List<LLUUID>(value); } 249 set { l_EstateManagers = new List<UUID>(value); }
250 } 250 }
251 251
252 private List<EstateBan> l_EstateBans = new List<EstateBan>(); 252 private List<EstateBan> l_EstateBans = new List<EstateBan>();
@@ -257,20 +257,20 @@ namespace OpenSim.Framework
257 set { l_EstateBans = new List<EstateBan>(value); } 257 set { l_EstateBans = new List<EstateBan>(value); }
258 } 258 }
259 259
260 private List<LLUUID> l_EstateAccess = new List<LLUUID>(); 260 private List<UUID> l_EstateAccess = new List<UUID>();
261 261
262 public LLUUID[] EstateAccess 262 public UUID[] EstateAccess
263 { 263 {
264 get { return l_EstateAccess.ToArray(); } 264 get { return l_EstateAccess.ToArray(); }
265 set { l_EstateAccess = new List<LLUUID>(value); } 265 set { l_EstateAccess = new List<UUID>(value); }
266 } 266 }
267 267
268 private List<LLUUID> l_EstateGroups = new List<LLUUID>(); 268 private List<UUID> l_EstateGroups = new List<UUID>();
269 269
270 public LLUUID[] EstateGroups 270 public UUID[] EstateGroups
271 { 271 {
272 get { return l_EstateGroups.ToArray(); } 272 get { return l_EstateGroups.ToArray(); }
273 set { l_EstateGroups = new List<LLUUID>(value); } 273 set { l_EstateGroups = new List<UUID>(value); }
274 } 274 }
275 275
276 public EstateSettings() 276 public EstateSettings()
@@ -281,7 +281,7 @@ namespace OpenSim.Framework
281 // 281 //
282 configMember = 282 configMember =
283 new ConfigurationMember(Path.Combine(Util.configDir(), 283 new ConfigurationMember(Path.Combine(Util.configDir(),
284 "estate_settings.xml"), "ESTATE SETTINGS", 284 "estate_settings.Xml"), "ESTATE SETTINGS",
285 loadConfigurationOptions, 285 loadConfigurationOptions,
286 handleIncomingConfiguration, true); 286 handleIncomingConfiguration, true);
287 287
@@ -296,21 +296,21 @@ namespace OpenSim.Framework
296 OnSave(this); 296 OnSave(this);
297 } 297 }
298 298
299 public void AddEstateManager(LLUUID avatarID) 299 public void AddEstateManager(UUID avatarID)
300 { 300 {
301 if (avatarID == LLUUID.Zero) 301 if (avatarID == UUID.Zero)
302 return; 302 return;
303 if (!l_EstateManagers.Contains(avatarID)) 303 if (!l_EstateManagers.Contains(avatarID))
304 l_EstateManagers.Add(avatarID); 304 l_EstateManagers.Add(avatarID);
305 } 305 }
306 306
307 public void RemoveEstateManager(LLUUID avatarID) 307 public void RemoveEstateManager(UUID avatarID)
308 { 308 {
309 if (l_EstateManagers.Contains(avatarID)) 309 if (l_EstateManagers.Contains(avatarID))
310 l_EstateManagers.Remove(avatarID); 310 l_EstateManagers.Remove(avatarID);
311 } 311 }
312 312
313 public bool IsEstateManager(LLUUID avatarID) 313 public bool IsEstateManager(UUID avatarID)
314 { 314 {
315 if (IsEstateOwner(avatarID)) 315 if (IsEstateOwner(avatarID))
316 return true; 316 return true;
@@ -318,7 +318,7 @@ namespace OpenSim.Framework
318 return l_EstateManagers.Contains(avatarID); 318 return l_EstateManagers.Contains(avatarID);
319 } 319 }
320 320
321 public bool IsEstateOwner(LLUUID avatarID) 321 public bool IsEstateOwner(UUID avatarID)
322 { 322 {
323 if (avatarID == m_EstateOwner) 323 if (avatarID == m_EstateOwner)
324 return true; 324 return true;
@@ -326,7 +326,7 @@ namespace OpenSim.Framework
326 return false; 326 return false;
327 } 327 }
328 328
329 public bool IsBanned(LLUUID avatarID) 329 public bool IsBanned(UUID avatarID)
330 { 330 {
331 foreach (EstateBan ban in l_EstateBans) 331 foreach (EstateBan ban in l_EstateBans)
332 if (ban.bannedUUID == avatarID) 332 if (ban.bannedUUID == avatarID)
@@ -347,7 +347,7 @@ namespace OpenSim.Framework
347 l_EstateBans.Clear(); 347 l_EstateBans.Clear();
348 } 348 }
349 349
350 public void RemoveBan(LLUUID avatarID) 350 public void RemoveBan(UUID avatarID)
351 { 351 {
352 foreach (EstateBan ban in new List<EstateBan>(l_EstateBans)) 352 foreach (EstateBan ban in new List<EstateBan>(l_EstateBans))
353 if (ban.bannedUUID == avatarID) 353 if (ban.bannedUUID == avatarID)
@@ -385,43 +385,43 @@ namespace OpenSim.Framework
385 String.Empty, "My Estate", true); 385 String.Empty, "My Estate", true);
386 386
387 configMember.addConfigurationOption("estate_manager_0", 387 configMember.addConfigurationOption("estate_manager_0",
388 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 388 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
389 String.Empty, "00000000-0000-0000-0000-000000000000", true); 389 String.Empty, "00000000-0000-0000-0000-000000000000", true);
390 390
391 configMember.addConfigurationOption("estate_manager_1", 391 configMember.addConfigurationOption("estate_manager_1",
392 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 392 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
393 String.Empty, "00000000-0000-0000-0000-000000000000", true); 393 String.Empty, "00000000-0000-0000-0000-000000000000", true);
394 394
395 configMember.addConfigurationOption("estate_manager_2", 395 configMember.addConfigurationOption("estate_manager_2",
396 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 396 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
397 String.Empty, "00000000-0000-0000-0000-000000000000", true); 397 String.Empty, "00000000-0000-0000-0000-000000000000", true);
398 398
399 configMember.addConfigurationOption("estate_manager_3", 399 configMember.addConfigurationOption("estate_manager_3",
400 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 400 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
401 String.Empty, "00000000-0000-0000-0000-000000000000", true); 401 String.Empty, "00000000-0000-0000-0000-000000000000", true);
402 402
403 configMember.addConfigurationOption("estate_manager_4", 403 configMember.addConfigurationOption("estate_manager_4",
404 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 404 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
405 String.Empty, "00000000-0000-0000-0000-000000000000", true); 405 String.Empty, "00000000-0000-0000-0000-000000000000", true);
406 406
407 configMember.addConfigurationOption("estate_manager_5", 407 configMember.addConfigurationOption("estate_manager_5",
408 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 408 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
409 String.Empty, "00000000-0000-0000-0000-000000000000", true); 409 String.Empty, "00000000-0000-0000-0000-000000000000", true);
410 410
411 configMember.addConfigurationOption("estate_manager_6", 411 configMember.addConfigurationOption("estate_manager_6",
412 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 412 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
413 String.Empty, "00000000-0000-0000-0000-000000000000", true); 413 String.Empty, "00000000-0000-0000-0000-000000000000", true);
414 414
415 configMember.addConfigurationOption("estate_manager_7", 415 configMember.addConfigurationOption("estate_manager_7",
416 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 416 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
417 String.Empty, "00000000-0000-0000-0000-000000000000", true); 417 String.Empty, "00000000-0000-0000-0000-000000000000", true);
418 418
419 configMember.addConfigurationOption("estate_manager_8", 419 configMember.addConfigurationOption("estate_manager_8",
420 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 420 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
421 String.Empty, "00000000-0000-0000-0000-000000000000", true); 421 String.Empty, "00000000-0000-0000-0000-000000000000", true);
422 422
423 configMember.addConfigurationOption("estate_manager_9", 423 configMember.addConfigurationOption("estate_manager_9",
424 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 424 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
425 String.Empty, "00000000-0000-0000-0000-000000000000", true); 425 String.Empty, "00000000-0000-0000-0000-000000000000", true);
426 426
427 configMember.addConfigurationOption("region_flags", 427 configMember.addConfigurationOption("region_flags",
@@ -480,34 +480,34 @@ namespace OpenSim.Framework
480 m_EstateName = (string) configuration_result; 480 m_EstateName = (string) configuration_result;
481 break; 481 break;
482 case "estate_manager_0": 482 case "estate_manager_0":
483 AddEstateManager((LLUUID)configuration_result); 483 AddEstateManager((UUID)configuration_result);
484 break; 484 break;
485 case "estate_manager_1": 485 case "estate_manager_1":
486 AddEstateManager((LLUUID)configuration_result); 486 AddEstateManager((UUID)configuration_result);
487 break; 487 break;
488 case "estate_manager_2": 488 case "estate_manager_2":
489 AddEstateManager((LLUUID)configuration_result); 489 AddEstateManager((UUID)configuration_result);
490 break; 490 break;
491 case "estate_manager_3": 491 case "estate_manager_3":
492 AddEstateManager((LLUUID)configuration_result); 492 AddEstateManager((UUID)configuration_result);
493 break; 493 break;
494 case "estate_manager_4": 494 case "estate_manager_4":
495 AddEstateManager((LLUUID)configuration_result); 495 AddEstateManager((UUID)configuration_result);
496 break; 496 break;
497 case "estate_manager_5": 497 case "estate_manager_5":
498 AddEstateManager((LLUUID)configuration_result); 498 AddEstateManager((UUID)configuration_result);
499 break; 499 break;
500 case "estate_manager_6": 500 case "estate_manager_6":
501 AddEstateManager((LLUUID)configuration_result); 501 AddEstateManager((UUID)configuration_result);
502 break; 502 break;
503 case "estate_manager_7": 503 case "estate_manager_7":
504 AddEstateManager((LLUUID)configuration_result); 504 AddEstateManager((UUID)configuration_result);
505 break; 505 break;
506 case "estate_manager_8": 506 case "estate_manager_8":
507 AddEstateManager((LLUUID)configuration_result); 507 AddEstateManager((UUID)configuration_result);
508 break; 508 break;
509 case "estate_manager_9": 509 case "estate_manager_9":
510 AddEstateManager((LLUUID)configuration_result); 510 AddEstateManager((UUID)configuration_result);
511 break; 511 break;
512 } 512 }
513 513
diff --git a/OpenSim/Framework/FriendListItem.cs b/OpenSim/Framework/FriendListItem.cs
index d3ca759..2861ce2 100644
--- a/OpenSim/Framework/FriendListItem.cs
+++ b/OpenSim/Framework/FriendListItem.cs
@@ -25,14 +25,14 @@
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.Framework 30namespace OpenSim.Framework
31{ 31{
32 public class FriendListItem 32 public class FriendListItem
33 { 33 {
34 public LLUUID Friend; 34 public UUID Friend;
35 public LLUUID FriendListOwner; 35 public UUID FriendListOwner;
36 36
37 // These are what the list owner gives the friend permission to do 37 // These are what the list owner gives the friend permission to do
38 38
@@ -42,4 +42,4 @@ namespace OpenSim.Framework
42 42
43 public bool onlinestatus = false; 43 public bool onlinestatus = false;
44 } 44 }
45} \ No newline at end of file 45}
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs
index 08c5f28..037f110 100644
--- a/OpenSim/Framework/GridInstantMessage.cs
+++ b/OpenSim/Framework/GridInstantMessage.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using OpenMetaverse;
29 30
30namespace OpenSim.Framework 31namespace OpenSim.Framework
31{ 32{
@@ -45,7 +46,7 @@ namespace OpenSim.Framework
45 46
46 public uint ParentEstateID; 47 public uint ParentEstateID;
47 48
48 public sLLVector3 Position; 49 public Vector3 Position;
49 50
50 public Guid RegionID; 51 public Guid RegionID;
51 public uint timestamp; 52 public uint timestamp;
@@ -55,4 +56,4 @@ namespace OpenSim.Framework
55 { 56 {
56 } 57 }
57 } 58 }
58} \ No newline at end of file 59}
diff --git a/OpenSim/Framework/IAssetProvider.cs b/OpenSim/Framework/IAssetProvider.cs
index ec70554..4c86279 100644
--- a/OpenSim/Framework/IAssetProvider.cs
+++ b/OpenSim/Framework/IAssetProvider.cs
@@ -25,16 +25,16 @@
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.Framework 30namespace OpenSim.Framework
31{ 31{
32 public interface IAssetProviderPlugin : IPlugin 32 public interface IAssetProviderPlugin : IPlugin
33 { 33 {
34 AssetBase FetchAsset(LLUUID uuid); 34 AssetBase FetchAsset(UUID uuid);
35 void CreateAsset(AssetBase asset); 35 void CreateAsset(AssetBase asset);
36 void UpdateAsset(AssetBase asset); 36 void UpdateAsset(AssetBase asset);
37 bool ExistsAsset(LLUUID uuid); 37 bool ExistsAsset(UUID uuid);
38 void Initialise(string connect); 38 void Initialise(string connect);
39 } 39 }
40 40
diff --git a/OpenSim/Framework/IAssetServer.cs b/OpenSim/Framework/IAssetServer.cs
index f96bdc6..d2f5ce7 100644
--- a/OpenSim/Framework/IAssetServer.cs
+++ b/OpenSim/Framework/IAssetServer.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
@@ -35,7 +35,7 @@ namespace OpenSim.Framework
35 public interface IAssetServer 35 public interface IAssetServer
36 { 36 {
37 void SetReceiver(IAssetReceiver receiver); 37 void SetReceiver(IAssetReceiver receiver);
38 void RequestAsset(LLUUID assetID, bool isTexture); 38 void RequestAsset(UUID assetID, bool isTexture);
39 void StoreAsset(AssetBase asset); 39 void StoreAsset(AssetBase asset);
40 void UpdateAsset(AssetBase asset); 40 void UpdateAsset(AssetBase asset);
41 void Close(); 41 void Close();
@@ -59,7 +59,7 @@ namespace OpenSim.Framework
59 /// </summary> 59 /// </summary>
60 /// <param name="assetID"></param> 60 /// <param name="assetID"></param>
61 /// <param name="IsTexture"></param> 61 /// <param name="IsTexture"></param>
62 void AssetNotFound(LLUUID assetID, bool IsTexture); 62 void AssetNotFound(UUID assetID, bool IsTexture);
63 } 63 }
64 64
65 public interface IAssetPlugin 65 public interface IAssetPlugin
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 224b51b..a7baf0e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.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;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
35{ 35{
@@ -44,20 +44,20 @@ namespace OpenSim.Framework
44 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); 44 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
45 45
46 public delegate void ImprovedInstantMessage(IClientAPI remoteclient, 46 public delegate void ImprovedInstantMessage(IClientAPI remoteclient,
47 LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, 47 UUID fromAgentID, UUID fromAgentSession, UUID toAgentID, UUID imSessionID, uint timestamp,
48 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, 48 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID,
49 LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... 49 Vector3 Position, UUID RegionID, byte[] binaryBucket); // This shouldn't be cut down...
50 // especially if we're ever going to implement groups, presence, estate message dialogs... 50 // especially if we're ever going to implement groups, presence, estate message dialogs...
51 51
52 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 52 public delegate void RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
53 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 53 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
54 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 54 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
55 bool RezSelected, bool RemoveItem, LLUUID fromTaskID); 55 bool RezSelected, bool RemoveItem, UUID fromTaskID);
56 56
57 public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt, 57 public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, UUID itemID, uint AttachmentPt,
58 uint ItemFlags, uint NextOwnerMask); 58 uint ItemFlags, uint NextOwnerMask);
59 59
60 public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot); 60 public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot);
61 61
62 public delegate void ModifyTerrain( 62 public delegate void ModifyTerrain(
63 float height, float seconds, byte size, byte action, float north, float west, float south, float east, 63 float height, float seconds, byte size, byte action, float north, float west, float south, float east,
@@ -65,9 +65,9 @@ namespace OpenSim.Framework
65 65
66 public delegate void SetAppearance(byte[] texture, List<byte> visualParamList); 66 public delegate void SetAppearance(byte[] texture, List<byte> visualParamList);
67 67
68 public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID); 68 public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
69 69
70 public delegate void StopAnim(IClientAPI remoteClient, LLUUID animID); 70 public delegate void StopAnim(IClientAPI remoteClient, UUID animID);
71 71
72 public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children); 72 public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
73 73
@@ -78,14 +78,14 @@ namespace OpenSim.Framework
78 public delegate void RequestMapName(IClientAPI remoteClient, string mapName); 78 public delegate void RequestMapName(IClientAPI remoteClient, string mapName);
79 79
80 public delegate void TeleportLocationRequest( 80 public delegate void TeleportLocationRequest(
81 IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); 81 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
82 82
83 public delegate void TeleportLandmarkRequest( 83 public delegate void TeleportLandmarkRequest(
84 IClientAPI remoteClient, LLUUID regionID, LLVector3 position); 84 IClientAPI remoteClient, UUID regionID, Vector3 position);
85 85
86 public delegate void DisconnectUser(); 86 public delegate void DisconnectUser();
87 87
88 public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); 88 public delegate void RequestAvatarProperties(IClientAPI remoteClient, UUID avatarID);
89 89
90 public delegate void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData ProfileData); 90 public delegate void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData ProfileData);
91 91
@@ -100,14 +100,14 @@ namespace OpenSim.Framework
100 100
101 public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message); 101 public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
102 102
103 public delegate void UpdateShape(LLUUID agentID, uint localID, UpdateShapeArgs shapeBlock); 103 public delegate void UpdateShape(UUID agentID, uint localID, UpdateShapeArgs shapeBlock);
104 104
105 public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data); 105 public delegate void ObjectExtraParams(UUID agentID, uint localID, ushort type, bool inUse, byte[] data);
106 106
107 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); 107 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
108 108
109 public delegate void RequestObjectPropertiesFamily( 109 public delegate void RequestObjectPropertiesFamily(
110 IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID TaskID); 110 IClientAPI remoteClient, UUID AgentID, uint RequestFlags, UUID TaskID);
111 111
112 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); 112 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
113 113
@@ -115,41 +115,41 @@ namespace OpenSim.Framework
115 115
116 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); 116 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
117 117
118 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); 118 public delegate void UpdateVector(uint localID, Vector3 pos, IClientAPI remoteClient);
119 119
120 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 120 public delegate void UpdatePrimRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
121 121
122 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 122 public delegate void UpdatePrimSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient);
123 123
124 public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); 124 public delegate void UpdatePrimGroupRotation(uint localID, Vector3 pos, Quaternion rot, IClientAPI remoteClient);
125 125
126 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID); 126 public delegate void ObjectDuplicate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID);
127 127
128 public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 128 public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
129 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 129 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
130 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates); 130 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates);
131 131
132 132
133 public delegate void StatusChange(bool status); 133 public delegate void StatusChange(bool status);
134 134
135 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); 135 public delegate void NewAvatar(IClientAPI remoteClient, UUID agentID, bool status);
136 136
137 public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData); 137 public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData);
138 138
139 public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset); 139 public delegate void AgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset);
140 140
141 public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); 141 public delegate void AgentSit(IClientAPI remoteClient, UUID agentID);
142 142
143 public delegate void AvatarPickerRequest(IClientAPI remoteClient, LLUUID agentdata, LLUUID queryID, string UserQuery 143 public delegate void AvatarPickerRequest(IClientAPI remoteClient, UUID agentdata, UUID queryID, string UserQuery
144 ); 144 );
145 145
146 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); 146 public delegate void MoveObject(UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient);
147 147
148 public delegate void ParcelAccessListRequest( 148 public delegate void ParcelAccessListRequest(
149 LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); 149 UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);
150 150
151 public delegate void ParcelAccessListUpdateRequest( 151 public delegate void ParcelAccessListUpdateRequest(
152 LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries, 152 UUID agentID, UUID sessionID, uint flags, int landLocalID, List<ParcelManager.ParcelAccessEntry> entries,
153 IClientAPI remote_client); 153 IClientAPI remote_client);
154 154
155 public delegate void ParcelPropertiesRequest( 155 public delegate void ParcelPropertiesRequest(
@@ -168,80 +168,80 @@ namespace OpenSim.Framework
168 public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client); 168 public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
169 public delegate void ParcelReclaim(int local_id, IClientAPI remote_client); 169 public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
170 170
171 public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, LLUUID[] agent_ids, LLUUID[] selected_ids, IClientAPI remote_client); 171 public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, UUID[] agent_ids, UUID[] selected_ids, IClientAPI remote_client);
172 172
173 public delegate void EstateOwnerMessageRequest(LLUUID AgentID, LLUUID SessionID, LLUUID TransactionID, LLUUID Invoice, byte[] Method, byte[][] Parameters, IClientAPI remote_client); 173 public delegate void EstateOwnerMessageRequest(UUID AgentID, UUID SessionID, UUID TransactionID, UUID Invoice, byte[] Method, byte[][] Parameters, IClientAPI remote_client);
174 174
175 public delegate void RegionInfoRequest(IClientAPI remote_client); 175 public delegate void RegionInfoRequest(IClientAPI remote_client);
176 176
177 public delegate void EstateCovenantRequest(IClientAPI remote_client); 177 public delegate void EstateCovenantRequest(IClientAPI remote_client);
178 178
179 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 179 public delegate void UUIDNameRequest(UUID id, IClientAPI remote_client);
180 180
181 public delegate void AddNewPrim( 181 public delegate void AddNewPrim(
182 LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 182 UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
183 byte RayEndIsIntersection); 183 byte RayEndIsIntersection);
184 184
185 public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client); 185 public delegate void RequestGodlikePowers(UUID AgentID, UUID SessionID, UUID token, bool GodLike, IClientAPI remote_client);
186 186
187 public delegate void GodKickUser( 187 public delegate void GodKickUser(
188 LLUUID GodAgentID, LLUUID GodSessionID, LLUUID AgentID, uint kickflags, byte[] reason); 188 UUID GodAgentID, UUID GodSessionID, UUID AgentID, uint kickflags, byte[] reason);
189 189
190 public delegate void CreateInventoryFolder( 190 public delegate void CreateInventoryFolder(
191 IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); 191 IClientAPI remoteClient, UUID folderID, ushort folderType, string folderName, UUID parentID);
192 192
193 public delegate void UpdateInventoryFolder( 193 public delegate void UpdateInventoryFolder(
194 IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID); 194 IClientAPI remoteClient, UUID folderID, ushort type, string name, UUID parentID);
195 195
196 public delegate void MoveInventoryFolder( 196 public delegate void MoveInventoryFolder(
197 IClientAPI remoteClient, LLUUID folderID, LLUUID parentID); 197 IClientAPI remoteClient, UUID folderID, UUID parentID);
198 198
199 public delegate void CreateNewInventoryItem( 199 public delegate void CreateNewInventoryItem(
200 IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, 200 IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name,
201 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate); 201 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate);
202 202
203 public delegate void FetchInventoryDescendents( 203 public delegate void FetchInventoryDescendents(
204 IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); 204 IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
205 205
206 public delegate void PurgeInventoryDescendents( 206 public delegate void PurgeInventoryDescendents(
207 IClientAPI remoteClient, LLUUID folderID); 207 IClientAPI remoteClient, UUID folderID);
208 208
209 public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); 209 public delegate void FetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID);
210 210
211 public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); 211 public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
212 212
213/* public delegate void UpdateInventoryItem( 213/* public delegate void UpdateInventoryItem(
214 IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description, 214 IClientAPI remoteClient, UUID transactionID, UUID itemID, string name, string description,
215 uint nextOwnerMask);*/ 215 uint nextOwnerMask);*/
216 216
217 public delegate void UpdateInventoryItem( 217 public delegate void UpdateInventoryItem(
218 IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, InventoryItemBase itemUpd); 218 IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd);
219 219
220 public delegate void CopyInventoryItem( 220 public delegate void CopyInventoryItem(
221 IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, 221 IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID, UUID newFolderID,
222 string newName); 222 string newName);
223 223
224 public delegate void MoveInventoryItem( 224 public delegate void MoveInventoryItem(
225 IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, string newName); 225 IClientAPI remoteClient, UUID folderID, UUID itemID, int length, string newName);
226 226
227 public delegate void RemoveInventoryItem( 227 public delegate void RemoveInventoryItem(
228 IClientAPI remoteClient, LLUUID itemID); 228 IClientAPI remoteClient, UUID itemID);
229 229
230 public delegate void RemoveInventoryFolder( 230 public delegate void RemoveInventoryFolder(
231 IClientAPI remoteClient, LLUUID folderID); 231 IClientAPI remoteClient, UUID folderID);
232 232
233 public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest); 233 public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest);
234 234
235 public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID); 235 public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, UUID transactionID, uint localID);
236 236
237 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem item, uint localID); 237 public delegate void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, TaskInventoryItem item, uint localID);
238 238
239 public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID); 239 public delegate void MoveTaskInventory(IClientAPI remoteClient, UUID folderID, uint localID, UUID itemID);
240 240
241 public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); 241 public delegate void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID);
242 242
243 public delegate void UDPAssetUploadRequest( 243 public delegate void UDPAssetUploadRequest(
244 IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal, 244 IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal,
245 bool tempFile); 245 bool tempFile);
246 246
247 public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); 247 public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data);
@@ -250,60 +250,60 @@ namespace OpenSim.Framework
250 250
251 public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); 251 public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
252 252
253 public delegate void FriendActionDelegate(IClientAPI remoteClient, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders); 253 public delegate void FriendActionDelegate(IClientAPI remoteClient, UUID agentID, UUID transactionID, List<UUID> callingCardFolders);
254 254
255 public delegate void FriendshipTermination(IClientAPI remoteClient, LLUUID agentID, LLUUID ExID); 255 public delegate void FriendshipTermination(IClientAPI remoteClient, UUID agentID, UUID ExID);
256 256
257 public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description); 257 public delegate void MoneyTransferRequest(UUID sourceID, UUID destID, int amount, int transactionType, string description);
258 258
259 public delegate void ParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, 259 public delegate void ParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
260 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated); 260 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated);
261 261
262 // We keep all this information for fraud purposes in the future. 262 // We keep all this information for fraud purposes in the future.
263 public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID); 263 public delegate void MoneyBalanceRequest(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID TransactionID);
264 264
265 public delegate void ObjectPermissions(IClientAPI controller, LLUUID agentID, LLUUID sessionID, byte field, uint localId, uint mask, byte set); 265 public delegate void ObjectPermissions(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set);
266 266
267 public delegate void EconomyDataRequest(LLUUID agentID); 267 public delegate void EconomyDataRequest(UUID agentID);
268 268
269 public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID); 269 public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
270 270
271 public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer); 271 public delegate void ScriptAnswer(IClientAPI remoteClient, UUID objectID, UUID itemID, int answer);
272 272
273 public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); 273 public delegate void RequestPayPrice(IClientAPI remoteClient, UUID objectID);
274 public delegate void ObjectSaleInfo(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, uint localID, byte saleType, int salePrice); 274 public delegate void ObjectSaleInfo(IClientAPI remoteClient, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice);
275 public delegate void ObjectBuy(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID groupID, LLUUID categoryID, uint localID, byte saleType, int salePrice); 275 public delegate void ObjectBuy(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID groupID, UUID categoryID, uint localID, byte saleType, int salePrice);
276 public delegate void BuyObjectInventory(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID objectID, LLUUID itemID, LLUUID folderID); 276 public delegate void BuyObjectInventory(IClientAPI remoteClient, UUID agentID, UUID sessionID, UUID objectID, UUID itemID, UUID folderID);
277 277
278 public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID); 278 public delegate void ForceReleaseControls(IClientAPI remoteClient, UUID agentID);
279 279
280 public delegate void GodLandStatRequest(int parcelID, uint reportType, uint requestflags, string filter, IClientAPI remoteClient); 280 public delegate void GodLandStatRequest(int parcelID, uint reportType, uint requestflags, string filter, IClientAPI remoteClient);
281 281
282 //Estate Requests 282 //Estate Requests
283 public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice); 283 public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, UUID invoice);
284 public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges); 284 public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges);
285 public delegate void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, LLUUID side); 285 public delegate void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID side);
286 public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, LLUUID side); 286 public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, UUID side);
287 public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal); 287 public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal);
288 public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient); 288 public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient);
289 public delegate void SetRegionTerrainSettings(float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool estateSun, bool fixedSun, float sunHour, bool globalSun, bool estateFixed, float estateSunHour); 289 public delegate void SetRegionTerrainSettings(float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool estateSun, bool fixedSun, float sunHour, bool globalSun, bool estateFixed, float estateSunHour);
290 public delegate void EstateChangeInfo(IClientAPI client, LLUUID invoice, LLUUID senderID, UInt32 param1, UInt32 param2); 290 public delegate void EstateChangeInfo(IClientAPI client, UUID invoice, UUID senderID, UInt32 param1, UInt32 param2);
291 public delegate void BakeTerrain(IClientAPI remoteClient ); 291 public delegate void BakeTerrain(IClientAPI remoteClient );
292 public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot); 292 public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot);
293 public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, LLUUID newCovenantID); 293 public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, UUID newCovenantID);
294 public delegate void UpdateEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user); 294 public delegate void UpdateEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user);
295 public delegate void SimulatorBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message); 295 public delegate void SimulatorBlueBoxMessageRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
296 public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message); 296 public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
297 public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics); 297 public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics);
298 public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID prey); 298 public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID prey);
299 public delegate void RegionHandleRequest(IClientAPI remoteClient, LLUUID regionID); 299 public delegate void RegionHandleRequest(IClientAPI remoteClient, UUID regionID);
300 public delegate void ParcelInfoRequest(IClientAPI remoteClient, LLUUID parcelID); 300 public delegate void ParcelInfoRequest(IClientAPI remoteClient, UUID parcelID);
301 301
302 public delegate void ScriptReset(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); 302 public delegate void ScriptReset(IClientAPI remoteClient, UUID objectID, UUID itemID);
303 public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); 303 public delegate void GetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID);
304 public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); 304 public delegate void SetScriptRunning(IClientAPI remoteClient, UUID objectID, UUID itemID, bool running);
305 public delegate void ActivateGesture(IClientAPI client, LLUUID gestureid, LLUUID assetId); 305 public delegate void ActivateGesture(IClientAPI client, UUID gestureid, UUID assetId);
306 public delegate void DeactivateGesture(IClientAPI client, LLUUID gestureid); 306 public delegate void DeactivateGesture(IClientAPI client, UUID gestureid);
307 307
308 public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY); 308 public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY);
309 309
@@ -311,21 +311,21 @@ namespace OpenSim.Framework
311 311
312 public interface IClientAPI 312 public interface IClientAPI
313 { 313 {
314 LLVector3 StartPos { get; set; } 314 Vector3 StartPos { get; set; }
315 315
316 LLUUID AgentId { get; } 316 UUID AgentId { get; }
317 317
318 LLUUID SessionId { get; } 318 UUID SessionId { get; }
319 319
320 LLUUID SecureSessionId { get; } 320 UUID SecureSessionId { get; }
321 321
322 LLUUID ActiveGroupId { get; } 322 UUID ActiveGroupId { get; }
323 323
324 string ActiveGroupName { get; } 324 string ActiveGroupName { get; }
325 325
326 ulong ActiveGroupPowers { get; } 326 ulong ActiveGroupPowers { get; }
327 327
328 ulong GetGroupPowers(LLUUID groupID); 328 ulong GetGroupPowers(UUID groupID);
329 329
330 string FirstName { get; } 330 string FirstName { get; }
331 331
@@ -429,7 +429,7 @@ namespace OpenSim.Framework
429 event UpdateVector OnUpdatePrimGroupScale; 429 event UpdateVector OnUpdatePrimGroupScale;
430 event StatusChange OnChildAgentStatus; 430 event StatusChange OnChildAgentStatus;
431 event GenericCall2 OnStopMovement; 431 event GenericCall2 OnStopMovement;
432 event Action<LLUUID> OnRemoveAvatar; 432 event Action<UUID> OnRemoveAvatar;
433 event ObjectPermissions OnObjectPermissions; 433 event ObjectPermissions OnObjectPermissions;
434 434
435 event CreateNewInventoryItem OnCreateNewInventoryItem; 435 event CreateNewInventoryItem OnCreateNewInventoryItem;
@@ -527,82 +527,82 @@ namespace OpenSim.Framework
527 event ActivateGesture OnActivateGesture; 527 event ActivateGesture OnActivateGesture;
528 event DeactivateGesture OnDeactivateGesture; 528 event DeactivateGesture OnDeactivateGesture;
529 529
530 // void ActivateGesture(LLUUID assetId, LLUUID gestureId); 530 // void ActivateGesture(UUID assetId, UUID gestureId);
531 531
532 // [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] 532 // [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
533 void OutPacket(Packet newPack, ThrottleOutPacketType packType); 533 void OutPacket(Packet newPack, ThrottleOutPacketType packType);
534 void SendWearables(AvatarWearable[] wearables, int serial); 534 void SendWearables(AvatarWearable[] wearables, int serial);
535 void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); 535 void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
536 void SendStartPingCheck(byte seq); 536 void SendStartPingCheck(byte seq);
537 void SendKillObject(ulong regionHandle, uint localID); 537 void SendKiPrimitive(ulong regionHandle, uint localID);
538 void SendAnimations(LLUUID[] animID, int[] seqs, LLUUID sourceAgentId); 538 void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId);
539 void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args); 539 void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);
540 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible); 540 void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible);
541 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible); 541 void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible);
542 542
543 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 543 void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
544 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp); 544 UUID imSessionID, string fromName, byte dialog, uint timeStamp);
545 545
546 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 546 void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
547 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 547 UUID imSessionID, string fromName, byte dialog, uint timeStamp,
548 byte[] binaryBucket); 548 byte[] binaryBucket);
549 549
550 void SendLayerData(float[] map); 550 void SendLayerData(float[] map);
551 void SendLayerData(int px, int py, float[] map); 551 void SendLayerData(int px, int py, float[] map);
552 552
553 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); 553 void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look);
554 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); 554 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint);
555 AgentCircuitData RequestClientInfo(); 555 AgentCircuitData RequestClientInfo();
556 556
557 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, 557 void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint,
558 string capsURL); 558 string capsURL);
559 559
560 void SendMapBlock(List<MapBlockData> mapBlocks, uint flag); 560 void SendMapBlock(List<MapBlockData> mapBlocks, uint flag);
561 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); 561 void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags);
562 562
563 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, 563 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID,
564 uint flags, string capsURL); 564 uint flags, string capsURL);
565 565
566 void SendTeleportFailed(string reason); 566 void SendTeleportFailed(string reason);
567 void SendTeleportLocationStart(); 567 void SendTeleportLocationStart();
568 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); 568 void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
569 void SendPayPrice(LLUUID objectID, int[] payPrice); 569 void SendPayPrice(UUID objectID, int[] payPrice);
570 570
571 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, 571 void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID, uint avatarLocalID,
572 LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation); 572 Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation);
573 573
574 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 574 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
575 LLVector3 velocity, LLQuaternion rotation); 575 Vector3 velocity, Quaternion rotation);
576 576
577 void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations); 577 void SendCoarseLocationUpdate(List<Vector3> CoarseLocations);
578 578
579 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 579 void AttachObject(uint localID, Quaternion rotation, byte attachPoint);
580 void SetChildAgentThrottle(byte[] throttle); 580 void SetChildAgentThrottle(byte[] throttle);
581 581
582 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 582 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
583 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 583 Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
584 uint flags, 584 uint flags,
585 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, 585 UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
586 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius); 586 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius);
587 587
588 588
589 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 589 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
590 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 590 Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
591 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 591 uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
592 uint parentID, byte[] particleSystem, byte clickAction); 592 uint parentID, byte[] particleSystem, byte clickAction);
593 593
594 594
595 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 595 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
596 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId); 596 Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId);
597 597
598 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 598 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
599 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); 599 Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity);
600 600
601 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, 601 void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
602 List<InventoryFolderBase> folders, bool fetchFolders, 602 List<InventoryFolderBase> folders, bool fetchFolders,
603 bool fetchItems); 603 bool fetchItems);
604 604
605 void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); 605 void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item);
606 606
607 /// <summary> 607 /// <summary>
608 /// Tell the client that we have created the item it requested. 608 /// Tell the client that we have created the item it requested.
@@ -610,11 +610,11 @@ namespace OpenSim.Framework
610 /// <param name="Item"></param> 610 /// <param name="Item"></param>
611 void SendInventoryItemCreateUpdate(InventoryItemBase Item); 611 void SendInventoryItemCreateUpdate(InventoryItemBase Item);
612 612
613 void SendRemoveInventoryItem(LLUUID itemID); 613 void SendRemoveInventoryItem(UUID itemID);
614 614
615 void SendTakeControls(int controls, bool passToAgent, bool TakeControls); 615 void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
616 616
617 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); 617 void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
618 618
619 /// <summary> 619 /// <summary>
620 /// Used by the server to inform the client of a new inventory item. Used when transferring items 620 /// Used by the server to inform the client of a new inventory item. Used when transferring items
@@ -632,90 +632,90 @@ namespace OpenSim.Framework
632 632
633 void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data); 633 void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
634 634
635 void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle); 635 void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle);
636 636
637 void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID); 637 void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID);
638 void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags); 638 void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags);
639 void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain); 639 void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain);
640 void SendAttachedSoundGainChange(LLUUID objectID, float gain); 640 void SendAttachedSoundGainChange(UUID objectID, float gain);
641 641
642 void SendNameReply(LLUUID profileId, string firstname, string lastname); 642 void SendNameReply(UUID profileId, string firstname, string lastname);
643 void SendAlertMessage(string message); 643 void SendAlertMessage(string message);
644 644
645 void SendAgentAlertMessage(string message, bool modal); 645 void SendAgentAlertMessage(string message, bool modal);
646 void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); 646 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
647 void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels); 647 void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels);
648 bool AddMoney(int debit); 648 bool AddMoney(int debit);
649 649
650 void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition); 650 void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition);
651 void SendViewerTime(int phase); 651 void SendViewerTime(int phase);
652 LLUUID GetDefaultAnimation(string name); 652 UUID GetDefaultAnimation(string name);
653 653
654 void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, 654 void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout,
655 uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); 655 uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
656 656
657 void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question); 657 void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
658 void SendHealth(float health); 658 void SendHealth(float health);
659 659
660 660
661 void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID); 661 void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID);
662 662
663 void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID); 663 void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID);
664 664
665 void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args); 665 void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
666 void SendEstateCovenantInformation(LLUUID covenant); 666 void SendEstateCovenantInformation(UUID covenant);
667 void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail); 667 void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail);
668 668
669 void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags); 669 void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags);
670 void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID); 670 void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID);
671 void SendForceClientSelectObjects(List<uint> objectIDs); 671 void SendForceClientSelectObjects(List<uint> objectIDs);
672 void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount); 672 void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount);
673 void SendLandParcelOverlay(byte[] data, int sequence_id); 673 void SendLandParcelOverlay(byte[] data, int sequence_id);
674 674
675 #region Parcel Methods 675 #region Parcel Methods
676 676
677 void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time); 677 void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time);
678 678
679 void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, 679 void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
680 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, 680 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
681 byte mediaLoop); 681 byte mediaLoop);
682 682
683 #endregion 683 #endregion
684 684
685 void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); 685 void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID);
686 void SendConfirmXfer(ulong xferID, uint PacketID); 686 void SendConfirmXfer(ulong xferID, uint PacketID);
687 void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); 687 void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName);
688 688
689 void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); 689 void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
690 690
691 void SendShutdownConnectionNotice(); 691 void SendShutdownConnectionNotice();
692 void SendSimStats(Packet pack); 692 void SendSimStats(Packet pack);
693 void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 693 void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
694 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 694 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
695 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, 695 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
696 LLUUID LastOwnerID, string ObjectName, string Description); 696 UUID LastOwnerID, string ObjectName, string Description);
697 697
698 void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 698 void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
699 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 699 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
700 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 700 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
701 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 701 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
702 uint BaseMask, byte saleType, int salePrice); 702 uint BaseMask, byte saleType, int salePrice);
703 void SendAgentOffline(LLUUID[] agentIDs); 703 void SendAgentOffline(UUID[] agentIDs);
704 704
705 void SendAgentOnline(LLUUID[] agentIDs); 705 void SendAgentOnline(UUID[] agentIDs);
706 706
707 void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 707 void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
708 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); 708 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook);
709 709
710 void SendAdminResponse(LLUUID Token, uint AdminLevel); 710 void SendAdminResponse(UUID Token, uint AdminLevel);
711 711
712 void SendGroupMembership(GroupData[] GroupMembership); 712 void SendGroupMembership(GroupData[] GroupMembership);
713 713
714 void SendGroupNameReply(LLUUID groupLLUID, string GroupName); 714 void SendGroupNameReply(UUID groupLLUID, string GroupName);
715 715
716 void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia); 716 void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia);
717 717
718 void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running); 718 void SendScriptRunningReply(UUID objectID, UUID itemID, bool running);
719 719
720 void SendAsset(AssetRequestToClient req); 720 void SendAsset(AssetRequestToClient req);
721 721
@@ -734,18 +734,18 @@ namespace OpenSim.Framework
734 event Action<IClientAPI> OnLogout; 734 event Action<IClientAPI> OnLogout;
735 event Action<IClientAPI> OnConnectionClosed; 735 event Action<IClientAPI> OnConnectionClosed;
736 736
737 void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message); 737 void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message);
738 738
739 void SendLogoutPacket(); 739 void SendLogoutPacket();
740 ClientInfo GetClientInfo(); 740 ClientInfo GetClientInfo();
741 void SetClientInfo(ClientInfo info); 741 void SetClientInfo(ClientInfo info);
742 void Terminate(); 742 void Terminate();
743 743
744 void SendSetFollowCamProperties(LLUUID objectID, SortedDictionary<int, float> parameters); 744 void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters);
745 void SendClearFollowCamProperties(LLUUID objectID); 745 void SendClearFollowCamProperties(UUID objectID);
746 746
747 void SendRegionHandle(LLUUID regoinID, ulong handle); 747 void SendRegionHandle(UUID regoinID, ulong handle);
748 void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y); 748 void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
749 void KillEndDone(); 749 void KillEndDone();
750 } 750 }
751} 751}
diff --git a/OpenSim/Framework/IInventoryData.cs b/OpenSim/Framework/IInventoryData.cs
index 1c62b0b..d5fa25d 100644
--- a/OpenSim/Framework/IInventoryData.cs
+++ b/OpenSim/Framework/IInventoryData.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.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -46,49 +46,49 @@ namespace OpenSim.Framework
46 /// </summary> 46 /// </summary>
47 /// <param name="parentID">The folder to get subfolders for</param> 47 /// <param name="parentID">The folder to get subfolders for</param>
48 /// <returns>A list of inventory folders</returns> 48 /// <returns>A list of inventory folders</returns>
49 List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID); 49 List<InventoryFolderBase> getFolderHierarchy(UUID parentID);
50 50
51 /// <summary> 51 /// <summary>
52 /// Returns a list of inventory items contained within the specified folder 52 /// Returns a list of inventory items contained within the specified folder
53 /// </summary> 53 /// </summary>
54 /// <param name="folderID">The UUID of the target folder</param> 54 /// <param name="folderID">The UUID of the target folder</param>
55 /// <returns>A List of InventoryItemBase items</returns> 55 /// <returns>A List of InventoryItemBase items</returns>
56 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID); 56 List<InventoryItemBase> getInventoryInFolder(UUID folderID);
57 57
58 /// <summary> 58 /// <summary>
59 /// Returns a list of the root folders within a users inventory 59 /// Returns a list of the root folders within a users inventory
60 /// </summary> 60 /// </summary>
61 /// <param name="user">The user whos inventory is to be searched</param> 61 /// <param name="user">The user whos inventory is to be searched</param>
62 /// <returns>A list of folder objects</returns> 62 /// <returns>A list of folder objects</returns>
63 List<InventoryFolderBase> getUserRootFolders(LLUUID user); 63 List<InventoryFolderBase> getUserRootFolders(UUID user);
64 64
65 /// <summary> 65 /// <summary>
66 /// Returns the users inventory root folder. 66 /// Returns the users inventory root folder.
67 /// </summary> 67 /// </summary>
68 /// <param name="user">The UUID of the user who is having inventory being returned</param> 68 /// <param name="user">The UUID of the user who is having inventory being returned</param>
69 /// <returns>Root inventory folder, null if no root inventory folder was found</returns> 69 /// <returns>Root inventory folder, null if no root inventory folder was found</returns>
70 InventoryFolderBase getUserRootFolder(LLUUID user); 70 InventoryFolderBase getUserRootFolder(UUID user);
71 71
72 /// <summary> 72 /// <summary>
73 /// Returns a list of inventory folders contained in the folder 'parentID' 73 /// Returns a list of inventory folders contained in the folder 'parentID'
74 /// </summary> 74 /// </summary>
75 /// <param name="parentID">The folder to get subfolders for</param> 75 /// <param name="parentID">The folder to get subfolders for</param>
76 /// <returns>A list of inventory folders</returns> 76 /// <returns>A list of inventory folders</returns>
77 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID); 77 List<InventoryFolderBase> getInventoryFolders(UUID parentID);
78 78
79 /// <summary> 79 /// <summary>
80 /// Returns an inventory item by its UUID 80 /// Returns an inventory item by its UUID
81 /// </summary> 81 /// </summary>
82 /// <param name="item">The UUID of the item to be returned</param> 82 /// <param name="item">The UUID of the item to be returned</param>
83 /// <returns>A class containing item information</returns> 83 /// <returns>A class containing item information</returns>
84 InventoryItemBase getInventoryItem(LLUUID item); 84 InventoryItemBase getInventoryItem(UUID item);
85 85
86 /// <summary> 86 /// <summary>
87 /// Returns a specified inventory folder by its UUID 87 /// Returns a specified inventory folder by its UUID
88 /// </summary> 88 /// </summary>
89 /// <param name="folder">The UUID of the folder to be returned</param> 89 /// <param name="folder">The UUID of the folder to be returned</param>
90 /// <returns>A class containing folder information</returns> 90 /// <returns>A class containing folder information</returns>
91 InventoryFolderBase getInventoryFolder(LLUUID folder); 91 InventoryFolderBase getInventoryFolder(UUID folder);
92 92
93 /// <summary> 93 /// <summary>
94 /// Creates a new inventory item based on item 94 /// Creates a new inventory item based on item
@@ -106,7 +106,7 @@ namespace OpenSim.Framework
106 /// 106 ///
107 /// </summary> 107 /// </summary>
108 /// <param name="item"></param> 108 /// <param name="item"></param>
109 void deleteInventoryItem(LLUUID item); 109 void deleteInventoryItem(UUID item);
110 110
111 /// <summary> 111 /// <summary>
112 /// Adds a new folder specified by folder 112 /// Adds a new folder specified by folder
@@ -130,7 +130,7 @@ namespace OpenSim.Framework
130 /// Deletes a folder. Thie will delete both the folder itself and its contents (items and descendent folders) 130 /// Deletes a folder. Thie will delete both the folder itself and its contents (items and descendent folders)
131 /// </summary> 131 /// </summary>
132 /// <param name="folder">The id of the folder</param> 132 /// <param name="folder">The id of the folder</param>
133 void deleteInventoryFolder(LLUUID folder); 133 void deleteInventoryFolder(UUID folder);
134 } 134 }
135 135
136 public class InventoryDataInitialiser : PluginInitialiserBase 136 public class InventoryDataInitialiser : PluginInitialiserBase
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs
index 1758508..2f0c113 100644
--- a/OpenSim/Framework/IRegionCommsListener.cs
+++ b/OpenSim/Framework/IRegionCommsListener.cs
@@ -26,31 +26,31 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
33 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent); 33 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
34 34
35 public delegate bool ExpectPrimDelegate(ulong regionHandle, LLUUID primID, string objData, int XMLMethod); 35 public delegate bool ExpectPrimDelegate(ulong regionHandle, UUID primID, string objData, int XMLMethod);
36 36
37 public delegate void UpdateNeighbours(List<RegionInfo> neighbours); 37 public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
38 38
39 public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying); 39 public delegate void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying);
40 40
41 public delegate void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical); 41 public delegate void PrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical);
42 42
43 public delegate void AcknowledgeAgentCross(ulong regionHandle, LLUUID agentID); 43 public delegate void AcknowledgeAgentCross(ulong regionHandle, UUID agentID);
44 44
45 public delegate void AcknowledgePrimCross(ulong regionHandle, LLUUID PrimID); 45 public delegate void AcknowledgePrimCross(ulong regionHandle, UUID PrimID);
46 46
47 public delegate bool CloseAgentConnection(ulong regionHandle, LLUUID agentID); 47 public delegate bool CloseAgentConnection(ulong regionHandle, UUID agentID);
48 48
49 public delegate bool RegionUp(RegionInfo region); 49 public delegate bool RegionUp(RegionInfo region);
50 50
51 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData); 51 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
52 52
53 public delegate void LogOffUser(ulong regionHandle, LLUUID agentID, LLUUID regionSecret, string message); 53 public delegate void LogOffUser(ulong regionHandle, UUID agentID, UUID regionSecret, string message);
54 54
55 public delegate LandData GetLandData(uint x, uint y); 55 public delegate LandData GetLandData(uint x, uint y);
56 56
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 2cce12f..d3e79d0 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
@@ -52,7 +52,7 @@ namespace OpenSim.Framework
52 event restart OnRestart; 52 event restart OnRestart;
53 53
54 void AddNewClient(IClientAPI client, bool child); 54 void AddNewClient(IClientAPI client, bool child);
55 void RemoveClient(LLUUID agentID); 55 void RemoveClient(UUID agentID);
56 void CloseAllAgents(uint circuitcode); 56 void CloseAllAgents(uint circuitcode);
57 57
58 void Restart(int seconds); 58 void Restart(int seconds);
@@ -60,9 +60,9 @@ namespace OpenSim.Framework
60 60
61 string GetSimulatorVersion(); 61 string GetSimulatorVersion();
62 62
63 bool PresenceChildStatus(LLUUID avatarID); 63 bool PresenceChildStatus(UUID avatarID);
64 64
65 string GetCapsPath(LLUUID agentId); 65 string GetCapsPath(UUID agentId);
66 66
67 T RequestModuleInterface<T>(); 67 T RequestModuleInterface<T>();
68 } 68 }
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs
index ffde002..4089253 100644
--- a/OpenSim/Framework/IUserData.cs
+++ b/OpenSim/Framework/IUserData.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.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -40,7 +40,7 @@ namespace OpenSim.Framework
40 /// </summary> 40 /// </summary>
41 /// <param name="user">The user's UUID</param> 41 /// <param name="user">The user's UUID</param>
42 /// <returns>The user data profile. Returns null if no user is found</returns> 42 /// <returns>The user data profile. Returns null if no user is found</returns>
43 UserProfileData GetUserByUUID(LLUUID user); 43 UserProfileData GetUserByUUID(UUID user);
44 44
45 /// <summary> 45 /// <summary>
46 /// Returns a users profile by searching their username parts 46 /// Returns a users profile by searching their username parts
@@ -56,14 +56,14 @@ namespace OpenSim.Framework
56 /// <param name="queryID">ID associated with the user's query. This must match what the client sent</param> 56 /// <param name="queryID">ID associated with the user's query. This must match what the client sent</param>
57 /// <param name="query">The filtered contents of the search box when the user hit search.</param> 57 /// <param name="query">The filtered contents of the search box when the user hit search.</param>
58 /// <returns>The user data profile</returns> 58 /// <returns>The user data profile</returns>
59 List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); 59 List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query);
60 60
61 /// <summary> 61 /// <summary>
62 /// Returns the current agent for a user searching by it's UUID 62 /// Returns the current agent for a user searching by it's UUID
63 /// </summary> 63 /// </summary>
64 /// <param name="user">The users UUID</param> 64 /// <param name="user">The users UUID</param>
65 /// <returns>The current agent session</returns> 65 /// <returns>The current agent session</returns>
66 UserAgentData GetAgentByUUID(LLUUID user); 66 UserAgentData GetAgentByUUID(UUID user);
67 67
68 /// <summary> 68 /// <summary>
69 /// Returns the current session agent for a user searching by username 69 /// Returns the current session agent for a user searching by username
@@ -84,7 +84,7 @@ namespace OpenSim.Framework
84 /// Stores new web-login key for user during web page login 84 /// Stores new web-login key for user during web page login
85 /// </summary> 85 /// </summary>
86 /// <param name="webLoginKey"></param> 86 /// <param name="webLoginKey"></param>
87 void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); 87 void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
88 88
89 /// <summary> 89 /// <summary>
90 /// Adds a new User profile to the database 90 /// Adds a new User profile to the database
@@ -99,7 +99,7 @@ namespace OpenSim.Framework
99 bool UpdateUserProfile(UserProfileData user); 99 bool UpdateUserProfile(UserProfileData user);
100 100
101 101
102 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle); 102 void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle);
103 /// <summary> 103 /// <summary>
104 /// Adds a new agent to the database 104 /// Adds a new agent to the database
105 /// </summary> 105 /// </summary>
@@ -112,14 +112,14 @@ namespace OpenSim.Framework
112 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 112 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
113 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 113 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
114 /// <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> 114 /// <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>
115 void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms); 115 void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms);
116 116
117 /// <summary> 117 /// <summary>
118 /// Delete friend on friendlistowner's friendlist. 118 /// Delete friend on friendlistowner's friendlist.
119 /// </summary> 119 /// </summary>
120 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 120 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
121 /// <param name="friend">The Ex-friend agent</param> 121 /// <param name="friend">The Ex-friend agent</param>
122 void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend); 122 void RemoveUserFriend(UUID friendlistowner, UUID friend);
123 123
124 /// <summary> 124 /// <summary>
125 /// Update permissions for friend on friendlistowner's friendlist. 125 /// Update permissions for friend on friendlistowner's friendlist.
@@ -127,13 +127,13 @@ namespace OpenSim.Framework
127 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 127 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
128 /// <param name="friend">The agent that is getting or loosing permissions</param> 128 /// <param name="friend">The agent that is getting or loosing permissions</param>
129 /// <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> 129 /// <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>
130 void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms); 130 void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
131 131
132 /// <summary> 132 /// <summary>
133 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 133 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
134 /// </summary> 134 /// </summary>
135 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 135 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
136 List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); 136 List<FriendListItem> GetUserFriendList(UUID friendlistowner);
137 137
138 /// <summary> 138 /// <summary>
139 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) 139 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
@@ -142,7 +142,7 @@ namespace OpenSim.Framework
142 /// <param name="to">The account to transfer to</param> 142 /// <param name="to">The account to transfer to</param>
143 /// <param name="amount">The amount to transfer</param> 143 /// <param name="amount">The amount to transfer</param>
144 /// <returns>Successful?</returns> 144 /// <returns>Successful?</returns>
145 bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); 145 bool MoneyTransferRequest(UUID from, UUID to, uint amount);
146 146
147 /// <summary> 147 /// <summary>
148 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. 148 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
@@ -151,7 +151,7 @@ namespace OpenSim.Framework
151 /// <param name="to">User to transfer to</param> 151 /// <param name="to">User to transfer to</param>
152 /// <param name="inventory">Specified inventory item</param> 152 /// <param name="inventory">Specified inventory item</param>
153 /// <returns>Successful?</returns> 153 /// <returns>Successful?</returns>
154 bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); 154 bool InventoryTransferRequest(UUID from, UUID to, UUID inventory);
155 155
156 /// <summary> 156 /// <summary>
157 /// Initialises the plugin (artificial constructor) 157 /// Initialises the plugin (artificial constructor)
@@ -161,11 +161,11 @@ namespace OpenSim.Framework
161 /// <summary> 161 /// <summary>
162 /// Gets the user appearance 162 /// Gets the user appearance
163 /// </summer> 163 /// </summer>
164 AvatarAppearance GetUserAppearance(LLUUID user); 164 AvatarAppearance GetUserAppearance(UUID user);
165 165
166 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 166 void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
167 167
168 void ResetAttachments(LLUUID userID); 168 void ResetAttachments(UUID userID);
169 } 169 }
170 170
171 public class UserDataInitialiser : PluginInitialiserBase 171 public class UserDataInitialiser : PluginInitialiserBase
diff --git a/OpenSim/Framework/InventoryCollection.cs b/OpenSim/Framework/InventoryCollection.cs
index df18efb..84b7d58 100644
--- a/OpenSim/Framework/InventoryCollection.cs
+++ b/OpenSim/Framework/InventoryCollection.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.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -37,6 +37,6 @@ namespace OpenSim.Framework
37 { 37 {
38 public List<InventoryFolderBase> Folders; 38 public List<InventoryFolderBase> Folders;
39 public List<InventoryItemBase> Items; 39 public List<InventoryItemBase> Items;
40 public LLUUID UserID; 40 public UUID UserID;
41 } 41 }
42} \ No newline at end of file 42}
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs
index 9c3c116..e55f834 100644
--- a/OpenSim/Framework/InventoryFolderBase.cs
+++ b/OpenSim/Framework/InventoryFolderBase.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
37 /// <summary> 37 /// <summary>
38 /// The UUID for this folder 38 /// The UUID for this folder
39 /// </summary> 39 /// </summary>
40 private LLUUID _id; 40 private UUID _id;
41 41
42 /// <summary> 42 /// <summary>
43 /// The name of the folder (64 characters or less) 43 /// The name of the folder (64 characters or less)
@@ -47,12 +47,12 @@ namespace OpenSim.Framework
47 /// <summary> 47 /// <summary>
48 /// The agent who's inventory this is contained by 48 /// The agent who's inventory this is contained by
49 /// </summary> 49 /// </summary>
50 private LLUUID _owner; 50 private UUID _owner;
51 51
52 /// <summary> 52 /// <summary>
53 /// The folder this folder is contained in 53 /// The folder this folder is contained in
54 /// </summary> 54 /// </summary>
55 private LLUUID _parentID; 55 private UUID _parentID;
56 56
57 /// <summary> 57 /// <summary>
58 /// Type of items normally stored in this folder 58 /// Type of items normally stored in this folder
@@ -72,19 +72,19 @@ namespace OpenSim.Framework
72 set { _name = value; } 72 set { _name = value; }
73 } 73 }
74 74
75 public virtual LLUUID Owner 75 public virtual UUID Owner
76 { 76 {
77 get { return _owner; } 77 get { return _owner; }
78 set { _owner = value; } 78 set { _owner = value; }
79 } 79 }
80 80
81 public virtual LLUUID ParentID 81 public virtual UUID ParentID
82 { 82 {
83 get { return _parentID; } 83 get { return _parentID; }
84 set { _parentID = value; } 84 set { _parentID = value; }
85 } 85 }
86 86
87 public virtual LLUUID ID 87 public virtual UUID ID
88 { 88 {
89 get { return _id; } 89 get { return _id; }
90 set { _id = value; } 90 set { _id = value; }
@@ -102,4 +102,4 @@ namespace OpenSim.Framework
102 set { _version = value; } 102 set { _version = value; }
103 } 103 }
104 } 104 }
105} \ No newline at end of file 105}
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 85b08cb..4441e73 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.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;
29 29
30namespace OpenSim.Framework 30namespace OpenSim.Framework
31{ 31{
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
37 /// <summary> 37 /// <summary>
38 /// The UUID of the associated asset on the asset server 38 /// The UUID of the associated asset on the asset server
39 /// </summary> 39 /// </summary>
40 private LLUUID _assetID; 40 private UUID _assetID;
41 41
42 /// <summary> 42 /// <summary>
43 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) 43 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
@@ -52,9 +52,9 @@ namespace OpenSim.Framework
52 /// <summary> 52 /// <summary>
53 /// The creator of this item 53 /// The creator of this item
54 /// </summary> 54 /// </summary>
55 private LLUUID _creator; 55 private UUID _creator;
56 56
57 private LLUUID _owner; 57 private UUID _owner;
58 58
59 private uint _nextPermissions; 59 private uint _nextPermissions;
60 60
@@ -76,12 +76,12 @@ namespace OpenSim.Framework
76 /// <summary> 76 /// <summary>
77 /// The folder this item is contained in 77 /// The folder this item is contained in
78 /// </summary> 78 /// </summary>
79 private LLUUID _folder; 79 private UUID _folder;
80 80
81 /// <summary> 81 /// <summary>
82 /// A UUID containing the ID for the inventory item itself 82 /// A UUID containing the ID for the inventory item itself
83 /// </summary> 83 /// </summary>
84 private LLUUID _id; 84 private UUID _id;
85 85
86 /// <summary> 86 /// <summary>
87 /// The type of inventory item. (Can be slightly different to the asset type 87 /// The type of inventory item. (Can be slightly different to the asset type
@@ -97,7 +97,7 @@ namespace OpenSim.Framework
97 /// <summary> 97 /// <summary>
98 /// 98 ///
99 /// </summary> 99 /// </summary>
100 private LLUUID _groupID; 100 private UUID _groupID;
101 101
102 /// <summary> 102 /// <summary>
103 /// 103 ///
@@ -124,7 +124,7 @@ namespace OpenSim.Framework
124 /// </summary> 124 /// </summary>
125 private int _creationDate; 125 private int _creationDate;
126 126
127 public virtual LLUUID ID { 127 public virtual UUID ID {
128 get { 128 get {
129 return _id; 129 return _id;
130 } 130 }
@@ -139,19 +139,19 @@ namespace OpenSim.Framework
139 set { _invType = value; } 139 set { _invType = value; }
140 } 140 }
141 141
142 public virtual LLUUID Folder 142 public virtual UUID Folder
143 { 143 {
144 get { return _folder; } 144 get { return _folder; }
145 set { _folder = value; } 145 set { _folder = value; }
146 } 146 }
147 147
148 public virtual LLUUID Owner 148 public virtual UUID Owner
149 { 149 {
150 get { return _owner; } 150 get { return _owner; }
151 set { _owner = value; } 151 set { _owner = value; }
152 } 152 }
153 153
154 public virtual LLUUID Creator 154 public virtual UUID Creator
155 { 155 {
156 get { return _creator; } 156 get { return _creator; }
157 set { _creator = value; } 157 set { _creator = value; }
@@ -199,13 +199,13 @@ namespace OpenSim.Framework
199 set { _assetType = value; } 199 set { _assetType = value; }
200 } 200 }
201 201
202 public virtual LLUUID AssetID 202 public virtual UUID AssetID
203 { 203 {
204 get { return _assetID; } 204 get { return _assetID; }
205 set { _assetID = value; } 205 set { _assetID = value; }
206 } 206 }
207 207
208 public virtual LLUUID GroupID 208 public virtual UUID GroupID
209 { 209 {
210 get 210 get
211 { 211 {
diff --git a/OpenSim/Framework/LLGroup.cs b/OpenSim/Framework/LLGroup.cs
index 9958780..53d42a4 100644
--- a/OpenSim/Framework/LLGroup.cs
+++ b/OpenSim/Framework/LLGroup.cs
@@ -28,7 +28,7 @@
28 28
29using System; 29using System;
30using System.Collections; 30using System.Collections;
31using libsecondlife; 31using OpenMetaverse;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Text; 33using System.Text;
34 34
@@ -37,8 +37,8 @@ namespace OpenSim.Framework
37 public class GroupData 37 public class GroupData
38 { 38 {
39 public string ActiveGroupTitle; 39 public string ActiveGroupTitle;
40 public LLUUID GroupID; 40 public UUID GroupID;
41 public List<LLUUID> GroupMembers; 41 public List<UUID> GroupMembers;
42 public string groupName; 42 public string groupName;
43 public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome); 43 public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome);
44 public List<string> GroupTitles; 44 public List<string> GroupTitles;
@@ -46,10 +46,10 @@ namespace OpenSim.Framework
46 public bool AllowPublish = true; 46 public bool AllowPublish = true;
47 public string Charter = "Cool Group Yeah!"; 47 public string Charter = "Cool Group Yeah!";
48 public int contribution = 0; 48 public int contribution = 0;
49 public LLUUID FounderID = LLUUID.Zero; 49 public UUID FounderID = UUID.Zero;
50 public int groupMembershipCost = 0; 50 public int groupMembershipCost = 0;
51 public int groupRollsCount = 1; 51 public int groupRollsCount = 1;
52 public LLUUID GroupPicture = LLUUID.Zero; 52 public UUID GroupPicture = UUID.Zero;
53 public bool MaturePublish = true; 53 public bool MaturePublish = true;
54 public int MembershipFee = 0; 54 public int MembershipFee = 0;
55 public bool OpenEnrollment = true; 55 public bool OpenEnrollment = true;
@@ -58,7 +58,7 @@ namespace OpenSim.Framework
58 public GroupData() 58 public GroupData()
59 { 59 {
60 GroupTitles = new List<string>(); 60 GroupTitles = new List<string>();
61 GroupMembers = new List<LLUUID>(); 61 GroupMembers = new List<UUID>();
62 } 62 }
63 63
64 public GroupPowers ActiveGroupPowers 64 public GroupPowers ActiveGroupPowers
@@ -70,11 +70,11 @@ namespace OpenSim.Framework
70 70
71 public class GroupList 71 public class GroupList
72 { 72 {
73 public List<LLUUID> m_GroupList; 73 public List<UUID> m_GroupList;
74 74
75 public GroupList() 75 public GroupList()
76 { 76 {
77 m_GroupList = new List<LLUUID>(); 77 m_GroupList = new List<UUID>();
78 } 78 }
79 } 79 }
80} 80}
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index a875a50..4e66721 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -27,22 +27,22 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 public class LandData 34 public class LandData
35 { 35 {
36 private LLVector3 _AABBMax = new LLVector3(); 36 private Vector3 _AABBMax = new Vector3();
37 private LLVector3 _AABBMin = new LLVector3(); 37 private Vector3 _AABBMin = new Vector3();
38 private int _area = 0; 38 private int _area = 0;
39 private uint _auctionID = 0; //Unemplemented. If set to 0, not being auctioned 39 private uint _auctionID = 0; //Unemplemented. If set to 0, not being auctioned
40 private LLUUID _authBuyerID = LLUUID.Zero; //Unemplemented. Authorized Buyer's UUID 40 private UUID _authBuyerID = UUID.Zero; //Unemplemented. Authorized Buyer's UUID
41 private Parcel.ParcelCategory _category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category 41 private Parcel.ParcelCategory _category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
42 private int _claimDate = 0; 42 private int _claimDate = 0;
43 private int _claimPrice = 0; //Unemplemented 43 private int _claimPrice = 0; //Unemplemented
44 private LLUUID _globalID = LLUUID.Zero; 44 private UUID _globalID = UUID.Zero;
45 private LLUUID _groupID = LLUUID.Zero; //Unemplemented 45 private UUID _groupID = UUID.Zero; //Unemplemented
46 private int _groupPrims = 0; 46 private int _groupPrims = 0;
47 private bool _isGroupOwned = false; 47 private bool _isGroupOwned = false;
48 private byte[] _bitmap = new byte[512]; 48 private byte[] _bitmap = new byte[512];
@@ -50,7 +50,7 @@ namespace OpenSim.Framework
50 50
51 51
52 private uint _flags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | 52 private uint _flags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark |
53 (uint) Parcel.ParcelFlags.AllowAllObjectEntry | 53 (uint) Parcel.ParcelFlags.AllowAPrimitiveEntry |
54 (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | 54 (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform |
55 (uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts | 55 (uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts |
56 (uint) Parcel.ParcelFlags.SoundLocal; 56 (uint) Parcel.ParcelFlags.SoundLocal;
@@ -60,12 +60,12 @@ namespace OpenSim.Framework
60 private Parcel.ParcelStatus _status = Parcel.ParcelStatus.Leased; 60 private Parcel.ParcelStatus _status = Parcel.ParcelStatus.Leased;
61 private int _localID = 0; 61 private int _localID = 0;
62 private byte _mediaAutoScale = 0; 62 private byte _mediaAutoScale = 0;
63 private LLUUID _mediaID = LLUUID.Zero; 63 private UUID _mediaID = UUID.Zero;
64 64
65 private string _mediaURL = String.Empty; 65 private string _mediaURL = String.Empty;
66 private string _musicURL = String.Empty; 66 private string _musicURL = String.Empty;
67 private int _otherPrims = 0; 67 private int _otherPrims = 0;
68 private LLUUID _ownerID = LLUUID.Zero; 68 private UUID _ownerID = UUID.Zero;
69 private int _ownerPrims = 0; 69 private int _ownerPrims = 0;
70 private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 70 private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
71 private float _passHours = 0; 71 private float _passHours = 0;
@@ -74,11 +74,11 @@ namespace OpenSim.Framework
74 private int _selectedPrims = 0; 74 private int _selectedPrims = 0;
75 private int _simwideArea = 0; 75 private int _simwideArea = 0;
76 private int _simwidePrims = 0; 76 private int _simwidePrims = 0;
77 private LLUUID _snapshotID = LLUUID.Zero; 77 private UUID _snapshotID = UUID.Zero;
78 private LLVector3 _userLocation = new LLVector3(); 78 private Vector3 _userLocation = new Vector3();
79 private LLVector3 _userLookAt = new LLVector3(); 79 private Vector3 _userLookAt = new Vector3();
80 80
81 public LLVector3 AABBMax { 81 public Vector3 AABBMax {
82 get { 82 get {
83 return _AABBMax; 83 return _AABBMax;
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Framework
87 } 87 }
88 } 88 }
89 89
90 public LLVector3 AABBMin { 90 public Vector3 AABBMin {
91 get { 91 get {
92 return _AABBMin; 92 return _AABBMin;
93 } 93 }
@@ -114,7 +114,7 @@ namespace OpenSim.Framework
114 } 114 }
115 } 115 }
116 116
117 public LLUUID AuthBuyerID { 117 public UUID AuthBuyerID {
118 get { 118 get {
119 return _authBuyerID; 119 return _authBuyerID;
120 } 120 }
@@ -123,7 +123,7 @@ namespace OpenSim.Framework
123 } 123 }
124 } 124 }
125 125
126 public libsecondlife.Parcel.ParcelCategory Category { 126 public OpenMetaverse.Parcel.ParcelCategory Category {
127 get { 127 get {
128 return _category; 128 return _category;
129 } 129 }
@@ -150,7 +150,7 @@ namespace OpenSim.Framework
150 } 150 }
151 } 151 }
152 152
153 public LLUUID GlobalID { 153 public UUID GlobalID {
154 get { 154 get {
155 return _globalID; 155 return _globalID;
156 } 156 }
@@ -159,7 +159,7 @@ namespace OpenSim.Framework
159 } 159 }
160 } 160 }
161 161
162 public LLUUID GroupID { 162 public UUID GroupID {
163 get { 163 get {
164 return _groupID; 164 return _groupID;
165 } 165 }
@@ -231,7 +231,7 @@ namespace OpenSim.Framework
231 } 231 }
232 } 232 }
233 233
234 public libsecondlife.Parcel.ParcelStatus Status { 234 public OpenMetaverse.Parcel.ParcelStatus Status {
235 get { 235 get {
236 return _status; 236 return _status;
237 } 237 }
@@ -258,7 +258,7 @@ namespace OpenSim.Framework
258 } 258 }
259 } 259 }
260 260
261 public LLUUID MediaID { 261 public UUID MediaID {
262 get { 262 get {
263 return _mediaID; 263 return _mediaID;
264 } 264 }
@@ -294,7 +294,7 @@ namespace OpenSim.Framework
294 } 294 }
295 } 295 }
296 296
297 public LLUUID OwnerID { 297 public UUID OwnerID {
298 get { 298 get {
299 return _ownerID; 299 return _ownerID;
300 } 300 }
@@ -312,7 +312,7 @@ namespace OpenSim.Framework
312 } 312 }
313 } 313 }
314 314
315 public List<libsecondlife.ParcelManager.ParcelAccessEntry> ParcelAccessList { 315 public List<OpenMetaverse.ParcelManager.ParcelAccessEntry> ParcelAccessList {
316 get { 316 get {
317 return _parcelAccessList; 317 return _parcelAccessList;
318 } 318 }
@@ -375,7 +375,7 @@ namespace OpenSim.Framework
375 } 375 }
376 } 376 }
377 377
378 public LLUUID SnapshotID { 378 public UUID SnapshotID {
379 get { 379 get {
380 return _snapshotID; 380 return _snapshotID;
381 } 381 }
@@ -384,7 +384,7 @@ namespace OpenSim.Framework
384 } 384 }
385 } 385 }
386 386
387 public LLVector3 UserLocation { 387 public Vector3 UserLocation {
388 get { 388 get {
389 return _userLocation; 389 return _userLocation;
390 } 390 }
@@ -393,7 +393,7 @@ namespace OpenSim.Framework
393 } 393 }
394 } 394 }
395 395
396 public LLVector3 UserLookAt { 396 public Vector3 UserLookAt {
397 get { 397 get {
398 return _userLookAt; 398 return _userLookAt;
399 } 399 }
@@ -404,7 +404,7 @@ namespace OpenSim.Framework
404 404
405 public LandData() 405 public LandData()
406 { 406 {
407 _globalID = LLUUID.Random(); 407 _globalID = UUID.Random();
408 } 408 }
409 409
410 public LandData Copy() 410 public LandData Copy()
diff --git a/OpenSim/Framework/LandStatReportItem.cs b/OpenSim/Framework/LandStatReportItem.cs
index 8c7ee7b..b3ad02a 100644
--- a/OpenSim/Framework/LandStatReportItem.cs
+++ b/OpenSim/Framework/LandStatReportItem.cs
@@ -29,7 +29,7 @@
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using libsecondlife; 32using OpenMetaverse;
33 33
34 34
35namespace OpenSim.Framework 35namespace OpenSim.Framework
@@ -41,7 +41,7 @@ namespace OpenSim.Framework
41 public float LocationZ; 41 public float LocationZ;
42 public string OwnerName; 42 public string OwnerName;
43 public float Score; 43 public float Score;
44 public LLUUID TaskID; 44 public UUID TaskID;
45 public uint TaskLocalID; 45 public uint TaskLocalID;
46 public string TaskName; 46 public string TaskName;
47 47
diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs
index 000ae53..0fed711 100644
--- a/OpenSim/Framework/LandUpdateArgs.cs
+++ b/OpenSim/Framework/LandUpdateArgs.cs
@@ -1,17 +1,17 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
6 public class LandUpdateArgs : EventArgs 6 public class LandUpdateArgs : EventArgs
7 { 7 {
8 public LLUUID AuthBuyerID; 8 public UUID AuthBuyerID;
9 public Parcel.ParcelCategory Category; 9 public Parcel.ParcelCategory Category;
10 public string Desc; 10 public string Desc;
11 public LLUUID GroupID; 11 public UUID GroupID;
12 public byte LandingType; 12 public byte LandingType;
13 public byte MediaAutoScale; 13 public byte MediaAutoScale;
14 public LLUUID MediaID; 14 public UUID MediaID;
15 public string MediaURL; 15 public string MediaURL;
16 public string MusicURL; 16 public string MusicURL;
17 public string Name; 17 public string Name;
@@ -19,8 +19,8 @@ namespace OpenSim.Framework
19 public float PassHours; 19 public float PassHours;
20 public int PassPrice; 20 public int PassPrice;
21 public int SalePrice; 21 public int SalePrice;
22 public LLUUID SnapshotID; 22 public UUID SnapshotID;
23 public LLVector3 UserLocation; 23 public Vector3 UserLocation;
24 public LLVector3 UserLookAt; 24 public Vector3 UserLookAt;
25 } 25 }
26} \ No newline at end of file 26}
diff --git a/OpenSim/Framework/Location.cs b/OpenSim/Framework/Location.cs
index 77b2c85..f67543a 100644
--- a/OpenSim/Framework/Location.cs
+++ b/OpenSim/Framework/Location.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
diff --git a/OpenSim/Framework/Login.cs b/OpenSim/Framework/Login.cs
index e754e9f..61fffd2 100644
--- a/OpenSim/Framework/Login.cs
+++ b/OpenSim/Framework/Login.cs
@@ -26,26 +26,26 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
33 public class Login 33 public class Login
34 { 34 {
35 public LLUUID Agent; 35 public UUID Agent;
36 public LLUUID BaseFolder; 36 public UUID BaseFolder;
37 public string CapsPath = String.Empty; 37 public string CapsPath = String.Empty;
38 public uint CircuitCode; 38 public uint CircuitCode;
39 public string First = "Test"; 39 public string First = "Test";
40 public LLUUID InventoryFolder; 40 public UUID InventoryFolder;
41 public string Last = "User"; 41 public string Last = "User";
42 public LLUUID SecureSession = LLUUID.Zero; 42 public UUID SecureSession = UUID.Zero;
43 public LLUUID Session; 43 public UUID Session;
44 public LLVector3 StartPos; 44 public Vector3 StartPos;
45 45
46 public Login() 46 public Login()
47 { 47 {
48 StartPos = new LLVector3(128, 128, 70); 48 StartPos = new Vector3(128, 128, 70);
49 } 49 }
50 } 50 }
51} \ No newline at end of file 51}
diff --git a/OpenSim/Framework/MapBlockData.cs b/OpenSim/Framework/MapBlockData.cs
index 60f5be3..7b5bfaa 100644
--- a/OpenSim/Framework/MapBlockData.cs
+++ b/OpenSim/Framework/MapBlockData.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -35,7 +35,7 @@ namespace OpenSim.Framework
35 public byte Access; 35 public byte Access;
36 public byte Agents; 36 public byte Agents;
37 public uint Flags; 37 public uint Flags;
38 public LLUUID MapImageId; 38 public UUID MapImageId;
39 public String Name; 39 public String Name;
40 public uint RegionFlags; 40 public uint RegionFlags;
41 public byte WaterHeight; 41 public byte WaterHeight;
@@ -46,4 +46,4 @@ namespace OpenSim.Framework
46 { 46 {
47 } 47 }
48 } 48 }
49} \ No newline at end of file 49}
diff --git a/OpenSim/Framework/OSChatMessage.cs b/OpenSim/Framework/OSChatMessage.cs
index 7f99cd7..fbeb7ba 100644
--- a/OpenSim/Framework/OSChatMessage.cs
+++ b/OpenSim/Framework/OSChatMessage.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -44,17 +44,17 @@ namespace OpenSim.Framework
44 protected int m_channel; 44 protected int m_channel;
45 protected string m_from; 45 protected string m_from;
46 protected string m_message; 46 protected string m_message;
47 protected LLVector3 m_position; 47 protected Vector3 m_position;
48 48
49 protected IScene m_scene; 49 protected IScene m_scene;
50 protected IClientAPI m_sender; 50 protected IClientAPI m_sender;
51 protected object m_senderObject; 51 protected object m_senderObject;
52 protected ChatTypeEnum m_type; 52 protected ChatTypeEnum m_type;
53 protected LLUUID m_fromID; 53 protected UUID m_fromID;
54 54
55 public OSChatMessage() 55 public OSChatMessage()
56 { 56 {
57 m_position = new LLVector3(); 57 m_position = new Vector3();
58 } 58 }
59 59
60 /// <summary> 60 /// <summary>
@@ -87,7 +87,7 @@ namespace OpenSim.Framework
87 /// <summary> 87 /// <summary>
88 /// The position of the sender at the time of the message broadcast. 88 /// The position of the sender at the time of the message broadcast.
89 /// </summary> 89 /// </summary>
90 public LLVector3 Position 90 public Vector3 Position
91 { 91 {
92 get { return m_position; } 92 get { return m_position; }
93 set { m_position = value; } 93 set { m_position = value; }
@@ -125,7 +125,7 @@ namespace OpenSim.Framework
125 set { m_senderObject = value; } 125 set { m_senderObject = value; }
126 } 126 }
127 127
128 public LLUUID SenderUUID 128 public UUID SenderUUID
129 { 129 {
130 get { return m_fromID; } 130 get { return m_fromID; }
131 set { m_fromID = value; } 131 set { m_fromID = value; }
@@ -142,4 +142,4 @@ namespace OpenSim.Framework
142 142
143 #endregion 143 #endregion
144 } 144 }
145} \ No newline at end of file 145}
diff --git a/OpenSim/Framework/OSUUID.cs b/OpenSim/Framework/OSUUID.cs
index cb83ff2..e69de29 100644
--- a/OpenSim/Framework/OSUUID.cs
+++ b/OpenSim/Framework/OSUUID.cs
@@ -1,114 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using libsecondlife;
30
31namespace OpenSim.Framework
32{
33 [Serializable]
34 public class OSUUID : IComparable
35 {
36 public static readonly OSUUID Zero = new OSUUID();
37 public Guid UUID;
38
39 public OSUUID()
40 {
41 }
42
43 /* Constructors */
44
45 public OSUUID(string s)
46 {
47 if (s == null)
48 UUID = new Guid();
49 else
50 UUID = new Guid(s);
51 }
52
53 public OSUUID(Guid g)
54 {
55 UUID = g;
56 }
57
58 public OSUUID(LLUUID l)
59 {
60 UUID = l.UUID;
61 }
62
63 public OSUUID(ulong u)
64 {
65 UUID = new Guid(0, 0, 0, BitConverter.GetBytes(u));
66 }
67
68 #region IComparable Members
69
70 public int CompareTo(object obj)
71 {
72 if (obj is OSUUID)
73 {
74 OSUUID ID = (OSUUID) obj;
75 return UUID.CompareTo(ID.UUID);
76 }
77
78 throw new ArgumentException("object is not a OSUUID");
79 }
80
81 #endregion
82
83 // out conversion
84 public override string ToString()
85 {
86 return UUID.ToString();
87 }
88
89 public LLUUID ToLLUUID()
90 {
91 return new LLUUID(UUID);
92 }
93
94 // for comparison bits
95 public override int GetHashCode()
96 {
97 return UUID.GetHashCode();
98 }
99
100 public override bool Equals(object o)
101 {
102 if (!(o is LLUUID)) return false;
103
104 OSUUID uuid = (OSUUID) o;
105 return UUID == uuid.UUID;
106 }
107
108 // Static methods
109 public static OSUUID Random()
110 {
111 return new OSUUID(Guid.NewGuid());
112 }
113 }
114} \ No newline at end of file
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index acd1425..27e74ca 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Net; 30using System.Net;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
35{ 35{
@@ -76,11 +76,13 @@ namespace OpenSim.Framework
76 ushort id; 76 ushort id;
77 PacketFrequency freq; 77 PacketFrequency freq;
78 78
79 Buffer.BlockCopy(bytes, 0, decoded_header, 0, 10);
80
81 if ((bytes[0] & Helpers.MSG_ZEROCODED) != 0) 79 if ((bytes[0] & Helpers.MSG_ZEROCODED) != 0)
82 { 80 {
83 Helpers.ZeroDecodeCommand(bytes, decoded_header); 81 Helpers.ZeroDecode(bytes, 16, decoded_header);
82 }
83 else
84 {
85 Buffer.BlockCopy(bytes, 0, decoded_header, 0, 10);
84 } 86 }
85 87
86 if (decoded_header[6] == 0xFF) 88 if (decoded_header[6] == 0xFF)
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index cabce1b..366552f 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -342,7 +342,7 @@ namespace OpenSim.Framework
342 } 342 }
343 343
344 /// <summary> 344 /// <summary>
345 /// Filters out which plugin to load based on its "Provider", which is name given by in the addin.xml 345 /// Filters out which plugin to load based on its "Provider", which is name given by in the addin.Xml
346 /// </summary> 346 /// </summary>
347 public class PluginProviderFilter : IPluginFilter 347 public class PluginProviderFilter : IPluginFilter
348 { 348 {
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index f244b51..56e566b 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Xml.Serialization; 30using System.Xml.Serialization;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
@@ -74,7 +74,7 @@ namespace OpenSim.Framework
74 { 74 {
75 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 75 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
76 76
77 private static readonly LLObject.TextureEntry m_defaultTexture; 77 private static readonly Primitive.TextureEntry m_defaultTexture;
78 78
79 private byte[] m_textureEntry; 79 private byte[] m_textureEntry;
80 80
@@ -96,13 +96,13 @@ namespace OpenSim.Framework
96 private ushort _profileBegin; 96 private ushort _profileBegin;
97 private ushort _profileEnd; 97 private ushort _profileEnd;
98 private ushort _profileHollow; 98 private ushort _profileHollow;
99 private LLVector3 _scale; 99 private Vector3 _scale;
100 private byte _state; 100 private byte _state;
101 private ProfileShape _profileShape; 101 private ProfileShape _profileShape;
102 private HollowShape _hollowShape; 102 private HollowShape _hollowShape;
103 103
104 // Sculpted 104 // Sculpted
105 [XmlIgnore] private LLUUID _sculptTexture = LLUUID.Zero; 105 [XmlIgnore] private UUID _sculptTexture = UUID.Zero;
106 [XmlIgnore] private byte _sculptType = (byte)0; 106 [XmlIgnore] private byte _sculptType = (byte)0;
107 [XmlIgnore] private byte[] _sculptData = new byte[0]; 107 [XmlIgnore] private byte[] _sculptData = new byte[0];
108 108
@@ -172,7 +172,7 @@ namespace OpenSim.Framework
172 static PrimitiveBaseShape() 172 static PrimitiveBaseShape()
173 { 173 {
174 m_defaultTexture = 174 m_defaultTexture =
175 new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f")); 175 new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f"));
176 } 176 }
177 177
178 public PrimitiveBaseShape() 178 public PrimitiveBaseShape()
@@ -183,12 +183,12 @@ namespace OpenSim.Framework
183 } 183 }
184 184
185 [XmlIgnore] 185 [XmlIgnore]
186 public LLObject.TextureEntry Textures 186 public Primitive.TextureEntry Textures
187 { 187 {
188 get 188 get
189 { 189 {
190 //m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); 190 //m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length);
191 return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); 191 return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length);
192 } 192 }
193 193
194 set { m_textureEntry = value.ToBytes(); } 194 set { m_textureEntry = value.ToBytes(); }
@@ -252,7 +252,7 @@ namespace OpenSim.Framework
252 252
253 public void SetScale(float side) 253 public void SetScale(float side)
254 { 254 {
255 _scale = new LLVector3(side, side, side); 255 _scale = new Vector3(side, side, side);
256 } 256 }
257 257
258 public void SetHeigth(float heigth) 258 public void SetHeigth(float heigth)
@@ -285,22 +285,22 @@ namespace OpenSim.Framework
285 return shape; 285 return shape;
286 } 286 }
287 287
288 public void SetPathRange(LLVector3 pathRange) 288 public void SetPathRange(Vector3 pathRange)
289 { 289 {
290 _pathBegin = LLObject.PackBeginCut(pathRange.X); 290 _pathBegin = Primitive.PackBeginCut(pathRange.X);
291 _pathEnd = LLObject.PackEndCut(pathRange.Y); 291 _pathEnd = Primitive.PackEndCut(pathRange.Y);
292 } 292 }
293 293
294 public void SetSculptData(byte sculptType, LLUUID SculptTextureUUID) 294 public void SetSculptData(byte sculptType, UUID SculptTextureUUID)
295 { 295 {
296 _sculptType = sculptType; 296 _sculptType = sculptType;
297 _sculptTexture = SculptTextureUUID; 297 _sculptTexture = SculptTextureUUID;
298 } 298 }
299 299
300 public void SetProfileRange(LLVector3 profileRange) 300 public void SetProfileRange(Vector3 profileRange)
301 { 301 {
302 _profileBegin = LLObject.PackBeginCut(profileRange.X); 302 _profileBegin = Primitive.PackBeginCut(profileRange.X);
303 _profileEnd = LLObject.PackEndCut(profileRange.Y); 303 _profileEnd = Primitive.PackEndCut(profileRange.Y);
304 } 304 }
305 305
306 public byte[] ExtraParams 306 public byte[] ExtraParams
@@ -477,7 +477,7 @@ namespace OpenSim.Framework
477 } 477 }
478 } 478 }
479 479
480 public LLVector3 Scale { 480 public Vector3 Scale {
481 get { 481 get {
482 return _scale; 482 return _scale;
483 } 483 }
@@ -513,7 +513,7 @@ namespace OpenSim.Framework
513 } 513 }
514 } 514 }
515 515
516 public LLUUID SculptTexture { 516 public UUID SculptTexture {
517 get { 517 get {
518 return _sculptTexture; 518 return _sculptTexture;
519 } 519 }
@@ -904,7 +904,7 @@ namespace OpenSim.Framework
904 public void ReadSculptData(byte[] data, int pos) 904 public void ReadSculptData(byte[] data, int pos)
905 { 905 {
906 byte[] SculptTextureUUID = new byte[16]; 906 byte[] SculptTextureUUID = new byte[16];
907 LLUUID SculptUUID = LLUUID.Zero; 907 UUID SculptUUID = UUID.Zero;
908 byte SculptTypel = data[16+pos]; 908 byte SculptTypel = data[16+pos];
909 909
910 if (data.Length+pos >= 17) 910 if (data.Length+pos >= 17)
@@ -913,12 +913,12 @@ namespace OpenSim.Framework
913 SculptTextureUUID = new byte[16]; 913 SculptTextureUUID = new byte[16];
914 SculptTypel = data[16 + pos]; 914 SculptTypel = data[16 + pos];
915 Array.Copy(data, pos, SculptTextureUUID,0, 16); 915 Array.Copy(data, pos, SculptTextureUUID,0, 16);
916 SculptUUID = new LLUUID(SculptTextureUUID, 0); 916 SculptUUID = new UUID(SculptTextureUUID, 0);
917 } 917 }
918 else 918 else
919 { 919 {
920 _sculptEntry = false; 920 _sculptEntry = false;
921 SculptUUID = LLUUID.Zero; 921 SculptUUID = UUID.Zero;
922 SculptTypel = 0x00; 922 SculptTypel = 0x00;
923 } 923 }
924 924
@@ -953,7 +953,7 @@ namespace OpenSim.Framework
953 _flexiDrag = (float)(data[pos++] & 0x7F) / 10.0f; 953 _flexiDrag = (float)(data[pos++] & 0x7F) / 10.0f;
954 _flexiGravity = (float)(data[pos++] / 10.0f) - 10.0f; 954 _flexiGravity = (float)(data[pos++] / 10.0f) - 10.0f;
955 _flexiWind = (float)data[pos++] / 10.0f; 955 _flexiWind = (float)data[pos++] / 10.0f;
956 LLVector3 lForce = new LLVector3(data, pos); 956 Vector3 lForce = new Vector3(data, pos);
957 _flexiForceX = lForce.X; 957 _flexiForceX = lForce.X;
958 _flexiForceY = lForce.Y; 958 _flexiForceY = lForce.Y;
959 _flexiForceZ = lForce.Z; 959 _flexiForceZ = lForce.Z;
@@ -986,7 +986,7 @@ namespace OpenSim.Framework
986 data[i++] |= (byte)((byte)(_flexiDrag * 10.01f) & 0x7F); 986 data[i++] |= (byte)((byte)(_flexiDrag * 10.01f) & 0x7F);
987 data[i++] = (byte)((_flexiGravity + 10.0f) * 10.01f); 987 data[i++] = (byte)((_flexiGravity + 10.0f) * 10.01f);
988 data[i++] = (byte)(_flexiWind * 10.01f); 988 data[i++] = (byte)(_flexiWind * 10.01f);
989 LLVector3 lForce = new LLVector3(_flexiForceX, _flexiForceY, _flexiForceZ); 989 Vector3 lForce = new Vector3(_flexiForceX, _flexiForceY, _flexiForceZ);
990 lForce.GetBytes().CopyTo(data, i); 990 lForce.GetBytes().CopyTo(data, i);
991 991
992 return data; 992 return data;
@@ -997,7 +997,7 @@ namespace OpenSim.Framework
997 if (data.Length - pos >= 16) 997 if (data.Length - pos >= 16)
998 { 998 {
999 _lightEntry = true; 999 _lightEntry = true;
1000 LLColor lColor = new LLColor(data, pos, false); 1000 Color4 lColor = new Color4(data, pos, false);
1001 _lightIntensity = lColor.A; 1001 _lightIntensity = lColor.A;
1002 _lightColorA = 1f; 1002 _lightColorA = 1f;
1003 _lightColorR = lColor.R; 1003 _lightColorR = lColor.R;
@@ -1027,7 +1027,7 @@ namespace OpenSim.Framework
1027 byte[] data = new byte[16]; 1027 byte[] data = new byte[16];
1028 1028
1029 // Alpha channel in color is intensity 1029 // Alpha channel in color is intensity
1030 LLColor tmpColor = new LLColor(_lightColorR,_lightColorG,_lightColorB,_lightIntensity); 1030 Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity);
1031 1031
1032 tmpColor.GetBytes().CopyTo(data, 0); 1032 tmpColor.GetBytes().CopyTo(data, 0);
1033 Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4); 1033 Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4);
diff --git a/OpenSim/Framework/ProxyCodec.cs b/OpenSim/Framework/ProxyCodec.cs
index cdba93d..9121bed 100644
--- a/OpenSim/Framework/ProxyCodec.cs
+++ b/OpenSim/Framework/ProxyCodec.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Net; 30using System.Net;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
35{ 35{
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs
index 2d0be15..5d3c2fe 100644
--- a/OpenSim/Framework/RegionCommsListener.cs
+++ b/OpenSim/Framework/RegionCommsListener.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.Framework 32namespace OpenSim.Framework
33{ 33{
@@ -84,7 +84,7 @@ namespace OpenSim.Framework
84 } 84 }
85 85
86 // From User Server 86 // From User Server
87 public virtual void TriggerLogOffUser(ulong regionHandle, LLUUID agentID, LLUUID RegionSecret, string message) 87 public virtual void TriggerLogOffUser(ulong regionHandle, UUID agentID, UUID RegionSecret, string message)
88 { 88 {
89 handlerLogOffUser = OnLogOffUser; 89 handlerLogOffUser = OnLogOffUser;
90 if (handlerLogOffUser != null) 90 if (handlerLogOffUser != null)
@@ -95,7 +95,7 @@ namespace OpenSim.Framework
95 } 95 }
96 96
97 97
98 public virtual bool TriggerExpectPrim(ulong regionHandle, LLUUID primID, string objData, int XMLMethod) 98 public virtual bool TriggerExpectPrim(ulong regionHandle, UUID primID, string objData, int XMLMethod)
99 { 99 {
100 handlerExpectPrim = OnExpectPrim; 100 handlerExpectPrim = OnExpectPrim;
101 if (handlerExpectPrim != null) 101 if (handlerExpectPrim != null)
@@ -128,7 +128,7 @@ namespace OpenSim.Framework
128 return false; 128 return false;
129 } 129 }
130 130
131 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, 131 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, UUID agentID, Vector3 position,
132 bool isFlying) 132 bool isFlying)
133 { 133 {
134 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion; 134 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
@@ -140,7 +140,7 @@ namespace OpenSim.Framework
140 return false; 140 return false;
141 } 141 }
142 142
143 public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, 143 public virtual bool TriggerExpectPrimCrossing(ulong regionHandle, UUID primID, Vector3 position,
144 bool isPhysical) 144 bool isPhysical)
145 { 145 {
146 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; 146 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion;
@@ -152,7 +152,7 @@ namespace OpenSim.Framework
152 return false; 152 return false;
153 } 153 }
154 154
155 public virtual bool TriggerAcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID) 155 public virtual bool TriggerAcknowledgeAgentCrossed(ulong regionHandle, UUID agentID)
156 { 156 {
157 handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed; 157 handlerAcknowledgeAgentCrossed = OnAcknowledgeAgentCrossed;
158 if (handlerAcknowledgeAgentCrossed != null) 158 if (handlerAcknowledgeAgentCrossed != null)
@@ -163,7 +163,7 @@ namespace OpenSim.Framework
163 return false; 163 return false;
164 } 164 }
165 165
166 public virtual bool TriggerAcknowledgePrimCrossed(ulong regionHandle, LLUUID primID) 166 public virtual bool TriggerAcknowledgePrimCrossed(ulong regionHandle, UUID primID)
167 { 167 {
168 handlerAcknowledgePrimCrossed = OnAcknowledgePrimCrossed; 168 handlerAcknowledgePrimCrossed = OnAcknowledgePrimCrossed;
169 if (handlerAcknowledgePrimCrossed != null) 169 if (handlerAcknowledgePrimCrossed != null)
@@ -174,7 +174,7 @@ namespace OpenSim.Framework
174 return false; 174 return false;
175 } 175 }
176 176
177 public virtual bool TriggerCloseAgentConnection(ulong regionHandle, LLUUID agentID) 177 public virtual bool TriggerCloseAgentConnection(ulong regionHandle, UUID agentID)
178 { 178 {
179 handlerCloseAgentConnection = OnCloseAgentConnection; 179 handlerCloseAgentConnection = OnCloseAgentConnection;
180 if (handlerCloseAgentConnection != null) 180 if (handlerCloseAgentConnection != null)
@@ -220,7 +220,7 @@ namespace OpenSim.Framework
220 return false; 220 return false;
221 } 221 }
222 222
223 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, LLUUID agentID) 223 public bool TriggerTellRegionToCloseChildConnection(ulong regionHandle, UUID agentID)
224 { 224 {
225 handlerCloseAgentConnection = OnCloseAgentConnection; 225 handlerCloseAgentConnection = OnCloseAgentConnection;
226 if (handlerCloseAgentConnection != null) 226 if (handlerCloseAgentConnection != null)
diff --git a/OpenSim/Framework/RegionHandshakeArgs.cs b/OpenSim/Framework/RegionHandshakeArgs.cs
index 5e483f3..695c726 100644
--- a/OpenSim/Framework/RegionHandshakeArgs.cs
+++ b/OpenSim/Framework/RegionHandshakeArgs.cs
@@ -1,5 +1,5 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
@@ -19,14 +19,14 @@ namespace OpenSim.Framework
19 public float waterHeight; 19 public float waterHeight;
20 public uint regionFlags; 20 public uint regionFlags;
21 public string regionName; 21 public string regionName;
22 public LLUUID SimOwner; 22 public UUID SimOwner;
23 public LLUUID terrainBase0; 23 public UUID terrainBase0;
24 public LLUUID terrainBase1; 24 public UUID terrainBase1;
25 public LLUUID terrainBase2; 25 public UUID terrainBase2;
26 public LLUUID terrainBase3; 26 public UUID terrainBase3;
27 public LLUUID terrainDetail0; 27 public UUID terrainDetail0;
28 public LLUUID terrainDetail1; 28 public UUID terrainDetail1;
29 public LLUUID terrainDetail2; 29 public UUID terrainDetail2;
30 public LLUUID terrainDetail3; 30 public UUID terrainDetail3;
31 } 31 }
32} \ No newline at end of file 32}
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 9b12662..925c5be 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using System.Xml; 32using System.Xml;
33using libsecondlife; 33using OpenMetaverse;
34using Nini.Config; 34using Nini.Config;
35 35
36namespace OpenSim.Framework 36namespace OpenSim.Framework
@@ -69,7 +69,7 @@ namespace OpenSim.Framework
69 protected uint? m_regionLocX; 69 protected uint? m_regionLocX;
70 protected uint? m_regionLocY; 70 protected uint? m_regionLocY;
71 protected uint m_remotingPort; 71 protected uint m_remotingPort;
72 public LLUUID RegionID = LLUUID.Zero; 72 public UUID RegionID = UUID.Zero;
73 public string RemotingAddress; 73 public string RemotingAddress;
74 74
75 public SimpleRegionInfo() 75 public SimpleRegionInfo()
@@ -105,7 +105,7 @@ namespace OpenSim.Framework
105 m_httpPort = ConvertFrom.HttpPort; 105 m_httpPort = ConvertFrom.HttpPort;
106 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; 106 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports;
107 RemotingAddress = ConvertFrom.RemotingAddress; 107 RemotingAddress = ConvertFrom.RemotingAddress;
108 RegionID = LLUUID.Zero; 108 RegionID = UUID.Zero;
109 ServerURI = ConvertFrom.ServerURI; 109 ServerURI = ConvertFrom.ServerURI;
110 } 110 }
111 111
@@ -202,16 +202,16 @@ namespace OpenSim.Framework
202 202
203// public bool m_allow_alternate_ports; 203// public bool m_allow_alternate_ports;
204 204
205 public LLUUID MasterAvatarAssignedUUID = LLUUID.Zero; 205 public UUID MasterAvatarAssignedUUID = UUID.Zero;
206 public string MasterAvatarFirstName = String.Empty; 206 public string MasterAvatarFirstName = String.Empty;
207 public string MasterAvatarLastName = String.Empty; 207 public string MasterAvatarLastName = String.Empty;
208 public string MasterAvatarSandboxPassword = String.Empty; 208 public string MasterAvatarSandboxPassword = String.Empty;
209 public LLUUID originRegionID = LLUUID.Zero; 209 public UUID originRegionID = UUID.Zero;
210 public string proxyUrl = ""; 210 public string proxyUrl = "";
211 public string RegionName = String.Empty; 211 public string RegionName = String.Empty;
212 public string regionSecret = LLUUID.Random().ToString(); 212 public string regionSecret = UUID.Random().ToString();
213 213
214 public LLUUID lastMapUUID = LLUUID.Zero; 214 public UUID lastMapUUID = UUID.Zero;
215 public string lastMapRefresh = "0"; 215 public string lastMapRefresh = "0";
216 216
217 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 217 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
@@ -248,7 +248,7 @@ namespace OpenSim.Framework
248 m_remotingPort = ConvertFrom.RemotingPort; 248 m_remotingPort = ConvertFrom.RemotingPort;
249 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; 249 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports;
250 RemotingAddress = ConvertFrom.RemotingAddress; 250 RemotingAddress = ConvertFrom.RemotingAddress;
251 RegionID = LLUUID.Zero; 251 RegionID = UUID.Zero;
252 proxyUrl = ConvertFrom.ProxyUrl; 252 proxyUrl = ConvertFrom.ProxyUrl;
253 originRegionID = ConvertFrom.OriginRegionID; 253 originRegionID = ConvertFrom.OriginRegionID;
254 RegionName = ConvertFrom.RegionName; 254 RegionName = ConvertFrom.RegionName;
@@ -264,7 +264,7 @@ namespace OpenSim.Framework
264 m_remotingPort = ConvertFrom.RemotingPort; 264 m_remotingPort = ConvertFrom.RemotingPort;
265 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports; 265 m_allow_alternate_ports = ConvertFrom.m_allow_alternate_ports;
266 RemotingAddress = ConvertFrom.RemotingAddress; 266 RemotingAddress = ConvertFrom.RemotingAddress;
267 RegionID = LLUUID.Zero; 267 RegionID = UUID.Zero;
268 ServerURI = ConvertFrom.ServerURI; 268 ServerURI = ConvertFrom.ServerURI;
269 } 269 }
270 270
@@ -315,7 +315,7 @@ namespace OpenSim.Framework
315 public void LoadFromNiniSource(IConfigSource source, string sectionName) 315 public void LoadFromNiniSource(IConfigSource source, string sectionName)
316 { 316 {
317 string errorMessage = String.Empty; 317 string errorMessage = String.Empty;
318 RegionID = new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToString())); 318 RegionID = new UUID(source.Configs[sectionName].GetString("Region_ID", UUID.Random().ToString()));
319 RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); 319 RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test");
320 m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); 320 m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000"));
321 m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); 321 m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000"));
@@ -368,7 +368,7 @@ namespace OpenSim.Framework
368 368
369 public void loadConfigurationOptionsFromMe() 369 public void loadConfigurationOptionsFromMe()
370 { 370 {
371 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE, 371 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID_NULL_FREE,
372 "UUID of Region (Default is recommended, random UUID)", 372 "UUID of Region (Default is recommended, random UUID)",
373 RegionID.ToString(), true); 373 RegionID.ToString(), true);
374 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 374 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
@@ -393,7 +393,7 @@ namespace OpenSim.Framework
393 configMember.addConfigurationOption("external_host_name", 393 configMember.addConfigurationOption("external_host_name",
394 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 394 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
395 "External Host Name", m_externalHostName, true); 395 "External Host Name", m_externalHostName, true);
396 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 396 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
397 "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true); 397 "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true);
398 configMember.addConfigurationOption("master_avatar_first", 398 configMember.addConfigurationOption("master_avatar_first",
399 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 399 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
@@ -404,7 +404,7 @@ namespace OpenSim.Framework
404 configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 404 configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
405 "(Sandbox Mode Only)Password for Master Avatar account", 405 "(Sandbox Mode Only)Password for Master Avatar account",
406 MasterAvatarSandboxPassword, true); 406 MasterAvatarSandboxPassword, true);
407 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 407 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
408 "Last Map UUID", lastMapUUID.ToString(), true); 408 "Last Map UUID", lastMapUUID.ToString(), true);
409 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 409 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
410 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); 410 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
@@ -413,9 +413,9 @@ namespace OpenSim.Framework
413 413
414 public void loadConfigurationOptions() 414 public void loadConfigurationOptions()
415 { 415 {
416 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 416 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
417 "UUID of Region (Default is recommended, random UUID)", 417 "UUID of Region (Default is recommended, random UUID)",
418 LLUUID.Random().ToString(), true); 418 UUID.Random().ToString(), true);
419 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 419 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
420 "Region Name", "OpenSim Test", false); 420 "Region Name", "OpenSim Test", false);
421 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 421 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
@@ -436,8 +436,8 @@ namespace OpenSim.Framework
436 configMember.addConfigurationOption("external_host_name", 436 configMember.addConfigurationOption("external_host_name",
437 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 437 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
438 "External Host Name", "127.0.0.1", false); 438 "External Host Name", "127.0.0.1", false);
439 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 439 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
440 "Master Avatar UUID", LLUUID.Zero.ToString(), true); 440 "Master Avatar UUID", UUID.Zero.ToString(), true);
441 configMember.addConfigurationOption("master_avatar_first", 441 configMember.addConfigurationOption("master_avatar_first",
442 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 442 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
443 "First Name of Master Avatar", "Test", false, 443 "First Name of Master Avatar", "Test", false,
@@ -452,7 +452,7 @@ namespace OpenSim.Framework
452 "(Sandbox Mode Only)Password for Master Avatar account", "test", false, 452 "(Sandbox Mode Only)Password for Master Avatar account", "test", false,
453 (ConfigurationOption.ConfigurationOptionShouldBeAsked) 453 (ConfigurationOption.ConfigurationOptionShouldBeAsked)
454 shouldMasterAvatarDetailsBeAsked); 454 shouldMasterAvatarDetailsBeAsked);
455 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 455 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
456 "Last Map UUID", lastMapUUID.ToString(), true); 456 "Last Map UUID", lastMapUUID.ToString(), true);
457 457
458 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 458 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
@@ -461,7 +461,7 @@ namespace OpenSim.Framework
461 461
462 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) 462 public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
463 { 463 {
464 return MasterAvatarAssignedUUID == LLUUID.Zero; 464 return MasterAvatarAssignedUUID == UUID.Zero;
465 } 465 }
466 466
467 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 467 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -469,8 +469,8 @@ namespace OpenSim.Framework
469 switch (configuration_key) 469 switch (configuration_key)
470 { 470 {
471 case "sim_UUID": 471 case "sim_UUID":
472 RegionID = (LLUUID) configuration_result; 472 RegionID = (UUID) configuration_result;
473 originRegionID = (LLUUID) configuration_result; 473 originRegionID = (UUID) configuration_result;
474 break; 474 break;
475 case "sim_name": 475 case "sim_name":
476 RegionName = (string) configuration_result; 476 RegionName = (string) configuration_result;
@@ -505,7 +505,7 @@ namespace OpenSim.Framework
505 } 505 }
506 break; 506 break;
507 case "master_avatar_uuid": 507 case "master_avatar_uuid":
508 MasterAvatarAssignedUUID = (LLUUID) configuration_result; 508 MasterAvatarAssignedUUID = (UUID) configuration_result;
509 break; 509 break;
510 case "master_avatar_first": 510 case "master_avatar_first":
511 MasterAvatarFirstName = (string) configuration_result; 511 MasterAvatarFirstName = (string) configuration_result;
@@ -518,7 +518,7 @@ namespace OpenSim.Framework
518 MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); 518 MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
519 break; 519 break;
520 case "lastmap_uuid": 520 case "lastmap_uuid":
521 lastMapUUID = (LLUUID)configuration_result; 521 lastMapUUID = (UUID)configuration_result;
522 break; 522 break;
523 case "lastmap_refresh": 523 case "lastmap_refresh":
524 lastMapRefresh = (string)configuration_result; 524 lastMapRefresh = (string)configuration_result;
@@ -528,7 +528,7 @@ namespace OpenSim.Framework
528 return true; 528 return true;
529 } 529 }
530 530
531 public void SaveLastMapUUID(LLUUID mapUUID) 531 public void SaveLastMapUUID(UUID mapUUID)
532 { 532 {
533 if (null == configMember) return; 533 if (null == configMember) return;
534 534
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
index a371851..c7d317f 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
@@ -59,12 +59,12 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
59 Directory.CreateDirectory(regionConfigPath); 59 Directory.CreateDirectory(regionConfigPath);
60 } 60 }
61 61
62 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); 62 string[] configFiles = Directory.GetFiles(regionConfigPath, "*.Xml");
63 63
64 if (configFiles.Length == 0) 64 if (configFiles.Length == 0)
65 { 65 {
66 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.xml"), false); 66 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.Xml"), false);
67 configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); 67 configFiles = Directory.GetFiles(regionConfigPath, "*.Xml");
68 } 68 }
69 69
70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length]; 70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length];
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index e0a60e6..525a3f0 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
@@ -45,7 +45,7 @@ namespace OpenSim.Framework
45 { 45 {
46 if (configMember == null) 46 if (configMember == null)
47 { 47 {
48 configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true); 48 configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.Xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true);
49 configMember.performConfigurationRetrieve(); 49 configMember.performConfigurationRetrieve();
50 } 50 }
51 } 51 }
@@ -69,19 +69,19 @@ namespace OpenSim.Framework
69 String.Empty, "21", true); 69 String.Empty, "21", true);
70 70
71 configMember.addConfigurationOption("terrain_base_0", 71 configMember.addConfigurationOption("terrain_base_0",
72 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 72 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
73 String.Empty, "b8d3965a-ad78-bf43-699b-bff8eca6c975",true); 73 String.Empty, "b8d3965a-ad78-bf43-699b-bff8eca6c975",true);
74 74
75 configMember.addConfigurationOption("terrain_base_1", 75 configMember.addConfigurationOption("terrain_base_1",
76 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 76 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
77 String.Empty, "abb783e6-3e93-26c0-248a-247666855da3",true); 77 String.Empty, "abb783e6-3e93-26c0-248a-247666855da3",true);
78 78
79 configMember.addConfigurationOption("terrain_base_2", 79 configMember.addConfigurationOption("terrain_base_2",
80 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 80 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
81 String.Empty, "179cdabd-398a-9b6b-1391-4dc333ba321f",true); 81 String.Empty, "179cdabd-398a-9b6b-1391-4dc333ba321f",true);
82 82
83 configMember.addConfigurationOption("terrain_base_3", 83 configMember.addConfigurationOption("terrain_base_3",
84 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 84 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
85 String.Empty, "beb169c7-11ea-fff2-efe5-0f24dc881df2",true); 85 String.Empty, "beb169c7-11ea-fff2-efe5-0f24dc881df2",true);
86 86
87 configMember.addConfigurationOption("terrain_start_height_0", 87 configMember.addConfigurationOption("terrain_start_height_0",
@@ -179,16 +179,16 @@ namespace OpenSim.Framework
179 m_Maturity = 1; 179 m_Maturity = 1;
180 break; 180 break;
181 case "terrain_base_0": 181 case "terrain_base_0":
182 m_TerrainTexture1 = (LLUUID)value; 182 m_TerrainTexture1 = (UUID)value;
183 break; 183 break;
184 case "terrain_base_1": 184 case "terrain_base_1":
185 m_TerrainTexture2 = (LLUUID)value; 185 m_TerrainTexture2 = (UUID)value;
186 break; 186 break;
187 case "terrain_base_2": 187 case "terrain_base_2":
188 m_TerrainTexture3 = (LLUUID)value; 188 m_TerrainTexture3 = (UUID)value;
189 break; 189 break;
190 case "terrain_base_3": 190 case "terrain_base_3":
191 m_TerrainTexture4 = (LLUUID)value; 191 m_TerrainTexture4 = (UUID)value;
192 break; 192 break;
193 case "terrain_start_height_0": 193 case "terrain_start_height_0":
194 m_Elevation1SW = (double)value; 194 m_Elevation1SW = (double)value;
@@ -237,9 +237,9 @@ namespace OpenSim.Framework
237 OnSave(this); 237 OnSave(this);
238 } 238 }
239 239
240 private LLUUID m_RegionUUID = LLUUID.Zero; 240 private UUID m_RegionUUID = UUID.Zero;
241 241
242 public LLUUID RegionUUID 242 public UUID RegionUUID
243 { 243 {
244 get { return m_RegionUUID; } 244 get { return m_RegionUUID; }
245 set { m_RegionUUID = value; } 245 set { m_RegionUUID = value; }
@@ -349,57 +349,57 @@ namespace OpenSim.Framework
349 set { m_DisablePhysics = value; } 349 set { m_DisablePhysics = value; }
350 } 350 }
351 351
352 private LLUUID m_TerrainTexture1 = LLUUID.Zero; 352 private UUID m_TerrainTexture1 = UUID.Zero;
353 353
354 public LLUUID TerrainTexture1 354 public UUID TerrainTexture1
355 { 355 {
356 get { return m_TerrainTexture1; } 356 get { return m_TerrainTexture1; }
357 set 357 set
358 { 358 {
359 if (value == LLUUID.Zero) 359 if (value == UUID.Zero)
360 m_TerrainTexture1 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); 360 m_TerrainTexture1 = new UUID("b8d3965a-ad78-bf43-699b-bff8eca6c975");
361 else 361 else
362 m_TerrainTexture1 = value; 362 m_TerrainTexture1 = value;
363 } 363 }
364 } 364 }
365 365
366 private LLUUID m_TerrainTexture2 = LLUUID.Zero; 366 private UUID m_TerrainTexture2 = UUID.Zero;
367 367
368 public LLUUID TerrainTexture2 368 public UUID TerrainTexture2
369 { 369 {
370 get { return m_TerrainTexture2; } 370 get { return m_TerrainTexture2; }
371 set 371 set
372 { 372 {
373 if (value == LLUUID.Zero) 373 if (value == UUID.Zero)
374 m_TerrainTexture2 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); 374 m_TerrainTexture2 = new UUID("abb783e6-3e93-26c0-248a-247666855da3");
375 else 375 else
376 m_TerrainTexture2 = value; 376 m_TerrainTexture2 = value;
377 } 377 }
378 } 378 }
379 379
380 private LLUUID m_TerrainTexture3 = LLUUID.Zero; 380 private UUID m_TerrainTexture3 = UUID.Zero;
381 381
382 public LLUUID TerrainTexture3 382 public UUID TerrainTexture3
383 { 383 {
384 get { return m_TerrainTexture3; } 384 get { return m_TerrainTexture3; }
385 set 385 set
386 { 386 {
387 if (value == LLUUID.Zero) 387 if (value == UUID.Zero)
388 m_TerrainTexture3 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); 388 m_TerrainTexture3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f");
389 else 389 else
390 m_TerrainTexture3 = value; 390 m_TerrainTexture3 = value;
391 } 391 }
392 } 392 }
393 393
394 private LLUUID m_TerrainTexture4 = LLUUID.Zero; 394 private UUID m_TerrainTexture4 = UUID.Zero;
395 395
396 public LLUUID TerrainTexture4 396 public UUID TerrainTexture4
397 { 397 {
398 get { return m_TerrainTexture4; } 398 get { return m_TerrainTexture4; }
399 set 399 set
400 { 400 {
401 if (value == LLUUID.Zero) 401 if (value == UUID.Zero)
402 m_TerrainTexture4 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); 402 m_TerrainTexture4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2");
403 else 403 else
404 m_TerrainTexture4 = value; 404 m_TerrainTexture4 = value;
405 } 405 }
@@ -509,17 +509,17 @@ namespace OpenSim.Framework
509 set { m_Sandbox = value; } 509 set { m_Sandbox = value; }
510 } 510 }
511 511
512 private LLVector3 m_SunVector; 512 private Vector3 m_SunVector;
513 513
514 public LLVector3 SunVector 514 public Vector3 SunVector
515 { 515 {
516 get { return m_SunVector; } 516 get { return m_SunVector; }
517 set { m_SunVector = value; } 517 set { m_SunVector = value; }
518 } 518 }
519 519
520 private LLUUID m_TerrainImageID; 520 private UUID m_TerrainImageID;
521 521
522 public LLUUID TerrainImageID 522 public UUID TerrainImageID
523 { 523 {
524 get { return m_TerrainImageID; } 524 get { return m_TerrainImageID; }
525 set { m_TerrainImageID = value; } 525 set { m_TerrainImageID = value; }
@@ -541,9 +541,9 @@ namespace OpenSim.Framework
541 set { m_SunPosition = value; } 541 set { m_SunPosition = value; }
542 } 542 }
543 543
544 private LLUUID m_Covenant = LLUUID.Zero; 544 private UUID m_Covenant = UUID.Zero;
545 545
546 public LLUUID Covenant 546 public UUID Covenant
547 { 547 {
548 get { return m_Covenant; } 548 get { return m_Covenant; }
549 set { m_Covenant = value; } 549 set { m_Covenant = value; }
diff --git a/OpenSim/Framework/RequestAssetArgs.cs b/OpenSim/Framework/RequestAssetArgs.cs
index 9f64a5a..0595ffa 100644
--- a/OpenSim/Framework/RequestAssetArgs.cs
+++ b/OpenSim/Framework/RequestAssetArgs.cs
@@ -1,5 +1,5 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
@@ -8,6 +8,6 @@ namespace OpenSim.Framework
8 public int ChannelType; 8 public int ChannelType;
9 public float Priority; 9 public float Priority;
10 public int SourceType; 10 public int SourceType;
11 public LLUUID TransferID; 11 public UUID TransferID;
12 } 12 }
13} \ No newline at end of file 13}
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs
index 4965a43..2052470 100644
--- a/OpenSim/Framework/SerializableRegionInfo.cs
+++ b/OpenSim/Framework/SerializableRegionInfo.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Net; 29using System.Net;
30using System.Net.Sockets; 30using System.Net.Sockets;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
@@ -47,14 +47,14 @@ namespace OpenSim.Framework
47 protected uint m_httpPort = 9000; 47 protected uint m_httpPort = 9000;
48 48
49 protected IPEndPoint m_internalEndPoint; 49 protected IPEndPoint m_internalEndPoint;
50 protected Guid m_originRegionID = LLUUID.Zero.UUID; 50 protected Guid m_originRegionID = UUID.Zero.Guid;
51 protected string m_proxyUrl; 51 protected string m_proxyUrl;
52 protected uint? m_regionLocX; 52 protected uint? m_regionLocX;
53 protected uint? m_regionLocY; 53 protected uint? m_regionLocY;
54 protected string m_regionName; 54 protected string m_regionName;
55 public uint m_remotingPort; 55 public uint m_remotingPort;
56 protected string m_serverURI; 56 protected string m_serverURI;
57 public Guid RegionID = LLUUID.Zero.UUID; 57 public Guid RegionID = UUID.Zero.Guid;
58 public string RemotingAddress; 58 public string RemotingAddress;
59 59
60 /// <summary> 60 /// <summary>
@@ -181,10 +181,10 @@ namespace OpenSim.Framework
181 set { m_proxyUrl = value; } 181 set { m_proxyUrl = value; }
182 } 182 }
183 183
184 public LLUUID OriginRegionID 184 public UUID OriginRegionID
185 { 185 {
186 get { return new LLUUID(m_originRegionID); } 186 get { return new UUID(m_originRegionID); }
187 set { m_originRegionID = value.UUID; } 187 set { m_originRegionID = value.Guid; }
188 } 188 }
189 189
190 public string RegionName 190 public string RegionName
@@ -199,4 +199,4 @@ namespace OpenSim.Framework
199 set { m_serverURI = value; } 199 set { m_serverURI = value; }
200 } 200 }
201 } 201 }
202} \ No newline at end of file 202}
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index d326b66..3787c38 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -35,7 +35,7 @@ using System.Reflection;
35using System.Text; 35using System.Text;
36using System.Threading; 36using System.Threading;
37using System.Xml; 37using System.Xml;
38using libsecondlife.StructuredData; 38using OpenMetaverse.StructuredData;
39using log4net; 39using log4net;
40using Nwc.XmlRpc; 40using Nwc.XmlRpc;
41 41
@@ -709,7 +709,7 @@ namespace OpenSim.Framework.Servers
709 // We'd like to put this into a text file parhaps that's easily editable. 709 // We'd like to put this into a text file parhaps that's easily editable.
710 // 710 //
711 // For this test to work, I used the following secondlife.exe parameters 711 // For this test to work, I used the following secondlife.exe parameters
712 // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 712 // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.Xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2
713 // 713 //
714 // Even after all that, there's still an error, but it's a start. 714 // Even after all that, there's still an error, but it's a start.
715 // 715 //
diff --git a/OpenSim/Framework/Servers/LLSDMethod.cs b/OpenSim/Framework/Servers/LLSDMethod.cs
index 7bb946e..6a39544 100644
--- a/OpenSim/Framework/Servers/LLSDMethod.cs
+++ b/OpenSim/Framework/Servers/LLSDMethod.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.StructuredData; 28using OpenMetaverse.StructuredData;
29 29
30namespace OpenSim.Framework.Servers 30namespace OpenSim.Framework.Servers
31{ 31{
diff --git a/OpenSim/Framework/Servers/LLSDMethodString.cs b/OpenSim/Framework/Servers/LLSDMethodString.cs
index 09736ba..e15b621 100644
--- a/OpenSim/Framework/Servers/LLSDMethodString.cs
+++ b/OpenSim/Framework/Servers/LLSDMethodString.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.StructuredData; 28using OpenMetaverse.StructuredData;
29 29
30namespace OpenSim.Framework.Servers 30namespace OpenSim.Framework.Servers
31{ 31{
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 58d5621..cc64ed6 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework.Statistics.Interfaces; 33using OpenSim.Framework.Statistics.Interfaces;
34 34
35namespace OpenSim.Framework.Statistics 35namespace OpenSim.Framework.Statistics
@@ -122,8 +122,8 @@ namespace OpenSim.Framework.Statistics
122 /// <summary> 122 /// <summary>
123 /// Retain a dictionary of all packet queues stats reporters 123 /// Retain a dictionary of all packet queues stats reporters
124 /// </summary> 124 /// </summary>
125 private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors 125 private IDictionary<UUID, PacketQueueStatsCollector> packetQueueStatsCollectors
126 = new Dictionary<LLUUID, PacketQueueStatsCollector>(); 126 = new Dictionary<UUID, PacketQueueStatsCollector>();
127 127
128 public void AddAbnormalClientThreadTermination() 128 public void AddAbnormalClientThreadTermination()
129 { 129 {
@@ -176,9 +176,9 @@ namespace OpenSim.Framework.Statistics
176 /// <summary> 176 /// <summary>
177 /// Register as a packet queue stats provider 177 /// Register as a packet queue stats provider
178 /// </summary> 178 /// </summary>
179 /// <param name="uuid">An agent LLUUID</param> 179 /// <param name="uuid">An agent UUID</param>
180 /// <param name="provider"></param> 180 /// <param name="provider"></param>
181 public void RegisterPacketQueueStatsProvider(LLUUID uuid, IPullStatsProvider provider) 181 public void RegisterPacketQueueStatsProvider(UUID uuid, IPullStatsProvider provider)
182 { 182 {
183 lock (packetQueueStatsCollectors) 183 lock (packetQueueStatsCollectors)
184 { 184 {
@@ -191,8 +191,8 @@ namespace OpenSim.Framework.Statistics
191 /// <summary> 191 /// <summary>
192 /// Deregister a packet queue stats provider 192 /// Deregister a packet queue stats provider
193 /// </summary> 193 /// </summary>
194 /// <param name="uuid">An agent LLUUID</param> 194 /// <param name="uuid">An agent UUID</param>
195 public void DeregisterPacketQueueStatsProvider(LLUUID uuid) 195 public void DeregisterPacketQueueStatsProvider(UUID uuid)
196 { 196 {
197 lock (packetQueueStatsCollectors) 197 lock (packetQueueStatsCollectors)
198 { 198 {
@@ -302,7 +302,7 @@ Asset service request failures: {5}"+ Environment.NewLine,
302 "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); 302 "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset"));
303 sb.Append(Environment.NewLine); 303 sb.Append(Environment.NewLine);
304 304
305 foreach (LLUUID key in packetQueueStatsCollectors.Keys) 305 foreach (UUID key in packetQueueStatsCollectors.Keys)
306 { 306 {
307 sb.Append(string.Format("{0}: ", key)); 307 sb.Append(string.Format("{0}: ", key));
308 sb.Append(packetQueueStatsCollectors[key].Report()); 308 sb.Append(packetQueueStatsCollectors[key].Report());
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index fc84041..60b22db 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -31,7 +31,7 @@ using System.Reflection;
31using System.Xml; 31using System.Xml;
32using System.Xml.Schema; 32using System.Xml.Schema;
33using System.Xml.Serialization; 33using System.Xml.Serialization;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36 36
37namespace OpenSim.Framework 37namespace OpenSim.Framework
@@ -41,7 +41,7 @@ namespace OpenSim.Framework
41 /// 41 ///
42 /// This class is not thread safe. Callers must synchronize on Dictionary methods. 42 /// This class is not thread safe. Callers must synchronize on Dictionary methods.
43 /// </summary> 43 /// </summary>
44 public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>, 44 public class TaskInventoryDictionary : Dictionary<UUID, TaskInventoryItem>,
45 ICloneable, IXmlSerializable 45 ICloneable, IXmlSerializable
46 { 46 {
47 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -56,7 +56,7 @@ namespace OpenSim.Framework
56 56
57 lock (this) 57 lock (this)
58 { 58 {
59 foreach (LLUUID uuid in Keys) 59 foreach (UUID uuid in Keys)
60 { 60 {
61 clone.Add(uuid, (TaskInventoryItem) this[uuid].Clone()); 61 clone.Add(uuid, (TaskInventoryItem) this[uuid].Clone());
62 } 62 }
@@ -76,7 +76,7 @@ namespace OpenSim.Framework
76 // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 76 // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217
77 // ... 77 // ...
78// private static XmlSerializer tiiSerializer 78// private static XmlSerializer tiiSerializer
79// = new XmlSerializer(typeof(Dictionary<LLUUID, TaskInventoryItem>.ValueCollection)); 79// = new XmlSerializer(typeof(Dictionary<UUID, TaskInventoryItem>.ValueCollection));
80 80
81 // see IXmlSerializable 81 // see IXmlSerializable
82 82
@@ -203,31 +203,31 @@ namespace OpenSim.Framework
203 "gesture" 203 "gesture"
204 }; 204 };
205 205
206 private LLUUID _assetID = LLUUID.Zero; 206 private UUID _assetID = UUID.Zero;
207 207
208 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; 208 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
209 private uint _creationDate = 0; 209 private uint _creationDate = 0;
210 private LLUUID _creatorID = LLUUID.Zero; 210 private UUID _creatorID = UUID.Zero;
211 private string _description = String.Empty; 211 private string _description = String.Empty;
212 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; 212 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL;
213 private uint _flags = 0; 213 private uint _flags = 0;
214 private LLUUID _groupID = LLUUID.Zero; 214 private UUID _groupID = UUID.Zero;
215 private uint _groupMask = FULL_MASK_PERMISSIONS_GENERAL; 215 private uint _groupMask = FULL_MASK_PERMISSIONS_GENERAL;
216 216
217 private int _invType = 0; 217 private int _invType = 0;
218 private LLUUID _itemID = LLUUID.Zero; 218 private UUID _itemID = UUID.Zero;
219 private LLUUID _lastOwnerID = LLUUID.Zero; 219 private UUID _lastOwnerID = UUID.Zero;
220 private string _name = String.Empty; 220 private string _name = String.Empty;
221 private uint _nextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; 221 private uint _nextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL;
222 private LLUUID _ownerID = LLUUID.Zero; 222 private UUID _ownerID = UUID.Zero;
223 private uint _ownerMask = FULL_MASK_PERMISSIONS_GENERAL; 223 private uint _ownerMask = FULL_MASK_PERMISSIONS_GENERAL;
224 private LLUUID _parentID = LLUUID.Zero; //parent folder id 224 private UUID _parentID = UUID.Zero; //parent folder id
225 private LLUUID _parentPartID = LLUUID.Zero; // SceneObjectPart this is inside 225 private UUID _parentPartID = UUID.Zero; // SceneObjectPart this is inside
226 private LLUUID _permsGranter; 226 private UUID _permsGranter;
227 private int _permsMask; 227 private int _permsMask;
228 private int _type = 0; 228 private int _type = 0;
229 229
230 public LLUUID AssetID { 230 public UUID AssetID {
231 get { 231 get {
232 return _assetID; 232 return _assetID;
233 } 233 }
@@ -254,7 +254,7 @@ namespace OpenSim.Framework
254 } 254 }
255 } 255 }
256 256
257 public LLUUID CreatorID { 257 public UUID CreatorID {
258 get { 258 get {
259 return _creatorID; 259 return _creatorID;
260 } 260 }
@@ -290,7 +290,7 @@ namespace OpenSim.Framework
290 } 290 }
291 } 291 }
292 292
293 public LLUUID GroupID { 293 public UUID GroupID {
294 get { 294 get {
295 return _groupID; 295 return _groupID;
296 } 296 }
@@ -317,7 +317,7 @@ namespace OpenSim.Framework
317 } 317 }
318 } 318 }
319 319
320 public LLUUID ItemID { 320 public UUID ItemID {
321 get { 321 get {
322 return _itemID; 322 return _itemID;
323 } 323 }
@@ -326,7 +326,7 @@ namespace OpenSim.Framework
326 } 326 }
327 } 327 }
328 328
329 public LLUUID LastOwnerID { 329 public UUID LastOwnerID {
330 get { 330 get {
331 return _lastOwnerID; 331 return _lastOwnerID;
332 } 332 }
@@ -353,7 +353,7 @@ namespace OpenSim.Framework
353 } 353 }
354 } 354 }
355 355
356 public LLUUID OwnerID { 356 public UUID OwnerID {
357 get { 357 get {
358 return _ownerID; 358 return _ownerID;
359 } 359 }
@@ -371,7 +371,7 @@ namespace OpenSim.Framework
371 } 371 }
372 } 372 }
373 373
374 public LLUUID ParentID { 374 public UUID ParentID {
375 get { 375 get {
376 return _parentID; 376 return _parentID;
377 } 377 }
@@ -380,7 +380,7 @@ namespace OpenSim.Framework
380 } 380 }
381 } 381 }
382 382
383 public LLUUID ParentPartID { 383 public UUID ParentPartID {
384 get { 384 get {
385 return _parentPartID; 385 return _parentPartID;
386 } 386 }
@@ -389,7 +389,7 @@ namespace OpenSim.Framework
389 } 389 }
390 } 390 }
391 391
392 public LLUUID PermsGranter { 392 public UUID PermsGranter {
393 get { 393 get {
394 return _permsGranter; 394 return _permsGranter;
395 } 395 }
@@ -428,12 +428,12 @@ namespace OpenSim.Framework
428 #endregion 428 #endregion
429 429
430 /// <summary> 430 /// <summary>
431 /// Reset the LLUUIDs for this item. 431 /// Reset the UUIDs for this item.
432 /// </summary> 432 /// </summary>
433 /// <param name="partID">The new part ID to which this item belongs</param> 433 /// <param name="partID">The new part ID to which this item belongs</param>
434 public void ResetIDs(LLUUID partID) 434 public void ResetIDs(UUID partID)
435 { 435 {
436 _itemID = LLUUID.Random(); 436 _itemID = UUID.Random();
437 _parentPartID = partID; 437 _parentPartID = partID;
438 } 438 }
439 } 439 }
diff --git a/OpenSim/Framework/TextureRequestArgs.cs b/OpenSim/Framework/TextureRequestArgs.cs
index fff1023..33971d6 100644
--- a/OpenSim/Framework/TextureRequestArgs.cs
+++ b/OpenSim/Framework/TextureRequestArgs.cs
@@ -1,5 +1,5 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
@@ -8,7 +8,7 @@ namespace OpenSim.Framework
8 private sbyte m_discardLevel; 8 private sbyte m_discardLevel;
9 private uint m_packetNumber; 9 private uint m_packetNumber;
10 private float m_priority; 10 private float m_priority;
11 protected LLUUID m_requestedAssetID; 11 protected UUID m_requestedAssetID;
12 12
13 public float Priority 13 public float Priority
14 { 14 {
@@ -37,10 +37,10 @@ namespace OpenSim.Framework
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 public LLUUID RequestedAssetID 40 public UUID RequestedAssetID
41 { 41 {
42 get { return m_requestedAssetID; } 42 get { return m_requestedAssetID; }
43 set { m_requestedAssetID = value; } 43 set { m_requestedAssetID = value; }
44 } 44 }
45 } 45 }
46} \ No newline at end of file 46}
diff --git a/OpenSim/Framework/UserAgentData.cs b/OpenSim/Framework/UserAgentData.cs
index 68f47ba..03a65c5 100644
--- a/OpenSim/Framework/UserAgentData.cs
+++ b/OpenSim/Framework/UserAgentData.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -58,12 +58,12 @@ namespace OpenSim.Framework
58 /// <summary> 58 /// <summary>
59 /// The position of the user within the region 59 /// The position of the user within the region
60 /// </summary> 60 /// </summary>
61 private LLVector3 currentPos; 61 private Vector3 currentPos;
62 62
63 /// <summary> 63 /// <summary>
64 /// Current region the user is logged into 64 /// Current region the user is logged into
65 /// </summary> 65 /// </summary>
66 private LLUUID currentRegion; 66 private UUID currentRegion;
67 67
68 /// <summary> 68 /// <summary>
69 /// A unix timestamp from when the user logged in 69 /// A unix timestamp from when the user logged in
@@ -78,25 +78,25 @@ namespace OpenSim.Framework
78 /// <summary> 78 /// <summary>
79 /// The region the user logged into initially 79 /// The region the user logged into initially
80 /// </summary> 80 /// </summary>
81 private LLUUID regionID; 81 private UUID regionID;
82 82
83 /// <summary> 83 /// <summary>
84 /// The "secure" session ID for the user 84 /// The "secure" session ID for the user
85 /// </summary> 85 /// </summary>
86 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks> 86 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
87 private LLUUID secureSessionID; 87 private UUID secureSessionID;
88 88
89 /// <summary> 89 /// <summary>
90 /// The session ID for the user (also the agent ID) 90 /// The session ID for the user (also the agent ID)
91 /// </summary> 91 /// </summary>
92 private LLUUID sessionID; 92 private UUID sessionID;
93 93
94 /// <summary> 94 /// <summary>
95 /// The UUID of the users avatar (not the agent!) 95 /// The UUID of the users avatar (not the agent!)
96 /// </summary> 96 /// </summary>
97 private LLUUID UUID; 97 private UUID UUID;
98 98
99 public virtual LLUUID ProfileID 99 public virtual UUID ProfileID
100 { 100 {
101 get { return UUID; } 101 get { return UUID; }
102 set { UUID = value; } 102 set { UUID = value; }
@@ -120,19 +120,19 @@ namespace OpenSim.Framework
120 set { agentOnline = value; } 120 set { agentOnline = value; }
121 } 121 }
122 122
123 public virtual LLUUID SessionID 123 public virtual UUID SessionID
124 { 124 {
125 get { return sessionID; } 125 get { return sessionID; }
126 set { sessionID = value; } 126 set { sessionID = value; }
127 } 127 }
128 128
129 public virtual LLUUID SecureSessionID 129 public virtual UUID SecureSessionID
130 { 130 {
131 get { return secureSessionID; } 131 get { return secureSessionID; }
132 set { secureSessionID = value; } 132 set { secureSessionID = value; }
133 } 133 }
134 134
135 public virtual LLUUID InitialRegion 135 public virtual UUID InitialRegion
136 { 136 {
137 get { return regionID; } 137 get { return regionID; }
138 set { regionID = value; } 138 set { regionID = value; }
@@ -150,7 +150,7 @@ namespace OpenSim.Framework
150 set { logoutTime = value; } 150 set { logoutTime = value; }
151 } 151 }
152 152
153 public virtual LLUUID Region 153 public virtual UUID Region
154 { 154 {
155 get { return currentRegion; } 155 get { return currentRegion; }
156 set { currentRegion = value; } 156 set { currentRegion = value; }
@@ -162,7 +162,7 @@ namespace OpenSim.Framework
162 set { currentHandle = value; } 162 set { currentHandle = value; }
163 } 163 }
164 164
165 public virtual LLVector3 Position 165 public virtual Vector3 Position
166 { 166 {
167 get { return currentPos; } 167 get { return currentPos; }
168 set { currentPos = value; } 168 set { currentPos = value; }
@@ -186,4 +186,4 @@ namespace OpenSim.Framework
186 set { currentPos.Z = value; } 186 set { currentPos.Z = value; }
187 } 187 }
188 } 188 }
189} \ No newline at end of file 189}
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
index 2d06148..bc93766 100644
--- a/OpenSim/Framework/UserProfileData.cs
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
@@ -53,12 +53,12 @@ namespace OpenSim.Framework
53 /// <summary> 53 /// <summary>
54 /// The coordinates inside the region of the home location 54 /// The coordinates inside the region of the home location
55 /// </summary> 55 /// </summary>
56 private LLVector3 _homeLocation; 56 private Vector3 _homeLocation;
57 57
58 /// <summary> 58 /// <summary>
59 /// Where the user will be looking when they rez. 59 /// Where the user will be looking when they rez.
60 /// </summary> 60 /// </summary>
61 private LLVector3 _homeLookAt; 61 private Vector3 _homeLookAt;
62 62
63 private uint _homeRegionX; 63 private uint _homeRegionX;
64 private uint _homeRegionY; 64 private uint _homeRegionY;
@@ -66,7 +66,7 @@ namespace OpenSim.Framework
66 /// <summary> 66 /// <summary>
67 /// The ID value for this user 67 /// The ID value for this user
68 /// </summary> 68 /// </summary>
69 private LLUUID _id; 69 private UUID _id;
70 70
71 /// <summary> 71 /// <summary>
72 /// A UNIX Timestamp for the users last login date / time 72 /// A UNIX Timestamp for the users last login date / time
@@ -97,7 +97,7 @@ namespace OpenSim.Framework
97 /// <summary> 97 /// <summary>
98 /// The profile image for the users first life tab 98 /// The profile image for the users first life tab
99 /// </summary> 99 /// </summary>
100 private LLUUID _profileFirstImage; 100 private UUID _profileFirstImage;
101 101
102 /// <summary> 102 /// <summary>
103 /// The first life about text listed in a users profile 103 /// The first life about text listed in a users profile
@@ -107,14 +107,14 @@ namespace OpenSim.Framework
107 /// <summary> 107 /// <summary>
108 /// The profile image for an avatar stored on the asset server 108 /// The profile image for an avatar stored on the asset server
109 /// </summary> 109 /// </summary>
110 private LLUUID _profileImage; 110 private UUID _profileImage;
111 111
112 /// <summary> 112 /// <summary>
113 /// A uint mask containing the "I want to do" part of the users profile 113 /// A uint mask containing the "I want to do" part of the users profile
114 /// </summary> 114 /// </summary>
115 private uint _profileWantDoMask; // Profile window "I want to" mask 115 private uint _profileWantDoMask; // Profile window "I want to" mask
116 116
117 private LLUUID _rootInventoryFolderID; 117 private UUID _rootInventoryFolderID;
118 118
119 /// <summary> 119 /// <summary>
120 /// The second component of a users account name 120 /// The second component of a users account name
@@ -134,7 +134,7 @@ namespace OpenSim.Framework
134 /// <summary> 134 /// <summary>
135 /// The last used Web_login_key 135 /// The last used Web_login_key
136 /// </summary> 136 /// </summary>
137 private LLUUID _webLoginKey; 137 private UUID _webLoginKey;
138 138
139 // Data for estates and other goodies 139 // Data for estates and other goodies
140 // to get away from per-machine configs a little 140 // to get away from per-machine configs a little
@@ -142,7 +142,7 @@ namespace OpenSim.Framework
142 private int _userFlags; 142 private int _userFlags;
143 private int _godLevel; 143 private int _godLevel;
144 private string _customType; 144 private string _customType;
145 private LLUUID _partner; 145 private UUID _partner;
146 146
147 /// <summary> 147 /// <summary>
148 /// The regionhandle of the users preferred home region. If 148 /// The regionhandle of the users preferred home region. If
@@ -159,26 +159,26 @@ namespace OpenSim.Framework
159 } 159 }
160 } 160 }
161 161
162 private LLUUID _homeRegionID; 162 private UUID _homeRegionID;
163 /// <summary> 163 /// <summary>
164 /// The regionID of the users home region. This is unique; 164 /// The regionID of the users home region. This is unique;
165 /// even if the position of the region changes within the 165 /// even if the position of the region changes within the
166 /// grid, this will refer to the same region. 166 /// grid, this will refer to the same region.
167 /// </summary> 167 /// </summary>
168 public LLUUID HomeRegionID 168 public UUID HomeRegionID
169 { 169 {
170 get { return _homeRegionID; } 170 get { return _homeRegionID; }
171 set { _homeRegionID = value; } 171 set { _homeRegionID = value; }
172 } 172 }
173 173
174 // Property wrappers 174 // Property wrappers
175 public virtual LLUUID ID 175 public virtual UUID ID
176 { 176 {
177 get { return _id; } 177 get { return _id; }
178 set { _id = value; } 178 set { _id = value; }
179 } 179 }
180 180
181 public virtual LLUUID WebLoginKey 181 public virtual UUID WebLoginKey
182 { 182 {
183 get { return _webLoginKey; } 183 get { return _webLoginKey; }
184 set { _webLoginKey = value; } 184 set { _webLoginKey = value; }
@@ -220,7 +220,7 @@ namespace OpenSim.Framework
220 set { _homeRegionY = value; } 220 set { _homeRegionY = value; }
221 } 221 }
222 222
223 public virtual LLVector3 HomeLocation 223 public virtual Vector3 HomeLocation
224 { 224 {
225 get { return _homeLocation; } 225 get { return _homeLocation; }
226 set { _homeLocation = value; } 226 set { _homeLocation = value; }
@@ -246,7 +246,7 @@ namespace OpenSim.Framework
246 } 246 }
247 247
248 248
249 public virtual LLVector3 HomeLookAt 249 public virtual Vector3 HomeLookAt
250 { 250 {
251 get { return _homeLookAt; } 251 get { return _homeLookAt; }
252 set { _homeLookAt = value; } 252 set { _homeLookAt = value; }
@@ -283,7 +283,7 @@ namespace OpenSim.Framework
283 set { _lastLogin = value; } 283 set { _lastLogin = value; }
284 } 284 }
285 285
286 public virtual LLUUID RootInventoryFolderID 286 public virtual UUID RootInventoryFolderID
287 { 287 {
288 get { return _rootInventoryFolderID; } 288 get { return _rootInventoryFolderID; }
289 set { _rootInventoryFolderID = value; } 289 set { _rootInventoryFolderID = value; }
@@ -325,13 +325,13 @@ namespace OpenSim.Framework
325 set { _profileFirstText = value; } 325 set { _profileFirstText = value; }
326 } 326 }
327 327
328 public virtual LLUUID Image 328 public virtual UUID Image
329 { 329 {
330 get { return _profileImage; } 330 get { return _profileImage; }
331 set { _profileImage = value; } 331 set { _profileImage = value; }
332 } 332 }
333 333
334 public virtual LLUUID FirstLifeImage 334 public virtual UUID FirstLifeImage
335 { 335 {
336 get { return _profileFirstImage; } 336 get { return _profileFirstImage; }
337 set { _profileFirstImage = value; } 337 set { _profileFirstImage = value; }
@@ -361,7 +361,7 @@ namespace OpenSim.Framework
361 set { _customType = value; } 361 set { _customType = value; }
362 } 362 }
363 363
364 public virtual LLUUID Partner 364 public virtual UUID Partner
365 { 365 {
366 get { return _partner; } 366 get { return _partner; }
367 set { _partner = value; } 367 set { _partner = value; }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 09bf029..d7dcf19 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -38,7 +38,7 @@ using System.Security.Cryptography;
38using System.Text; 38using System.Text;
39using System.Text.RegularExpressions; 39using System.Text.RegularExpressions;
40using System.Xml; 40using System.Xml;
41using libsecondlife; 41using OpenMetaverse;
42using log4net; 42using log4net;
43using Nini.Config; 43using Nini.Config;
44using Nwc.XmlRpc; 44using Nwc.XmlRpc;
@@ -67,7 +67,7 @@ namespace OpenSim.Framework
67 /// <param name="a">A 3d vector</param> 67 /// <param name="a">A 3d vector</param>
68 /// <param name="b">A 3d vector</param> 68 /// <param name="b">A 3d vector</param>
69 /// <returns>The distance between the two vectors</returns> 69 /// <returns>The distance between the two vectors</returns>
70 public static double GetDistanceTo(LLVector3 a, LLVector3 b) 70 public static double GetDistanceTo(Vector3 a, Vector3 b)
71 { 71 {
72 float dx = a.X - b.X; 72 float dx = a.X - b.X;
73 float dy = a.Y - b.Y; 73 float dy = a.Y - b.Y;
@@ -80,7 +80,7 @@ namespace OpenSim.Framework
80 /// </summary> 80 /// </summary>
81 /// <param name="a">A 3d vector</param> 81 /// <param name="a">A 3d vector</param>
82 /// <returns>The magnitude of the vector</returns> 82 /// <returns>The magnitude of the vector</returns>
83 public static double GetMagnitude(LLVector3 a) 83 public static double GetMagnitude(Vector3 a)
84 { 84 {
85 return Math.Sqrt((a.X * a.X) + (a.Y * a.Y) + (a.Z * a.Z)); 85 return Math.Sqrt((a.X * a.X) + (a.Y * a.Y) + (a.Z * a.Z));
86 } 86 }
@@ -91,20 +91,20 @@ namespace OpenSim.Framework
91 /// <param name="a">A 3d vector</param> 91 /// <param name="a">A 3d vector</param>
92 /// <returns>A new vector which is normalized form of the vector</returns> 92 /// <returns>A new vector which is normalized form of the vector</returns>
93 /// <remarks>The vector paramater cannot be <0,0,0></remarks> 93 /// <remarks>The vector paramater cannot be <0,0,0></remarks>
94 public static LLVector3 GetNormalizedVector(LLVector3 a) 94 public static Vector3 GetNormalizedVector(Vector3 a)
95 { 95 {
96 if (IsZeroVector(a)) 96 if (IsZeroVector(a))
97 throw new ArgumentException("Vector paramater cannot be a zero vector."); 97 throw new ArgumentException("Vector paramater cannot be a zero vector.");
98 98
99 float Mag = (float) GetMagnitude(a); 99 float Mag = (float) GetMagnitude(a);
100 return new LLVector3(a.X / Mag, a.Y / Mag, a.Z / Mag); 100 return new Vector3(a.X / Mag, a.Y / Mag, a.Z / Mag);
101 } 101 }
102 102
103 /// <summary> 103 /// <summary>
104 /// Returns if a vector is a zero vector (has all zero components) 104 /// Returns if a vector is a zero vector (has all zero components)
105 /// </summary> 105 /// </summary>
106 /// <returns></returns> 106 /// <returns></returns>
107 public static bool IsZeroVector(LLVector3 v) 107 public static bool IsZeroVector(Vector3 v)
108 { 108 {
109 if (v.X == 0 && v.Y == 0 && v.Z == 0) 109 if (v.X == 0 && v.Y == 0 && v.Z == 0)
110 { 110 {
@@ -268,7 +268,7 @@ namespace OpenSim.Framework
268 268
269 public static string GetRandomCapsPath() 269 public static string GetRandomCapsPath()
270 { 270 {
271 LLUUID caps = LLUUID.Random(); 271 UUID caps = UUID.Random();
272 string capsPath = caps.ToString(); 272 string capsPath = caps.ToString();
273 capsPath = capsPath.Remove(capsPath.Length - 4, 4); 273 capsPath = capsPath.Remove(capsPath.Length - 4, 4);
274 return capsPath; 274 return capsPath;
@@ -525,13 +525,13 @@ namespace OpenSim.Framework
525 } 525 }
526 526
527 /// <summary> 527 /// <summary>
528 /// Convert an LLUUID to a raw uuid string. Right now this is a string without hyphens. 528 /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens.
529 /// </summary> 529 /// </summary>
530 /// <param name="lluuid"></param> 530 /// <param name="UUID"></param>
531 /// <returns></returns> 531 /// <returns></returns>
532 public static String ToRawUuidString(LLUUID lluuid) 532 public static String ToRawUuidString(UUID UUID)
533 { 533 {
534 return lluuid.UUID.ToString("n"); 534 return UUID.Guid.ToString("n");
535 } 535 }
536 536
537 public static string CleanString(string input) 537 public static string CleanString(string input)
@@ -728,16 +728,16 @@ namespace OpenSim.Framework
728 } 728 }
729 729
730 // used for RemoteParcelRequest (for "About Landmark") 730 // used for RemoteParcelRequest (for "About Landmark")
731 public static LLUUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { 731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
732 byte[] bytes = { 732 byte[] bytes = {
733 (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32), 733 (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32),
734 (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle, 734 (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle,
735 (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x, 735 (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x,
736 (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y }; 736 (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y };
737 return new LLUUID(bytes, 0); 737 return new UUID(bytes, 0);
738 } 738 }
739 739
740 public static void ParseFakeParcelID(LLUUID parcelID, out ulong regionHandle, out uint x, out uint y) { 740 public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y) {
741 byte[] bytes = parcelID.GetBytes(); 741 byte[] bytes = parcelID.GetBytes();
742 regionHandle = Helpers.BytesToUInt64(bytes); 742 regionHandle = Helpers.BytesToUInt64(bytes);
743 x = Helpers.BytesToUInt(bytes, 8); 743 x = Helpers.BytesToUInt(bytes, 8);
diff --git a/OpenSim/Framework/ViewerEffectEventHandlerArg.cs b/OpenSim/Framework/ViewerEffectEventHandlerArg.cs
index 6d7e2ab..3c7f36d 100644
--- a/OpenSim/Framework/ViewerEffectEventHandlerArg.cs
+++ b/OpenSim/Framework/ViewerEffectEventHandlerArg.cs
@@ -1,15 +1,15 @@
1using System; 1using System;
2using libsecondlife; 2using OpenMetaverse;
3 3
4namespace OpenSim.Framework 4namespace OpenSim.Framework
5{ 5{
6 public class ViewerEffectEventHandlerArg : EventArgs 6 public class ViewerEffectEventHandlerArg : EventArgs
7 { 7 {
8 public LLUUID AgentID; 8 public UUID AgentID;
9 public byte[] Color; 9 public byte[] Color;
10 public float Duration; 10 public float Duration;
11 public LLUUID ID; 11 public UUID ID;
12 public byte Type; 12 public byte Type;
13 public byte[] TypeData; 13 public byte[] TypeData;
14 } 14 }
15} \ No newline at end of file 15}
diff --git a/OpenSim/Framework/sLLVector3.cs b/OpenSim/Framework/sLLVector3.cs
index c0bafb2..e69de29 100644
--- a/OpenSim/Framework/sLLVector3.cs
+++ b/OpenSim/Framework/sLLVector3.cs
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using libsecondlife;
30
31namespace OpenSim.Framework
32{
33 [Serializable]
34 public class sLLVector3
35 {
36 public float x = 0;
37 public float y = 0;
38 public float z = 0;
39
40 public sLLVector3()
41 {
42 }
43
44 public sLLVector3(LLVector3 v)
45 {
46 x = v.X;
47 y = v.Y;
48 z = v.Z;
49 }
50 }
51} \ No newline at end of file
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 6d46048..bded875 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using log4net.Config; 33using log4net.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -108,7 +108,7 @@ namespace OpenSim.Grid.AssetServer
108 m_httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider)); 108 m_httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
109 } 109 }
110 110
111 public byte[] GetAssetData(LLUUID assetID, bool isTexture) 111 public byte[] GetAssetData(UUID assetID, bool isTexture)
112 { 112 {
113 return null; 113 return null;
114 } 114 }
@@ -119,7 +119,7 @@ namespace OpenSim.Grid.AssetServer
119 new PluginLoader<IAssetProviderPlugin> (new AssetDataInitialiser (connect)); 119 new PluginLoader<IAssetProviderPlugin> (new AssetDataInitialiser (connect));
120 120
121 // loader will try to load all providers (MySQL, MSSQL, etc) 121 // loader will try to load all providers (MySQL, MSSQL, etc)
122 // unless it is constrainted to the correct "Provider" entry in the addin.xml 122 // unless it is constrainted to the correct "Provider" entry in the addin.Xml
123 loader.Add ("/OpenSim/AssetData", new PluginProviderFilter (provider)); 123 loader.Add ("/OpenSim/AssetData", new PluginProviderFilter (provider));
124 loader.Load(); 124 loader.Load();
125 125
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs
index f63b78b..457142f 100644
--- a/OpenSim/Grid/AssetServer/RestService.cs
+++ b/OpenSim/Grid/AssetServer/RestService.cs
@@ -32,7 +32,7 @@ using System.Reflection;
32using System.Text; 32using System.Text;
33using System.Xml; 33using System.Xml;
34using System.Xml.Serialization; 34using System.Xml.Serialization;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
@@ -70,9 +70,9 @@ namespace OpenSim.Grid.AssetServer
70 70
71 if (p.Length > 0) 71 if (p.Length > 0)
72 { 72 {
73 LLUUID assetID = null; 73 UUID assetID = null;
74 74
75 if (!LLUUID.TryParse(p[0], out assetID)) 75 if (!UUID.TryParse(p[0], out assetID))
76 { 76 {
77 m_log.InfoFormat( 77 m_log.InfoFormat(
78 "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]); 78 "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0]);
@@ -128,9 +128,9 @@ namespace OpenSim.Grid.AssetServer
128 { 128 {
129 string param = GetParam(path); 129 string param = GetParam(path);
130 130
131 LLUUID assetId; 131 UUID assetId;
132 if (param.Length > 0) 132 if (param.Length > 0)
133 LLUUID.TryParse(param, out assetId); 133 UUID.TryParse(param, out assetId);
134 // byte[] txBuffer = new byte[4096]; 134 // byte[] txBuffer = new byte[4096];
135 135
136 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 136 XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
diff --git a/OpenSim/Grid/Communications/OGS1/OGS1InterServiceInventoryService.cs b/OpenSim/Grid/Communications/OGS1/OGS1InterServiceInventoryService.cs
index a36d396..5de5bb3 100644
--- a/OpenSim/Grid/Communications/OGS1/OGS1InterServiceInventoryService.cs
+++ b/OpenSim/Grid/Communications/OGS1/OGS1InterServiceInventoryService.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; 32using OpenSim.Framework.Communications;
33using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
@@ -51,10 +51,10 @@ namespace OpenSim.Grid.Communications.OGS1
51 /// </summary> 51 /// </summary>
52 /// <param name="userId"></param> 52 /// <param name="userId"></param>
53 /// <returns></returns> 53 /// <returns></returns>
54 public bool CreateNewUserInventory(LLUUID userId) 54 public bool CreateNewUserInventory(UUID userId)
55 { 55 {
56 return SynchronousRestObjectPoster.BeginPostObject<Guid, bool>( 56 return SynchronousRestObjectPoster.BeginPostObject<Guid, bool>(
57 "POST", m_inventoryServerUrl + "CreateInventory/", userId.UUID); 57 "POST", m_inventoryServerUrl + "CreateInventory/", userId.Guid);
58 } 58 }
59 59
60 /// <summary> 60 /// <summary>
@@ -62,10 +62,10 @@ namespace OpenSim.Grid.Communications.OGS1
62 /// </summary> 62 /// </summary>
63 /// <param name="userId"></param> 63 /// <param name="userId"></param>
64 /// <returns></returns> 64 /// <returns></returns>
65 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) 65 public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
66 { 66 {
67 return SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( 67 return SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>(
68 "POST", m_inventoryServerUrl + "RootFolders/", userId.UUID); 68 "POST", m_inventoryServerUrl + "RootFolders/", userId.Guid);
69 } 69 }
70 } 70 }
71} 71}
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index eb4aea6..6fbfc71 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -32,7 +32,7 @@ using System.Collections.Generic;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using System.Xml; 34using System.Xml;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
38using OpenSim.Data; 38using OpenSim.Data;
@@ -68,7 +68,7 @@ namespace OpenSim.Grid.GridServer
68 new PluginLoader<ILogDataPlugin> (new LogDataInitialiser (connect)); 68 new PluginLoader<ILogDataPlugin> (new LogDataInitialiser (connect));
69 69
70 // loader will try to load all providers (MySQL, MSSQL, etc) 70 // loader will try to load all providers (MySQL, MSSQL, etc)
71 // unless it is constrainted to the correct "Provider" entry in the addin.xml 71 // unless it is constrainted to the correct "Provider" entry in the addin.Xml
72 gridloader.Add ("/OpenSim/GridData", new PluginProviderFilter (provider)); 72 gridloader.Add ("/OpenSim/GridData", new PluginProviderFilter (provider));
73 logloader.Add ("/OpenSim/LogData", new PluginProviderFilter (provider)); 73 logloader.Add ("/OpenSim/LogData", new PluginProviderFilter (provider));
74 74
@@ -107,13 +107,13 @@ namespace OpenSim.Grid.GridServer
107 /// </summary> 107 /// </summary>
108 /// <param name="uuid">A UUID key of the region to return</param> 108 /// <param name="uuid">A UUID key of the region to return</param>
109 /// <returns>A SimProfileData for the region</returns> 109 /// <returns>A SimProfileData for the region</returns>
110 public RegionProfileData GetRegion(LLUUID uuid) 110 public RegionProfileData GetRegion(UUID uuid)
111 { 111 {
112 foreach (IGridDataPlugin plugin in _plugins) 112 foreach (IGridDataPlugin plugin in _plugins)
113 { 113 {
114 try 114 try
115 { 115 {
116 return plugin.GetProfileByLLUUID(uuid); 116 return plugin.GetProfileByUUID(uuid);
117 } 117 }
118 catch (Exception e) 118 catch (Exception e)
119 { 119 {
@@ -340,9 +340,9 @@ namespace OpenSim.Grid.GridServer
340 RegionProfileData existingSim; 340 RegionProfileData existingSim;
341 341
342 Hashtable requestData = (Hashtable)request.Params[0]; 342 Hashtable requestData = (Hashtable)request.Params[0];
343 LLUUID uuid; 343 UUID uuid;
344 344
345 if (!requestData.ContainsKey("UUID") || !LLUUID.TryParse((string)requestData["UUID"], out uuid)) 345 if (!requestData.ContainsKey("UUID") || !UUID.TryParse((string)requestData["UUID"], out uuid))
346 { 346 {
347 m_log.Warn("[LOGIN PRELUDE]: Region connected without a UUID, sending back error response."); 347 m_log.Warn("[LOGIN PRELUDE]: Region connected without a UUID, sending back error response.");
348 return ErrorResponse("No UUID passed to grid server - unable to connect you"); 348 return ErrorResponse("No UUID passed to grid server - unable to connect you");
@@ -425,7 +425,7 @@ namespace OpenSim.Grid.GridServer
425 catch (Exception e) 425 catch (Exception e)
426 { 426 {
427 m_log.Warn("[LOGIN END]: " + 427 m_log.Warn("[LOGIN END]: " +
428 "Unable to login region " + sim.UUID.ToString() + " via " + plugin.Name); 428 "Unable to login region " + sim.ToString() + " via " + plugin.Name);
429 m_log.Warn("[LOGIN END]: " + e.ToString()); 429 m_log.Warn("[LOGIN END]: " + e.ToString());
430 } 430 }
431 } 431 }
@@ -471,7 +471,7 @@ namespace OpenSim.Grid.GridServer
471 responseData["user_recvkey"] = sim.regionUserRecvKey; 471 responseData["user_recvkey"] = sim.regionUserRecvKey;
472 responseData["authkey"] = sim.regionSecret; 472 responseData["authkey"] = sim.regionSecret;
473 473
474 // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap) 474 // New! If set, use as URL to local sim storage (ie http://remotehost/region.Yap)
475 responseData["data_uri"] = sim.regionDataURI; 475 responseData["data_uri"] = sim.regionDataURI;
476 476
477 responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines; 477 responseData["allow_forceful_banlines"] = Config.AllowForcefulBanlines;
@@ -515,7 +515,7 @@ namespace OpenSim.Grid.GridServer
515 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString(); 515 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString();
516 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString(); 516 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString();
517 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString(); 517 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString();
518 NeighbourBlock["UUID"] = aSim.Value.UUID.ToString(); 518 NeighbourBlock["UUID"] = aSim.Value.ToString();
519 NeighbourBlock["regionHandle"] = aSim.Value.regionHandle.ToString(); 519 NeighbourBlock["regionHandle"] = aSim.Value.regionHandle.ToString();
520 520
521 if (aSim.Value.UUID != sim.UUID) 521 if (aSim.Value.UUID != sim.UUID)
@@ -566,8 +566,8 @@ namespace OpenSim.Grid.GridServer
566 RegionProfileData sim; 566 RegionProfileData sim;
567 sim = new RegionProfileData(); 567 sim = new RegionProfileData();
568 568
569 sim.UUID = new LLUUID((string)requestData["UUID"]); 569 sim.UUID = new UUID((string)requestData["UUID"]);
570 sim.originUUID = new LLUUID((string)requestData["originUUID"]); 570 sim.originUUID = new UUID((string)requestData["originUUID"]);
571 571
572 sim.regionRecvKey = String.Empty; 572 sim.regionRecvKey = String.Empty;
573 sim.regionSendKey = String.Empty; 573 sim.regionSendKey = String.Empty;
@@ -602,8 +602,8 @@ namespace OpenSim.Grid.GridServer
602 sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); 602 sim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]);
603 sim.regionLocZ = 0; 603 sim.regionLocZ = 0;
604 604
605 LLUUID textureID; 605 UUID textureID;
606 if (LLUUID.TryParse((string)requestData["map-image-id"], out textureID)) 606 if (UUID.TryParse((string)requestData["map-image-id"], out textureID))
607 { 607 {
608 sim.regionMapTextureID = textureID; 608 sim.regionMapTextureID = textureID;
609 } 609 }
@@ -654,11 +654,11 @@ namespace OpenSim.Grid.GridServer
654 654
655 if (requestData.ContainsKey("UUID")) 655 if (requestData.ContainsKey("UUID"))
656 { 656 {
657 //TheSim = GetRegion(new LLUUID((string) requestData["UUID"])); 657 //TheSim = GetRegion(new UUID((string) requestData["UUID"]));
658 uuid = requestData["UUID"].ToString(); 658 uuid = requestData["UUID"].ToString();
659 m_log.InfoFormat("[LOGOUT]: Logging out region: {0}", uuid); 659 m_log.InfoFormat("[LOGOUT]: Logging out region: {0}", uuid);
660 660
661 // logToDB((new LLUUID((string)requestData["UUID"])).ToString(),"XmlRpcDeleteRegionMethod","", 5,"Attempting delete with UUID."); 661 // logToDB((new UUID((string)requestData["UUID"])).ToString(),"XmlRpcDeleteRegionMethod","", 5,"Attempting delete with UUID.");
662 } 662 }
663 else 663 else
664 { 664 {
@@ -716,7 +716,7 @@ namespace OpenSim.Grid.GridServer
716 RegionProfileData simData = null; 716 RegionProfileData simData = null;
717 if (requestData.ContainsKey("region_UUID")) 717 if (requestData.ContainsKey("region_UUID"))
718 { 718 {
719 LLUUID regionID = new LLUUID((string)requestData["region_UUID"]); 719 UUID regionID = new UUID((string)requestData["region_UUID"]);
720 simData = GetRegion(regionID); 720 simData = GetRegion(regionID);
721 if (simData == null) 721 if (simData == null)
722 { 722 {
@@ -764,7 +764,7 @@ namespace OpenSim.Grid.GridServer
764 responseData["remoting_port"] = simData.remotingPort.ToString(); 764 responseData["remoting_port"] = simData.remotingPort.ToString();
765 responseData["region_locx"] = simData.regionLocX.ToString(); 765 responseData["region_locx"] = simData.regionLocX.ToString();
766 responseData["region_locy"] = simData.regionLocY.ToString(); 766 responseData["region_locy"] = simData.regionLocY.ToString();
767 responseData["region_UUID"] = simData.UUID.UUID.ToString(); 767 responseData["region_UUID"] = simData.UUID.Guid.ToString();
768 responseData["region_name"] = simData.regionName; 768 responseData["region_name"] = simData.regionName;
769 responseData["regionHandle"] = simData.regionHandle.ToString(); 769 responseData["regionHandle"] = simData.regionHandle.ToString();
770 } 770 }
@@ -923,8 +923,8 @@ namespace OpenSim.Grid.GridServer
923 923
924 RegionProfileData TheSim; 924 RegionProfileData TheSim;
925 925
926 LLUUID UUID; 926 UUID UUID;
927 if (LLUUID.TryParse(param, out UUID)) 927 if (UUID.TryParse(param, out UUID))
928 { 928 {
929 TheSim = GetRegion(UUID); 929 TheSim = GetRegion(UUID);
930 930
@@ -933,7 +933,7 @@ namespace OpenSim.Grid.GridServer
933 respstring = "<Root>"; 933 respstring = "<Root>";
934 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>"; 934 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
935 respstring += "<sim>"; 935 respstring += "<sim>";
936 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>"; 936 respstring += "<uuid>" + TheSim.ToString() + "</uuid>";
937 respstring += "<regionname>" + TheSim.regionName + "</regionname>"; 937 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
938 respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>"; 938 respstring += "<sim_ip>" + Util.GetHostFromDNS(TheSim.serverIP).ToString() + "</sim_ip>";
939 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>"; 939 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
@@ -969,11 +969,11 @@ namespace OpenSim.Grid.GridServer
969 { 969 {
970 Console.WriteLine("Processing region update via REST method"); 970 Console.WriteLine("Processing region update via REST method");
971 RegionProfileData theSim; 971 RegionProfileData theSim;
972 theSim = GetRegion(new LLUUID(param)); 972 theSim = GetRegion(new UUID(param));
973 if (theSim == null) 973 if (theSim == null)
974 { 974 {
975 theSim = new RegionProfileData(); 975 theSim = new RegionProfileData();
976 LLUUID UUID = new LLUUID(param); 976 UUID UUID = new UUID(param);
977 theSim.UUID = UUID; 977 theSim.UUID = UUID;
978 theSim.regionRecvKey = Config.SimRecvKey; 978 theSim.regionRecvKey = Config.SimRecvKey;
979 } 979 }
@@ -1067,7 +1067,7 @@ namespace OpenSim.Grid.GridServer
1067 { 1067 {
1068 plugin.AddProfile(theSim); 1068 plugin.AddProfile(theSim);
1069 m_log.Info("[grid]: New sim added to grid (" + theSim.regionName + ")"); 1069 m_log.Info("[grid]: New sim added to grid (" + theSim.regionName + ")");
1070 logToDB(theSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5, 1070 logToDB(theSim.ToString(), "RestSetSimMethod", String.Empty, 5,
1071 "Region successfully updated and connected to grid."); 1071 "Region successfully updated and connected to grid.");
1072 } 1072 }
1073 else 1073 else
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
index e4d43d4..4d58775 100644
--- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs
+++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs
@@ -32,7 +32,7 @@ using System.Reflection;
32using System.Threading; 32using System.Threading;
33using System.Net; 33using System.Net;
34 34
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
38 38
@@ -147,7 +147,7 @@ namespace OpenSim.Grid.InventoryServer
147 } 147 }
148 } 148 }
149 149
150 public override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) 150 public override void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback)
151 { 151 {
152 } 152 }
153 153
@@ -158,7 +158,7 @@ namespace OpenSim.Grid.InventoryServer
158 /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns> 158 /// <returns>The user's inventory. If an inventory cannot be found then an empty collection is returned.</returns>
159 public InventoryCollection GetUserInventory(Guid rawUserID) 159 public InventoryCollection GetUserInventory(Guid rawUserID)
160 { 160 {
161 LLUUID userID = new LLUUID(rawUserID); 161 UUID userID = new UUID(rawUserID);
162 162
163 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID); 163 m_log.InfoFormat("[GRID AGENT INVENTORY]: Processing request for inventory of {0}", userID);
164 164
@@ -216,7 +216,7 @@ namespace OpenSim.Grid.InventoryServer
216 /// <returns></returns> 216 /// <returns></returns>
217 public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID) 217 public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID)
218 { 218 {
219 LLUUID userID = new LLUUID(rawUserID); 219 UUID userID = new UUID(rawUserID);
220 return GetInventorySkeleton(userID); 220 return GetInventorySkeleton(userID);
221 } 221 }
222 222
@@ -227,7 +227,7 @@ namespace OpenSim.Grid.InventoryServer
227 /// <returns></returns> 227 /// <returns></returns>
228 public bool CreateUsersInventory(Guid rawUserID) 228 public bool CreateUsersInventory(Guid rawUserID)
229 { 229 {
230 LLUUID userID = new LLUUID(rawUserID); 230 UUID userID = new UUID(rawUserID);
231 231
232 m_log.InfoFormat("[GRID AGENT INVENTORY]: Creating new set of inventory folders for user {0}", userID); 232 m_log.InfoFormat("[GRID AGENT INVENTORY]: Creating new set of inventory folders for user {0}", userID);
233 233
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index a77c570..9f40d16 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.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 log4net.Config; 34using log4net.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -142,7 +142,7 @@ namespace OpenSim.Grid.InventoryServer
142 switch (cmd) 142 switch (cmd)
143 { 143 {
144 case "add-user": 144 case "add-user":
145 m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); 145 m_inventoryService.CreateUsersInventory(UUID.Random().Guid);
146 break; 146 break;
147 } 147 }
148 } 148 }
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index c80d48c..f9be780 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using log4net.Config; 33using log4net.Config;
34 34
@@ -48,7 +48,7 @@ namespace OpenSim.Grid.MessagingServer
48 private MessageServerConfig Cfg; 48 private MessageServerConfig Cfg;
49 private MessageService msgsvc; 49 private MessageService msgsvc;
50 50
51 // private LLUUID m_lastCreatedUser = LLUUID.Random(); 51 // private UUID m_lastCreatedUser = UUID.Random();
52 52
53 public static void Main(string[] args) 53 public static void Main(string[] args)
54 { 54 {
@@ -84,7 +84,7 @@ namespace OpenSim.Grid.MessagingServer
84 { 84 {
85 base.Startup(); 85 base.Startup();
86 86
87 Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml"))); 87 Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.Xml")));
88 88
89 m_log.Info("[REGION]: Starting HTTP process"); 89 m_log.Info("[REGION]: Starting HTTP process");
90 m_httpServer = new BaseHttpServer(Cfg.HttpPort); 90 m_httpServer = new BaseHttpServer(Cfg.HttpPort);
@@ -133,7 +133,7 @@ namespace OpenSim.Grid.MessagingServer
133 try 133 try
134 { 134 {
135 //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", 135 //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/",
136 //userID.UUID); 136 //userID.Guid);
137 } 137 }
138 catch (Exception ex) 138 catch (Exception ex)
139 { 139 {
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs
index dd6e445..1c5d334 100644
--- a/OpenSim/Grid/MessagingServer/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer/MessageService.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 Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenSim.Data; 37using OpenSim.Data;
@@ -206,11 +206,11 @@ namespace OpenSim.Grid.MessagingServer
206 /// </summary> 206 /// </summary>
207 /// <param name="agentID"></param> 207 /// <param name="agentID"></param>
208 /// <param name="friendID"></param> 208 /// <param name="friendID"></param>
209 public void addBackReference(LLUUID agentID, LLUUID friendID) 209 public void addBackReference(UUID agentID, UUID friendID)
210 { 210 {
211 if (m_presence_BackReferences.Contains(friendID)) 211 if (m_presence_BackReferences.Contains(friendID))
212 { 212 {
213 List<LLUUID> presenseBackReferences = (List<LLUUID>)m_presence_BackReferences[friendID]; 213 List<UUID> presenseBackReferences = (List<UUID>)m_presence_BackReferences[friendID];
214 if (!presenseBackReferences.Contains(agentID)) 214 if (!presenseBackReferences.Contains(agentID))
215 { 215 {
216 presenseBackReferences.Add(agentID); 216 presenseBackReferences.Add(agentID);
@@ -219,7 +219,7 @@ namespace OpenSim.Grid.MessagingServer
219 } 219 }
220 else 220 else
221 { 221 {
222 List<LLUUID> presenceBackReferences = new List<LLUUID>(); 222 List<UUID> presenceBackReferences = new List<UUID>();
223 presenceBackReferences.Add(agentID); 223 presenceBackReferences.Add(agentID);
224 m_presence_BackReferences[friendID] = presenceBackReferences; 224 m_presence_BackReferences[friendID] = presenceBackReferences;
225 } 225 }
@@ -230,11 +230,11 @@ namespace OpenSim.Grid.MessagingServer
230 /// </summary> 230 /// </summary>
231 /// <param name="agentID"></param> 231 /// <param name="agentID"></param>
232 /// <param name="friendID"></param> 232 /// <param name="friendID"></param>
233 public void removeBackReference(LLUUID agentID, LLUUID friendID) 233 public void removeBackReference(UUID agentID, UUID friendID)
234 { 234 {
235 if (m_presence_BackReferences.Contains(friendID)) 235 if (m_presence_BackReferences.Contains(friendID))
236 { 236 {
237 List<LLUUID> presenseBackReferences = (List<LLUUID>)m_presence_BackReferences[friendID]; 237 List<UUID> presenseBackReferences = (List<UUID>)m_presence_BackReferences[friendID];
238 if (presenseBackReferences.Contains(agentID)) 238 if (presenseBackReferences.Contains(agentID))
239 { 239 {
240 presenseBackReferences.Remove(agentID); 240 presenseBackReferences.Remove(agentID);
@@ -253,11 +253,11 @@ namespace OpenSim.Grid.MessagingServer
253 /// Logoff Processor. Call this to clean up agent presence data and send logoff presence notifications 253 /// Logoff Processor. Call this to clean up agent presence data and send logoff presence notifications
254 /// </summary> 254 /// </summary>
255 /// <param name="AgentID"></param> 255 /// <param name="AgentID"></param>
256 private void ProcessLogOff(LLUUID AgentID) 256 private void ProcessLogOff(UUID AgentID)
257 { 257 {
258 m_log.Info("[LOGOFF]: Processing Logoff"); 258 m_log.Info("[LOGOFF]: Processing Logoff");
259 UserPresenceData AgentData = null; 259 UserPresenceData AgentData = null;
260 List<LLUUID> AgentsNeedingNotification = new List<LLUUID>(); 260 List<UUID> AgentsNeedingNotification = new List<UUID>();
261 UserPresenceData friendd = null; 261 UserPresenceData friendd = null;
262 lock (m_presences) 262 lock (m_presences)
263 { 263 {
@@ -275,7 +275,7 @@ namespace OpenSim.Grid.MessagingServer
275 //{ 275 //{
276 //if (m_presence_BackReferences.Contains(AgentID)) 276 //if (m_presence_BackReferences.Contains(AgentID))
277 //{ 277 //{
278 //AgentsNeedingNotification = (List<LLUUID>)m_presence_BackReferences[AgentID]; 278 //AgentsNeedingNotification = (List<UUID>)m_presence_BackReferences[AgentID];
279 //} 279 //}
280 //} 280 //}
281 281
@@ -356,17 +356,17 @@ namespace OpenSim.Grid.MessagingServer
356 #region UserServer Comms 356 #region UserServer Comms
357 357
358 /// <summary> 358 /// <summary>
359 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 359 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
360 /// </summary> 360 /// </summary>
361 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 361 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
362 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 362 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
363 { 363 {
364 List<FriendListItem> buddylist = new List<FriendListItem>(); 364 List<FriendListItem> buddylist = new List<FriendListItem>();
365 365
366 try 366 try
367 { 367 {
368 Hashtable param = new Hashtable(); 368 Hashtable param = new Hashtable();
369 param["ownerID"] = friendlistowner.UUID.ToString(); 369 param["ownerID"] = friendlistowner.ToString();
370 370
371 IList parameters = new ArrayList(); 371 IList parameters = new ArrayList();
372 parameters.Add(param); 372 parameters.Add(param);
@@ -403,8 +403,8 @@ namespace OpenSim.Grid.MessagingServer
403 { 403 {
404 FriendListItem buddylistitem = new FriendListItem(); 404 FriendListItem buddylistitem = new FriendListItem();
405 405
406 buddylistitem.FriendListOwner = new LLUUID((string)data["ownerID" + i.ToString()]); 406 buddylistitem.FriendListOwner = new UUID((string)data["ownerID" + i.ToString()]);
407 buddylistitem.Friend = new LLUUID((string)data["friendID" + i.ToString()]); 407 buddylistitem.Friend = new UUID((string)data["friendID" + i.ToString()]);
408 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]); 408 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]);
409 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]); 409 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]);
410 410
@@ -438,11 +438,11 @@ namespace OpenSim.Grid.MessagingServer
438 //requestData["lastname"] = lastname; 438 //requestData["lastname"] = lastname;
439 439
440 AgentCircuitData agentData = new AgentCircuitData(); 440 AgentCircuitData agentData = new AgentCircuitData();
441 agentData.SessionID = new LLUUID((string)requestData["sessionid"]); 441 agentData.SessionID = new UUID((string)requestData["sessionid"]);
442 agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); 442 agentData.SecureSessionID = new UUID((string)requestData["secure_session_id"]);
443 agentData.firstname = (string)requestData["firstname"]; 443 agentData.firstname = (string)requestData["firstname"];
444 agentData.lastname = (string)requestData["lastname"]; 444 agentData.lastname = (string)requestData["lastname"];
445 agentData.AgentID = new LLUUID((string)requestData["agentid"]); 445 agentData.AgentID = new UUID((string)requestData["agentid"]);
446 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); 446 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
447 agentData.CapsPath = (string)requestData["caps_path"]; 447 agentData.CapsPath = (string)requestData["caps_path"];
448 448
@@ -453,7 +453,7 @@ namespace OpenSim.Grid.MessagingServer
453 else 453 else
454 { 454 {
455 agentData.startpos = 455 agentData.startpos =
456 new LLVector3(Convert.ToUInt32(requestData["positionx"]), 456 new Vector3(Convert.ToUInt32(requestData["positionx"]),
457 Convert.ToUInt32(requestData["positiony"]), 457 Convert.ToUInt32(requestData["positiony"]),
458 Convert.ToUInt32(requestData["positionz"])); 458 Convert.ToUInt32(requestData["positionz"]));
459 agentData.child = false; 459 agentData.child = false;
@@ -485,7 +485,7 @@ namespace OpenSim.Grid.MessagingServer
485 m_log.Info("[USERLOGOFF]: User logged off called"); 485 m_log.Info("[USERLOGOFF]: User logged off called");
486 Hashtable requestData = (Hashtable)request.Params[0]; 486 Hashtable requestData = (Hashtable)request.Params[0];
487 487
488 LLUUID AgentID = new LLUUID((string)requestData["agentid"]); 488 UUID AgentID = new UUID((string)requestData["agentid"]);
489 489
490 ProcessLogOff(AgentID); 490 ProcessLogOff(AgentID);
491 491
@@ -598,7 +598,7 @@ namespace OpenSim.Grid.MessagingServer
598 regionProfile.regionLocY = regY; 598 regionProfile.regionLocY = regY;
599 599
600 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 600 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
601 regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); 601 regionProfile.UUID = new UUID((string)responseData["region_UUID"]);
602 regionProfile.regionName = (string)responseData["region_name"]; 602 regionProfile.regionName = (string)responseData["region_name"];
603 lock (m_regionInfoCache) 603 lock (m_regionInfoCache)
604 { 604 {
diff --git a/OpenSim/Grid/MessagingServer/PresenceBackreferenceEntry.cs b/OpenSim/Grid/MessagingServer/PresenceBackreferenceEntry.cs
index 281beb9..4d6f3de 100644
--- a/OpenSim/Grid/MessagingServer/PresenceBackreferenceEntry.cs
+++ b/OpenSim/Grid/MessagingServer/PresenceBackreferenceEntry.cs
@@ -28,21 +28,21 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Grid.MessagingServer 33namespace OpenSim.Grid.MessagingServer
34{ 34{
35 // This is a wrapper for a List<LLUUID> so it can be happily stored in a hashtable. 35 // This is a wrapper for a List<UUID> so it can be happily stored in a hashtable.
36 public class PresenceBackreferenceEntry 36 public class PresenceBackreferenceEntry
37 { 37 {
38 List<LLUUID> AgentList = new List<LLUUID>(); 38 List<UUID> AgentList = new List<UUID>();
39 39
40 public PresenceBackreferenceEntry() 40 public PresenceBackreferenceEntry()
41 { 41 {
42 42
43 } 43 }
44 44
45 public void Add(LLUUID item) 45 public void Add(UUID item)
46 { 46 {
47 lock (AgentList) 47 lock (AgentList)
48 { 48 {
@@ -50,9 +50,9 @@ namespace OpenSim.Grid.MessagingServer
50 } 50 }
51 } 51 }
52 52
53 public LLUUID getitem(int index) 53 public UUID getitem(int index)
54 { 54 {
55 LLUUID result = null; 55 UUID result = null;
56 lock (AgentList) 56 lock (AgentList)
57 { 57 {
58 if (index > 0 && index < AgentList.Count) 58 if (index > 0 && index < AgentList.Count)
@@ -76,7 +76,7 @@ namespace OpenSim.Grid.MessagingServer
76 } 76 }
77 } 77 }
78 78
79 public void Remove(LLUUID item) 79 public void Remove(UUID item)
80 { 80 {
81 lock (AgentList) 81 lock (AgentList)
82 { 82 {
@@ -85,7 +85,7 @@ namespace OpenSim.Grid.MessagingServer
85 } 85 }
86 } 86 }
87 87
88 public bool contains(LLUUID item) 88 public bool contains(UUID item)
89 { 89 {
90 bool result = false; 90 bool result = false;
91 lock (AgentList) 91 lock (AgentList)
diff --git a/OpenSim/Grid/MessagingServer/UserManager.cs b/OpenSim/Grid/MessagingServer/UserManager.cs
index de41756..6fa5113 100644
--- a/OpenSim/Grid/MessagingServer/UserManager.cs
+++ b/OpenSim/Grid/MessagingServer/UserManager.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 Nwc.XmlRpc; 35using Nwc.XmlRpc;
36using OpenSim.Framework; 36using OpenSim.Framework;
@@ -41,7 +41,7 @@ namespace OpenSim.Grid.MessagingServer
41{ 41{
42 class UserManager : UserManagerBase 42 class UserManager : UserManagerBase
43 { 43 {
44 public UserAgentData GetUserAgentData(LLUUID AgentID) 44 public UserAgentData GetUserAgentData(UUID AgentID)
45 { 45 {
46 UserProfileData userProfile = GetUserProfile(AgentID); 46 UserProfileData userProfile = GetUserProfile(AgentID);
47 47
@@ -67,7 +67,7 @@ namespace OpenSim.Grid.MessagingServer
67 return null; 67 return null;
68 } 68 }
69 69
70 public override UserProfileData SetupMasterUser(LLUUID uuid) 70 public override UserProfileData SetupMasterUser(UUID uuid)
71 { 71 {
72 //throw new Exception("The method or operation is not implemented."); 72 //throw new Exception("The method or operation is not implemented.");
73 return null; 73 return null;
diff --git a/OpenSim/Grid/MessagingServer/UserPresenceData.cs b/OpenSim/Grid/MessagingServer/UserPresenceData.cs
index 3c5002c..2119c13 100644
--- a/OpenSim/Grid/MessagingServer/UserPresenceData.cs
+++ b/OpenSim/Grid/MessagingServer/UserPresenceData.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.Data; 31using OpenSim.Data;
32using OpenSim.Framework; 32using OpenSim.Framework;
33 33
@@ -39,7 +39,7 @@ namespace OpenSim.Grid.MessagingServer
39 public RegionProfileData regionData = new RegionProfileData(); 39 public RegionProfileData regionData = new RegionProfileData();
40 public string httpURI = String.Empty; 40 public string httpURI = String.Empty;
41 public List<FriendListItem> friendData = new List<FriendListItem> (); 41 public List<FriendListItem> friendData = new List<FriendListItem> ();
42 public List<LLUUID> subscriptionData = new List<LLUUID>(); 42 public List<UUID> subscriptionData = new List<UUID>();
43 public bool OnlineYN = true; 43 public bool OnlineYN = true;
44 public bool lookupUserRegionYN = true; 44 public bool lookupUserRegionYN = true;
45 45
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
index 13bf290..3b433ba 100644
--- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
+++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
@@ -29,7 +29,7 @@ using System;
29using System.IO; 29using System.IO;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
35 35
@@ -63,9 +63,9 @@ namespace OpenSim.Grid.MessagingServer
63 63
64 if (p.Length > 0) 64 if (p.Length > 0)
65 { 65 {
66 LLUUID assetID = null; 66 UUID assetID = null;
67 67
68 if (!LLUUID.TryParse(p[0], out assetID)) 68 if (!UUID.TryParse(p[0], out assetID))
69 { 69 {
70 m_log.InfoFormat( 70 m_log.InfoFormat(
71 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]); 71 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]);
@@ -91,9 +91,9 @@ namespace OpenSim.Grid.MessagingServer
91 { 91 {
92 string param = GetParam(path); 92 string param = GetParam(path);
93 93
94 LLUUID assetId; 94 UUID assetId;
95 if (param.Length > 0) 95 if (param.Length > 0)
96 LLUUID.TryParse(param, out assetId); 96 UUID.TryParse(param, out assetId);
97 // byte[] txBuffer = new byte[4096]; 97 // byte[] txBuffer = new byte[4096];
98 98
99 // TODO: Read POST serialize XMPP stanzas 99 // TODO: Read POST serialize XMPP stanzas
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 63bdea8..4b226ae 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.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.Console; 32using OpenSim.Framework.Console;
33using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
@@ -92,7 +92,7 @@ namespace OpenSim.Grid.ScriptServer
92 92
93 if (Command == "OnRezScript") 93 if (Command == "OnRezScript")
94 { 94 {
95 Engine.EventManager().OnRezScript((uint)p[0], new LLUUID((string)p[1]), (string)p[2], 0, false); 95 Engine.EventManager().OnRezScript((uint)p[0], new UUID((string)p[1]), (string)p[2], 0, false);
96 } 96 }
97 } 97 }
98 98
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index e487648..6441b7a 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using log4net.Config; 35using log4net.Config;
36using OpenSim.Framework; 36using OpenSim.Framework;
@@ -58,7 +58,7 @@ namespace OpenSim.Grid.UserServer
58 public MessageServersConnector m_messagesService; 58 public MessageServersConnector m_messagesService;
59 protected IInterServiceInventoryServices m_interServiceInventoryService; 59 protected IInterServiceInventoryServices m_interServiceInventoryService;
60 60
61 private LLUUID m_lastCreatedUser = LLUUID.Random(); 61 private UUID m_lastCreatedUser = UUID.Random();
62 62
63 public static void Main(string[] args) 63 public static void Main(string[] args)
64 { 64 {
@@ -92,7 +92,7 @@ namespace OpenSim.Grid.UserServer
92 { 92 {
93 base.Startup(); 93 base.Startup();
94 94
95 Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml"))); 95 Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.Xml")));
96 96
97 m_stats = StatsManager.StartCollectingUserStats(); 97 m_stats = StatsManager.StartCollectingUserStats();
98 98
@@ -183,7 +183,7 @@ namespace OpenSim.Grid.UserServer
183 183
184 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); 184 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
185 185
186 LLUUID userID = new LLUUID(); 186 UUID userID = new UUID();
187 187
188 try 188 try
189 { 189 {
@@ -209,7 +209,7 @@ namespace OpenSim.Grid.UserServer
209 { 209 {
210 m_log.ErrorFormat( 210 m_log.ErrorFormat(
211 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", 211 "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}",
212 Cfg.InventoryUrl + "CreateInventory/", userID.UUID); 212 Cfg.InventoryUrl + "CreateInventory/", userID);
213 } 213 }
214 catch (Exception e) 214 catch (Exception e)
215 { 215 {
@@ -240,8 +240,8 @@ namespace OpenSim.Grid.UserServer
240 case "test-inventory": 240 case "test-inventory":
241 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); 241 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
242 // requester.ReturnResponseVal = TestResponse; 242 // requester.ReturnResponseVal = TestResponse;
243 // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); 243 // requester.BeginPostObject<UUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
244 SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>( 244 SynchronousRestObjectPoster.BeginPostObject<UUID, List<InventoryFolderBase>>(
245 "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser); 245 "POST", Cfg.InventoryUrl + "RootFolders/", m_lastCreatedUser);
246 break; 246 break;
247 247
@@ -322,12 +322,12 @@ namespace OpenSim.Grid.UserServer
322 m_console.Notice("response got"); 322 m_console.Notice("response got");
323 } 323 }
324 324
325 public void NotifyMessageServersUserLoggOff(LLUUID agentID) 325 public void NotifyMessageServersUserLoggOff(UUID agentID)
326 { 326 {
327 m_messagesService.TellMessageServersAboutUserLogoff(agentID); 327 m_messagesService.TellMessageServersAboutUserLogoff(agentID);
328 } 328 }
329 329
330 public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 330 public void NotifyMessageServersUserLoggedInToLocation(UUID agentID, UUID sessionID, UUID RegionID,
331 ulong regionhandle, float positionX, float positionY, 331 ulong regionhandle, float positionX, float positionY,
332 float positionZ, string firstname, string lastname) 332 float positionZ, string firstname, string lastname)
333 { 333 {
@@ -335,4 +335,4 @@ namespace OpenSim.Grid.UserServer
335 positionY, positionZ, firstname, lastname); 335 positionY, positionZ, firstname, lastname);
336 } 336 }
337 } 337 }
338} \ No newline at end of file 338}
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs
index b3f8b19..8fecd5b 100644
--- a/OpenSim/Grid/UserServer/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs
@@ -29,7 +29,7 @@ using System.Collections;
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 Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
@@ -146,7 +146,7 @@ namespace OpenSim.Grid.UserServer
146 // string scurrentRegionID = (string)requestData["regionid"]; 146 // string scurrentRegionID = (string)requestData["regionid"];
147 // string sregionhandle = (string)requestData["regionhandle"]; 147 // string sregionhandle = (string)requestData["regionhandle"];
148 // string scurrentpos = (string)requestData["currentpos"]; 148 // string scurrentpos = (string)requestData["currentpos"];
149 //LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); 149 //Vector3.TryParse((string)reader["currentPos"], out retval.currentPos);
150 // TODO: Okay now raise event so the user server can pass this data to the Usermanager 150 // TODO: Okay now raise event so the user server can pass this data to the Usermanager
151 151
152 responseData["responsestring"] = "TRUE"; 152 responseData["responsestring"] = "TRUE";
@@ -155,7 +155,7 @@ namespace OpenSim.Grid.UserServer
155 return response; 155 return response;
156 } 156 }
157 157
158 public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 158 public void TellMessageServersAboutUser(UUID agentID, UUID sessionID, UUID RegionID,
159 ulong regionhandle, float positionX, float positionY, 159 ulong regionhandle, float positionX, float positionY,
160 float positionZ, string firstname, string lastname) 160 float positionZ, string firstname, string lastname)
161 { 161 {
@@ -179,7 +179,7 @@ namespace OpenSim.Grid.UserServer
179 } 179 }
180 } 180 }
181 181
182 public void TellMessageServersAboutUserLogoff(LLUUID agentID) 182 public void TellMessageServersAboutUserLogoff(UUID agentID)
183 { 183 {
184 lock (MessageServers) 184 lock (MessageServers)
185 { 185 {
@@ -198,7 +198,7 @@ namespace OpenSim.Grid.UserServer
198 } 198 }
199 } 199 }
200 200
201 private void NotifyMessageServerAboutUserLogoff(MessageServerInfo serv, LLUUID agentID) 201 private void NotifyMessageServerAboutUserLogoff(MessageServerInfo serv, UUID agentID)
202 { 202 {
203 Hashtable reqparams = new Hashtable(); 203 Hashtable reqparams = new Hashtable();
204 reqparams["sendkey"] = serv.sendkey; 204 reqparams["sendkey"] = serv.sendkey;
@@ -219,7 +219,7 @@ namespace OpenSim.Grid.UserServer
219 } 219 }
220 220
221 private void NotifyMessageServerAboutUser(MessageServerInfo serv, 221 private void NotifyMessageServerAboutUser(MessageServerInfo serv,
222 LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 222 UUID agentID, UUID sessionID, UUID RegionID,
223 ulong regionhandle, float positionX, float positionY, float positionZ, 223 ulong regionhandle, float positionX, float positionY, float positionZ,
224 string firstname, string lastname) 224 string firstname, string lastname)
225 { 225 {
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 1f84346..10490a6 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.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 Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Data; 35using OpenSim.Data;
@@ -39,7 +39,7 @@ using OpenSim.Framework.Communications.Cache;
39 39
40namespace OpenSim.Grid.UserServer 40namespace OpenSim.Grid.UserServer
41{ 41{
42 public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 42 public delegate void UserLoggedInAtLocation(UUID agentID, UUID sessionID, UUID RegionID,
43 ulong regionhandle, float positionX, float positionY, float positionZ, 43 ulong regionhandle, float positionX, float positionY, float positionZ,
44 string firstname, string lastname); 44 string firstname, string lastname);
45 45
@@ -151,7 +151,7 @@ namespace OpenSim.Grid.UserServer
151 int start_z = -1; 151 int start_z = -1;
152 152
153 // use the homeRegionID if it is stored already. If not, use the regionHandle as before 153 // use the homeRegionID if it is stored already. If not, use the regionHandle as before
154 if (theUser.HomeRegionID != LLUUID.Zero) 154 if (theUser.HomeRegionID != UUID.Zero)
155 { 155 {
156 HomeInfo = 156 HomeInfo =
157 RegionProfileData.RequestSimProfileData( 157 RegionProfileData.RequestSimProfileData(
@@ -271,7 +271,7 @@ namespace OpenSim.Grid.UserServer
271 theUser.CurrentAgent.Handle = SimInfo.regionHandle; 271 theUser.CurrentAgent.Handle = SimInfo.regionHandle;
272 if (start_x >= 0 && start_y >= 0 && start_z >= 0) 272 if (start_x >= 0 && start_y >= 0 && start_z >= 0)
273 { 273 {
274 LLVector3 tmp_v = new LLVector3(start_x, start_y, start_z); 274 Vector3 tmp_v = new Vector3(start_x, start_y, start_z);
275 theUser.CurrentAgent.Position = tmp_v; 275 theUser.CurrentAgent.Position = tmp_v;
276 } 276 }
277 // Prepare notification 277 // Prepare notification
@@ -466,7 +466,7 @@ namespace OpenSim.Grid.UserServer
466 } 466 }
467 467
468 // See LoginService 468 // See LoginService
469 protected override InventoryData GetInventorySkeleton(LLUUID userID) 469 protected override InventoryData GetInventorySkeleton(UUID userID)
470 { 470 {
471 m_log.DebugFormat( 471 m_log.DebugFormat(
472 "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", 472 "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}",
@@ -498,7 +498,7 @@ namespace OpenSim.Grid.UserServer
498 498
499 if (folders != null && folders.Count > 0) 499 if (folders != null && folders.Count > 0)
500 { 500 {
501 LLUUID rootID = LLUUID.Zero; 501 UUID rootID = UUID.Zero;
502 ArrayList AgentInventoryArray = new ArrayList(); 502 ArrayList AgentInventoryArray = new ArrayList();
503 Hashtable TempHash; 503 Hashtable TempHash;
504 504
@@ -506,7 +506,7 @@ namespace OpenSim.Grid.UserServer
506 { 506 {
507// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); 507// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name);
508 508
509 if (InvFolder.ParentID == LLUUID.Zero) 509 if (InvFolder.ParentID == UUID.Zero)
510 { 510 {
511 rootID = InvFolder.ID; 511 rootID = InvFolder.ID;
512 } 512 }
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 69c550a..4b5f5a0 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.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 Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -38,7 +38,7 @@ using OpenSim.Framework.Servers;
38 38
39namespace OpenSim.Grid.UserServer 39namespace OpenSim.Grid.UserServer
40{ 40{
41 public delegate void logOffUser(LLUUID AgentID); 41 public delegate void logOffUser(UUID AgentID);
42 42
43 public class UserManager : UserManagerBase 43 public class UserManager : UserManagerBase
44 { 44 {
@@ -79,7 +79,7 @@ namespace OpenSim.Grid.UserServer
79 return response; 79 return response;
80 } 80 }
81 81
82 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(LLUUID queryID, List<AvatarPickerAvatar> returnUsers) 82 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(UUID queryID, List<AvatarPickerAvatar> returnUsers)
83 { 83 {
84 XmlRpcResponse response = new XmlRpcResponse(); 84 XmlRpcResponse response = new XmlRpcResponse();
85 Hashtable responseData = new Hashtable(); 85 Hashtable responseData = new Hashtable();
@@ -108,8 +108,8 @@ namespace OpenSim.Grid.UserServer
108 108
109 for (int i = 0; i < returnUsers.Count; i++) 109 for (int i = 0; i < returnUsers.Count; i++)
110 { 110 {
111 responseData["ownerID" + i] = returnUsers[i].FriendListOwner.UUID.ToString(); 111 responseData["ownerID" + i] = returnUsers[i].FriendListOwner.ToString();
112 responseData["friendID" + i] = returnUsers[i].Friend.UUID.ToString(); 112 responseData["friendID" + i] = returnUsers[i].Friend.ToString();
113 responseData["ownerPerms" + i] = returnUsers[i].FriendListOwnerPerms.ToString(); 113 responseData["ownerPerms" + i] = returnUsers[i].FriendListOwnerPerms.ToString();
114 responseData["friendPerms" + i] = returnUsers[i].FriendPerms.ToString(); 114 responseData["friendPerms" + i] = returnUsers[i].FriendPerms.ToString();
115 } 115 }
@@ -172,11 +172,11 @@ namespace OpenSim.Grid.UserServer
172 // XmlRpcResponse response = new XmlRpcResponse(); 172 // XmlRpcResponse response = new XmlRpcResponse();
173 Hashtable requestData = (Hashtable) request.Params[0]; 173 Hashtable requestData = (Hashtable) request.Params[0];
174 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); 174 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
175 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); 175 UUID queryID = new UUID(UUID.Zero.ToString());
176 176
177 if (requestData.Contains("avquery") && requestData.Contains("queryid")) 177 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
178 { 178 {
179 queryID = new LLUUID((string) requestData["queryid"]); 179 queryID = new UUID((string) requestData["queryid"]);
180 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]); 180 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]);
181 } 181 }
182 182
@@ -195,13 +195,13 @@ namespace OpenSim.Grid.UserServer
195 requestData.Contains("region_uuid")) 195 requestData.Contains("region_uuid"))
196 { 196 {
197 // ulong cregionhandle = 0; 197 // ulong cregionhandle = 0;
198 LLUUID regionUUID; 198 UUID regionUUID;
199 LLUUID avatarUUID; 199 UUID avatarUUID;
200 200
201 Helpers.TryParse((string) requestData["avatar_id"], out avatarUUID); 201 UUID.TryParse((string) requestData["avatar_id"], out avatarUUID);
202 Helpers.TryParse((string) requestData["region_uuid"], out regionUUID); 202 UUID.TryParse((string) requestData["region_uuid"], out regionUUID);
203 203
204 if (avatarUUID != LLUUID.Zero) 204 if (avatarUUID != UUID.Zero)
205 { 205 {
206 UserProfileData userProfile = GetUserProfile(avatarUUID); 206 UserProfileData userProfile = GetUserProfile(avatarUUID);
207 userProfile.CurrentAgent.Region = regionUUID; 207 userProfile.CurrentAgent.Region = regionUUID;
@@ -231,8 +231,8 @@ namespace OpenSim.Grid.UserServer
231 requestData.Contains("friendPerms")) 231 requestData.Contains("friendPerms"))
232 { 232 {
233 // UserManagerBase.AddNewuserFriend 233 // UserManagerBase.AddNewuserFriend
234 AddNewUserFriend(new LLUUID((string) requestData["ownerID"]), 234 AddNewUserFriend(new UUID((string) requestData["ownerID"]),
235 new LLUUID((string) requestData["friendID"]), 235 new UUID((string) requestData["friendID"]),
236 (uint) Convert.ToInt32((string) requestData["friendPerms"])); 236 (uint) Convert.ToInt32((string) requestData["friendPerms"]));
237 returnString = "TRUE"; 237 returnString = "TRUE";
238 } 238 }
@@ -252,8 +252,8 @@ namespace OpenSim.Grid.UserServer
252 if (requestData.Contains("ownerID") && requestData.Contains("friendID")) 252 if (requestData.Contains("ownerID") && requestData.Contains("friendID"))
253 { 253 {
254 // UserManagerBase.AddNewuserFriend 254 // UserManagerBase.AddNewuserFriend
255 RemoveUserFriend(new LLUUID((string) requestData["ownerID"]), 255 RemoveUserFriend(new UUID((string) requestData["ownerID"]),
256 new LLUUID((string) requestData["friendID"])); 256 new UUID((string) requestData["friendID"]));
257 returnString = "TRUE"; 257 returnString = "TRUE";
258 } 258 }
259 responseData["returnString"] = returnString; 259 responseData["returnString"] = returnString;
@@ -271,8 +271,8 @@ namespace OpenSim.Grid.UserServer
271 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && 271 if (requestData.Contains("ownerID") && requestData.Contains("friendID") &&
272 requestData.Contains("friendPerms")) 272 requestData.Contains("friendPerms"))
273 { 273 {
274 UpdateUserFriendPerms(new LLUUID((string) requestData["ownerID"]), 274 UpdateUserFriendPerms(new UUID((string) requestData["ownerID"]),
275 new LLUUID((string) requestData["friendID"]), 275 new UUID((string) requestData["friendID"]),
276 (uint) Convert.ToInt32((string) requestData["friendPerms"])); 276 (uint) Convert.ToInt32((string) requestData["friendPerms"]));
277 // UserManagerBase. 277 // UserManagerBase.
278 returnString = "TRUE"; 278 returnString = "TRUE";
@@ -292,7 +292,7 @@ namespace OpenSim.Grid.UserServer
292 292
293 if (requestData.Contains("ownerID")) 293 if (requestData.Contains("ownerID"))
294 { 294 {
295 returndata = GetUserFriendList(new LLUUID((string) requestData["ownerID"])); 295 returndata = GetUserFriendList(new UUID((string) requestData["ownerID"]));
296 } 296 }
297 297
298 return FriendListItemListtoXmlRPCResponse(returndata); 298 return FriendListItemListtoXmlRPCResponse(returndata);
@@ -306,7 +306,7 @@ namespace OpenSim.Grid.UserServer
306 Hashtable responseData; 306 Hashtable responseData;
307 if (requestData.Contains("owner")) 307 if (requestData.Contains("owner"))
308 { 308 {
309 appearance = GetUserAppearance(new LLUUID((string) requestData["owner"])); 309 appearance = GetUserAppearance(new UUID((string) requestData["owner"]));
310 if (appearance == null) 310 if (appearance == null)
311 { 311 {
312 responseData = new Hashtable(); 312 responseData = new Hashtable();
@@ -337,7 +337,7 @@ namespace OpenSim.Grid.UserServer
337 if (requestData.Contains("owner")) 337 if (requestData.Contains("owner"))
338 { 338 {
339 AvatarAppearance appearance = new AvatarAppearance(requestData); 339 AvatarAppearance appearance = new AvatarAppearance(requestData);
340 UpdateUserAppearance(new LLUUID((string) requestData["owner"]), appearance); 340 UpdateUserAppearance(new UUID((string) requestData["owner"]), appearance);
341 responseData = new Hashtable(); 341 responseData = new Hashtable();
342 responseData["returnString"] = "TRUE"; 342 responseData["returnString"] = "TRUE";
343 } 343 }
@@ -396,7 +396,7 @@ namespace OpenSim.Grid.UserServer
396 { 396 {
397 try 397 try
398 { 398 {
399 LLUUID guess = new LLUUID((string) requestData["avatar_uuid"]); 399 UUID guess = new UUID((string) requestData["avatar_uuid"]);
400 400
401 userProfile = GetUserProfile(guess); 401 userProfile = GetUserProfile(guess);
402 } 402 }
@@ -427,11 +427,11 @@ namespace OpenSim.Grid.UserServer
427 //CFK: Console.WriteLine("METHOD BY UUID CALLED"); 427 //CFK: Console.WriteLine("METHOD BY UUID CALLED");
428 if (requestData.Contains("avatar_uuid")) 428 if (requestData.Contains("avatar_uuid"))
429 { 429 {
430 LLUUID guess; 430 UUID guess;
431 431
432 Helpers.TryParse((string) requestData["avatar_uuid"], out guess); 432 UUID.TryParse((string) requestData["avatar_uuid"], out guess);
433 433
434 if (guess == LLUUID.Zero) 434 if (guess == UUID.Zero)
435 { 435 {
436 return CreateUnknownUserErrorResponse(); 436 return CreateUnknownUserErrorResponse();
437 } 437 }
@@ -476,16 +476,16 @@ namespace OpenSim.Grid.UserServer
476 string authed = "FALSE"; 476 string authed = "FALSE";
477 if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id")) 477 if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id"))
478 { 478 {
479 LLUUID guess_aid; 479 UUID guess_aid;
480 LLUUID guess_sid; 480 UUID guess_sid;
481 481
482 Helpers.TryParse((string) requestData["avatar_uuid"], out guess_aid); 482 UUID.TryParse((string) requestData["avatar_uuid"], out guess_aid);
483 if (guess_aid == LLUUID.Zero) 483 if (guess_aid == UUID.Zero)
484 { 484 {
485 return CreateUnknownUserErrorResponse(); 485 return CreateUnknownUserErrorResponse();
486 } 486 }
487 Helpers.TryParse((string) requestData["session_id"], out guess_sid); 487 UUID.TryParse((string) requestData["session_id"], out guess_sid);
488 if (guess_sid == LLUUID.Zero) 488 if (guess_sid == UUID.Zero)
489 { 489 {
490 return CreateUnknownUserErrorResponse(); 490 return CreateUnknownUserErrorResponse();
491 } 491 }
@@ -520,7 +520,7 @@ namespace OpenSim.Grid.UserServer
520 return CreateUnknownUserErrorResponse(); 520 return CreateUnknownUserErrorResponse();
521 } 521 }
522 522
523 LLUUID UserUUID = new LLUUID((string) requestData["avatar_uuid"]); 523 UUID UserUUID = new UUID((string) requestData["avatar_uuid"]);
524 UserProfileData userProfile = GetUserProfile(UserUUID); 524 UserProfileData userProfile = GetUserProfile(UserUUID);
525 if (null == userProfile) 525 if (null == userProfile)
526 { 526 {
@@ -532,11 +532,11 @@ namespace OpenSim.Grid.UserServer
532 } 532 }
533 if (requestData.Contains("FLImageID")) 533 if (requestData.Contains("FLImageID"))
534 { 534 {
535 userProfile.FirstLifeImage = new LLUUID((string) requestData["FLImageID"]); 535 userProfile.FirstLifeImage = new UUID((string) requestData["FLImageID"]);
536 } 536 }
537 if (requestData.Contains("ImageID")) 537 if (requestData.Contains("ImageID"))
538 { 538 {
539 userProfile.Image = new LLUUID((string) requestData["ImageID"]); 539 userProfile.Image = new UUID((string) requestData["ImageID"]);
540 } 540 }
541 // dont' know how yet 541 // dont' know how yet
542 if (requestData.Contains("MaturePublish")) 542 if (requestData.Contains("MaturePublish"))
@@ -575,8 +575,8 @@ namespace OpenSim.Grid.UserServer
575 } 575 }
576 if (requestData.Contains("home_region_id")) 576 if (requestData.Contains("home_region_id"))
577 { 577 {
578 LLUUID regionID; 578 UUID regionID;
579 LLUUID.TryParse((string) requestData["home_region_id"], out regionID); 579 UUID.TryParse((string) requestData["home_region_id"], out regionID);
580 userProfile.HomeRegionID = regionID; 580 userProfile.HomeRegionID = regionID;
581 } 581 }
582 if (requestData.Contains("home_pos_x")) 582 if (requestData.Contains("home_pos_x"))
@@ -682,7 +682,7 @@ namespace OpenSim.Grid.UserServer
682 { 682 {
683 try 683 try
684 { 684 {
685 userProfile.Partner = new LLUUID((string) requestData["partner"]); 685 userProfile.Partner = new UUID((string) requestData["partner"]);
686 } 686 }
687 catch (InvalidCastException) 687 catch (InvalidCastException)
688 { 688 {
@@ -691,7 +691,7 @@ namespace OpenSim.Grid.UserServer
691 } 691 }
692 else 692 else
693 { 693 {
694 userProfile.Partner = LLUUID.Zero; 694 userProfile.Partner = UUID.Zero;
695 } 695 }
696 696
697 // call plugin! 697 // call plugin!
@@ -710,8 +710,8 @@ namespace OpenSim.Grid.UserServer
710 { 710 {
711 try 711 try
712 { 712 {
713 LLUUID userUUID = new LLUUID((string) requestData["avatar_uuid"]); 713 UUID userUUID = new UUID((string) requestData["avatar_uuid"]);
714 LLUUID RegionID = new LLUUID((string) requestData["region_uuid"]); 714 UUID RegionID = new UUID((string) requestData["region_uuid"]);
715 ulong regionhandle = (ulong) Convert.ToInt64((string) requestData["region_handle"]); 715 ulong regionhandle = (ulong) Convert.ToInt64((string) requestData["region_handle"]);
716 float posx = (float) Convert.ToDecimal((string) requestData["region_pos_x"]); 716 float posx = (float) Convert.ToDecimal((string) requestData["region_pos_x"]);
717 float posy = (float) Convert.ToDecimal((string) requestData["region_pos_y"]); 717 float posy = (float) Convert.ToDecimal((string) requestData["region_pos_y"]);
@@ -749,9 +749,9 @@ namespace OpenSim.Grid.UserServer
749 throw new Exception("The method or operation is not implemented."); 749 throw new Exception("The method or operation is not implemented.");
750 } 750 }
751 751
752 public override UserProfileData SetupMasterUser(LLUUID uuid) 752 public override UserProfileData SetupMasterUser(UUID uuid)
753 { 753 {
754 throw new Exception("The method or operation is not implemented."); 754 throw new Exception("The method or operation is not implemented.");
755 } 755 }
756 } 756 }
757} \ No newline at end of file 757}
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 }
diff --git a/OpenSim/TestSuite/BotManager.cs b/OpenSim/TestSuite/BotManager.cs
index 29864ab..7039b0f 100644
--- a/OpenSim/TestSuite/BotManager.cs
+++ b/OpenSim/TestSuite/BotManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -198,7 +198,7 @@ namespace OpenSim.TestSuite
198 break; 198 break;
199 case "addbots": 199 case "addbots":
200 int newbots; 200 int newbots;
201 Helpers.TryParse(cmdparams[0], out newbots); 201 Int32.TryParse(cmdparams[0], out newbots);
202 202
203 if (newbots > 0) 203 if (newbots > 0)
204 addbots(newbots); 204 addbots(newbots);
diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs
index 0e02aef..c04e19e 100644
--- a/OpenSim/TestSuite/PhysicsBot.cs
+++ b/OpenSim/TestSuite/PhysicsBot.cs
@@ -29,7 +29,7 @@ using System;
29using System.IO; 29using System.IO;
30using System.Threading; 30using System.Threading;
31using System.Timers; 31using System.Timers;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
@@ -55,7 +55,7 @@ namespace OpenSim.TestSuite
55 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here 55 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here
56 56
57 //New instance of a SecondLife client 57 //New instance of a SecondLife client
58 public SecondLife client = new SecondLife(); 58 public GridClient client = new GridClient();
59 59
60 protected string[] talkarray; 60 protected string[] talkarray;
61 /// <summary> 61 /// <summary>
@@ -87,8 +87,8 @@ namespace OpenSim.TestSuite
87 client.Self.Movement.AlwaysRun = false; 87 client.Self.Movement.AlwaysRun = false;
88 } 88 }
89 89
90 // TODO: unused: LLVector3 pos = client.Self.SimPosition; 90 // TODO: unused: Vector3 pos = client.Self.SimPosition;
91 LLVector3 newpos = new LLVector3(somthing.Next(255), somthing.Next(255), somthing.Next(255)); 91 Vector3 newpos = new Vector3(somthing.Next(255), somthing.Next(255), somthing.Next(255));
92 client.Self.Movement.TurnToward(newpos); 92 client.Self.Movement.TurnToward(newpos);
93 93
94 for (int i = 0; i < 2000; i++) 94 for (int i = 0; i < 2000; i++)
diff --git a/OpenSim/Tests/Common/VectorToleranceConstraint.cs b/OpenSim/Tests/Common/VectorToleranceConstraint.cs
index 249fe09..ce2683c 100644
--- a/OpenSim/Tests/Common/VectorToleranceConstraint.cs
+++ b/OpenSim/Tests/Common/VectorToleranceConstraint.cs
@@ -26,17 +26,17 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using NUnit.Framework; 30using NUnit.Framework;
31 31
32namespace OpenSim.Tests.Common 32namespace OpenSim.Tests.Common
33{ 33{
34 public class VectorToleranceConstraint : ANumericalToleranceConstraint 34 public class VectorToleranceConstraint : ANumericalToleranceConstraint
35 { 35 {
36 private LLVector3 _baseValue; 36 private Vector3 _baseValue;
37 private LLVector3 _valueToBeTested; 37 private Vector3 _valueToBeTested;
38 38
39 public VectorToleranceConstraint(LLVector3 baseValue, double tolerance) : base(tolerance) 39 public VectorToleranceConstraint(Vector3 baseValue, double tolerance) : base(tolerance)
40 { 40 {
41 _baseValue = baseValue; 41 _baseValue = baseValue;
42 } 42 }
@@ -54,12 +54,12 @@ namespace OpenSim.Tests.Common
54 { 54 {
55 throw new ArgumentException("Constraint cannot be used upon null values."); 55 throw new ArgumentException("Constraint cannot be used upon null values.");
56 } 56 }
57 if (valueToBeTested.GetType() != typeof (LLVector3)) 57 if (valueToBeTested.GetType() != typeof (Vector3))
58 { 58 {
59 throw new ArgumentException("Constraint cannot be used upon non vector values."); 59 throw new ArgumentException("Constraint cannot be used upon non vector values.");
60 } 60 }
61 61
62 _valueToBeTested = (LLVector3) valueToBeTested; 62 _valueToBeTested = (Vector3) valueToBeTested;
63 63
64 return (IsWithinDoubleConstraint(_valueToBeTested.X, _baseValue.X) && 64 return (IsWithinDoubleConstraint(_valueToBeTested.X, _baseValue.X) &&
65 IsWithinDoubleConstraint(_valueToBeTested.Y, _baseValue.Y) && 65 IsWithinDoubleConstraint(_valueToBeTested.Y, _baseValue.Y) &&
diff --git a/OpenSim/Tests/Framework/UtilTest.cs b/OpenSim/Tests/Framework/UtilTest.cs
index 121ee93..a973ed2 100644
--- a/OpenSim/Tests/Framework/UtilTest.cs
+++ b/OpenSim/Tests/Framework/UtilTest.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 NUnit.Framework; 29using NUnit.Framework;
30using NUnit.Framework.SyntaxHelpers; 30using NUnit.Framework.SyntaxHelpers;
31using OpenSim.Tests.Common; 31using OpenSim.Tests.Common;
@@ -38,15 +38,15 @@ namespace OpenSim.Framework.Tests
38 [Test] 38 [Test]
39 public void VectorOperationTests() 39 public void VectorOperationTests()
40 { 40 {
41 LLVector3 v1, v2; 41 Vector3 v1, v2;
42 double expectedDistance; 42 double expectedDistance;
43 double expectedMagnitude; 43 double expectedMagnitude;
44 double lowPrecisionTolerance = 0.001; 44 double lowPrecisionTolerance = 0.001;
45 45
46 //Lets test a simple case of <0,0,0> and <5,5,5> 46 //Lets test a simple case of <0,0,0> and <5,5,5>
47 { 47 {
48 v1 = new LLVector3(0, 0, 0); 48 v1 = new Vector3(0, 0, 0);
49 v2 = new LLVector3(5, 5, 5); 49 v2 = new Vector3(5, 5, 5);
50 expectedDistance = 8.66; 50 expectedDistance = 8.66;
51 Assert.That(Util.GetDistanceTo(v1, v2), 51 Assert.That(Util.GetDistanceTo(v1, v2),
52 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance), 52 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance),
@@ -65,9 +65,9 @@ namespace OpenSim.Framework.Tests
65 Assert.That(causesArgumentException, Is.True, 65 Assert.That(causesArgumentException, Is.True,
66 "Getting magnitude of null vector did not cause argument exception."); 66 "Getting magnitude of null vector did not cause argument exception.");
67 67
68 LLVector3 expectedNormalizedVector = new LLVector3(.577f, .577f, .577f); 68 Vector3 expectedNormalizedVector = new Vector3(.577f, .577f, .577f);
69 double expectedNormalizedMagnitude = 1; 69 double expectedNormalizedMagnitude = 1;
70 LLVector3 normalizedVector = Util.GetNormalizedVector(v2); 70 Vector3 normalizedVector = Util.GetNormalizedVector(v2);
71 Assert.That(normalizedVector, 71 Assert.That(normalizedVector,
72 new VectorToleranceConstraint(expectedNormalizedVector, lowPrecisionTolerance), 72 new VectorToleranceConstraint(expectedNormalizedVector, lowPrecisionTolerance),
73 "Normalized vector generated from vector was not what was expected."); 73 "Normalized vector generated from vector was not what was expected.");
@@ -78,8 +78,8 @@ namespace OpenSim.Framework.Tests
78 78
79 //Lets test a simple case of <0,0,0> and <0,0,0> 79 //Lets test a simple case of <0,0,0> and <0,0,0>
80 { 80 {
81 v1 = new LLVector3(0, 0, 0); 81 v1 = new Vector3(0, 0, 0);
82 v2 = new LLVector3(0, 0, 0); 82 v2 = new Vector3(0, 0, 0);
83 expectedDistance = 0; 83 expectedDistance = 0;
84 Assert.That(Util.GetDistanceTo(v1, v2), 84 Assert.That(Util.GetDistanceTo(v1, v2),
85 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance), 85 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance),
@@ -106,8 +106,8 @@ namespace OpenSim.Framework.Tests
106 106
107 //Lets test a simple case of <0,0,0> and <-5,-5,-5> 107 //Lets test a simple case of <0,0,0> and <-5,-5,-5>
108 { 108 {
109 v1 = new LLVector3(0, 0, 0); 109 v1 = new Vector3(0, 0, 0);
110 v2 = new LLVector3(-5, -5, -5); 110 v2 = new Vector3(-5, -5, -5);
111 expectedDistance = 8.66; 111 expectedDistance = 8.66;
112 Assert.That(Util.GetDistanceTo(v1, v2), 112 Assert.That(Util.GetDistanceTo(v1, v2),
113 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance), 113 new DoubleToleranceConstraint(expectedDistance, lowPrecisionTolerance),
@@ -126,9 +126,9 @@ namespace OpenSim.Framework.Tests
126 Assert.That(causesArgumentException, Is.True, 126 Assert.That(causesArgumentException, Is.True,
127 "Getting magnitude of null vector did not cause argument exception."); 127 "Getting magnitude of null vector did not cause argument exception.");
128 128
129 LLVector3 expectedNormalizedVector = new LLVector3(-.577f, -.577f, -.577f); 129 Vector3 expectedNormalizedVector = new Vector3(-.577f, -.577f, -.577f);
130 double expectedNormalizedMagnitude = 1; 130 double expectedNormalizedMagnitude = 1;
131 LLVector3 normalizedVector = Util.GetNormalizedVector(v2); 131 Vector3 normalizedVector = Util.GetNormalizedVector(v2);
132 Assert.That(normalizedVector, 132 Assert.That(normalizedVector,
133 new VectorToleranceConstraint(expectedNormalizedVector, lowPrecisionTolerance), 133 new VectorToleranceConstraint(expectedNormalizedVector, lowPrecisionTolerance),
134 "Normalized vector generated from vector was not what was expected."); 134 "Normalized vector generated from vector was not what was expected.");
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
index f469d91..68d4716 100644
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ b/OpenSim/Tools/Export/OpenSimExport.cs
@@ -63,7 +63,7 @@ namespace OpenSimExport
63 XmlConfigurator.Configure(); 63 XmlConfigurator.Configure();
64 64
65 OpenSimExport export = new OpenSimExport(InitConfig(args)); 65 OpenSimExport export = new OpenSimExport(InitConfig(args));
66 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false); 66 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.Xml",false);
67 67
68 Console.WriteLine("This application does nothing useful yet: " + reg.RegionID); 68 Console.WriteLine("This application does nothing useful yet: " + reg.RegionID);
69 foreach (SceneObjectGroup group in export.sman.DataStore.LoadObjects(reg.RegionID)) 69 foreach (SceneObjectGroup group in export.sman.DataStore.LoadObjects(reg.RegionID))
@@ -109,4 +109,4 @@ namespace OpenSimExport
109 return config; 109 return config;
110 } 110 }
111 } 111 }
112} \ No newline at end of file 112}
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 4bdc494..8eb00c7 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -197,7 +197,7 @@ namespace pCampBot
197 break; 197 break;
198 case "addbots": 198 case "addbots":
199 int newbots; 199 int newbots;
200 Helpers.TryParse(cmdparams[0], out newbots); 200 Int32.TryParse(cmdparams[0], out newbots);
201 201
202 if (newbots > 0) 202 if (newbots > 0)
203 addbots(newbots); 203 addbots(newbots);
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs
index 49c3c78..84987b2 100644
--- a/OpenSim/Tools/pCampBot/PhysicsBot.cs
+++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs
@@ -29,7 +29,7 @@ using System;
29using System.IO; 29using System.IO;
30using System.Threading; 30using System.Threading;
31using System.Timers; 31using System.Timers;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
@@ -55,7 +55,7 @@ namespace pCampBot
55 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here 55 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here
56 56
57 //New instance of a SecondLife client 57 //New instance of a SecondLife client
58 public SecondLife client = new SecondLife(); 58 public GridClient client = new GridClient();
59 59
60 protected string[] talkarray; 60 protected string[] talkarray;
61 /// <summary> 61 /// <summary>
@@ -87,8 +87,8 @@ namespace pCampBot
87 client.Self.Movement.AlwaysRun = false; 87 client.Self.Movement.AlwaysRun = false;
88 } 88 }
89 89
90 // TODO: unused: LLVector3 pos = client.Self.SimPosition; 90 // TODO: unused: Vector3 pos = client.Self.SimPosition;
91 LLVector3 newpos = new LLVector3(somthing.Next(255), somthing.Next(255), somthing.Next(255)); 91 Vector3 newpos = new Vector3(somthing.Next(255), somthing.Next(255), somthing.Next(255));
92 client.Self.Movement.TurnToward(newpos); 92 client.Self.Movement.TurnToward(newpos);
93 93
94 for (int i = 0; i < 2000; i++) 94 for (int i = 0; i < 2000; i++)