aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-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
106 files changed, 2445 insertions, 2607 deletions
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);