From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- .../Agent/AssetDownload/AssetDownloadModule.cs | 30 +-- .../AssetTransaction/AgentAssetsTransactions.cs | 34 ++-- .../AssetTransaction/AssetTransactionModule.cs | 24 +-- .../Agent/TextureDownload/TextureDownloadModule.cs | 10 +- .../Agent/TextureDownload/TextureNotFoundSender.cs | 10 +- .../TextureDownload/UserTextureDownloadService.cs | 14 +- .../Modules/Agent/TextureSender/TextureSender.cs | 6 +- .../Environment/Modules/Agent/Xfer/XferModule.cs | 4 +- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 26 +-- .../Environment/Modules/Avatar/Chat/ChatModule.cs | 26 +-- .../Modules/Avatar/Chat/IRCBridgeModule.cs | 10 +- .../Currency/SampleMoney/SampleMoneyModule.cs | 138 +++++++------- .../Modules/Avatar/Friends/FriendsModule.cs | 106 +++++------ .../Modules/Avatar/Groups/GroupsModule.cs | 36 ++-- .../Avatar/InstantMessage/InstantMessageModule.cs | 104 +++++------ .../Modules/Avatar/Inventory/InventoryModule.cs | 24 +-- .../Avatar/Profiles/AvatarProfilesModule.cs | 6 +- .../Voice/AsterixVoice/AsteriskVoiceModule.cs | 10 +- .../Avatar/Voice/SIPVoice/SIPVoiceModule.cs | 10 +- .../ContentManagementSystem/AuraMetaEntity.cs | 20 +- .../ContentManagementSystem/BeamMetaEntity.cs | 22 +-- .../ContentManagementSystem/CMController.cs | 36 ++-- .../ContentManagementSystem/CMEntityCollection.cs | 20 +- .../Modules/ContentManagementSystem/CMModel.cs | 20 +- .../Modules/ContentManagementSystem/CMView.cs | 12 +- .../ContentManagementEntity.cs | 26 ++- .../ContentManagementModule.cs | 6 +- .../ContentManagementSystem/FileSystemDatabase.cs | 30 ++- .../Modules/ContentManagementSystem/GitDatabase.cs | 38 ++-- .../ContentManagementSystem/IContentDatabase.cs | 23 +-- .../Modules/ContentManagementSystem/MetaEntity.cs | 22 +-- .../ContentManagementSystem/PointMetaEntity.cs | 36 ++-- .../SceneObjectGroupDiff.cs | 28 ++- .../Modules/InterGrid/OpenGridProtocolModule.cs | 86 ++++----- .../DynamicTexture/DynamicTextureModule.cs | 68 ++++--- .../Modules/Scripting/EMailModules/EmailModule.cs | 14 +- .../Scripting/HttpRequest/ScriptsHttpRequests.cs | 24 +-- .../Scripting/LoadImageURL/LoadImageURLModule.cs | 16 +- .../Scripting/VectorRender/VectorRenderModule.cs | 13 +- .../Modules/Scripting/WorldComm/WorldCommModule.cs | 68 +++---- .../Modules/Scripting/XMLRPC/XMLRPCModule.cs | 100 +++++----- .../Modules/World/Archiver/ArchiveConstants.cs | 16 +- .../Modules/World/Archiver/ArchiveReadRequest.cs | 15 +- .../World/Archiver/ArchiveWriteRequestExecution.cs | 12 +- .../Archiver/ArchiveWriteRequestPreparation.cs | 32 ++-- .../Modules/World/Archiver/ArchiverModule.cs | 2 +- .../Modules/World/Archiver/AssetsArchiver.cs | 12 +- .../Modules/World/Archiver/AssetsDearchiver.cs | 6 +- .../Modules/World/Archiver/AssetsRequest.cs | 14 +- .../Modules/World/Estate/EstateManagementModule.cs | 52 +++--- .../Environment/Modules/World/Land/LandChannel.cs | 12 +- .../Modules/World/Land/LandManagementModule.cs | 71 ++++--- .../Environment/Modules/World/Land/LandObject.cs | 46 ++--- .../Environment/Modules/World/NPC/NPCAvatar.cs | 204 ++++++++++----------- .../Environment/Modules/World/NPC/NPCModule.cs | 6 +- .../Modules/World/Permissions/PermissionsModule.cs | 132 ++++++------- .../Modules/World/Serialiser/IRegionSerialiser.cs | 12 +- .../Modules/World/Serialiser/SceneXmlLoader.cs | 15 +- .../Modules/World/Serialiser/SerialiseObjects.cs | 6 +- .../Modules/World/Serialiser/SerialiserModule.cs | 8 +- .../Environment/Modules/World/Sun/SunModule.cs | 23 ++- .../Modules/World/Terrain/TerrainModule.cs | 6 +- .../World/TreePopulator/TreePopulatorModule.cs | 37 ++-- .../Modules/World/WorldMap/MapImageModule.cs | 79 ++++---- .../World/WorldMap/ShadedMapTileRenderer.cs | 5 +- .../World/WorldMap/TexturedMapTileRenderer.cs | 33 ++-- .../Modules/World/WorldMap/WorldMapModule.cs | 49 ++--- 67 files changed, 1115 insertions(+), 1146 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') 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 @@ */ using System.Collections.Generic; -using libsecondlife; -using libsecondlife.Packets; +using OpenMetaverse; +using OpenMetaverse.Packets; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -43,16 +43,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload private List AssetRequests; private Scene m_scene; - private Dictionary RegisteredScenes = new Dictionary(); + private Dictionary RegisteredScenes = new Dictionary(); /// /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests /// - private Dictionary> RequestedAssets; + private Dictionary> RequestedAssets; public AssetDownloadModule() { - RequestedAssets = new Dictionary>(); + RequestedAssets = new Dictionary>(); AssetRequests = new List(); } @@ -109,24 +109,24 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload /// public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) { - LLUUID requestID = null; + UUID requestID = null; byte source = 2; if (transferRequest.TransferInfo.SourceType == 2) { //direct asset request - requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); + requestID = new UUID(transferRequest.TransferInfo.Params, 0); } else if (transferRequest.TransferInfo.SourceType == 3) { //inventory asset request - requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); + requestID = new UUID(transferRequest.TransferInfo.Params, 80); source = 3; //Console.WriteLine("asset request " + requestID); } //not found asset // so request from asset server - Dictionary userRequests = null; + Dictionary userRequests = null; if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests)) { if (!userRequests.ContainsKey(requestID)) @@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload } else { - userRequests = new Dictionary(); + userRequests = new Dictionary(); AssetRequest request = new AssetRequest(); request.RequestUser = userInfo; request.RequestAssetID = requestID; @@ -156,11 +156,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload } } - public void AssetCallback(LLUUID assetID, AssetBase asset) + public void AssetCallback(UUID assetID, AssetBase asset) { if (asset != null) { - foreach (Dictionary userRequests in RequestedAssets.Values) + foreach (Dictionary userRequests in RequestedAssets.Values) { if (userRequests.ContainsKey(assetID)) { @@ -212,9 +212,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload public int NumPackets = 0; public int PacketCounter = 0; public byte[] Params = null; - public LLUUID RequestAssetID; + public UUID RequestAssetID; public IClientAPI RequestUser; - public LLUUID TransferRequestID; + public UUID TransferRequestID; //public bool AssetInCache; //public int TimeRequested; @@ -225,4 +225,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload #endregion } -} \ No newline at end of file +} 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 @@ using System; using System.Collections.Generic; using System.IO; -using libsecondlife; -using libsecondlife.Packets; +using OpenMetaverse; +using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; @@ -46,18 +46,18 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction // Fields private bool m_dumpAssetsToFile; public AgentAssetTransactionsManager Manager; - public LLUUID UserID; - public Dictionary XferUploaders = new Dictionary(); + public UUID UserID; + public Dictionary XferUploaders = new Dictionary(); // Methods - public AgentAssetTransactions(LLUUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile) + public AgentAssetTransactions(UUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile) { UserID = agentID; Manager = manager; m_dumpAssetsToFile = dumpAssetsToFile; } - public AssetXferUploader RequestXferUploader(LLUUID transactionID) + public AssetXferUploader RequestXferUploader(UUID transactionID) { if (!XferUploaders.ContainsKey(transactionID)) { @@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction } } - public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, + public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) { @@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction } } - public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, + public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) { if (XferUploaders.ContainsKey(transactionID)) @@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// The asset if the upload has completed, null if it has not. - public AssetBase GetTransactionAsset(LLUUID transactionID) + public AssetBase GetTransactionAsset(UUID transactionID) { if (XferUploaders.ContainsKey(transactionID)) { @@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction // Fields public bool AddToInventory; public AssetBase Asset; - public LLUUID InventFolder = LLUUID.Zero; + public UUID InventFolder = UUID.Zero; private sbyte invType = 0; private bool m_createItem = false; private string m_description = String.Empty; @@ -154,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction private AgentAssetTransactions m_userTransactions; private uint nextPerm = 0; private IClientAPI ourClient; - public LLUUID TransactionID = LLUUID.Zero; + public UUID TransactionID = UUID.Zero; private sbyte type = 0; public bool UploadComplete; private byte wearableType = 0; @@ -210,7 +210,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// True if the transfer is complete, false otherwise - public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, + public bool Initialise(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) { ourClient = remoteClient; @@ -297,7 +297,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction fs.Close(); } - public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, + public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) { @@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction } } - public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, + public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) { if (TransactionID == transactionID) @@ -332,7 +332,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction if (userInfo != null) { - LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId); + UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId); AssetBase asset = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( @@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction if (asset != null && asset.FullID == assetID) { // Assets never get updated, new ones get created - asset.FullID = LLUUID.Random(); + asset.FullID = UUID.Random(); asset.Name = item.Name; asset.Description = item.Description; asset.Type = (sbyte) item.AssetType; @@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction InventoryItemBase item = new InventoryItemBase(); item.Owner = ourClient.AgentId; item.Creator = ourClient.AgentId; - item.ID = LLUUID.Random(); + item.ID = UUID.Random(); item.AssetID = Asset.FullID; item.Description = m_description; 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 @@ using System; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction { public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions { - private readonly Dictionary RegisteredScenes = new Dictionary(); + private readonly Dictionary RegisteredScenes = new Dictionary(); private bool m_dumpAssetsToFile = false; private Scene m_scene = null; @@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction #region IAgentAssetTransactions Members - public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, + public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) { @@ -61,13 +61,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction wearableType, nextOwnerMask); } - public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, + public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) { m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); } - public void RemoveAgentAssetTransactions(LLUUID userID) + public void RemoveAgentAssetTransactions(UUID userID) { m_transactionManager.RemoveAgentAssetTransactions(userID); } @@ -146,8 +146,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// Each agent has its own singleton collection of transactions /// - private Dictionary AgentTransactions = - new Dictionary(); + private Dictionary AgentTransactions = + new Dictionary(); /// /// Should we dump uploaded assets to the filesystem? @@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// - private AgentAssetTransactions GetUserTransactions(LLUUID userID) + private AgentAssetTransactions GetUserTransactions(UUID userID) { lock (AgentTransactions) { @@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// from a scene (and hence won't be making any more transactions here). /// /// - public void RemoveAgentAssetTransactions(LLUUID userID) + public void RemoveAgentAssetTransactions(UUID userID) { // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); @@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// - public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, + public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) { @@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// - public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, + public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID, InventoryItemBase item) { m_log.DebugFormat( @@ -259,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction /// /// /// - public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, + public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data, bool storeLocal, bool tempFile) { 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 @@ using System; using System.Collections.Generic; using System.Threading; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -50,8 +50,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// Each user has their own texture download service. /// - private readonly Dictionary m_userTextureServices = - new Dictionary(); + private readonly Dictionary m_userTextureServices = + new Dictionary(); private Scene m_scene; private List m_scenes = new List(); @@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// Cleanup the texture service related objects for the removed presence. /// /// - private void EventManager_OnRemovePresence(LLUUID agentId) + private void EventManager_OnRemovePresence(UUID agentId) { UserTextureDownloadService textureService; @@ -216,4 +216,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload m_scene.AddPendingDownloads(-1); } } -} \ No newline at end of file +} 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 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using libsecondlife; -using libsecondlife.Packets; +using OpenMetaverse; +using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -46,11 +46,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload // See ITextureSender // private bool m_sending = false; - private LLUUID m_textureId; + private UUID m_textureId; // See ITextureSender - public TextureNotFoundSender(IClientAPI client, LLUUID textureID) + public TextureNotFoundSender(IClientAPI client, UUID textureID) { // // m_client = client; m_textureId = textureID; @@ -101,4 +101,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload #endregion } -} \ No newline at end of file +} 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 @@ using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Limit; @@ -65,8 +65,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// XXX Also going to limit requests for found textures. /// - private readonly IRequestLimitStrategy foundTextureLimitStrategy - = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); + private readonly IRequestLimitStrategy foundTextureLimitStrategy + = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); private readonly IClientAPI m_client; private readonly Scene m_scene; @@ -80,15 +80,15 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// Holds texture senders before they have received the appropriate texture from the asset cache. /// - private readonly Dictionary m_textureSenders = new Dictionary(); + private readonly Dictionary m_textureSenders = new Dictionary(); /// /// We're going to limit requests for the same missing texture. /// XXX This is really a temporary solution to deal with the situation where a client continually requests /// the same missing textures /// - private readonly IRequestLimitStrategy missingTextureLimitStrategy - = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); + private readonly IRequestLimitStrategy missingTextureLimitStrategy + = new RepeatLimitStrategy(MAX_ALLOWED_TEXTURE_REQUESTS); public UserTextureDownloadService( IClientAPI client, Scene scene, BlockingQueue sharedQueue) @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload /// /// /// - public void TextureCallback(LLUUID textureID, AssetBase texture) + public void TextureCallback(UUID textureID, AssetBase texture) { //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false)); 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 @@ using System; using System.Reflection; -using libsecondlife.Packets; +using OpenMetaverse.Packets; using log4net; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender /// private AssetBase m_asset; - //public LLUUID assetID { get { return m_asset.FullID; } } + //public UUID assetID { get { return m_asset.FullID; } } // private bool m_cancel = false; @@ -220,4 +220,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender return numPackets; } } -} \ No newline at end of file +} 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 @@ using System; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -228,4 +228,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer #endregion } -} \ No newline at end of file +} 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 @@ using System; using System.Collections.Generic; using System.Threading; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; @@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules public class AvatarFactoryModule : IAvatarFactory { private Scene m_scene = null; - private readonly Dictionary m_avatarsAppearance = new Dictionary(); + private readonly Dictionary m_avatarsAppearance = new Dictionary(); private bool m_enablePersist = false; private string m_connectionString; @@ -51,10 +51,10 @@ namespace OpenSim.Region.Environment.Modules private BaseDatabaseConnector m_databaseMapper; private AppearanceTableMapper m_appearanceMapper; - private Dictionary m_fetchesInProgress = new Dictionary(); + private Dictionary m_fetchesInProgress = new Dictionary(); private object m_syncLock = new object(); - public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) + public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance) { //should only let one thread at a time do this part @@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules } } - private AvatarAppearance CreateDefault(LLUUID avatarId) + private AvatarAppearance CreateDefault(UUID avatarId) { AvatarAppearance appearance = null; AvatarWearable[] wearables; @@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules return appearance; } - private AvatarAppearance CheckDatabase(LLUUID avatarId) + private AvatarAppearance CheckDatabase(UUID avatarId) { AvatarAppearance appearance = null; if (m_enablePersist) @@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules return appearance; } - private AvatarAppearance CheckCache(LLUUID avatarId) + private AvatarAppearance CheckCache(UUID avatarId) { AvatarAppearance appearance = null; lock (m_avatarsAppearance) @@ -282,16 +282,16 @@ namespace OpenSim.Region.Environment.Modules { if (wear.Type < 13) { - if (wear.ItemID == LLUUID.Zero) + if (wear.ItemID == UUID.Zero) { - avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; - avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; + avatAppearance.Wearables[wear.Type].ItemID = UUID.Zero; + avatAppearance.Wearables[wear.Type].AssetID = UUID.Zero; UpdateDatabase(clientView.AgentId, avatAppearance); } else { - LLUUID assetId; + UUID assetId; InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); if (baseItem != null) @@ -310,11 +310,11 @@ namespace OpenSim.Region.Environment.Modules } } - public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) + public void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance) { if (m_enablePersist) { - m_appearanceMapper.Update(userID.UUID, avatAppearance); + m_appearanceMapper.Update(userID.Guid, avatAppearance); } } 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; using System.Reflection; using System.Text.RegularExpressions; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat // chat works by redistributing every incoming chat // message to each avatar in the scene - LLVector3 pos = new LLVector3(128, 128, 30); + Vector3 pos = new Vector3(128, 128, 30); ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) { if (presence.IsChildAgent) return; @@ -129,12 +129,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat if (null == c.SenderObject) client.SendChatMessage(c.Message, (byte)c.Type, - pos, c.From, LLUUID.Zero, + pos, c.From, UUID.Zero, (byte)ChatSourceType.Agent, (byte)ChatAudibleLevel.Fully); else client.SendChatMessage(c.Message, (byte)c.Type, - pos, c.From, LLUUID.Zero, + pos, c.From, UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); }); @@ -153,13 +153,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat scene = m_scenes[0]; // Filled in since it's easier than rewriting right now. - LLVector3 fromPos = e.Position; - LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, + Vector3 fromPos = e.Position; + Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); string fromName = e.From; string message = e.Message; - LLUUID fromID = e.SenderUUID; + UUID fromID = e.SenderUUID; if(message.Length >= 1000) // libomv limit message = message.Substring(0, 1000); @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat if (avatar != null) { fromPos = avatar.AbsolutePosition; - regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, + regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); fromName = avatar.Firstname + " " + avatar.Lastname; fromID = e.Sender.AgentId; @@ -217,16 +217,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat } } - private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, - LLUUID fromAgentID, string fromName, ChatTypeEnum type, + private void TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos, + UUID fromAgentID, string fromName, ChatTypeEnum type, string message, ChatSourceType src) { // don't send stuff to child agents if (presence.IsChildAgent) return; - LLVector3 fromRegionPos = fromPos + regionPos; - LLVector3 toRegionPos = presence.AbsolutePosition + - new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, + Vector3 fromRegionPos = fromPos + regionPos; + Vector3 toRegionPos = presence.AbsolutePosition + + new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 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; using System.Reflection; using System.Text.RegularExpressions; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -617,7 +617,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat public void ListenerRun() { string inputLine; - LLVector3 pos = new LLVector3(128, 128, 20); + Vector3 pos = new Vector3(128, 128, 20); while (m_enabled) { try @@ -638,7 +638,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat c.Position = pos; c.From = data["nick"]; c.Sender = null; - c.SenderUUID = LLUUID.Zero; + c.SenderUUID = UUID.Zero; // is message "\001ACTION foo // bar\001"? -> "/me foo bar" @@ -684,9 +684,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat c.Message = String.Format(format, args); c.Type = ChatTypeEnum.Say; c.Channel = 0; - c.Position = new LLVector3(128, 128, 20); + c.Position = new Vector3(128, 128, 20); c.Sender = null; - c.SenderUUID = LLUUID.Zero; + c.SenderUUID = UUID.Zero; foreach (Scene m_scene in m_scenes) { 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; using System.Net.Sockets; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// Where Stipends come from and Fees go to. /// - // private LLUUID EconomyBaseAccount = LLUUID.Zero; + // private UUID EconomyBaseAccount = UUID.Zero; private float EnergyEfficiency = 0f; private bool gridmode = false; @@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney private IConfigSource m_gConfig; private bool m_keepMoneyAcrossLogins = true; - private Dictionary m_KnownClientFunds = new Dictionary(); + private Dictionary m_KnownClientFunds = new Dictionary(); // private string m_LandAddress = String.Empty; private int m_minFundsBeforeRefresh = 100; @@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// Region UUIDS indexed by AgentID /// - private Dictionary m_rootAgents = new Dictionary(); + private Dictionary m_rootAgents = new Dictionary(); /// /// Scenes by Region Handle @@ -184,11 +184,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney } } - public void ApplyUploadCharge(LLUUID agentID) + public void ApplyUploadCharge(UUID agentID) { } - public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) + public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) { string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); @@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); - // string EBA = startupConfig.GetString("EconomyBaseAccount", LLUUID.Zero.ToString()); + // string EBA = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString()); // Helpers.TryParse(EBA, out EconomyBaseAccount); // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1); @@ -294,7 +294,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney if (s != null && agent != null && childYN == false) { //s.RegionInfo.RegionHandle; - LLUUID agentID = LLUUID.Zero; + UUID agentID = UUID.Zero; int funds = 0; Hashtable hbinfo = @@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney s.RegionInfo.regionSecret); if ((bool) hbinfo["success"] == true) { - Helpers.TryParse((string) hbinfo["agentId"], out agentID); + UUID.TryParse((string)hbinfo["agentId"], out agentID); try { funds = (Int32) hbinfo["funds"]; @@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney (string) hbinfo["errorMessage"]); client.SendAlertMessage((string) hbinfo["errorMessage"]); } - SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero); + SendMoneyBalance(client, agentID, client.SessionId, UUID.Zero); } } } @@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - private bool doMoneyTransfer(LLUUID Sender, LLUUID Receiver, int amount, int transactiontype, string description) + private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) { bool result = false; if (amount >= 0) @@ -425,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - public void SendMoneyBalance(IClientAPI client, LLUUID agentID, LLUUID SessionID, LLUUID TransactionID) + public void SendMoneyBalance(IClientAPI client, UUID agentID, UUID SessionID, UUID TransactionID) { if (client.AgentId == agentID && client.SessionId == SessionID) { @@ -456,7 +456,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - public Hashtable GetBalanceForUserFromMoneyServer(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) + public Hashtable GetBalanceForUserFromMoneyServer(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret) { Hashtable MoneyBalanceRequestParams = new Hashtable(); MoneyBalanceRequestParams["agentId"] = agentId.ToString(); @@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - public Hashtable claim_user(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) + public Hashtable claim_user(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret) { Hashtable MoneyBalanceRequestParams = new Hashtable(); MoneyBalanceRequestParams["agentId"] = agentId.ToString(); @@ -563,12 +563,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney IClientAPI sendMoneyBal = LocateClientObject(agentId); if (sendMoneyBal != null) { - SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, LLUUID.Zero); + SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, UUID.Zero); } return MoneyRespData; } - private SceneObjectPart findPrim(LLUUID objectID) + private SceneObjectPart findPrim(UUID objectID) { lock (m_scenel) { @@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return null; } - private string resolveObjectName(LLUUID objectID) + private string resolveObjectName(UUID objectID) { SceneObjectPart part = findPrim(objectID); if (part != null) @@ -594,7 +594,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return String.Empty; } - private string resolveAgentName(LLUUID agentID) + private string resolveAgentName(UUID agentID) { // try avatar username surname Scene scene = GetRandomScene(); @@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return String.Empty; } - private void BalanceUpdate(LLUUID senderID, LLUUID receiverID, bool transactionresult, string description) + private void BalanceUpdate(UUID senderID, UUID receiverID, bool transactionresult, string description) { IClientAPI sender = LocateClientObject(senderID); IClientAPI receiver = LocateClientObject(receiverID); @@ -616,12 +616,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { if (sender != null) { - sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(senderID)); + sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID)); } if (receiver != null) { - receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(receiverID)); + receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID)); } } } @@ -633,7 +633,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - public bool TransferMoneyonMoneyServer(LLUUID sourceId, LLUUID destId, int amount, int transactiontype, string description) + public bool TransferMoneyonMoneyServer(UUID sourceId, UUID destId, int amount, int transactiontype, string description) { int aggregatePermInventory = 0; int aggregatePermNextOwner = 0; @@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return rvalue; } - public int GetRemoteBalance(LLUUID agentId) + public int GetRemoteBalance(UUID agentId) { int funds = 0; @@ -755,7 +755,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney } SetLocalFundsForAgentID(agentId, funds); - SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); + SendMoneyBalance(aClient, agentId, aClient.SessionId, UUID.Zero); } else { @@ -776,10 +776,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney if (requestData.ContainsKey("agentId")) { - LLUUID agentId = LLUUID.Zero; + UUID agentId = UUID.Zero; - Helpers.TryParse((string) requestData["agentId"], out agentId); - if (agentId != LLUUID.Zero) + UUID.TryParse((string) requestData["agentId"], out agentId); + if (agentId != UUID.Zero) { GetRemoteBalance(agentId); } @@ -809,13 +809,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney Hashtable retparam = new Hashtable(); Hashtable requestData = (Hashtable) request.Params[0]; - LLUUID agentId = LLUUID.Zero; - LLUUID soundId = LLUUID.Zero; - LLUUID regionId = LLUUID.Zero; + UUID agentId = UUID.Zero; + UUID soundId = UUID.Zero; + UUID regionId = UUID.Zero; - Helpers.TryParse((string) requestData["agentId"], out agentId); - Helpers.TryParse((string) requestData["soundId"], out soundId); - Helpers.TryParse((string) requestData["regionId"], out regionId); + UUID.TryParse((string) requestData["agentId"], out agentId); + UUID.TryParse((string) requestData["soundId"], out soundId); + UUID.TryParse((string) requestData["regionId"], out regionId); string text = (string) requestData["text"]; string secret = (string) requestData["secret"]; @@ -828,9 +828,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney IClientAPI client = LocateClientObject(agentId); if (client != null) { - if (soundId != LLUUID.Zero) - client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); - client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); + + if (soundId != UUID.Zero) + client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); + + client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text); + retparam.Add("success", true); } else @@ -843,10 +846,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney retparam.Add("success", false); } } - else - { - retparam.Add("success", false); - } + ret.Value = retparam; return ret; } @@ -856,14 +856,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney public XmlRpcResponse quote_func(XmlRpcRequest request) { Hashtable requestData = (Hashtable) request.Params[0]; - LLUUID agentId = LLUUID.Zero; + UUID agentId = UUID.Zero; int amount = 0; Hashtable quoteResponse = new Hashtable(); XmlRpcResponse returnval = new XmlRpcResponse(); if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) { - Helpers.TryParse((string) requestData["agentId"], out agentId); + UUID.TryParse((string) requestData["agentId"], out agentId); try { amount = (Int32) requestData["currencyBuy"]; @@ -894,11 +894,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney public XmlRpcResponse buy_func(XmlRpcRequest request) { Hashtable requestData = (Hashtable) request.Params[0]; - LLUUID agentId = LLUUID.Zero; + UUID agentId = UUID.Zero; int amount = 0; if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) { - Helpers.TryParse((string) requestData["agentId"], out agentId); + UUID.TryParse((string) requestData["agentId"], out agentId); try { amount = (Int32) requestData["currencyBuy"]; @@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney catch (InvalidCastException) { } - if (agentId != LLUUID.Zero) + if (agentId != UUID.Zero) { lock (m_KnownClientFunds) { @@ -922,7 +922,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney IClientAPI client = LocateClientObject(agentId); if (client != null) { - SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); + SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero); } } } @@ -974,11 +974,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney Hashtable retparam = new Hashtable(); Hashtable requestData = (Hashtable) request.Params[0]; - LLUUID agentId = LLUUID.Zero; + UUID agentId = UUID.Zero; int amount = 0; if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) { - Helpers.TryParse((string) requestData["agentId"], out agentId); + UUID.TryParse((string) requestData["agentId"], out agentId); try { amount = (Int32) requestData["currencyBuy"]; @@ -986,7 +986,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney catch (InvalidCastException) { } - if (agentId != LLUUID.Zero) + if (agentId != UUID.Zero) { lock (m_KnownClientFunds) { @@ -1002,7 +1002,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney IClientAPI client = LocateClientObject(agentId); if (client != null) { - SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); + SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero); } } } @@ -1020,7 +1020,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// Ensures that the agent accounting data is set up in this instance. /// /// - private void CheckExistAndRefreshFunds(LLUUID agentID) + private void CheckExistAndRefreshFunds(UUID agentID) { lock (m_KnownClientFunds) { @@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - private int GetFundsForAgentID(LLUUID AgentID) + private int GetFundsForAgentID(UUID AgentID) { int returnfunds = 0; lock (m_KnownClientFunds) @@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return returnfunds; } - private void SetLocalFundsForAgentID(LLUUID AgentID, int amount) + private void SetLocalFundsForAgentID(UUID AgentID, int amount) { lock (m_KnownClientFunds) { @@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - private IClientAPI LocateClientObject(LLUUID AgentID) + private IClientAPI LocateClientObject(UUID AgentID) { ScenePresence tPresence = null; IClientAPI rclient = null; @@ -1110,7 +1110,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney return null; } - private Scene LocateSceneClientIn(LLUUID AgentId) + private Scene LocateSceneClientIn(UUID AgentId) { lock (m_scenel) { @@ -1148,7 +1148,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - public Scene GetSceneByUUID(LLUUID RegionID) + public Scene GetSceneByUUID(UUID RegionID) { lock (m_scenel) { @@ -1167,7 +1167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney #region event Handlers - public void requestPayPrice(IClientAPI client, LLUUID objectID) + public void requestPayPrice(IClientAPI client, UUID objectID) { Scene scene = LocateSceneClientIn(client.AgentId); if (scene == null) @@ -1186,7 +1186,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// When the client closes the connection we remove their accounting info from memory to free up resources. /// /// - public void ClientClosed(LLUUID AgentID) + public void ClientClosed(UUID AgentID) { lock (m_KnownClientFunds) { @@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// Event called Economy Data Request handler. /// /// - public void EconomyDataRequestHandler(LLUUID agentId) + public void EconomyDataRequestHandler(UUID agentId) { IClientAPI user = LocateClientObject(agentId); @@ -1309,11 +1309,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney if (e.sender != e.receiver) { - sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); + sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender)); } if (receiver != null) { - receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); + receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(part.OwnerID)); } } return; @@ -1330,13 +1330,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { if (sender != null) { - sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); + sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender)); } } if (receiver != null) { - receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.receiver)); + receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.receiver)); } } else @@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// Event Handler for when the client logs out. /// /// - private void ClientLoggedOut(LLUUID AgentId) + private void ClientLoggedOut(UUID AgentId) { lock (m_rootAgents) { @@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney /// /// /// - private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) + private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) { lock (m_rootAgents) { @@ -1404,8 +1404,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID]) { - - m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; @@ -1527,7 +1525,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney else { string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); - DeadAvatar.ControllingClient.SendAgentAlertMessage("You impailed yourself on " + part.Name + " owned by " + killer +"!", true); + DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true); } //DeadAvatar.Scene. part.ObjectOwner } @@ -1564,8 +1562,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney #endregion - public void ObjectBuy(IClientAPI remoteClient, LLUUID agentID, - LLUUID sessionID, LLUUID groupID, LLUUID categoryID, + public void ObjectBuy(IClientAPI remoteClient, UUID agentID, + UUID sessionID, UUID groupID, UUID categoryID, uint localID, byte saleType, int salePrice) { 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; using System.Collections; using System.Collections.Generic; using System.Reflection; -using libsecondlife; -using libsecondlife.Packets; +using OpenMetaverse; +using OpenMetaverse.Packets; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -43,10 +43,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private Dictionary> FriendLists = new Dictionary>(); - private Dictionary m_pendingFriendRequests = new Dictionary(); - private Dictionary m_rootAgents = new Dictionary(); - private Dictionary> StoredFriendListUpdates = new Dictionary>(); + private Dictionary> FriendLists = new Dictionary>(); + private Dictionary m_pendingFriendRequests = new Dictionary(); + private Dictionary m_rootAgents = new Dictionary(); + private Dictionary> StoredFriendListUpdates = new Dictionary>(); private List m_scene = new List(); @@ -98,16 +98,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) { - LLUUID notifyAgentId = LLUUID.Zero; - LLUUID notifyAboutAgentId = LLUUID.Zero; + UUID notifyAgentId = UUID.Zero; + UUID notifyAboutAgentId = UUID.Zero; bool notifyOnlineStatus = false; if ((string)requestData["status"] == "TRUE") notifyOnlineStatus = true; - Helpers.TryParse((string)requestData["notify_id"], out notifyAgentId); + UUID.TryParse((string)requestData["notify_id"], out notifyAgentId); - Helpers.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); + UUID.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); if (avatar != null) @@ -189,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } - private void doFriendListUpdateOnline(LLUUID AgentId) + private void doFriendListUpdateOnline(UUID AgentId) { List fl = new List(); @@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - List UpdateUsers = new List(); + List UpdateUsers = new List(); foreach (FriendListItem f in fl) { @@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } } - foreach (LLUUID user in UpdateUsers) + foreach (UUID user in UpdateUsers) { ScenePresence av = GetPresenceFromAgentID(user); if (av != null) @@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends if (fli.Friend == AgentId) { fli.onlinestatus = true; - LLUUID[] Agents = new LLUUID[1]; + UUID[] Agents = new UUID[1]; Agents[0] = AgentId; av.ControllingClient.SendAgentOnline(Agents); @@ -266,7 +266,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private void ClientLoggedOut(LLUUID AgentId) + private void ClientLoggedOut(UUID AgentId) { lock (m_rootAgents) { @@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends lfli = FriendLists[AgentId]; } } - List updateUsers = new List(); + List updateUsers = new List(); foreach (FriendListItem fli in lfli) { if (fli.onlinestatus == true) @@ -352,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); if (av != null) { - LLUUID[] agents = new LLUUID[1]; + UUID[] agents = new UUID[1]; agents[0] = AgentId; av.ControllingClient.SendAgentOffline(agents); } @@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) + private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) { lock (m_rootAgents) { @@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private ScenePresence GetPresenceFromAgentID(LLUUID AgentID) + private ScenePresence GetPresenceFromAgentID(UUID AgentID) { ScenePresence returnAgent = null; lock (m_scene) @@ -451,11 +451,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends #region FriendRequestHandling - private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + private void OnInstantMessage(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket) { // Friend Requests go by Instant Message.. using the dialog param @@ -464,17 +464,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends // 38 == Offer friendship if (dialog == (byte) 38) { - LLUUID friendTransactionID = LLUUID.Random(); + UUID friendTransactionID = UUID.Random(); m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = fromAgentID.UUID; - msg.fromAgentSession = fromAgentSession.UUID; - msg.toAgentID = toAgentID.UUID; - msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here + msg.fromAgentID = fromAgentID.Guid; + msg.fromAgentSession = fromAgentSession.Guid; + msg.toAgentID = toAgentID.Guid; + msg.imSessionID = friendTransactionID.Guid; // This is the item we're mucking with here m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); msg.timestamp = timestamp; if (client != null) @@ -490,8 +490,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends msg.fromGroup = fromGroup; msg.offline = offline; msg.ParentEstateID = ParentEstateID; - msg.Position = new sLLVector3(Position); - msg.RegionID = RegionID.UUID; + msg.Position = Position; + msg.RegionID = RegionID.Guid; msg.binaryBucket = binaryBucket; // We don't really care which scene we pipe it through. m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); @@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List callingCardFolders) + private void OnApprovedFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List callingCardFolders) { if (m_pendingFriendRequests.ContainsKey(transactionID)) { @@ -528,18 +528,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends // Compose response to other agent. GridInstantMessage msg = new GridInstantMessage(); - msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; - msg.fromAgentID = agentID.UUID; + msg.toAgentID = m_pendingFriendRequests[transactionID].Guid; + msg.fromAgentID = agentID.Guid; msg.fromAgentName = client.Name; - msg.fromAgentSession = client.SessionId.UUID; + msg.fromAgentSession = client.SessionId.Guid; msg.fromGroup = false; - msg.imSessionID = transactionID.UUID; - msg.message = agentID.UUID.ToString(); + msg.imSessionID = transactionID.Guid; + msg.message = agentID.Guid.ToString(); msg.ParentEstateID = 0; msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); - msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; + msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid; msg.dialog = (byte) 39; // Approved friend request - msg.Position = new sLLVector3(); + msg.Position = Vector3.Zero; msg.offline = (byte) 0; msg.binaryBucket = new byte[0]; // 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 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1); - //LLUUID[] Agents = new LLUUID[1]; + //UUID[] Agents = new UUID[1]; //Agents[0] = msg.toAgentID; //av.ControllingClient.SendAgentOnline(Agents); @@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List callingCardFolders) + private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List callingCardFolders) { if (m_pendingFriendRequests.ContainsKey(transactionID)) { @@ -571,18 +571,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } // Compose response to other agent. GridInstantMessage msg = new GridInstantMessage(); - msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; - msg.fromAgentID = agentID.UUID; + msg.toAgentID = m_pendingFriendRequests[transactionID].Guid; + msg.fromAgentID = agentID.Guid; msg.fromAgentName = client.Name; - msg.fromAgentSession = client.SessionId.UUID; + msg.fromAgentSession = client.SessionId.Guid; msg.fromGroup = false; - msg.imSessionID = transactionID.UUID; - msg.message = agentID.UUID.ToString(); + msg.imSessionID = transactionID.Guid; + msg.message = agentID.Guid.ToString(); msg.ParentEstateID = 0; msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); - msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; + msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid; msg.dialog = (byte) 40; // Deny friend request - msg.Position = new sLLVector3(); + msg.Position = Vector3.Zero; msg.offline = (byte) 0; msg.binaryBucket = new byte[0]; SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); @@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends } } - private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) + private void OnTerminateFriendship(IClientAPI client, UUID agent, UUID exfriendID) { m_scene[0].StoreRemoveFriendship(agent, exfriendID); // TODO: Inform the client that the ExFriend is offline @@ -599,10 +599,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends private void OnGridInstantMessage(GridInstantMessage msg) { // Trigger the above event handler - OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), - new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, + OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), + new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, - new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), + new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), msg.binaryBucket); } @@ -611,8 +611,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends public struct StoredFriendListUpdate { - public LLUUID storedFor; - public LLUUID storedAbout; + public UUID storedFor; + public UUID storedAbout; public bool OnlineYN; } } 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 @@ using System; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -41,11 +41,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private Dictionary m_grouplistmap = new Dictionary(); - private Dictionary m_groupmap = new Dictionary(); - private Dictionary m_iclientmap = new Dictionary(); - private Dictionary m_groupUUIDGroup = new Dictionary(); - private LLUUID opensimulatorGroupID = new LLUUID("00000000-68f9-1111-024e-222222111123"); + private Dictionary m_grouplistmap = new Dictionary(); + private Dictionary m_groupmap = new Dictionary(); + private Dictionary m_iclientmap = new Dictionary(); + private Dictionary m_groupUUIDGroup = new Dictionary(); + private UUID opensimulatorGroupID = new UUID("00000000-68f9-1111-024e-222222111123"); private List m_scene = new List(); @@ -161,13 +161,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups client.SendGroupMembership(updateGroups); } - private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID) + private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID AgentID, UUID SessionID) { // Adam, this is one of those impossible to refactor items without resorting to .Split hackery string firstname = remoteClient.FirstName; string lastname = remoteClient.LastName; - LLUUID ActiveGroupID = LLUUID.Zero; + UUID ActiveGroupID = UUID.Zero; uint ActiveGroupPowers = 0; string ActiveGroupName = "OpenSimulator Tester"; string ActiveGroupTitle = "I IZ N0T"; @@ -202,11 +202,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups } } - private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + private void OnInstantMessage(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket) { } @@ -214,16 +214,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups private void OnGridInstantMessage(GridInstantMessage msg) { // Trigger the above event handler - OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), - new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, + OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), + new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, - new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), + new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), msg.binaryBucket); } - private void HandleUUIDGroupNameRequest(LLUUID id,IClientAPI remote_client) + private void HandleUUIDGroupNameRequest(UUID id,IClientAPI remote_client) { string groupnamereply = "Unknown"; - LLUUID groupUUID = LLUUID.Zero; + UUID groupUUID = UUID.Zero; lock (m_groupUUIDGroup) { @@ -236,7 +236,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups } remote_client.SendGroupNameReply(groupUUID, groupnamereply); } - private void OnClientClosed(LLUUID agentID) + private void OnClientClosed(UUID agentID) { lock (m_iclientmap) { 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; using System.Reflection; using System.Net; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly List m_scenes = new List(); - private Dictionary m_userRegionMap = new Dictionary(); + private Dictionary m_userRegionMap = new Dictionary(); #region IRegionModule Members @@ -106,11 +106,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage client.OnInstantMessage += OnInstantMessage; } - private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + private void OnInstantMessage(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket) { bool dialogHandledElsewhere @@ -122,8 +122,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage // IM dialogs need to be pre-processed and have their sessionID filled by the server // so the sim can match the transaction on the return packet. - // Don't send a Friend Dialog IM with a LLUUID.Zero session. - if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero)) + // Don't send a Friend Dialog IM with a UUID.Zero session. + if (!(dialogHandledElsewhere && imSessionID == UUID.Zero)) { // Try root avatar only first foreach (Scene scene in m_scenes) @@ -195,10 +195,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage private void OnGridInstantMessage(GridInstantMessage msg) { // Trigger the above event handler - OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), - new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, + OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), + new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, - new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), + new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), msg.binaryBucket); } @@ -214,10 +214,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage { bool successful = false; // various rational defaults - LLUUID fromAgentID = LLUUID.Zero; - LLUUID fromAgentSession = LLUUID.Zero; - LLUUID toAgentID = LLUUID.Zero; - LLUUID imSessionID = LLUUID.Zero; + UUID fromAgentID = UUID.Zero; + UUID fromAgentSession = UUID.Zero; + UUID toAgentID = UUID.Zero; + UUID imSessionID = UUID.Zero; uint timestamp = 0; string fromAgentName = ""; string message = ""; @@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage bool fromGroup = false; byte offline = (byte)0; uint ParentEstateID=0; - LLVector3 Position = LLVector3.Zero; - LLUUID RegionID = LLUUID.Zero ; + Vector3 Position = Vector3.Zero; + UUID RegionID = UUID.Zero ; byte[] binaryBucket = new byte[0]; float pos_x = 0; @@ -248,11 +248,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle")) { // Do the easy way of validating the UUIDs - Helpers.TryParse((string)requestData["from_agent_id"], out fromAgentID); - Helpers.TryParse((string)requestData["from_agent_session"], out fromAgentSession); - Helpers.TryParse((string)requestData["to_agent_id"], out toAgentID); - Helpers.TryParse((string)requestData["im_session_id"], out imSessionID); - Helpers.TryParse((string)requestData["region_id"], out RegionID); + UUID.TryParse((string)requestData["from_agent_id"], out fromAgentID); + UUID.TryParse((string)requestData["from_agent_session"], out fromAgentSession); + UUID.TryParse((string)requestData["to_agent_id"], out toAgentID); + UUID.TryParse((string)requestData["im_session_id"], out imSessionID); + UUID.TryParse((string)requestData["region_id"], out RegionID); # region timestamp try @@ -345,24 +345,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage } # endregion - Position = new LLVector3(pos_x, pos_y, pos_z); + Position = new Vector3(pos_x, pos_y, pos_z); binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); // Create a New GridInstantMessageObject the the data GridInstantMessage gim = new GridInstantMessage(); - gim.fromAgentID = fromAgentID.UUID; + gim.fromAgentID = fromAgentID.Guid; gim.fromAgentName = fromAgentName; - gim.fromAgentSession = fromAgentSession.UUID; + gim.fromAgentSession = fromAgentSession.Guid; gim.fromGroup = fromGroup; - gim.imSessionID = imSessionID.UUID; - gim.RegionID = RegionID.UUID; + gim.imSessionID = imSessionID.Guid; + gim.RegionID = RegionID.Guid; gim.timestamp = timestamp; - gim.toAgentID = toAgentID.UUID; + gim.toAgentID = toAgentID.Guid; gim.message = message; gim.dialog = dialog; gim.offline = offline; gim.ParentEstateID = ParentEstateID; - gim.Position = new sLLVector3(Position); + gim.Position = Position; gim.binaryBucket = binaryBucket; @@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage /// /// /// - public delegate void GridInstantMessageDelegate(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + public delegate void GridInstantMessageDelegate(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle); private void GridInstantMessageCompleted(IAsyncResult iar) @@ -432,11 +432,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage } - protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) { GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync; @@ -459,11 +459,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage /// if it's the same as the user's looked up region handle, then we end the recursive loop /// /// - protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) { UserAgentData upd = null; @@ -527,10 +527,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage if (reginfo != null) { GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = fromAgentID.UUID; - msg.fromAgentSession = fromAgentSession.UUID; - msg.toAgentID = toAgentID.UUID; - msg.imSessionID = imSessionID.UUID; + msg.fromAgentID = fromAgentID.Guid; + msg.fromAgentSession = fromAgentSession.Guid; + msg.toAgentID = toAgentID.Guid; + msg.imSessionID = imSessionID.Guid; msg.timestamp = timestamp; msg.fromAgentName = fromAgentName; msg.message = message; @@ -538,8 +538,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage msg.fromGroup = fromGroup; msg.offline = offline; msg.ParentEstateID = ParentEstateID; - msg.Position = new sLLVector3(Position); - msg.RegionID = RegionID.UUID; + msg.Position = Position; + msg.RegionID = RegionID.Guid; msg.binaryBucket = binaryBucket; Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg); @@ -649,7 +649,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage /// /// UUID of region to get the region handle for /// - private ulong getLocalRegionHandleFromUUID(LLUUID regionID) + private ulong getLocalRegionHandleFromUUID(UUID regionID) { ulong returnhandle = 0; @@ -692,13 +692,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline; gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None); gim["parent_estate_id"] = msg.ParentEstateID.ToString(); - gim["position_x"] = msg.Position.x.ToString(); - gim["position_y"] = msg.Position.y.ToString(); - gim["position_z"] = msg.Position.z.ToString(); + gim["position_x"] = msg.Position.X.ToString(); + gim["position_y"] = msg.Position.Y.ToString(); + gim["position_z"] = msg.Position.Z.ToString(); gim["region_id"] = msg.RegionID.ToString(); gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None); return gim; } } -} \ No newline at end of file +} 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 @@ using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory /// occurs in the initial offer message, not the accept message. So this dictionary links /// IM Session Ids to ItemIds /// - private IDictionary m_pendingOffers = new Dictionary(); + private IDictionary m_pendingOffers = new Dictionary(); private List m_Scenelist = new List(); - private Dictionary m_AgentRegions = new Dictionary(); + private Dictionary m_AgentRegions = new Dictionary(); #region IRegionModule Members @@ -92,11 +92,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory client.OnInstantMessage += OnInstantMessage; } - private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, - LLUUID fromAgentSession, LLUUID toAgentID, - LLUUID imSessionID, uint timestamp, string fromAgentName, + private void OnInstantMessage(IClientAPI client, UUID fromAgentID, + UUID fromAgentSession, UUID toAgentID, + UUID imSessionID, uint timestamp, string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, - uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + uint ParentEstateID, Vector3 Position, UUID RegionID, byte[] binaryBucket) { if (dialog == (byte) InstantMessageDialog.InventoryOffered) @@ -117,8 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory // Next 16 bytes are the UUID //Array.Copy(binaryBucket, 1, rawId, 0, 16); - //LLUUID itemId = new LLUUID(new Guid(rawId)); - LLUUID itemId = new LLUUID(binaryBucket, 1); + //UUID itemId = new UUID(new Guid(rawId)); + UUID itemId = new UUID(binaryBucket, 1); m_log.DebugFormat( "[AGENT INVENTORY]: ItemId for giving is {0}", itemId); @@ -225,12 +225,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory } } - public void SetRootAgentScene(LLUUID agentID, Scene scene) + public void SetRootAgentScene(UUID agentID, Scene scene) { m_AgentRegions[agentID] = scene; } - public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) + public bool NeedSceneCacheClear(UUID agentID, Scene scene) { if (!m_AgentRegions.ContainsKey(agentID)) { @@ -279,7 +279,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory return false; } - public void ClientLoggedOut(LLUUID agentID) + public void ClientLoggedOut(UUID agentID) { if (m_AgentRegions.ContainsKey(agentID)) 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 @@ using System; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles /// /// /// - public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID) + public void RequestAvatarProperty(IClientAPI remoteClient, UUID avatarID) { // FIXME: finish adding fields such as url, masking, etc. UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); @@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles } else { - charterMember = Helpers.StringToField(profile.CustomType); + charterMember = Utils.StringToBytes(profile.CustomType); } 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 @@ using System; using System.Collections; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice #endregion - public void OnRegisterCaps(LLUUID agentID, Caps caps) + public void OnRegisterCaps(UUID agentID, Caps caps) { m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); string capsBase = "/CAPS/" + caps.CapsObjectPath; @@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice /// /// public string ParcelVoiceInfoRequest(string request, string path, string param, - LLUUID agentID, Caps caps) + UUID agentID, Caps caps) { // we need to do: // - send channel_uri: as "sip:regionID@m_sipDomain" @@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice /// /// public string ProvisionVoiceAccountRequest(string request, string path, string param, - LLUUID agentID, Caps caps) + UUID agentID, Caps caps) { // we need to // - get user data from UserProfileCacheService @@ -289,4 +289,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice } } } -} \ No newline at end of file +} 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 @@ using System; using System.Collections; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice #endregion - public void OnRegisterCaps(LLUUID agentID, Caps caps) + public void OnRegisterCaps(UUID agentID, Caps caps) { m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); string capsBase = "/CAPS/" + caps.CapsObjectPath; @@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice /// /// public string ParcelVoiceInfoRequest(string request, string path, string param, - LLUUID agentID, Caps caps) + UUID agentID, Caps caps) { try { @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice /// /// public string ProvisionVoiceAccountRequest(string request, string path, string param, - LLUUID agentID, Caps caps) + UUID agentID, Caps caps) { try { @@ -199,4 +199,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice return null; } } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class AuraMetaEntity : PointMetaEntity @@ -59,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Constructors //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency. - public AuraMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) + public AuraMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale) : base(scene, LocalId, groupPos, transparency) { SetAura(color, scale); } - public AuraMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) + public AuraMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale) : base(scene, uuid, LocalId, groupPos, transparency) { SetAura(color, scale); @@ -75,7 +73,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Private Methods - private float Average(LLVector3 values) + private float Average(Vector3 values) { return (values.X + values.Y + values.Z)/3f; } @@ -84,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Public Methods - public void SetAura(LLVector3 color, LLVector3 scale) + public void SetAura(Vector3 color, Vector3 scale) { SetAura(color, Average(scale) * 2.0f); } - public void SetAura(LLVector3 color, float radius) + public void SetAura(Vector3 color, float radius) { SceneObjectPart From = m_Entity.RootPart; @@ -110,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); } - public void SetAura(SceneObjectPart From, LLVector3 color, float radius, float burstRadius, float age, float burstRate, libsecondlife.Primitive.ParticleSystem.SourcePattern patternFlags) + public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags) { Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | @@ -139,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement prules.PartAcceleration.Y = 0.0f; prules.PartAcceleration.Z = 0.0f; prules.Pattern = patternFlags; //PSYS_SRC_PATTERN - //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank + //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS @@ -160,4 +158,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -50,21 +50,19 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class BeamMetaEntity : PointMetaEntity { #region Constructors - public BeamMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) + public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) : base(scene, LocalId, groupPos, transparency) { SetBeamToUUID(To, color); } - public BeamMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) + public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) : base(scene, uuid, LocalId, groupPos, transparency) { SetBeamToUUID(To, color); @@ -74,13 +72,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Public Methods - public void SetBeamToUUID(SceneObjectPart To, LLVector3 color) + public void SetBeamToUUID(SceneObjectPart To, Vector3 color) { SceneObjectPart From = m_Entity.RootPart; //Scale size of particles to distance objects are apart (for better visibility) - LLVector3 FromPos = From.GetWorldPosition(); - LLVector3 ToPos = From.GetWorldPosition(); -// LLUUID toUUID = To.UUID; + Vector3 FromPos = From.GetWorldPosition(); + Vector3 ToPos = From.GetWorldPosition(); + UUID toUUID = To.UUID; float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + Math.Pow(FromPos.X-ToPos.Y, 2) + Math.Pow(FromPos.X-ToPos.Z, 2) @@ -94,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement SetBeamToUUID(From, To, color, rate, scale, speed); } - public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, LLVector3 color, float rate, float scale, float speed) + public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed) { Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | @@ -118,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement prules.PartAcceleration.Y = 0.0f; prules.PartAcceleration.Z = 0.0f; //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN - //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank + //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank prules.BurstRate = rate; //PSYS_SRC_BURST_RATE prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS @@ -138,4 +136,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Diagnostics; using System.Threading; -using libsecondlife; +using OpenMetaverse; using OpenSim; using OpenSim.Framework; @@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { /// @@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// Only called by the MainLoop. /// - private void UndoDid(CMModel model, CMView view, LLUUID uuid) + private void UndoDid(CMModel model, CMView view, UUID uuid) { if ((m_state & State.SHOWING_CHANGES) > 0) { @@ -289,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_WorkQueue.Enqueue(moreWork); } - protected void ObjectDuplicated(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID) + protected void ObjectDuplicated(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTDUPLICATED; @@ -298,8 +296,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] dup queue"); } - protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, - LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, + protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID, + UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) { Work moreWork = new Work(); @@ -318,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] new client"); } - protected void OnUnDid(IClientAPI remoteClient, LLUUID primId) + protected void OnUnDid(IClientAPI remoteClient, UUID primId) { Work moreWork = new Work(); moreWork.Type = WorkType.UNDODID; @@ -405,7 +403,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// /// - protected void StopManaging(LLUUID clientUUID) + protected void StopManaging(UUID clientUUID) { foreach(Object sceneobj in m_sceneList.Values) { @@ -433,7 +431,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement } } - protected void UpdateMultiplePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) + protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -442,7 +440,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] pos"); } - protected void UpdateMultipleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) + protected void UpdateMultipleRotation(uint localID, Quaternion rot, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -451,7 +449,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] rot"); } - protected void UpdateMultipleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) + protected void UpdateMultipleScale(uint localID, Vector3 scale, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -460,8 +458,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT]scale"); } - protected void UpdateNewParts(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, - byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, + protected void UpdateNewParts(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape, + byte bypassRaycast, Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection) { Work moreWork = new Work(); @@ -471,7 +469,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] new parts"); } - protected void UpdateSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) + protected void UpdateSinglePosition(uint localID, Vector3 pos, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -483,7 +481,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// /// - protected void UpdateSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) + protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -492,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_log.Debug("[CONTENT MANAGEMENT] rot"); } - protected void UpdateSingleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) + protected void UpdateSingleScale(uint localID, Vector3 scale, IClientAPI remoteClient) { Work moreWork = new Work(); moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; @@ -723,7 +721,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement public Object Data2; //Just more space for holding data. public uint LocalId; //Convenient public WorkType Type; - public LLUUID UUID; //Convenient + public UUID UUID; //Convenient #endregion Fields } @@ -745,4 +743,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Other } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Threading; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -52,8 +52,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class CMEntityCollection @@ -63,12 +61,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or // old versions of deleted SceneObjectGroups will be stored in this hash table. - // The LLUUID keys are from the SceneObjectGroup RootPart UUIDs - protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //LLUUID to ContentManagementEntity + // The UUID keys are from the SceneObjectGroup RootPart UUIDs + protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable - // The LLUUID keys are from the SceneObjectPart that they are supposed to be on. - protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //LLUUID to AuraMetaEntity + // The UUID keys are from the SceneObjectPart that they are supposed to be on. + protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //UUID to AuraMetaEntity #endregion Fields @@ -151,7 +149,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement part.ParentGroup.Scene.PrimIDAllocate(), part.GetWorldPosition(), MetaEntity.TRANSLUCENT, - new LLVector3(0,254,0), + new Vector3(0,254,0), part.Scale ); m_NewlyCreatedEntityAura.Add(part.UUID, ent); @@ -175,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return ent; } - public bool RemoveEntity(LLUUID uuid) + public bool RemoveEntity(UUID uuid) { if (!m_CMEntityHash.ContainsKey(uuid)) return false; @@ -183,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return true; } - public bool RemoveNewlyCreatedEntityAura(LLUUID uuid) + public bool RemoveNewlyCreatedEntityAura(UUID uuid) { if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) return false; @@ -193,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Diagnostics; -using libsecondlife; +using OpenMetaverse; using OpenSim; using OpenSim.Framework; @@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class CMModel @@ -133,14 +131,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_MetaEntityCollection.ClearAll(); } - public ContentManagementEntity FindMetaEntityAffectedByUndo(LLUUID uuid) + public ContentManagementEntity FindMetaEntityAffectedByUndo(UUID uuid) { ContentManagementEntity ent = GetMetaGroupByPrim(uuid); return ent; } //-------------------------------- HELPERS --------------------------------------------------------------------// - public ContentManagementEntity GetMetaGroupByPrim(LLUUID uuid) + public ContentManagementEntity GetMetaGroupByPrim(UUID uuid) { foreach (Object ent in m_MetaEntityCollection.Entities.Values) { @@ -194,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement SceneObjectGroup temp = null; System.Collections.Hashtable deleteListUUIDs = new Hashtable(); // Dictionary SearchList = new Dictionary(); - Dictionary ReplacementList = new Dictionary(); + Dictionary ReplacementList = new Dictionary(); int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID); // EntityBase[] searchArray; @@ -255,14 +253,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement break; } - foreach(LLUUID uuid in deleteListUUIDs.Keys) + foreach(UUID uuid in deleteListUUIDs.Keys) { try { // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); - scene.SendKillObject(scene.Entities[uuid].LocalId); + scene.SendKiPrimitive(scene.Entities[uuid].LocalId); scene.m_innerScene.DeleteSceneObject(uuid, false); ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(); } @@ -284,7 +282,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement if (!(ent is SceneObjectGroup)) continue; - if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Phantom) == 0) + if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0) ((SceneObjectGroup)ent).ApplyPhysics(true); ((SceneObjectGroup)ent).AttachToBackup(); ((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 { if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) { - ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new LLVector3(0,254,0), part.Scale); + ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new Vector3(0,254,0), part.Scale); ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition(); auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]); } @@ -356,4 +354,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; using OpenSim; using OpenSim.Framework; @@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class CMView @@ -136,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement SendSimChatMessage(scene, menu); } - public void DisplayMetaEntity(LLUUID uuid) + public void DisplayMetaEntity(UUID uuid) { ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); if (group != null) @@ -199,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement public void SendSimChatMessage(Scene scene, string message) { - scene.SimChat(Helpers.StringToField(message), - ChatTypeEnum.Broadcast, 0, new LLVector3(0,0,0), "Content Manager", LLUUID.Zero, false); + scene.SimChat(Utils.StringToBytes(message), + ChatTypeEnum.Broadcast, 0, new Vector3(0,0,0), "Content Manager", UUID.Zero, false); } #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class ContentManagementEntity : MetaEntity @@ -64,8 +62,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Fields - protected Dictionary m_AuraEntities = new Dictionary(); - protected Dictionary m_BeamEntities = new Dictionary(); + protected Dictionary m_AuraEntities = new Dictionary(); + protected Dictionary m_BeamEntities = new Dictionary(); // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different. // This can come in handy. @@ -108,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid. /// - private bool ContainsKey(List list, LLUUID uuid) + private bool ContainsKey(List list, UUID uuid) { foreach( EntityBase part in list) if (part.UUID == uuid) @@ -116,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return false; } - private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List list, LLUUID uuid) + private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List list, UUID uuid) { foreach (EntityBase ent in list) { @@ -150,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement // if already displaying a red aura over part, make sure its red if (m_AuraEntities.ContainsKey(part.UUID)) { - m_AuraEntities[part.UUID].SetAura(new LLVector3(254,0,0), part.Scale); + m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale); } else { @@ -158,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_Entity.Scene.PrimIDAllocate(), part.GetWorldPosition(), MetaEntity.TRANSLUCENT, - new LLVector3(254,0,0), + new Vector3(254,0,0), part.Scale ); m_AuraEntities.Add(part.UUID, auraGroup); @@ -189,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID. /// - public bool HasChildPrim(LLUUID uuid) + public bool HasChildPrim(UUID uuid) { if (m_UnchangedEntity.Children.ContainsKey(uuid)) return true; @@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_UnchangedEntity.RootPart.GetWorldPosition(), MetaEntity.TRANSLUCENT, sceneEntityPart, - new LLVector3(0,0,254) + new Vector3(0,0,254) ); m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); } @@ -280,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_Entity.Scene.PrimIDAllocate(), UnchangedPart.GetWorldPosition(), MetaEntity.TRANSLUCENT, - new LLVector3(0,0,254), + new Vector3(0,0,254), UnchangedPart.Scale ); m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); @@ -314,7 +312,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_Entity.Scene.PrimIDAllocate(), UnchangedPart.GetWorldPosition(), MetaEntity.TRANSLUCENT, - new LLVector3(254,0,0), + new Vector3(254,0,0), UnchangedPart.Scale ); m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); @@ -386,4 +384,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Threading; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class ContentManagementModule : IRegionModule @@ -162,4 +160,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -53,8 +53,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class FileSystemDatabase : IContentDatabase @@ -70,8 +68,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Fields private string m_repodir = null; - private Dictionary m_scenes = new Dictionary(); - private Dictionary m_serialiser = new Dictionary(); + private Dictionary m_scenes = new Dictionary(); + private Dictionary m_serialiser = new Dictionary(); #endregion Fields @@ -92,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement if (!Directory.Exists(m_repodir)) Directory.CreateDirectory(m_repodir); - foreach (LLUUID region in m_scenes.Keys) + foreach (UUID region in m_scenes.Keys) { scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; if (!Directory.Exists(scenedir)) @@ -104,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement private void SetupSerialiser() { if (m_serialiser.Count == 0) - foreach(LLUUID region in m_scenes.Keys) + foreach(UUID region in m_scenes.Keys) m_serialiser.Add(region, m_scenes[region].RequestModuleInterface() ); @@ -114,12 +112,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Public Methods - public int GetMostRecentRevision(LLUUID regionid) + public int GetMostRecentRevision(UUID regionid) { return NumOfRegionRev(regionid); } - public string GetRegionObjectHeightMap(LLUUID regionid) + public string GetRegionObjectHeightMap(UUID regionid) { String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + "heightmap.r32"; @@ -131,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return result; } - public string GetRegionObjectHeightMap(LLUUID regionid, int revision) + public string GetRegionObjectHeightMap(UUID regionid, int revision) { String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + "heightmap.r32"; @@ -143,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return result; } - public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) + public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision) { System.Collections.ArrayList objectList = new System.Collections.ArrayList(); string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + @@ -169,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return null; } - public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) + public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid) { int revision = NumOfRegionRev(regionid); m_log.Info("[FSDB]: found revisions:" + revision); @@ -215,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement m_scenes.Add(scene.RegionInfo.RegionID, scene); } - public System.Collections.Generic.SortedDictionary ListOfRegionRevisions(LLUUID regionid) + public System.Collections.Generic.SortedDictionary ListOfRegionRevisions(UUID regionid) { SortedDictionary revisionDict = new SortedDictionary(); @@ -244,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement return revisionDict; } - public int NumOfRegionRev(LLUUID regionid) + public int NumOfRegionRev(UUID regionid) { string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; m_log.Info("[FSDB]: Reading scene dir: " + scenedir); @@ -261,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement CreateDirectory(); } - public void SaveRegion(LLUUID regionid, string regionName, string logMessage) + public void SaveRegion(UUID regionid, string regionName, string logMessage) { m_log.Info("[FSDB]: ..............................."); string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; @@ -311,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -54,8 +54,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { /// @@ -73,57 +71,57 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Public Methods - public SceneObjectGroup GetMostRecentObjectRevision(LLUUID id) + public SceneObjectGroup GetMostRecentObjectRevision(UUID id) { return null; } - public int GetMostRecentRevision(LLUUID regionid) + public int GetMostRecentRevision(UUID regionid) { return 0; } - public SceneObjectGroup GetObjectRevision(LLUUID id, int revision) + public SceneObjectGroup GetObjectRevision(UUID id, int revision) { return null; } - public System.Collections.ArrayList GetObjectsFromRegion(LLUUID regionid, int revision) + public System.Collections.ArrayList GetObjectsFromRegion(UUID regionid, int revision) { return null; } - public string GetRegionObjectHeightMap(LLUUID regionid) + public string GetRegionObjectHeightMap(UUID regionid) { return null; } - public string GetRegionObjectHeightMap(LLUUID regionid, int revision) + public string GetRegionObjectHeightMap(UUID regionid, int revision) { return null; } - public string GetRegionObjectXML(LLUUID regionid) + public string GetRegionObjectXML(UUID regionid) { return null; } - public string GetRegionObjectXML(LLUUID regionid, int revision) + public string GetRegionObjectXML(UUID regionid, int revision) { return null; } - public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) + public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid) { return null; } - public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) + public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision) { return null; } - public bool InRepository(LLUUID id) + public bool InRepository(UUID id) { return false; } @@ -132,22 +130,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement { } - public System.Collections.Generic.SortedDictionary ListOfObjectRevisions(LLUUID id) + public System.Collections.Generic.SortedDictionary ListOfObjectRevisions(UUID id) { return null; } - public System.Collections.Generic.SortedDictionary ListOfRegionRevisions(LLUUID id) + public System.Collections.Generic.SortedDictionary ListOfRegionRevisions(UUID id) { return null; } - public int NumOfObjectRev(LLUUID id) + public int NumOfObjectRev(UUID id) { return 0; } - public int NumOfRegionRev(LLUUID regionid) + public int NumOfRegionRev(UUID regionid) { return 0; } @@ -160,10 +158,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement { } - public void SaveRegion(LLUUID regionid, string regionName, string logMessage) + public void SaveRegion(UUID regionid, string regionName, string logMessage) { } #endregion Public Methods } -} \ No newline at end of file +} 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 @@ #endregion Header using System; - -using libsecondlife; - +using OpenMetaverse; using OpenSim.Region.Environment.Scenes; - using Nini.Config; namespace OpenSim.Region.Environment.Modules.ContentManagement @@ -52,18 +49,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// Returns the most recent revision number of a region. /// - int GetMostRecentRevision(LLUUID regionid); + int GetMostRecentRevision(UUID regionid); - string GetRegionObjectHeightMap(LLUUID regionid); + string GetRegionObjectHeightMap(UUID regionid); - string GetRegionObjectHeightMap(LLUUID regionid, int revision); + string GetRegionObjectHeightMap(UUID regionid, int revision); /// /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region. /// - System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid); + System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid); - System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision); + System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision); /// /// 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 /// /// Returns a list of the revision numbers and corresponding log messages for a given region. /// - System.Collections.Generic.SortedDictionary ListOfRegionRevisions(LLUUID id); + System.Collections.Generic.SortedDictionary ListOfRegionRevisions(UUID id); /// /// Returns the total number of revisions saved for a specific region. /// - int NumOfRegionRev(LLUUID regionid); + int NumOfRegionRev(UUID regionid); /// /// Should be called once after Initialise has been called. @@ -90,8 +87,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// /// Saves the Region terrain map and objects within the region as xml to the database. /// - void SaveRegion(LLUUID regionid, string regionName, string logMessage); + void SaveRegion(UUID regionid, string regionName, string logMessage); #endregion Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class MetaEntity @@ -109,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Public Properties - public Dictionary Children + public Dictionary Children { get { return m_Entity.Children; } set { m_Entity.Children = value; } @@ -142,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement get { return m_Entity.Scene; } } - public LLUUID UUID + public UUID UUID { get { return m_Entity.UUID; } set { m_Entity.UUID = value; } @@ -161,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement protected void Initialize(bool physics) { //make new uuids - Dictionary parts = new Dictionary(); + Dictionary parts = new Dictionary(); foreach(SceneObjectPart part in m_Entity.Children.Values) { part.ResetIDs(part.LinkNum); @@ -191,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement //This is important because we are not IN any database. //m_Entity.FakeDeleteGroup(); foreach( SceneObjectPart part in m_Entity.Children.Values) - client.SendKillObject(m_Entity.RegionHandle, part.LocalId); + client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } /// @@ -201,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement { foreach( SceneObjectPart part in m_Entity.Children.Values) m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) - { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); } + { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } ); } @@ -237,12 +235,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement /// public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount) { - LLObject.TextureEntry tex = null; - LLColor texcolor; + Primitive.TextureEntry tex = null; + Color4 texcolor; try { tex = part.Shape.Textures; - texcolor = new LLColor(); + texcolor = new Color4(); } catch(Exception) { @@ -280,4 +278,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Collections.Generic; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -50,22 +50,20 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { public class PointMetaEntity : MetaEntity { #region Constructors - public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency) + public PointMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency) : base() { - CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos); + CreatePointEntity(scene, UUID.Random(), LocalId, groupPos); SetPartTransparency(m_Entity.RootPart, transparency); } - public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency) + public PointMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency) : base() { CreatePointEntity(scene, uuid, LocalId, groupPos); @@ -76,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Private Methods - private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos) + private void CreatePointEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos) { SceneObjectGroup x = new SceneObjectGroup(); SceneObjectPart y = new SceneObjectPart(); @@ -85,23 +83,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement y.Name = "Very Small Point"; y.RegionHandle = scene.RegionInfo.RegionHandle; y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; - y.OwnerID = LLUUID.Zero; - y.CreatorID = LLUUID.Zero; - y.LastOwnerID = LLUUID.Zero; + y.OwnerID = UUID.Zero; + y.CreatorID = UUID.Zero; + y.LastOwnerID = UUID.Zero; y.UUID = uuid; y.LocalId = LocalId; y.Shape = PrimitiveBaseShape.CreateBox(); - y.Scale = new LLVector3(0.01f,0.01f,0.01f); - y.LastOwnerID = LLUUID.Zero; + y.Scale = new Vector3(0.01f,0.01f,0.01f); + y.LastOwnerID = UUID.Zero; y.GroupPosition = groupPos; - y.OffsetPosition = new LLVector3(0, 0, 0); - y.RotationOffset = new LLQuaternion(0,0,0,0); - y.Velocity = new LLVector3(0, 0, 0); - y.RotationalVelocity = new LLVector3(0, 0, 0); - y.AngularVelocity = new LLVector3(0, 0, 0); - y.Acceleration = new LLVector3(0, 0, 0); + y.OffsetPosition = new Vector3(0, 0, 0); + y.RotationOffset = new Quaternion(0,0,0,0); + y.Velocity = new Vector3(0, 0, 0); + y.RotationalVelocity = new Vector3(0, 0, 0); + y.AngularVelocity = new Vector3(0, 0, 0); + y.Acceleration = new Vector3(0, 0, 0); y.Flags = 0; y.TrimPermissions(); @@ -121,4 +119,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Private Methods } -} \ No newline at end of file +} 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; using System.Diagnostics; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { #region Enumerations @@ -99,14 +97,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Private Methods - private static bool AreQuaternionsEquivalent(LLQuaternion first, LLQuaternion second) + private static bool AreQuaternionsEquivalent(Quaternion first, Quaternion second) { - LLVector3 firstVector = llRot2Euler(first); - LLVector3 secondVector = llRot2Euler(second); + Vector3 firstVector = llRot2Euler(first); + Vector3 secondVector = llRot2Euler(second); return AreVectorsEquivalent(firstVector, secondVector); } - private static bool AreVectorsEquivalent(LLVector3 first, LLVector3 second) + private static bool AreVectorsEquivalent(Vector3 first, Vector3 second) { if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) @@ -133,21 +131,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs // Also changed the original function from LSL_Types to LL types - private static LLVector3 llRot2Euler(LLQuaternion r) + private static Vector3 llRot2Euler(Quaternion r) { - LLQuaternion t = new LLQuaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); + Quaternion t = new Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); double m = (t.X + t.Y + t.Z + t.W); - if (m == 0) return new LLVector3(); + if (m == 0) return new Vector3(); double n = 2 * (r.Y * r.W + r.X * r.Z); double p = m * m - n * n; if (p > 0) - 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))), + 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))), (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W)))); else if (n > 0) - 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))); + 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))); else - 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))); + 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))); } #endregion Private Methods @@ -187,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement result |= Diff.ROTATIONOFFSET; - // MISC COMPARISONS (LLUUID, Byte) + // MISC COMPARISONS (UUID, Byte) if(first.ClickAction != second.ClickAction) result |= Diff.CLICKACTION; if(first.ObjectOwner != second.ObjectOwner) @@ -217,4 +215,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} 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; using System.Text.RegularExpressions; using System.Threading; -using libsecondlife; -using libsecondlife.StructuredData; +using OpenMetaverse; +using OpenMetaverse.StructuredData; using log4net; using Nini.Config; @@ -50,9 +50,9 @@ using OpenSim.Region.Environment.Scenes; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Capabilities; using OpenSim.Framework.Statistics; -using LLSD = libsecondlife.StructuredData.LLSD; -using LLSDMap = libsecondlife.StructuredData.LLSDMap; -using LLSDArray = libsecondlife.StructuredData.LLSDArray; +using LLSD = OpenMetaverse.StructuredData.LLSD; +using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; +using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; namespace OpenSim.Region.Environment.Modules.InterGrid { @@ -60,12 +60,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid { public string first_name; public string last_name; - public LLUUID agent_id; - public LLUUID local_agent_id; - public LLUUID region_id; + public UUID agent_id; + public UUID local_agent_id; + public UUID region_id; public uint circuit_code; - public LLUUID secure_session_id; - public LLUUID session_id; + public UUID secure_session_id; + public UUID session_id; public bool agent_access; public string sim_access; public uint god_level; @@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid private List m_scene = new List(); private Dictionary CapsLoginID = new Dictionary(); - private Dictionary m_OGPState = new Dictionary(); + private Dictionary m_OGPState = new Dictionary(); private string LastNameSuffix = "_EXTERNAL"; private string FirstNamePrefix = ""; @@ -231,10 +231,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //string RegionURI = reg.ServerURI; //int RegionPort = (int)reg.HttpPort; - LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); + UUID RemoteAgentID = requestMap["agent_id"].AsUUID(); // will be used in the future. The client always connects with the aditi agentid currently - LLUUID LocalAgentID = RemoteAgentID; + UUID LocalAgentID = RemoteAgentID; string FirstName = requestMap["first_name"].AsString(); string LastName = requestMap["last_name"].AsString(); @@ -274,15 +274,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid // Generate a dummy agent for the user so we can get back a CAPS path AgentCircuitData agentData = new AgentCircuitData(); agentData.AgentID = LocalAgentID; - agentData.BaseFolder=LLUUID.Zero; + agentData.BaseFolder=UUID.Zero; agentData.CapsPath=Util.GetRandomCapsPath(); agentData.child = false; agentData.circuitcode = (uint)(Util.RandomClass.Next()); agentData.firstname = FirstName; agentData.lastname = LastName; - agentData.SecureSessionID=LLUUID.Random(); - agentData.SessionID=LLUUID.Random(); - agentData.startpos = new LLVector3(128f, 128f, 100f); + agentData.SecureSessionID=UUID.Random(); + agentData.SessionID=UUID.Random(); + agentData.startpos = new Vector3(128f, 128f, 100f); // Pre-Fill our region cache with information on the agent. UserAgentData useragent = new UserAgentData(); @@ -308,14 +308,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid userProfile.CurrentAgent = useragent; userProfile.CustomType = "OGP"; userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol"; - userProfile.FirstLifeImage = LLUUID.Zero; + userProfile.FirstLifeImage = UUID.Zero; userProfile.FirstName = agentData.firstname; userProfile.GodLevel = 0; userProfile.HomeLocation = agentData.startpos; userProfile.HomeLocationX = agentData.startpos.X; userProfile.HomeLocationY = agentData.startpos.Y; userProfile.HomeLocationZ = agentData.startpos.Z; - userProfile.HomeLookAt = LLVector3.Zero; + userProfile.HomeLookAt = Vector3.Zero; userProfile.HomeLookAtX = userProfile.HomeLookAt.X; userProfile.HomeLookAtY = userProfile.HomeLookAt.Y; userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z; @@ -324,18 +324,18 @@ namespace OpenSim.Region.Environment.Modules.InterGrid userProfile.HomeRegionX = reg.RegionLocX; userProfile.HomeRegionY = reg.RegionLocY; userProfile.ID = agentData.AgentID; - userProfile.Image = LLUUID.Zero; + userProfile.Image = UUID.Zero; userProfile.LastLogin = Util.UnixTimeSinceEpoch(); - userProfile.Partner = LLUUID.Zero; + userProfile.Partner = UUID.Zero; userProfile.PasswordHash = "$1$"; userProfile.PasswordSalt = ""; - userProfile.RootInventoryFolderID = LLUUID.Zero; + userProfile.RootInventoryFolderID = UUID.Zero; userProfile.SurName = agentData.lastname; userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; userProfile.UserFlags = 0; userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; userProfile.WantDoMask = 0; - userProfile.WebLoginKey = LLUUID.Random(); + userProfile.WebLoginKey = UUID.Random(); // Do caps registration // get seed cap @@ -348,7 +348,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //string raCap = string.Empty; - LLUUID AvatarRezCapUUID = LLUUID.Random(); + UUID AvatarRezCapUUID = UUID.Random(); string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar"; // 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 LLSDMap requestMap = (LLSDMap)request; // take these values to start. There's a few more - LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); - LLUUID SessionID = requestMap["session_id"].AsUUID(); + UUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); + UUID SessionID = requestMap["session_id"].AsUUID(); int circuitcode = requestMap["circuit_code"].AsInteger(); LLSDArray Parameter = new LLSDArray(); if (requestMap.ContainsKey("parameter")) @@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid //int version = 1; int estateID = 1; int parentEstateID = 1; - LLUUID regionID = LLUUID.Zero; + UUID regionID = UUID.Zero; bool visibleToParent = true; for (int i = 0; i < Parameter.Count; i++) @@ -537,17 +537,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); string uuidString = PathArray[2]; m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString); - LLUUID userUUID = LLUUID.Zero; - if (Helpers.TryParse(uuidString, out userUUID)) + UUID userUUID = UUID.Zero; + if (UUID.TryParse(uuidString, out userUUID)) { - LLUUID RemoteID = uuidString; - LLUUID LocalID = RemoteID; + UUID RemoteID = uuidString; + UUID LocalID = RemoteID; // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds // would be done already.. but the client connects with the Aditi UUID // regardless over the UDP stack OGPState userState = GetOGPState(LocalID); - if (userState.agent_id != LLUUID.Zero) + if (userState.agent_id != UUID.Zero) { //LLSDMap outboundRequestMap = new LLSDMap(); LLSDMap inboundRequestMap = (LLSDMap)request; @@ -592,7 +592,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid int rrX = rezResponseMap["region_x"].AsInteger(); int rrY = rezResponseMap["region_y"].AsInteger(); m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); - LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); + UUID rrRID = rezResponseMap["region_id"].AsUUID(); string rrAccess = rezResponseMap["sim_access"].AsString(); @@ -802,12 +802,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid OGPState returnState = new OGPState(); returnState.first_name = ""; returnState.last_name = ""; - returnState.agent_id = LLUUID.Zero; - returnState.local_agent_id = LLUUID.Zero; - returnState.region_id = LLUUID.Zero; + returnState.agent_id = UUID.Zero; + returnState.local_agent_id = UUID.Zero; + returnState.region_id = UUID.Zero; returnState.circuit_code = 0; - returnState.secure_session_id = LLUUID.Zero; - returnState.session_id = LLUUID.Zero; + returnState.secure_session_id = UUID.Zero; + returnState.session_id = UUID.Zero; returnState.agent_access = true; returnState.god_level = 0; returnState.god_overide = false; @@ -827,7 +827,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid return returnState; } - private OGPState GetOGPState(LLUUID agentId) + private OGPState GetOGPState(UUID agentId) { lock (m_OGPState) { @@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid } } - public void DeleteOGPState(LLUUID agentId) + public void DeleteOGPState(UUID agentId) { lock (m_OGPState) { @@ -851,7 +851,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid } } - private void UpdateOGPState(LLUUID agentId, OGPState state) + private void UpdateOGPState(UUID agentId, OGPState state) { lock (m_OGPState) { @@ -866,7 +866,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid } } - public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) + public void ShutdownConnection(UUID avatarId, OpenGridProtocolModule mod) { Scene homeScene = GetRootScene(); ScenePresence avatar = null; @@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid public void ShutdownNoLogout() { - LLUUID avUUID = LLUUID.Zero; + UUID avUUID = UUID.Zero; if (avToBeKilled != null) { 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; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; -using libsecondlife; +using OpenMetaverse; +using OpenMetaverse.Imaging; using Nini.Config; -using OpenJPEGNet; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -40,12 +40,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture { public class DynamicTextureModule : IRegionModule, IDynamicTextureManager { - private Dictionary RegisteredScenes = new Dictionary(); + private Dictionary RegisteredScenes = new Dictionary(); private Dictionary RenderPlugins = new Dictionary(); - private Dictionary Updaters = new Dictionary(); + private Dictionary Updaters = new Dictionary(); #region IDynamicTextureManager Members @@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture /// /// /// - public void ReturnData(LLUUID id, byte[] data) + public void ReturnData(UUID id, byte[] data) { if (Updaters.ContainsKey(id)) { @@ -75,13 +75,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture } } - public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, + public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, int updateTimer) { return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); } - public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, + public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) { if (RenderPlugins.ContainsKey(contentType)) @@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture updater.ContentType = contentType; updater.Url = url; updater.UpdateTimer = updateTimer; - updater.UpdaterID = LLUUID.Random(); + updater.UpdaterID = UUID.Random(); updater.Params = extraParams; updater.BlendWithOldTexture = SetBlending; updater.FrontAlpha = AlphaValue; @@ -107,16 +107,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); return updater.UpdaterID; } - return LLUUID.Zero; + return UUID.Zero; } - public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, + public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, int updateTimer) { return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); } - public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, + public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) { if (RenderPlugins.ContainsKey(contentType)) @@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture updater.ContentType = contentType; updater.BodyData = data; updater.UpdateTimer = updateTimer; - updater.UpdaterID = LLUUID.Random(); + updater.UpdaterID = UUID.Random(); updater.Params = extraParams; updater.BlendWithOldTexture = SetBlending; updater.FrontAlpha = AlphaValue; @@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); return updater.UpdaterID; } - return LLUUID.Zero; + return UUID.Zero; } #endregion @@ -184,18 +184,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture public string BodyData; public string ContentType; public byte FrontAlpha = 255; - public LLUUID LastAssetID; + public UUID LastAssetID; public string Params; - public LLUUID PrimID; + public UUID PrimID; public bool SetNewFrontAlpha = false; - public LLUUID SimUUID; - public LLUUID UpdaterID; + public UUID SimUUID; + public UUID UpdaterID; public int UpdateTimer; public string Url; public DynamicTextureUpdater() { - LastAssetID = LLUUID.Zero; + LastAssetID = UUID.Zero; UpdateTimer = 0; BodyData = null; } @@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture if (BlendWithOldTexture) { - LLUUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; + UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); if (oldAsset != null) { @@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture // Create a new asset for user AssetBase asset = new AssetBase(); - asset.FullID = LLUUID.Random(); + asset.FullID = UUID.Random(); asset.Data = assetData; asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); asset.Type = 0; @@ -243,10 +243,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture LastAssetID = asset.FullID; // mostly keep the values from before - LLObject.TextureEntry tmptex = part.Shape.Textures; + Primitive.TextureEntry tmptex = part.Shape.Textures; // remove the old asset from the cache - LLUUID oldID = tmptex.DefaultTexture.TextureID; + UUID oldID = tmptex.DefaultTexture.TextureID; scene.AssetCache.ExpireAsset(oldID); tmptex.DefaultTexture.TextureID = asset.FullID; @@ -259,15 +259,27 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) { - Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); - Bitmap image2 = new Bitmap(OpenJPEG.DecodeToImage(backImage)); - if (setNewAlpha) + ManagedImage managedImage; + Image image; + + if (OpenJPEG.DecodeToImage(frontImage, out managedImage, out image)) { - SetAlpha(ref image1, newAlpha); + Bitmap image1 = new Bitmap(image); + + if (OpenJPEG.DecodeToImage(backImage, out managedImage, out image)) + { + Bitmap image2 = new Bitmap(image); + + if (setNewAlpha) + SetAlpha(ref image1, newAlpha); + + Bitmap joint = MergeBitMaps(image1, image2); + + return OpenJPEG.EncodeFromImage(joint, true); + } } - Bitmap joint = MergeBitMaps(image1, image2); - return OpenJPEG.EncodeFromImage(joint, true); + return null; } 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; using System.Reflection; using System.Collections.Generic; using System.Text.RegularExpressions; -using libsecondlife; +using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules } } - private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) + private SceneObjectPart findPrim(UUID objectID, out string ObjectRegionName) { lock (m_Scenes) { @@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules return null; } - private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) + private void resolveNamePositionRegionName(UUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) { string m_ObjectRegionName; SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); @@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules /// /// /// - public void SendEmail(LLUUID objectID, string address, string subject, string body) + public void SendEmail(UUID objectID, string address, string subject, string body) { //Check if address is empty if (address == string.Empty) @@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules //Creation EmailMessage EmailMessage emailMessage = new EmailMessage(); //From - emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); + emailMessage.FromAddress = new EmailAddress(objectID.ToString()+"@"+m_HostName); //To - Only One emailMessage.AddToAddress(new EmailAddress(address)); //Subject @@ -264,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules //Send Email Message emailMessage.Send(smtpServer); //Log - m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); + m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.ToString()); } catch (Exception e) { @@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules /// /// /// - public Email GetNextEmail(LLUUID objectID, string sender, string subject) + public Email GetNextEmail(UUID objectID, string sender, string subject) { return null; } 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; using System.Net; using System.Text; using System.Threading; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Servers; @@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest private string m_name = "HttpScriptRequests"; // - private Dictionary m_pendingRequests; + private Dictionary m_pendingRequests; private Scene m_scene; // private Queue rpcQueue = new Queue(); @@ -101,14 +101,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest #region IHttpRequests Members - public LLUUID MakeHttpRequest(string url, string parameters, string body) + public UUID MakeHttpRequest(string url, string parameters, string body) { - return LLUUID.Zero; + return UUID.Zero; } - public LLUUID StartHttpRequest(uint localID, LLUUID itemID, string url, List parameters, Dictionary headers, string body) + public UUID StartHttpRequest(uint localID, UUID itemID, string url, List parameters, Dictionary headers, string body) { - LLUUID reqID = LLUUID.Random(); + UUID reqID = UUID.Random(); HttpRequestClass htc = new HttpRequestClass(); // Partial implementation: support for parameter flags needed @@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest return reqID; } - public void StopHttpRequest(uint m_localID, LLUUID m_itemID) + public void StopHttpRequest(uint m_localID, UUID m_itemID) { if (m_pendingRequests != null) { @@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest { lock (HttpListLock) { - foreach (LLUUID luid in m_pendingRequests.Keys) + foreach (UUID luid in m_pendingRequests.Keys) { HttpRequestClass tmpReq; @@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest return null; } - public void RemoveCompletedRequest(LLUUID id) + public void RemoveCompletedRequest(UUID id) { lock (HttpListLock) { @@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest m_scene.RegisterModuleInterface(this); - m_pendingRequests = new Dictionary(); + m_pendingRequests = new Dictionary(); } public void PostInitialise() @@ -274,11 +274,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest public bool httpVerifyCert = true; // not implemented // Request info - public LLUUID itemID; + public UUID itemID; public uint localID; public DateTime next; public string outbound_body; - public LLUUID reqID; + public UUID reqID; public HttpWebRequest request; public string response_body; public List 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; using System.Drawing; using System.IO; using System.Net; -using libsecondlife; +using OpenMetaverse; +using OpenMetaverse.Imaging; using Nini.Config; -using OpenJPEGNet; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -70,13 +70,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL return null; } - public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) + public bool AsyncConvertUrl(UUID id, string url, string extraParams) { MakeHttpRequest(url, id); return true; } - public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) + public bool AsyncConvertData(UUID id, string bodyData, string extraParams) { return false; } @@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL #endregion - private void MakeHttpRequest(string url, LLUUID requestID) + private void MakeHttpRequest(string url, UUID requestID) { WebRequest request = HttpWebRequest.Create(url); RequestState state = new RequestState((HttpWebRequest) request, requestID); @@ -177,10 +177,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL public class RequestState { public HttpWebRequest Request = null; - public LLUUID RequestID = LLUUID.Zero; + public UUID RequestID = UUID.Zero; public int TimeOfRequest = 0; - public RequestState(HttpWebRequest request, LLUUID requestID) + public RequestState(HttpWebRequest request, UUID requestID) { Request = request; RequestID = requestID; @@ -189,4 +189,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL #endregion } -} \ No newline at end of file +} 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; using System.Globalization; using System.IO; using System.Net; -using libsecondlife; +using OpenMetaverse; +using OpenMetaverse.Imaging; using Nini.Config; -using OpenJPEGNet; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Image=System.Drawing.Image; //using Cairo; @@ -79,12 +78,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender return null; } - public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) + public bool AsyncConvertUrl(UUID id, string url, string extraParams) { return false; } - public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) + public bool AsyncConvertData(UUID id, string bodyData, string extraParams) { Draw(bodyData, id, extraParams); return true; @@ -127,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender #endregion - private void Draw(string data, LLUUID id, string extraParams) + private void Draw(string data, UUID id, string extraParams) { // TODO: this is a brutal hack. extraParams should actually be parsed reasonably. int size = 256; @@ -374,4 +373,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender return null; } } -} \ No newline at end of file +} 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 @@ using System; using System.Collections; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -66,7 +66,7 @@ using OpenSim.Region.Environment.Scenes; * * For LSL compliance, note the following: * (Tested again 1.21.1 on May 2, 2008) - * 1. 'id' has to be parsed into a LLUUID. None-UUID keys are + * 1. 'id' has to be parsed into a UUID. None-UUID keys are * to be replaced by the ZeroID key. (Well, TryParse does * that for us. * 2. Setting up an listen event from the same script, with the @@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm /// key to filter on (user given, could be totally faked) /// msg to filter on /// number of the scripts handle - public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) + public int Listen(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg) { return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg); } @@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm /// UUID of the script engine /// handle returned by Listen() /// temp. activate or deactivate the Listen() - public void ListenControl(LLUUID itemID, int handle, int active) + public void ListenControl(UUID itemID, int handle, int active) { if (active == 1) m_listenerManager.Activate(itemID, handle); @@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm /// /// UUID of the script engine /// handle returned by Listen() - public void ListenRemove(LLUUID itemID, int handle) + public void ListenRemove(UUID itemID, int handle) { m_listenerManager.Remove(itemID, handle); } @@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm /// (script engine) /// /// UUID of the script engine - public void DeleteListener(LLUUID itemID) + public void DeleteListener(UUID itemID) { m_listenerManager.DeleteListener(itemID); } @@ -210,11 +210,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm /// name of sender (object or avatar) /// key of sender (object or avatar) /// msg to sent - public void DeliverMessage(ChatTypeEnum type, int channel, string name, LLUUID id, string msg) + public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg) { SceneObjectPart source = null; ScenePresence avatar = null; - LLVector3 position; + Vector3 position; source = m_scene.GetSceneObjectPart(id); if (source != null) @@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm // Determine which listen event filters match the given set of arguments, this results // in a limited set of listeners, each belonging a host. If the host is in range, add them // to the pending queue. - foreach (ListenerInfo li in m_listenerManager.GetListeners(LLUUID.Zero, channel, name, id, msg)) + foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) { // Dont process if this message is from yourself! if (li.GetHostID().Equals(id)) @@ -331,12 +331,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm e.Message); } - public Object[] GetSerializationData(LLUUID itemID) + public Object[] GetSerializationData(UUID itemID) { return m_listenerManager.GetSerializationData(itemID); } - public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, + public void CreateFromData(uint localID, UUID itemID, UUID hostID, Object[] data) { m_listenerManager.AddFromData(localID, itemID, hostID, data); @@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm m_curlisteners = 0; } - public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) + public int AddListener(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg) { // do we already have a match on this particular filter event? List coll = GetListeners(itemID, channel, name, id, msg); @@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm return -1; } - public void Remove(LLUUID itemID, int handle) + public void Remove(UUID itemID, int handle) { lock (m_listeners) { @@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm } } - public void DeleteListener(LLUUID itemID) + public void DeleteListener(UUID itemID) { List emptyChannels = new List(); List removedListeners = new List(); @@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm } } - public void Activate(LLUUID itemID, int handle) + public void Activate(UUID itemID, int handle) { lock (m_listeners) { @@ -474,7 +474,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm } } - public void Dectivate(LLUUID itemID, int handle) + public void Dectivate(UUID itemID, int handle) { lock (m_listeners) { @@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm } // non-locked access, since its always called in the context of the lock - private int GetNewHandle(LLUUID itemID) + private int GetNewHandle(UUID itemID) { List handles = new List(); @@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm // Theres probably a more clever and efficient way to // do this, maybe with regex. // PM2008: Ha, one could even be smart and define a specialized Enumerator. - public List GetListeners(LLUUID itemID, int channel, string name, LLUUID id, string msg) + public List GetListeners(UUID itemID, int channel, string name, UUID id, string msg) { List collection = new List(); @@ -539,7 +539,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm { continue; } - if (!itemID.Equals(LLUUID.Zero) && !li.GetItemID().Equals(itemID)) + if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID)) { continue; } @@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm { continue; } - if (!li.GetID().Equals(LLUUID.Zero) && !li.GetID().Equals(id)) + if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id)) { continue; } @@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm return collection; } - public Object[] GetSerializationData(LLUUID itemID) + public Object[] GetSerializationData(UUID itemID) { List data = new List(); @@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm return (Object[])data.ToArray(); } - public void AddFromData(uint localID, LLUUID itemID, LLUUID hostID, + public void AddFromData(uint localID, UUID itemID, UUID hostID, Object[] data) { int idx = 0; @@ -603,25 +603,25 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm private bool m_active; // Listener is active or not private int m_handle; // Assigned handle of this listener private uint m_localID; // Local ID from script engine - private LLUUID m_itemID; // ID of the host script engine - private LLUUID m_hostID; // ID of the host/scene part + private UUID m_itemID; // ID of the host script engine + private UUID m_hostID; // ID of the host/scene part private int m_channel; // Channel - private LLUUID m_id; // ID to filter messages from + private UUID m_id; // ID to filter messages from private string m_name; // Object name to filter messages from private string m_message; // The message - public ListenerInfo(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) + public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message) { Initialise(handle, localID, ItemID, hostID, channel, name, id, message); } - public ListenerInfo(ListenerInfo li, string name, LLUUID id, string message) + public ListenerInfo(ListenerInfo li, string name, UUID id, string message) { Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); } - private void Initialise(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, - LLUUID id, string message) + private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, + UUID id, string message) { m_active = true; m_handle = handle; @@ -648,22 +648,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm return data; } - public static ListenerInfo FromData(uint localID, LLUUID ItemID, LLUUID hostID, Object[] data) + public static ListenerInfo FromData(uint localID, UUID ItemID, UUID hostID, Object[] data) { ListenerInfo linfo = new ListenerInfo((int)data[1], localID, ItemID, hostID, (int)data[2], (string)data[3], - (LLUUID)data[4], (string)data[5]); + (UUID)data[4], (string)data[5]); linfo.m_active=(bool)data[0]; return linfo; } - public LLUUID GetItemID() + public UUID GetItemID() { return m_itemID; } - public LLUUID GetHostID() + public UUID GetHostID() { return m_hostID; } @@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm m_active = true; } - public LLUUID GetID() + public UUID GetID() { return m_id; } 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; using System.Net; using System.Reflection; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using Nwc.XmlRpc; @@ -82,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC private string m_name = "XMLRPCModule"; // - private Dictionary m_openChannels; - private Dictionary m_pendingSRDResponses; + private Dictionary m_openChannels; + private Dictionary m_pendingSRDResponses; private int m_remoteDataPort = 0; - private Dictionary m_rpcPending; - private Dictionary m_rpcPendingResponses; + private Dictionary m_rpcPending; + private Dictionary m_rpcPendingResponses; private List m_scenes = new List(); private int RemoteReplyScriptTimeout = 9000; private int RemoteReplyScriptWait = 300; @@ -102,10 +102,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC // get called only one time (or we lose any open channels) if (null == m_openChannels) { - m_openChannels = new Dictionary(); - m_rpcPending = new Dictionary(); - m_rpcPendingResponses = new Dictionary(); - m_pendingSRDResponses = new Dictionary(); + m_openChannels = new Dictionary(); + m_rpcPending = new Dictionary(); + m_rpcPendingResponses = new Dictionary(); + m_pendingSRDResponses = new Dictionary(); try { @@ -164,11 +164,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC /********************************************** * OpenXMLRPCChannel * - * Generate a LLUUID channel key and add it and + * Generate a UUID channel key and add it and * the prim id to dictionary * * A custom channel key can be proposed. - * Otherwise, passing LLUUID.Zero will generate + * Otherwise, passing UUID.Zero will generate * and return a random channel * * First check if there is a channel assigned for @@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC * * ********************************************/ - public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID, LLUUID channelID) + public UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID) { - LLUUID newChannel = LLUUID.Zero; + UUID newChannel = UUID.Zero; // This should no longer happen, but the check is reasonable anyway if (null == m_openChannels) @@ -201,9 +201,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC } } - if (newChannel == LLUUID.Zero) + if (newChannel == UUID.Zero) { - newChannel = (channelID == LLUUID.Zero) ? LLUUID.Random() : channelID; + newChannel = (channelID == UUID.Zero) ? UUID.Random() : channelID; RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel); lock (XMLRPCListLock) { @@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC // Delete channels based on itemID // for when a script is deleted - public void DeleteChannels(LLUUID itemID) + public void DeleteChannels(UUID itemID) { if (m_openChannels != null) { @@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC IEnumerator tmpEnumerator = tmp.GetEnumerator(); while (tmpEnumerator.MoveNext()) - m_openChannels.Remove((LLUUID) tmpEnumerator.Current); + m_openChannels.Remove((UUID) tmpEnumerator.Current); } } } @@ -248,12 +248,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC public void RemoteDataReply(string channel, string message_id, string sdata, int idata) { - LLUUID message_key = new LLUUID(message_id); - LLUUID channel_key = new LLUUID(channel); + UUID message_key = new UUID(message_id); + UUID channel_key = new UUID(channel); RPCRequestInfo rpcInfo = null; - if (message_key == LLUUID.Zero) + if (message_key == UUID.Zero) { foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) if (oneRpcInfo.GetChannelKey() == channel_key) @@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC * *********************************************/ - public void CloseXMLRPCChannel(LLUUID channelKey) + public void CloseXMLRPCChannel(UUID channelKey) { if (m_openChannels.ContainsKey(channelKey)) m_openChannels.Remove(channelKey); @@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC { lock (XMLRPCListLock) { - foreach (LLUUID luid in m_rpcPending.Keys) + foreach (UUID luid in m_rpcPending.Keys) { RPCRequestInfo tmpReq; @@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC return null; } - public void RemoveCompletedRequest(LLUUID id) + public void RemoveCompletedRequest(UUID id) { lock (XMLRPCListLock) { @@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC } } - public LLUUID SendRemoteData(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) + public UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata) { SendRemoteDataRequest req = new SendRemoteDataRequest( localID, itemID, channel, dest, idata, sdata @@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC { lock (XMLRPCListLock) { - foreach (LLUUID luid in m_pendingSRDResponses.Keys) + foreach (UUID luid in m_pendingSRDResponses.Keys) { SendRemoteDataRequest tmpReq; @@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC return null; } - public void RemoveCompletedSRDRequest(LLUUID id) + public void RemoveCompletedSRDRequest(UUID id) { lock (XMLRPCListLock) { @@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC } } - public void CancelSRDRequests(LLUUID itemID) + public void CancelSRDRequests(UUID itemID) { if (m_pendingSRDResponses != null) { @@ -408,7 +408,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC if (GoodXML) { - LLUUID channel = new LLUUID((string) requestData["Channel"]); + UUID channel = new UUID((string) requestData["Channel"]); RPCChannelInfo rpcChanInfo; if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) { @@ -462,24 +462,24 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC public class RPCRequestInfo { - private LLUUID m_ChannelKey; + private UUID m_ChannelKey; private string m_IntVal; - private LLUUID m_ItemID; + private UUID m_ItemID; private uint m_localID; - private LLUUID m_MessageID; + private UUID m_MessageID; private bool m_processed; private int m_respInt; private string m_respStr; private string m_StrVal; - public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal) + public RPCRequestInfo(uint localID, UUID itemID, UUID channelKey, string strVal, string intVal) { m_localID = localID; m_StrVal = strVal; m_IntVal = intVal; m_ItemID = itemID; m_ChannelKey = channelKey; - m_MessageID = LLUUID.Random(); + m_MessageID = UUID.Random(); m_processed = false; m_respStr = String.Empty; m_respInt = 0; @@ -490,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC return m_processed; } - public LLUUID GetChannelKey() + public UUID GetChannelKey() { return m_ChannelKey; } @@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC return m_localID; } - public LLUUID GetItemID() + public UUID GetItemID() { return m_ItemID; } @@ -540,7 +540,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC return int.Parse(m_IntVal); } - public LLUUID GetMessageID() + public UUID GetMessageID() { return m_MessageID; } @@ -548,23 +548,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC public class RPCChannelInfo { - private LLUUID m_ChannelKey; - private LLUUID m_itemID; + private UUID m_ChannelKey; + private UUID m_itemID; private uint m_localID; - public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID) + public RPCChannelInfo(uint localID, UUID itemID, UUID channelID) { m_ChannelKey = channelID; m_localID = localID; m_itemID = itemID; } - public LLUUID GetItemID() + public UUID GetItemID() { return m_itemID; } - public LLUUID GetChannelID() + public UUID GetChannelID() { return m_ChannelKey; } @@ -583,15 +583,15 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC public bool finished; private Thread httpThread; public int idata; - public LLUUID m_itemID; + public UUID m_itemID; public uint m_localID; - public LLUUID reqID; + public UUID reqID; public XmlRpcRequest request; public int response_idata; public string response_sdata; public string sdata; - public SendRemoteDataRequest(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) + public SendRemoteDataRequest(uint localID, UUID itemID, string channel, string dest, int idata, string sdata) { this.channel = channel; destURL = dest; @@ -600,10 +600,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC m_itemID = itemID; m_localID = localID; - reqID = LLUUID.Random(); + reqID = UUID.Random(); } - public LLUUID process() + public UUID process() { httpThread = new Thread(SendRequest); httpThread.Name = "HttpRequestThread"; @@ -625,12 +625,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC { Hashtable param = new Hashtable(); - // Check if channel is an LLUUID + // Check if channel is an UUID // if not, use as method name - LLUUID parseUID; + UUID parseUID; string mName = "llRemoteData"; if ((channel != null) && (channel != "")) - if (!LLUUID.TryParse(channel, out parseUID)) + if (!UUID.TryParse(channel, out parseUID)) mName = channel; else param["Channel"] = channel; @@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC } } - public LLUUID GetReqID() + public UUID GetReqID() { return reqID; } 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 @@ */ using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; namespace OpenSim.Region.Environment.Modules.World.Archiver { @@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// The location of the archive control file /// - public static readonly string CONTROL_FILE_PATH = "archive.xml"; + public static readonly string CONTROL_FILE_PATH = "archive.Xml"; /// /// Path for the assets held in an archive @@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Path for the assets metadata file /// - //public static readonly string ASSETS_METADATA_PATH = "assets.xml"; + //public static readonly string ASSETS_METADATA_PATH = "assets.Xml"; /// /// Path for the prims file @@ -88,11 +88,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this -// disable warning: we know Script is obsolete, but need to support it -// anyhow -#pragma warning disable 0612 - ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Script] = ASSET_EXTENSION_SEPARATOR + "script.txt"; // Not sure if we'll ever see this -#pragma warning restore 0612 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg"; @@ -116,11 +111,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder; -// disable warning: we know Script is obsolete, but need to support it -// anyhow -#pragma warning disable 0612 - EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.txt"] = (sbyte)AssetType.Script; -#pragma warning restore 0612 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder; 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; using OpenSim.Region.Environment.Modules.World.Terrain; using OpenSim.Framework.Communications.Cache; using System; -using Axiom.Math; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using log4net; namespace OpenSim.Region.Environment.Modules.World.Archiver @@ -57,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Used to cache lookups for valid uuids. /// - private IDictionary m_validUserUuids = new Dictionary(); + private IDictionary m_validUserUuids = new Dictionary(); public ArchiveReadRequest(Scene scene, string loadPath) { @@ -137,8 +136,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver // Try to retain the original creator/owner/lastowner if their uuid is present on this grid // otherwise, use the master avatar uuid instead - LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; foreach (SceneObjectPart part in sceneObject.Children.Values) { @@ -184,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// - private bool resolveUserUuid(LLUUID uuid) + private bool resolveUserUuid(UUID uuid) { if (!m_validUserUuids.ContainsKey(uuid)) { @@ -209,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// true if asset was successfully loaded, false otherwise private bool LoadAsset(string assetPath, byte[] data) { - // Right now we're nastily obtaining the lluuid from the filename + // Right now we're nastily obtaining the UUID from the filename string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); @@ -231,7 +230,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); - AssetBase asset = new AssetBase(new LLUUID(uuid), String.Empty); + AssetBase asset = new AssetBase(new UUID(uuid), String.Empty); asset.Type = assetType; asset.Data = data; 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; using System.IO.Compression; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Method called when all the necessary assets for an archive request have been received. /// - public delegate void AssetsRequestCallback(IDictionary assetsFound, ICollection assetsNotFoundUuids); + public delegate void AssetsRequestCallback(IDictionary assetsFound, ICollection assetsNotFoundUuids); /// /// 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 m_savePath = savePath; } - protected internal void ReceivedAllAssets(IDictionary assetsFound, ICollection assetsNotFoundUuids) + protected internal void ReceivedAllAssets(IDictionary assetsFound, ICollection assetsNotFoundUuids) { - foreach (LLUUID uuid in assetsNotFoundUuids) + foreach (UUID uuid in assetsNotFoundUuids) { m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); } @@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver { //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); - LLVector3 position = sceneObject.AbsolutePosition; + Vector3 position = sceneObject.AbsolutePosition; string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); string filename = string.Format( - "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.xml", + "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.Xml", ArchiveConstants.OBJECTS_PATH, sceneObject.Name, Math.Round(position.X), Math.Round(position.Y), Math.Round(position.Z), 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; //using System.Text; using System.Text.RegularExpressions; using System.Threading; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; @@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// The callback made when we request the asset for an object from the asset service. /// - public void AssetRequestCallback(LLUUID assetID, AssetBase asset) + public void AssetRequestCallback(UUID assetID, AssetBase asset) { lock (this) { @@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// - protected AssetBase GetAsset(LLUUID uuid) + protected AssetBase GetAsset(UUID uuid) { m_waitingForObjectAsset = true; m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true); @@ -128,20 +128,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// Dictionary in which to record the references - protected void GetScriptAssetUuids(LLUUID scriptUuid, IDictionary assetUuids) + protected void GetScriptAssetUuids(UUID scriptUuid, IDictionary assetUuids) { AssetBase scriptAsset = GetAsset(scriptUuid); if (null != scriptAsset) { - string script = Helpers.FieldToUTF8String(scriptAsset.Data); + string script = Utils.BytesToString(scriptAsset.Data); //m_log.DebugFormat("[ARCHIVER]: Script {0}", script); MatchCollection uuidMatches = m_uuidRegex.Matches(script); //m_log.DebugFormat("[ARCHIVER]: Found {0} matches in script", uuidMatches.Count); foreach (Match uuidMatch in uuidMatches) { - LLUUID uuid = new LLUUID(uuidMatch.Value); + UUID uuid = new UUID(uuidMatch.Value); //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid); assetUuids[uuid] = 1; } @@ -153,17 +153,17 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// Dictionary in which to record the references - protected void GetWearableAssetUuids(LLUUID wearableAssetUuid, IDictionary assetUuids) + protected void GetWearableAssetUuids(UUID wearableAssetUuid, IDictionary assetUuids) { AssetBase assetBase = GetAsset(wearableAssetUuid); //m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data)); - AssetWearable wearableAsset = new AssetBodypart(assetBase.Data); + AssetWearable wearableAsset = new AssetBodypart(wearableAssetUuid, assetBase.Data); wearableAsset.Decode(); //m_log.DebugFormat( // "[ARCHIVER]: Wearable asset {0} references {1} assets", wearableAssetUuid, wearableAsset.Textures.Count); - foreach (LLUUID uuid in wearableAsset.Textures.Values) + foreach (UUID uuid in wearableAsset.Textures.Values) { //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid); assetUuids[uuid] = 1; @@ -176,14 +176,14 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// within this object). /// /// - /// - protected void GetSceneObjectAssetUuids(LLUUID sceneObjectUuid, IDictionary assetUuids) + /// + protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary assetUuids) { AssetBase objectAsset = GetAsset(sceneObjectUuid); if (null != objectAsset) { - string xml = Helpers.FieldToUTF8String(objectAsset.Data); + string xml = Utils.BytesToString(objectAsset.Data); SceneObjectGroup sog = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, xml); GetSceneObjectAssetUuids(sog, assetUuids); } @@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// - protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary assetUuids) + protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary assetUuids) { m_log.DebugFormat( "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); @@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver try { - LLObject.TextureEntry textureEntry = part.Shape.Textures; + Primitive.TextureEntry textureEntry = part.Shape.Textures; // Get the prim's default texture. This will be used for faces which don't have their own texture assetUuids[textureEntry.DefaultTexture.TextureID] = 1; @@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver // XXX: Not a great way to iterate through face textures, but there's no // other method available to tell how many faces there actually are //int i = 0; - foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures) + foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures) { if (texture != null) { @@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver public void ArchiveRegion() { - Dictionary assetUuids = new Dictionary(); + Dictionary assetUuids = new Dictionary(); List entities = m_scene.GetEntities(); List sceneObjects = new List(); 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; using OpenSim.Region.Environment.Scenes; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; 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; using System.IO; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; @@ -45,9 +45,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Archive assets /// - protected IDictionary m_assets; + protected IDictionary m_assets; - public AssetsArchiver(IDictionary assets) + public AssetsArchiver(IDictionary assets) { m_assets = assets; } @@ -76,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver xtw.WriteStartElement("assets"); - foreach (LLUUID uuid in m_assets.Keys) + foreach (UUID uuid in m_assets.Keys) { AssetBase asset = m_assets[uuid]; @@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver xtw.WriteEndDocument(); - archive.AddFile("assets.xml", sw.ToString()); + archive.AddFile("assets.Xml", sw.ToString()); } /// @@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar //archive.AddDir("assets"); - foreach (LLUUID uuid in m_assets.Keys) + foreach (UUID uuid in m_assets.Keys) { AssetBase asset = m_assets[uuid]; 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; using System.IO; using System.Reflection; using System.Xml; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; @@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// protected void ResolveAssetData(string assetPath, byte[] data) { - // Right now we're nastily obtaining the lluuid from the filename + // Right now we're nastily obtaining the UUID from the filename string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); if (m_metadata.ContainsKey(filename)) @@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); - AssetBase asset = new AssetBase(new LLUUID(filename), metadata.Name); + AssetBase asset = new AssetBase(new UUID(filename), metadata.Name); asset.Description = metadata.Description; asset.Type = metadata.AssetType; 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; using System.Collections.Generic; //using System.Reflection; using System.Threading; -using libsecondlife; +using OpenMetaverse; //using log4net; namespace OpenSim.Region.Environment.Modules.World.Archiver @@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// uuids to request /// - protected ICollection m_uuids; + protected ICollection m_uuids; /// /// Callback used when all the assets requested have been received. @@ -57,12 +57,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Assets retrieved in this request /// - protected Dictionary m_assets = new Dictionary(); + protected Dictionary m_assets = new Dictionary(); /// /// Maintain a list of assets that could not be found. This will be passed back to the requester. /// - protected List m_notFoundAssetUuids = new List(); + protected List m_notFoundAssetUuids = new List(); /// /// 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 /// protected AssetCache m_assetCache; - protected internal AssetsRequest(ICollection uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) + protected internal AssetsRequest(ICollection uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) { m_uuids = uuids; m_assetsRequestCallback = assetsRequestCallback; @@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver if (m_repliesRequired == 0) m_assetsRequestCallback(m_assets, m_notFoundAssetUuids); - foreach (LLUUID uuid in m_uuids) + foreach (UUID uuid in m_uuids) { m_assetCache.GetAsset(uuid, AssetRequestCallback, true); } @@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// /// - public void AssetRequestCallback(LLUUID assetID, AssetBase asset) + public void AssetRequestCallback(UUID assetID, AssetBase asset) { if (asset != null) 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; using System.Threading; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -41,15 +41,15 @@ namespace OpenSim.Region.Environment.Modules.World.Estate { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private delegate void LookupUUIDS(List uuidLst); + private delegate void LookupUUIDS(List uuidLst); private Scene m_scene; #region Packet Data Responders - private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) + private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice) { - //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) + //SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant) uint sun = 0; if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) @@ -119,9 +119,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate sendRegionInfoPacketToAll(); } - public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, LLUUID texture) + public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture) { - if (texture == LLUUID.Zero) + if(texture == UUID.Zero) return; switch (corner) @@ -202,13 +202,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate m_scene.Restart(timeInSeconds); } - private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, LLUUID estateCovenantID) + private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) { m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; m_scene.RegionInfo.RegionSettings.Save(); } - private void handleEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user) + private void handleEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user) { // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. @@ -338,17 +338,17 @@ namespace OpenSim.Region.Environment.Modules.World.Estate } } - private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) + private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) { m_scene.SendRegionMessageFromEstateTools(senderID, sessionID, senderName, message); } - private void SendEstateBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) + private void SendEstateBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) { m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message); } - private void handleEstateDebugRegionRequest(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics) + private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics) { if (physics) m_scene.RegionInfo.RegionSettings.DisablePhysics = true; @@ -371,9 +371,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); } - private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, LLUUID invoice, LLUUID senderID, LLUUID prey) + private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey) { - if (prey != LLUUID.Zero) + if (prey != UUID.Zero) { ScenePresence s = m_scene.GetScenePresence(prey); if (s != null) @@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) { Dictionary SceneData = new Dictionary(); - List uuidNameLookupList = new List(); + List uuidNameLookupList = new List(); if (reportType == 1) { @@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; icon.EndInvoke(iar); } - private void LookupUUID(List uuidLst) + private void LookupUUID(List uuidLst) { LookupUUIDS d = LookupUUIDsAsync; @@ -499,9 +499,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate LookupUUIDSCompleted, d); } - private void LookupUUIDsAsync(List uuidLst) + private void LookupUUIDsAsync(List uuidLst) { - LLUUID[] uuidarr = new LLUUID[0]; + UUID[] uuidarr = new UUID[0]; lock (uuidLst) { @@ -533,7 +533,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate { RegionHandshakeArgs args = new RegionHandshakeArgs(); bool estatemanager = false; - LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers; + UUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers; for (int i = 0; i < EstateManagers.Length; i++) { if (EstateManagers[i] == remoteClient.AgentId) @@ -559,14 +559,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate args.regionFlags = GetRegionFlags(); args.regionName = m_scene.RegionInfo.RegionName; - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; else args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; - args.terrainBase0 = LLUUID.Zero; - args.terrainBase1 = LLUUID.Zero; - args.terrainBase2 = LLUUID.Zero; - args.terrainBase3 = LLUUID.Zero; + args.terrainBase0 = UUID.Zero; + args.terrainBase1 = UUID.Zero; + args.terrainBase2 = UUID.Zero; + args.terrainBase3 = UUID.Zero; args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1; args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2; args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3; @@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate ); } - public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) + public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2) { if (parms2 == 0) { @@ -812,14 +812,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate return (uint)flags; } - public bool IsManager(LLUUID avatarID) + public bool IsManager(UUID avatarID) { if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) return true; if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) return true; - List ems = new List(m_scene.RegionInfo.EstateSettings.EstateManagers); + List ems = new List(m_scene.RegionInfo.EstateSettings.EstateManagers); if (ems.Contains(avatarID)) return true; 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 @@ using System; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { return m_landManagementModule.GetLandObject(x_float, y_float); } - ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); + ILandObject obj = new LandObject(UUID.Zero, false, m_scene); obj.landData.Name = "NO LAND"; return obj; } @@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land { return m_landManagementModule.GetLandObject(x, y); } - ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); + ILandObject obj = new LandObject(UUID.Zero, false, m_scene); obj.landData.Name = "NO LAND"; return obj; } - public List ParcelsNearPoint(LLVector3 position) + public List ParcelsNearPoint(Vector3 position) { if (m_landManagementModule != null) { @@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land m_landManagementModule.UpdateLandObject(localID, data); } } - public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) + public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) { if (m_landManagementModule != null) { @@ -168,4 +168,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land #endregion } -} \ No newline at end of file +} 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 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -29,7 +29,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Region.Environment.Interfaces; @@ -38,7 +38,6 @@ using OpenSim.Framework; using OpenSim.Framework.Servers; using OpenSim.Framework.Communications.Capabilities; using OpenSim.Region.Physics.Manager; -using Axiom.Math; using Caps = OpenSim.Framework.Communications.Capabilities.Caps; namespace OpenSim.Region.Environment.Modules.World.Land @@ -165,10 +164,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; landIDList.Initialize(); - ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); + ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; else fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; @@ -176,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land AddLandObject(fullSimParcel); } - public List ParcelsNearPoint(LLVector3 position) + public List ParcelsNearPoint(Vector3 position) { List parcelsNear = new List(); for (int x = -4; x <= 4; x += 4) @@ -205,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers"); avatar.PhysicsActor.Position = - new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y, - avatar.lastKnownAllowedPosition.z); + new PhysicsVector(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y, + avatar.lastKnownAllowedPosition.Z); avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0); } else @@ -216,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID) + public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID) { if (m_scene.RegionInfo.RegionID == regionID) { @@ -353,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } - public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, + public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client) { if (landList.ContainsKey(landLocalID)) @@ -362,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, + public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID, List entries, IClientAPI remote_client) { @@ -385,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land /// public ILandObject CreateBaseLand() { - return new LandObject(LLUUID.Zero, false, m_scene); + return new LandObject(UUID.Zero, false, m_scene); } /// @@ -529,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void AddPrimToLandPrimCounts(SceneObjectGroup obj) { - LLVector3 position = obj.AbsolutePosition; + Vector3 position = obj.AbsolutePosition; ILandObject landUnderPrim = GetLandObject(position.X, position.Y); if (landUnderPrim != null) { @@ -548,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void FinalizeLandPrimCountUpdate() { //Get Simwide prim count for owner - Dictionary> landOwnersAndParcels = new Dictionary>(); + Dictionary> landOwnersAndParcels = new Dictionary>(); foreach (LandObject p in landList.Values) { if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) @@ -563,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - foreach (LLUUID owner in landOwnersAndParcels.Keys) + foreach (UUID owner in landOwnersAndParcels.Keys) { int simArea = 0; int simPrims = 0; @@ -617,9 +616,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land /// South Point /// East Point /// North Point - /// LLUUID of user who is trying to subdivide + /// UUID of user who is trying to subdivide /// Returns true if successful - private void subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) + private void subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { //First, lets loop through the points and make sure they are all in the same peice of land //Get the land object at start @@ -658,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) ILandObject newLand = startLandObject.Copy(); newLand.landData.Name = "Subdivision of " + newLand.landData.Name; - newLand.landData.GlobalID = LLUUID.Random(); + newLand.landData.GlobalID = UUID.Random(); newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); @@ -683,9 +682,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land /// y value in first piece of land /// x value in second peice of land /// y value in second peice of land - /// LLUUID of the avatar trying to join the land objects + /// UUID of the avatar trying to join the land objects /// Returns true if successful - private void join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) + private void join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) { end_x -= 4; end_y -= 4; @@ -770,13 +769,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); } else if (currentParcelBlock.landData.SalePrice > 0 && - (currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero || + (currentParcelBlock.landData.AuthBuyerID == UUID.Zero || currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) { //Sale Flag tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); } - else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero) + else if (currentParcelBlock.landData.OwnerID == UUID.Zero) { //Public Flag tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); @@ -914,7 +913,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) { - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; else landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; @@ -930,7 +929,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) { - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; else landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; @@ -979,13 +978,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land } if (lob != null) { - LLUUID AuthorizedID = lob.landData.AuthBuyerID; + UUID AuthorizedID = lob.landData.AuthBuyerID; int saleprice = lob.landData.SalePrice; - LLUUID pOwnerID = lob.landData.OwnerID; + UUID pOwnerID = lob.landData.OwnerID; bool landforsale = ((lob.landData.Flags & (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); - if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) + if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) { lock (e) { @@ -1027,7 +1026,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land AddLandObject(new_land); } - public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) + public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) { ILandObject selectedParcel = null; lock (landList) @@ -1065,7 +1064,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land #region CAPS handler - private void OnRegisterCaps(LLUUID agentID, Caps caps) + private void OnRegisterCaps(UUID agentID, Caps caps) { string capsBase = "/CAPS/" + caps.CapsObjectPath; caps.RegisterHandler("RemoteParcelRequest", @@ -1080,7 +1079,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x - // and y coordinate (each 8 bit), encoded in a LLUUID (128 bit). + // and y coordinate (each 8 bit), encoded in a UUID (128 bit). // // Request format: // @@ -1095,16 +1094,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // // - private string RemoteParcelRequest(string request, string path, string param, LLUUID agentID, Caps caps) + private string RemoteParcelRequest(string request, string path, string param, UUID agentID, Caps caps) { - LLUUID parcelID = LLUUID.Zero; + UUID parcelID = UUID.Zero; try { Hashtable hash = new Hashtable(); - hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); + hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) { - LLUUID regionID = (LLUUID)hash["region_id"]; + UUID regionID = (UUID)hash["region_id"]; ArrayList list = (ArrayList)hash["location"]; uint x = (uint)(double)list[0]; uint y = (uint)(double)list[1]; @@ -1148,9 +1147,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land #endregion - private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) + private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID) { - if (parcelID == LLUUID.Zero) + if (parcelID == UUID.Zero) return; // 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 @@ using System; using System.Collections.Generic; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land set { m_landData = value; } } - public LLUUID regionUUID + public UUID regionUUID { get { return m_scene.RegionInfo.RegionID; } } #region Constructors - public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) + public LandObject(UUID owner_id, bool is_group_owned, Scene scene) { m_scene = scene; landData.OwnerID = owner_id; @@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) + public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) { LandData newData = landData.Copy(); newData.OwnerID = avatarID; @@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land newData.ClaimDate = Util.UnixTimeSinceEpoch(); newData.ClaimPrice = claimprice; newData.SalePrice = 0; - newData.AuthBuyerID = LLUUID.Zero; + newData.AuthBuyerID = UUID.Zero; newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); sendLandUpdateToAvatarsOverMe(); } - public bool isEitherBannedOrRestricted(LLUUID avatar) + public bool isEitherBannedOrRestricted(UUID avatar) { if (isBannedFromLand(avatar)) { @@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land return false; } - public bool isBannedFromLand(LLUUID avatar) + public bool isBannedFromLand(UUID avatar) { if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) { @@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land return false; } - public bool isRestrictedFromLand(LLUUID avatar) + public bool isRestrictedFromLand(UUID avatar) { if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) { @@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land #region AccessList Functions - public List createAccessListArrayByFlag(ParcelManager.AccessList flag) + public List createAccessListArrayByFlag(ParcelManager.AccessList flag) { - List list = new List(); + List list = new List(); foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) { if (entry.Flags == flag) @@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land } if (list.Count == 0) { - list.Add(LLUUID.Zero); + list.Add(UUID.Zero); } return list; } - public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, + public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client) { if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) { - List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); + List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); } if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) { - List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); + List avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); } } @@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { LandData newData = landData.Copy(); - if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero) + if (entries.Count == 1 && entries[0].AgentID == UUID.Zero) { entries.Clear(); } @@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (ty > 255) ty = 255; landData.AABBMin = - new LLVector3((float) (min_x * 4), (float) (min_y * 4), + new Vector3((float) (min_x * 4), (float) (min_y * 4), (float) m_scene.Heightmap[tx, ty]); tx = max_x * 4; @@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land if (ty > 255) ty = 255; landData.AABBMax = - new LLVector3((float) (max_x * 4), (float) (max_y * 4), + new Vector3((float) (max_x * 4), (float) (max_y * 4), (float) m_scene.Heightmap[tx, ty]); landData.Area = tempArea; } @@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) { - Dictionary primCount = new Dictionary(); + Dictionary primCount = new Dictionary(); lock (primsOverMe) { @@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land } } - public Dictionary getLandObjectOwners() + public Dictionary getLandObjectOwners() { - Dictionary ownersAndCount = new Dictionary(); + Dictionary ownersAndCount = new Dictionary(); lock (primsOverMe) { try @@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land m_scene.returnObjects(objs, obj.OwnerID); } - public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client) + public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client) { List objlist = new List(); for (int i = 0; i < owners.Length; i++) @@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void addPrimToCount(SceneObjectGroup obj) { - LLUUID prim_owner = obj.OwnerID; + UUID prim_owner = obj.OwnerID; int prim_count = obj.PrimCount; if (obj.IsSelected) @@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { if (primsOverMe.Contains(obj)) { - LLUUID prim_owner = obj.OwnerID; + UUID prim_owner = obj.OwnerID; int prim_count = obj.PrimCount; 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 @@ using System; using System.Collections.Generic; using System.Net; -using libsecondlife; -using libsecondlife.Packets; +using OpenMetaverse; +using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; @@ -39,12 +39,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { private readonly string m_firstname; private readonly string m_lastname; - private readonly LLVector3 m_startPos; - private readonly LLUUID m_uuid = LLUUID.Random(); + private readonly Vector3 m_startPos; + private readonly UUID m_uuid = UUID.Random(); private readonly Scene m_scene; - public NPCAvatar(string firstname, string lastname, LLVector3 position, Scene scene) + public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene) { m_firstname = firstname; m_lastname = lastname; @@ -77,34 +77,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC SendOnChatFromViewer(message, ChatTypeEnum.Broadcast); } - public void GiveMoney(LLUUID target, int amount) + public void GiveMoney(UUID target, int amount) { OnMoneyTransferRequest(m_uuid, target, amount, 1, "Payment"); } - public void InstantMessage(LLUUID target, string message) + public void InstantMessage(UUID target, string message) { - OnInstantMessage(this, m_uuid, SessionId, target, LLUUID.Combine(m_uuid, target), + OnInstantMessage(this, m_uuid, SessionId, target, UUID.Combine(m_uuid, target), (uint) Util.UnixTimeSinceEpoch(), Name, message, 0, false, 0, 0, Position, m_scene.RegionInfo.RegionID, new byte[0]); } - public void SendAgentOffline(LLUUID[] agentIDs) + public void SendAgentOffline(UUID[] agentIDs) { } - public void SendAgentOnline(LLUUID[] agentIDs) + public void SendAgentOnline(UUID[] agentIDs) { } - public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, - LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, + Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { } - public void SendAdminResponse(LLUUID Token, uint AdminLevel) + public void SendAdminResponse(UUID Token, uint AdminLevel) { } @@ -114,12 +114,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC } - public LLUUID GetDefaultAnimation(string name) + public UUID GetDefaultAnimation(string name) { - return LLUUID.Zero; + return UUID.Zero; } - public LLVector3 Position + public Vector3 Position { get { return m_scene.Entities[m_uuid].AbsolutePosition; } set { m_scene.Entities[m_uuid].AbsolutePosition = value; } @@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public event UpdateVector OnUpdatePrimGroupScale; public event StatusChange OnChildAgentStatus; public event GenericCall2 OnStopMovement; - public event Action OnRemoveAvatar; + public event Action OnRemoveAvatar; public event CreateNewInventoryItem OnCreateNewInventoryItem; public event CreateInventoryFolder OnCreateNewInventoryFolder; @@ -322,34 +322,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC #endregion - public void ActivateGesture(LLUUID assetId, LLUUID gestureId) + public void ActivateGesture(UUID assetId, UUID gestureId) { } - public void DeactivateGesture(LLUUID assetId, LLUUID gestureId) + public void DeactivateGesture(UUID assetId, UUID gestureId) { } #region Overrriden Methods IGNORE - public virtual LLVector3 StartPos + public virtual Vector3 StartPos { get { return m_startPos; } set { } } - public virtual LLUUID AgentId + public virtual UUID AgentId { get { return m_uuid; } } - public LLUUID SessionId + public UUID SessionId { - get { return LLUUID.Zero; } + get { return UUID.Zero; } } - public LLUUID SecureSessionId + public UUID SecureSessionId { - get { return LLUUID.Zero; } + get { return UUID.Zero; } } public virtual string FirstName @@ -373,9 +373,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC set { } } - public LLUUID ActiveGroupId + public UUID ActiveGroupId { - get { return LLUUID.Zero; } + get { return UUID.Zero; } } public string ActiveGroupName @@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC get { return 0; } } - public ulong GetGroupPowers(LLUUID groupID) - { - return 0; - } + public ulong GetGroupPowers(UUID groupID) + { + return 0; + } public virtual int NextAnimationSequenceNumber { @@ -406,7 +406,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) + public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) { } @@ -422,12 +422,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) + public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) { } - public virtual void SendKillObject(ulong regionHandle, uint localID) + public virtual void SendKiPrimitive(ulong regionHandle, uint localID) { } @@ -440,27 +440,27 @@ namespace OpenSim.Region.Environment.Modules.World.NPC } - public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) + public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId) { } - public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, - LLUUID fromAgentID, byte source, byte audible) + public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, + UUID fromAgentID, byte source, byte audible) { } - public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, - LLUUID fromAgentID, byte source, byte audible) + public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, + UUID fromAgentID, byte source, byte audible) { } - public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, - LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) + public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, + UUID imSessionID, string fromName, byte dialog, uint timeStamp) { } - public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, - LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, + public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, + UUID imSessionID, string fromName, byte dialog, uint timeStamp, byte[] binaryBucket) { } @@ -476,7 +476,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) + public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) { } @@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC return new AgentCircuitData(); } - public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, + public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) { } @@ -498,7 +498,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) + public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) { } @@ -515,66 +515,66 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) + public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) { } - public virtual void SendPayPrice(LLUUID objectID, int[] payPrice) + public virtual void SendPayPrice(UUID objectID, int[] payPrice) { } - public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, - uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) + public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID, + uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) { } public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, - LLVector3 position, LLVector3 velocity, LLQuaternion rotation) + Vector3 position, Vector3 velocity, Quaternion rotation) { } - public virtual void SendCoarseLocationUpdate(List CoarseLocations) + public virtual void SendCoarseLocationUpdate(List CoarseLocations) { } - public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) + public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint) { } - public virtual void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) + public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) { } public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, - PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, - LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, - LLUUID objectID, LLUUID ownerID, string text, byte[] color, + PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, + Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, + UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction) { } public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, - PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, - LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, - LLUUID objectID, LLUUID ownerID, string text, byte[] color, + PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, + Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, + UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte[] textureanimation, - bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) { } public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, - LLVector3 position, LLQuaternion rotation, LLVector3 velocity, - LLVector3 rotationalvelocity, byte state, LLUUID AssetId) + Vector3 position, Quaternion rotation, Vector3 velocity, + Vector3 rotationalvelocity, byte state, UUID AssetId) { } public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, - LLVector3 position, LLQuaternion rotation, LLVector3 velocity, - LLVector3 rotationalvelocity) + Vector3 position, Quaternion rotation, Vector3 velocity, + Vector3 rotationalvelocity) { } - public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, + public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, @@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) + public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) { } @@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendRemoveInventoryItem(LLUUID itemID) + public virtual void SendRemoveInventoryItem(UUID itemID) { } @@ -603,7 +603,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) + public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName) { } @@ -618,24 +618,24 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) + public virtual void SendNameReply(UUID profileId, string firstname, string lastname) { } - public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) + public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) { } - public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, + public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) { } - public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) + public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) { } - public void SendAttachedSoundGainChange(LLUUID objectID, float gain) + public void SendAttachedSoundGainChange(UUID objectID, float gain) { } @@ -652,7 +652,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, + public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) { } @@ -669,7 +669,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC OnCompleteMovementToRegion(); } } - public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) + public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) { } @@ -677,11 +677,11 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) + public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) { } - public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) + public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) { } @@ -693,16 +693,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, + public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, - LLUUID LastOwnerID, string ObjectName, string Description) + UUID LastOwnerID, string ObjectName, string Description) { } - public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, - LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, - LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, + public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, + UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, + UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) { @@ -713,7 +713,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC return false; } - public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong time, uint dlen, uint ylen, float phase) + public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) { } @@ -721,9 +721,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, - string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, - LLUUID partnerID) + public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, + string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, + UUID partnerID) { } @@ -762,7 +762,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC get { return m_circuitCode; } set { m_circuitCode = value; } } - public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) + public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) { } @@ -783,52 +783,52 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question) + public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question) { } public void SendHealth(float health) { } - public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) + public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) { } - public void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID) + public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) { } public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) { } - public void SendEstateCovenantInformation(LLUUID covenant) + public void SendEstateCovenantInformation(UUID covenant) { } - public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail) { } 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) { } - public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) + public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) { } public void SendForceClientSelectObjects(List objectIDs) { } - public void SendLandObjectOwners(Dictionary ownersAndCount) + public void SendLandObjectOwners(Dictionary ownersAndCount) { } public void SendLandParcelOverlay(byte[] data, int sequence_id) { } - public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) + public void SendGroupNameReply(UUID groupLLUID, string GroupName) { } - public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) + public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) { } @@ -842,25 +842,25 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, + public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) { } - public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary parameters) + public void SendSetFollowCamProperties (UUID objectID, SortedDictionary parameters) { } - public void SendClearFollowCamProperties (LLUUID objectID) + public void SendClearFollowCamProperties (UUID objectID) { } - public void SendRegionHandle (LLUUID regoinID, ulong handle) + public void SendRegionHandle (UUID regoinID, ulong handle) { } - public void SendParcelInfo (RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) + public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y) { } 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 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; @@ -40,8 +40,8 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { // if (m_enabled) // { - // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene); - // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene); + // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new Vector3(128, 128, 40), scene); + // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new Vector3(136, 128, 40), scene); // scene.AddNewClient(testAvatar, false); // scene.AddNewClient(testAvatar2, false); // } 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 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using libsecondlife; +using OpenMetaverse; using Nini.Config; using System; using System.Collections; @@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #endregion #region Helper Functions - protected void SendPermissionError(LLUUID user, string reason) + protected void SendPermissionError(UUID user, string reason) { m_scene.EventManager.TriggerPermissionError(user, reason); } @@ -238,14 +238,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); } - protected bool IsAdministrator(LLUUID user) + protected bool IsAdministrator(UUID user) { - if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) + if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero) { if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)) return true; } - if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) + if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) { if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) return true; @@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - protected bool IsEstateManager(LLUUID user) + protected bool IsEstateManager(UUID user) { return m_scene.RegionInfo.EstateSettings.IsEstateManager(user); } @@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #region Object Permissions - public uint GenerateClientFlags(LLUUID user, LLUUID objID) + public uint GenerateClientFlags(UUID user, UUID objID) { // Here's the way this works, // ObjectFlags and Permission flags are two different enumerations @@ -306,27 +306,27 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return (uint)0; uint objflags = task.GetEffectiveObjectFlags(); - LLUUID objectOwner = task.OwnerID; + UUID objectOwner = task.OwnerID; // Remove any of the objectFlags that are temporary. These will get added back if appropriate // in the next bit of code objflags &= (uint) - ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object - LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object - LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) - LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it - LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object - LLObject.ObjectFlags.ObjectAnyOwner | // Tells client that someone owns the object - LLObject.ObjectFlags.ObjectOwnerModify | // Tells client that you're the owner of the object - LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set + ~(PrimFlags.ObjectCopy | // Tells client you can copy the object + PrimFlags.ObjectModify | // tells client you can modify the object + PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) + PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it + PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object + PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object + PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object + PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set ); // Creating the three ObjectFlags options for this method to choose from. // Customize the OwnerMask uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags); - objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner | (uint)LLObject.ObjectFlags.ObjectAnyOwner | (uint)LLObject.ObjectFlags.ObjectOwnerModify; + objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify; // Customize the GroupMask // uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags); @@ -336,8 +336,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions // Hack to allow collaboration until Groups and Group Permissions are implemented - if ((objectEveryoneMask & (uint)LLObject.ObjectFlags.ObjectMove) != 0) - objectEveryoneMask |= (uint)LLObject.ObjectFlags.ObjectModify; + if ((objectEveryoneMask & (uint)PrimFlags.ObjectMove) != 0) + objectEveryoneMask |= (uint)PrimFlags.ObjectModify; if (m_bypassPermissions) return objectOwnerMask; @@ -378,28 +378,28 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) { - objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectCopy; + objectFlagsMask |= (uint)PrimFlags.ObjectCopy; } if ((setPermissionMask & (uint)PermissionMask.Move) != 0) { - objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectMove; + objectFlagsMask |= (uint)PrimFlags.ObjectMove; } if ((setPermissionMask & (uint)PermissionMask.Modify) != 0) { - objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectModify; + objectFlagsMask |= (uint)PrimFlags.ObjectModify; } if ((setPermissionMask & (uint)PermissionMask.Transfer) != 0) { - objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectTransfer; + objectFlagsMask |= (uint)PrimFlags.ObjectTransfer; } return objectFlagsMask; } - protected bool GenericObjectPermission(LLUUID currentUser, LLUUID objId, bool denyOnLocked) + protected bool GenericObjectPermission(UUID currentUser, UUID objId, bool denyOnLocked) { // Default: deny bool permission = false; @@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId]; - LLUUID objectOwner = group.OwnerID; + UUID objectOwner = group.OwnerID; locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); // 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 #endregion #region Generic Permissions - protected bool GenericCommunicationPermission(LLUUID user, LLUUID target) + protected bool GenericCommunicationPermission(UUID user, UUID target) { // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission bool permission = true; @@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - public bool GenericEstatePermission(LLUUID user) + public bool GenericEstatePermission(UUID user) { // Default: deny bool permission = false; @@ -507,7 +507,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - protected bool GenericParcelPermission(LLUUID user, ILandObject parcel) + protected bool GenericParcelPermission(UUID user, ILandObject parcel) { bool permission = false; @@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - protected bool GenericParcelPermission(LLUUID user, LLVector3 pos) + protected bool GenericParcelPermission(UUID user, Vector3 pos) { ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); if (parcel == null) return false; @@ -543,7 +543,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #endregion #region Permission Checks - private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) + private bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericParcelPermission(user, parcel); } - private bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene) + private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -559,7 +559,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericParcelPermission(user, parcel); } - private bool CanBeGodLike(LLUUID user, Scene scene) + private bool CanBeGodLike(UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -567,7 +567,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return IsAdministrator(user); } - private bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition) + private bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -581,7 +581,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return CanRezObject(objectCount, owner, objectPosition, scene); } - private bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene) + private bool CanDeleteObject(UUID objectID, UUID deleter, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -589,7 +589,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericObjectPermission(deleter, objectID, false); } - private bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene) + private bool CanEditObject(UUID objectID, UUID editorID, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -598,7 +598,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericObjectPermission(editorID, objectID, false); } - private bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene) + private bool CanEditParcel(UUID user, ILandObject parcel, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericParcelPermission(user, parcel); } - private bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) + private bool CanEditScript(UUID script, UUID objectID, UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -614,7 +614,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - private bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) + private bool CanEditNotecard(UUID notecard, UUID objectID, UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - private bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene) + private bool CanInstantMessage(UUID user, UUID target, Scene startScene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericCommunicationPermission(user, target); } - private bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene) + private bool CanInventoryTransfer(UUID user, UUID target, Scene startScene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -639,7 +639,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericCommunicationPermission(user, target); } - private bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand) + private bool CanIssueEstateCommand(UUID user, Scene requestFromScene, bool ownerCommand) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -656,7 +656,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericEstatePermission(user); } - private bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene) + private bool CanMoveObject(UUID objectID, UUID moverID, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) @@ -696,10 +696,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; - // LLUUID taskOwner = null; + // UUID taskOwner = null; // Added this because at this point in time it wouldn't be wise for // the administrator object permissions to take effect. - // LLUUID objectOwner = task.OwnerID; + // UUID objectOwner = task.OwnerID; // Anyone can move if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0) @@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objectID]; - LLUUID objectOwner = group.OwnerID; + UUID objectOwner = group.OwnerID; locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); @@ -747,7 +747,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - private bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene) + private bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) + if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAPrimitiveEntry)) != 0) { return true; } @@ -793,7 +793,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - private bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene) + private bool CanReturnObject(UUID objectID, UUID returnerID, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -801,7 +801,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericObjectPermission(returnerID, objectID, false); } - private bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene) + private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -830,7 +830,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - private bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene) + private bool CanRunConsoleCommand(UUID user, Scene requestFromScene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -839,7 +839,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return IsAdministrator(user); } - private bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) + private bool CanRunScript(UUID script, UUID objectID, UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -847,7 +847,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - private bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene) + private bool CanSellParcel(UUID user, ILandObject parcel, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -855,7 +855,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericParcelPermission(user, parcel); } - private bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene) + private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -863,7 +863,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return GenericObjectPermission(stealer,objectID, false); } - private bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene) + private bool CanTakeCopyObject(UUID objectID, UUID userID, Scene inScene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -883,10 +883,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions } SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; - // LLUUID taskOwner = null; + // UUID taskOwner = null; // Added this because at this point in time it wouldn't be wise for // the administrator object permissions to take effect. - // LLUUID objectOwner = task.OwnerID; + // UUID objectOwner = task.OwnerID; if ((task.RootPart.EveryoneMask & PERM_COPY) != 0) @@ -895,7 +895,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - private bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene) + private bool CanTerraformLand(UUID user, Vector3 position, Scene requestFromScene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -927,7 +927,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - private bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) + private bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -935,7 +935,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) + private bool CanViewNotecard(UUID notecard, UUID objectID, UUID user, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -945,7 +945,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions #endregion - public bool CanLinkObject(LLUUID userID, LLUUID objectID) + public bool CanLinkObject(UUID userID, UUID objectID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanDelinkObject(LLUUID userID, LLUUID objectID) + public bool CanDelinkObject(UUID userID, UUID objectID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -961,7 +961,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) + public bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -969,7 +969,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + public bool CanCopyInventory(UUID itemID, UUID objectID, UUID userID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -977,7 +977,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + public bool CanDeleteInventory(UUID itemID, UUID objectID, UUID userID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) + public bool CanCreateInventory(uint invType, UUID objectID, UUID userID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -993,7 +993,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } - public bool CanTeleport(LLUUID userID) + public bool CanTeleport(UUID userID) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 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 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using libsecondlife; +using OpenMetaverse; using System.Collections.Generic; using System.IO; using OpenSim.Region.Environment.Scenes; @@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser /// /// /// - void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset); + void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset); /// /// Save prims in the xml format @@ -76,14 +76,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser /// /// Save prims in the xml2 format, optionally specifying a bounding box for which - /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims + /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims /// are exported. /// /// /// /// /// - void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max); + void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max); /// /// Save a set of prims in the xml2 format @@ -94,14 +94,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser /// /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which - /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims + /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims /// are exported. /// /// /// /// /// - void SavePrimListToXml2(List entityList, TextWriter stream, LLVector3 min, LLVector3 max); + void SavePrimListToXml2(List entityList, TextWriter stream, Vector3 min, Vector3 max); /// /// 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; using System.IO; //using System.Reflection; using System.Xml; -using Axiom.Math; -using libsecondlife; +using OpenMetaverse; //using log4net; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -45,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) + public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) { XmlDocument doc = new XmlDocument(); XmlNode rootNode; @@ -208,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes SavePrimListToXml2(EntityList, fileName); } - public static void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) + public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) { List EntityList = scene.GetEntities(); @@ -223,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes StreamWriter stream = new StreamWriter(file); try { - SavePrimListToXml2(entityList, stream, LLVector3.Zero, LLVector3.Zero); + SavePrimListToXml2(entityList, stream, Vector3.Zero, Vector3.Zero); } finally { @@ -236,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes } } - public static void SavePrimListToXml2(List entityList, TextWriter stream, LLVector3 min, LLVector3 max) + public static void SavePrimListToXml2(List entityList, TextWriter stream, Vector3 min, Vector3 max) { int primCount = 0; stream.WriteLine("\n"); @@ -246,9 +245,9 @@ namespace OpenSim.Region.Environment.Scenes if (ent is SceneObjectGroup) { SceneObjectGroup g = (SceneObjectGroup)ent; - if (!min.Equals(LLVector3.Zero) || !max.Equals(LLVector3.Zero)) + if (!min.Equals(Vector3.Zero) || !max.Equals(Vector3.Zero)) { - LLVector3 pos = g.RootPart.GetWorldPosition(); + Vector3 pos = g.RootPart.GetWorldPosition(); if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z) continue; 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 public string WriteToFile(Scene scene, string dir) { - string targetFileName = dir + "objects.xml"; + string targetFileName = dir + "objects.Xml"; SaveSerialisedToFile(targetFileName, scene); - return "objects.xml"; + return "objects.Xml"; } #endregion @@ -122,4 +122,4 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser #endregion } } -} \ No newline at end of file +} 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 @@ using System; using System.Collections.Generic; using System.IO; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander; @@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser #region IRegionSerialiser Members - public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) + public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) { SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset); } @@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser SceneXmlLoader.SavePrimsToXml2(scene, fileName); } - public void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) + public void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) { SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max); } @@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser SceneXmlLoader.SavePrimListToXml2(entityList, fileName); } - public void SavePrimListToXml2(List entityList, TextWriter stream, LLVector3 min, LLVector3 max) + public void SavePrimListToXml2(List entityList, TextWriter stream, Vector3 min, Vector3 max) { SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); } 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 @@ using System; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; @@ -91,14 +91,14 @@ namespace OpenSim.Region.Environment.Modules // private double VWTimeRatio; // VW time as a ratio of real time // Working values - private LLVector3 Position = new LLVector3(0,0,0); - private LLVector3 Velocity = new LLVector3(0,0,0); - private LLQuaternion Tilt = new LLQuaternion(1,0,0,0); + private Vector3 Position = Vector3.Zero; + private Vector3 Velocity = Vector3.Zero; + private Quaternion Tilt = Quaternion.Identity; private long LindenHourOffset = 0; private bool sunFixed = false; - private Dictionary m_rootAgents = new Dictionary(); + private Dictionary m_rootAgents = new Dictionary(); // Current time in elpased seconds since Jan 1st 1970 private ulong CurrentTime @@ -348,14 +348,14 @@ namespace OpenSim.Region.Environment.Modules // For interest we rotate it slightly about the X access. // Celestial tilt is a value that ranges .025 - Position = LLVector3.Rot(Position,Tilt); + Position *= Tilt; // Finally we shift the axis so that more of the // circle is above the horizon than below. This // makes the nights shorter than the days. Position.Z = Position.Z + (float) HorizonShift; - Position = LLVector3.Norm(Position); + Position = Vector3.Normalize(Position); // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")"); @@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules // Correct angular velocity to reflect the seasonal rotation - Magnitude = LLVector3.Mag(Position); + Magnitude = Position.Length(); if (sunFixed) { Velocity.X = 0; @@ -374,13 +374,12 @@ namespace OpenSim.Region.Environment.Modules return; } - Velocity = LLVector3.Rot(Velocity, Tilt)*((float)(1.0/Magnitude)); + Velocity = (Velocity * Tilt) * (1.0f / Magnitude); // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")"); - } - private void ClientLoggedOut(LLUUID AgentId) + private void ClientLoggedOut(UUID AgentId) { lock (m_rootAgents) { @@ -392,7 +391,7 @@ namespace OpenSim.Region.Environment.Modules } } - private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) + private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) { lock (m_rootAgents) { 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; using System.Collections.Generic; using System.IO; using System.Reflection; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -591,7 +591,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain float south, float east, IClientAPI remoteClient) { // Not a good permissions check, if in area mode, need to check the entire area. - if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(north, west, 0))) + if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(north, west, 0))) { if (north == south && east == west) { @@ -648,7 +648,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. // for now check a point in the centre of the region - if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(127, 127, 0))) + if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(127, 127, 0))) { InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter } 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; using System.Collections.Generic; using System.Reflection; using System.Timers; -using Axiom.Math; -using libsecondlife; +using OpenMetaverse; using log4net; using Nini.Config; using OpenSim.Framework; @@ -49,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator public double m_tree_density = 50.0; // Aim for this many per region public double m_tree_updates = 1000.0; // MS between updates - private List m_trees; + private List m_trees; #region IRegionModule Members @@ -63,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator { } - m_trees = new List(); + m_trees = new List(); m_scene = scene; m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; @@ -98,24 +97,24 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator { if (args[0] == "tree") { - LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; - if (uuid == LLUUID.Zero) + UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; + if (uuid == UUID.Zero) uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; m_log.Debug("[TREES]: New tree planting"); - CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f)); + CreateTree(uuid, new Vector3(128.0f, 128.0f, 0.0f)); } } private void growTrees() { - foreach (LLUUID tree in m_trees) + foreach (UUID tree in m_trees) { if (m_scene.Entities.ContainsKey(tree)) { SceneObjectPart s_tree = ((SceneObjectGroup) m_scene.Entities[tree]).RootPart; // 100 seconds to grow 1m - s_tree.Scale += new LLVector3(0.1f, 0.1f, 0.1f); + s_tree.Scale += new Vector3(0.1f, 0.1f, 0.1f); s_tree.SendFullUpdateToAllClients(); //s_tree.ScheduleTerseUpdate(); } @@ -128,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator private void seedTrees() { - foreach (LLUUID tree in m_trees) + foreach (UUID tree in m_trees) { if (m_scene.Entities.ContainsKey(tree)) { @@ -151,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator private void killTrees() { - foreach (LLUUID tree in m_trees) + foreach (UUID tree in m_trees) { double killLikelyhood = 0.0; @@ -162,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator Math.Pow(selectedTree.Scale.Y, 2) + Math.Pow(selectedTree.Scale.Z, 2)); - foreach (LLUUID picktree in m_trees) + foreach (UUID picktree in m_trees) { if (picktree != tree) { @@ -187,7 +186,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator m_scene.ForEachClient(delegate(IClientAPI controller) { - controller.SendKillObject(m_scene.RegionInfo.RegionHandle, + controller.SendKiPrimitive(m_scene.RegionInfo.RegionHandle, selectedTree.LocalId); }); @@ -204,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator private void SpawnChild(SceneObjectPart s_tree) { - LLVector3 position = new LLVector3(); + Vector3 position = new Vector3(); position.X = s_tree.AbsolutePosition.X + (1 * (-1 * Util.RandomClass.Next(1))); if (position.X > 255) @@ -223,20 +222,20 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator position.X += (float) randX; position.Y += (float) randY; - LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; - if (uuid == LLUUID.Zero) + UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; + if (uuid == UUID.Zero) uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; CreateTree(uuid, position); } - private void CreateTree(LLUUID uuid, LLVector3 position) + private void CreateTree(UUID uuid, Vector3 position) { position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y]; SceneObjectGroup tree = - m_scene.AddTree(uuid, new LLVector3(0.1f, 0.1f, 0.1f), - LLQuaternion.Identity, + m_scene.AddTree(uuid, new Vector3(0.1f, 0.1f, 0.1f), + Quaternion.Identity, position, Tree.Cypress1, 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; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Reflection; -using Axiom.Math; using Nini.Config; +using OpenMetaverse.Imaging; using log4net; -using OpenJPEGNet; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using libsecondlife; +using OpenMetaverse; namespace OpenSim.Region.Environment.Modules.World.WorldMap { @@ -252,7 +251,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap if (part.Shape.Textures.DefaultTexture == null) continue; - LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; + Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA; // Not sure why some of these are null, oh well. @@ -265,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap //Try to set the map spot color try { - // If the color gets goofy somehow, skip it *shakes fist at LLColor + // If the color gets goofy somehow, skip it *shakes fist at Color4 mapdotspot = Color.FromArgb(colorr, colorg, colorb); } catch (ArgumentException) @@ -282,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // Mono Array } - LLVector3 pos = part.GetWorldPosition(); + Vector3 pos = part.GetWorldPosition(); // skip prim outside of retion if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) @@ -312,20 +311,20 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap Vector3 tScale = new Vector3(); Vector3 axPos = new Vector3(pos.X,pos.Y,pos.Z); - LLQuaternion llrot = part.GetWorldRotation(); + Quaternion llrot = part.GetWorldRotation(); Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); - scale = rot * lscale; + scale = lscale * rot; // negative scales don't work in this situation - scale.x = Math.Abs(scale.x); - scale.y = Math.Abs(scale.y); - scale.z = Math.Abs(scale.z); + scale.X = Math.Abs(scale.X); + scale.Y = Math.Abs(scale.Y); + scale.Z = Math.Abs(scale.Z); // This scaling isn't very accurate and doesn't take into account the face rotation :P - int mapdrawstartX = (int)(pos.X - scale.x); - int mapdrawstartY = (int)(pos.Y - scale.y); - int mapdrawendX = (int)(pos.X + scale.x); - int mapdrawendY = (int)(pos.Y + scale.y); + int mapdrawstartX = (int)(pos.X - scale.X); + int mapdrawstartY = (int)(pos.Y - scale.Y); + int mapdrawendX = (int)(pos.X + scale.X); + int mapdrawendY = (int)(pos.Y + scale.Y); // If object is beyond the edge of the map, don't draw it to avoid errors if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 @@ -342,9 +341,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap Vector3[] FaceC = new Vector3[6]; // vertex C for Facei Vector3[] FaceD = new Vector3[6]; // vertex D for Facei - tScale = new Vector3(lscale.x, -lscale.y, lscale.z); - scale = ((rot * tScale)); - vertexes[0] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(lscale.X, -lscale.Y, lscale.Z); + scale = ((tScale * rot)); + vertexes[0] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[0].x = pos.X + vertexes[0].x; //vertexes[0].y = pos.Y + vertexes[0].y; //vertexes[0].z = pos.Z + vertexes[0].z; @@ -354,8 +353,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceA[4] = vertexes[0]; tScale = lscale; - scale = ((rot * tScale)); - vertexes[1] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + scale = ((tScale * rot)); + vertexes[1] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[1].x = pos.X + vertexes[1].x; // vertexes[1].y = pos.Y + vertexes[1].y; @@ -365,10 +364,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceA[1] = vertexes[1]; FaceC[4] = vertexes[1]; - tScale = new Vector3(lscale.x, -lscale.y, -lscale.z); - scale = ((rot * tScale)); + tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z); + scale = ((tScale * rot)); - vertexes[2] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); //vertexes[2].x = pos.X + vertexes[2].x; //vertexes[2].y = pos.Y + vertexes[2].y; @@ -378,9 +377,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceD[3] = vertexes[2]; FaceC[5] = vertexes[2]; - tScale = new Vector3(lscale.x, lscale.y, -lscale.z); - scale = ((rot * tScale)); - vertexes[3] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(lscale.X, lscale.Y, -lscale.Z); + scale = ((tScale * rot)); + vertexes[3] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); //vertexes[3].x = pos.X + vertexes[3].x; // vertexes[3].y = pos.Y + vertexes[3].y; @@ -390,9 +389,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceC[1] = vertexes[3]; FaceA[5] = vertexes[3]; - tScale = new Vector3(-lscale.x, lscale.y, lscale.z); - scale = ((rot * tScale)); - vertexes[4] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(-lscale.X, lscale.Y, lscale.Z); + scale = ((tScale * rot)); + vertexes[4] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[4].x = pos.X + vertexes[4].x; // vertexes[4].y = pos.Y + vertexes[4].y; @@ -402,9 +401,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceA[2] = vertexes[4]; FaceD[4] = vertexes[4]; - tScale = new Vector3(-lscale.x, lscale.y, -lscale.z); - scale = ((rot * tScale)); - vertexes[5] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(-lscale.X, lscale.Y, -lscale.Z); + scale = ((tScale * rot)); + vertexes[5] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[5].x = pos.X + vertexes[5].x; // vertexes[5].y = pos.Y + vertexes[5].y; @@ -414,9 +413,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceC[2] = vertexes[5]; FaceB[5] = vertexes[5]; - tScale = new Vector3(-lscale.x, -lscale.y, lscale.z); - scale = ((rot * tScale)); - vertexes[6] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(-lscale.X, -lscale.Y, lscale.Z); + scale = ((tScale * rot)); + vertexes[6] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[6].x = pos.X + vertexes[6].x; // vertexes[6].y = pos.Y + vertexes[6].y; @@ -426,9 +425,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap FaceA[3] = vertexes[6]; FaceB[4] = vertexes[6]; - tScale = new Vector3(-lscale.x, -lscale.y, -lscale.z); - scale = ((rot * tScale)); - vertexes[7] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); + tScale = new Vector3(-lscale.X, -lscale.Y, -lscale.Z); + scale = ((tScale * rot)); + vertexes[7] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); // vertexes[7].x = pos.X + vertexes[7].x; // vertexes[7].y = pos.Y + vertexes[7].y; @@ -533,8 +532,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap //Vector3 topos = new Vector3(0, 0, 0); // float z = -point3d.z - topos.z; - returnpt.X = (int)point3d.x;//(int)((topos.x - point3d.x) / z * d); - returnpt.Y = (int)(255 - point3d.y);//(int)(255 - (((topos.y - point3d.y) / z * d))); + returnpt.X = (int)point3d.X;//(int)((topos.x - point3d.x) / z * d); + returnpt.Y = (int)(255 - point3d.Y);//(int)(255 - (((topos.y - point3d.y) / z * d))); return returnpt; } 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; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Reflection; -using Axiom.Math; +using OpenMetaverse; +using OpenMetaverse.Imaging; using Nini.Config; using log4net; -using OpenJPEGNet; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using libsecondlife; namespace OpenSim.Region.Environment.Modules.World.WorldMap { 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; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Reflection; -using Axiom.Math; +using OpenMetaverse; using Nini.Config; using log4net; -using OpenJPEGNet; +using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Modules.World.Terrain; -using libsecondlife; namespace OpenSim.Region.Environment.Modules.World.WorldMap { @@ -122,15 +121,15 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // some hardcoded terrain UUIDs that work with SL 1.20 (the four default textures and "Blank"). // The color-values were choosen because they "look right" (at least to me) ;-) - private static readonly LLUUID defaultTerrainTexture1 = new LLUUID("0bc58228-74a0-7e83-89bc-5c23464bcec5"); + private static readonly UUID defaultTerrainTexture1 = new UUID("0bc58228-74a0-7e83-89bc-5c23464bcec5"); private static readonly Color defaultColor1 = Color.FromArgb(165, 137, 118); - private static readonly LLUUID defaultTerrainTexture2 = new LLUUID("63338ede-0037-c4fd-855b-015d77112fc8"); + private static readonly UUID defaultTerrainTexture2 = new UUID("63338ede-0037-c4fd-855b-015d77112fc8"); private static readonly Color defaultColor2 = Color.FromArgb(69, 89, 49); - private static readonly LLUUID defaultTerrainTexture3 = new LLUUID("303cd381-8560-7579-23f1-f0a880799740"); + private static readonly UUID defaultTerrainTexture3 = new UUID("303cd381-8560-7579-23f1-f0a880799740"); private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141); - private static readonly LLUUID defaultTerrainTexture4 = new LLUUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); + private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); - private static readonly LLUUID blankTerrainTexture = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); + private static readonly UUID blankTerrainTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); #endregion @@ -142,14 +141,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // added when the terrain textures are changed in the estate dialog and a new map is generated (and will stay in // that map until the region-server restarts. This could be considered a memory-leak, but it's a *very* small one. // TODO does it make sense to use a "real" cache and regenerate missing entries on fetch? - private Dictionary m_mapping; + private Dictionary m_mapping; public void Initialise(Scene scene, IConfigSource source) { m_scene = scene; // m_config = source; // not used currently - m_mapping = new Dictionary(); + m_mapping = new Dictionary(); m_mapping.Add(defaultTerrainTexture1, defaultColor1); m_mapping.Add(defaultTerrainTexture2, defaultColor2); m_mapping.Add(defaultTerrainTexture3, defaultColor3); @@ -164,12 +163,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // TODO (- on "map" command: We are in the command-line thread, we will wait for completion anyway) // TODO (- on "automatic" update after some change: We are called from the mapUpdateTimer here and // will wait anyway) - private Bitmap fetchTexture(LLUUID id) + private Bitmap fetchTexture(UUID id) { AssetBase asset = m_scene.AssetCache.GetAsset(id, true); m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); if (asset == null) return null; - return new Bitmap(OpenJPEG.DecodeToImage(asset.Data)); + + ManagedImage managedImage; + Image image; + if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image)) + return new Bitmap(image); + else + return null; } // Compute the average color of a texture. @@ -196,8 +201,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // return either the average color of the texture, or the defaultColor if the texturID is invalid // or the texture couldn't be found - private Color computeAverageColor(LLUUID textureID, Color defaultColor) { - if (textureID == LLUUID.Zero) return defaultColor; // not set + private Color computeAverageColor(UUID textureID, Color defaultColor) { + if (textureID == UUID.Zero) return defaultColor; // not set if (m_mapping.ContainsKey(textureID)) return m_mapping[textureID]; // one of the predefined textures 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; using System.Drawing.Imaging; using System.IO; using System.Reflection; -using libsecondlife; -using OpenJPEGNet; +using OpenMetaverse; +using OpenMetaverse.Imaging; using log4net; using Nini.Config; using OpenSim.Framework; @@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap #endregion - public void OnRegisterCaps(LLUUID agentID, Caps caps) + public void OnRegisterCaps(UUID agentID, Caps caps) { m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); string capsBase = "/CAPS/" + caps.CapsObjectPath; @@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap /// /// public string MapLayerRequest(string request, string path, string param, - LLUUID agentID, Caps caps) + UUID agentID, Caps caps) { //try //{ @@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap LLSDMapLayer mapLayer = new LLSDMapLayer(); mapLayer.Right = 5000; mapLayer.Top = 5000; - mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); + mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); return mapLayer; } @@ -223,7 +223,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap //doFriendListUpdateOnline(client.AgentId); client.OnRequestMapBlocks += RequestMapBlocks; } - private void ClientLoggedOut(LLUUID AgentId) + private void ClientLoggedOut(UUID AgentId) { } @@ -248,15 +248,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap m_log.Info("[WEBMAP]: Sending map image jpeg"); Hashtable reply = new Hashtable(); int statuscode = 200; - - byte[] jpeg; - + byte[] jpeg = new byte[0]; if (myMapImageJPEG.Length == 0) { MemoryStream imgstream = new MemoryStream(); Bitmap mapTexture = new Bitmap(1,1); - System.Drawing.Image image = (System.Drawing.Image)mapTexture; + ManagedImage managedImage; + Image image = (Image)mapTexture; try { @@ -268,21 +267,24 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true); // Decode image to System.Drawing.Image - image = OpenJPEG.DecodeToImage(mapasset.Data); + if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image)) + { + // Save to bitmap + mapTexture = new Bitmap(image); - // Save to bitmap - mapTexture = new Bitmap(image); + ImageCodecInfo myImageCodecInfo; - ImageCodecInfo myImageCodecInfo; + Encoder myEncoder; - Encoder myEncoder; + EncoderParameter myEncoderParameter; + EncoderParameters myEncoderParameters = new EncoderParameters(); - EncoderParameter myEncoderParameter; - EncoderParameters myEncoderParameters = new EncoderParameters(); + myImageCodecInfo = GetEncoderInfo("image/jpeg"); - myImageCodecInfo = GetEncoderInfo("image/jpeg"); + myEncoder = Encoder.Quality; - myEncoder = Encoder.Quality; + myEncoderParameter = new EncoderParameter(myEncoder, 95L); + myEncoderParameters.Param[0] = myEncoderParameter; myEncoderParameter = new EncoderParameter(myEncoder, 95L); myEncoderParameters.Param[0] = myEncoderParameter; @@ -290,14 +292,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // Save bitmap to stream mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters); - // Write the stream to a byte array for output - jpeg = imgstream.ToArray(); - myMapImageJPEG = jpeg; + // Write the stream to a byte array for output + jpeg = imgstream.ToArray(); + myMapImageJPEG = jpeg; + } } catch (Exception) { // Dummy! - jpeg = new byte[0]; m_log.Warn("[WEBMAP]: Unable to generate Map image"); } finally @@ -314,7 +316,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap // Use cached version so we don't have to loose our mind jpeg = myMapImageJPEG; } - //jpeg = new byte[0]; reply["str_response_string"] = Convert.ToBase64String(jpeg); reply["int_response_code"] = statuscode; -- cgit v1.1