diff options
author | Justin Clark-Casey (justincc) | 2010-03-05 23:35:49 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-05 23:35:49 +0000 |
commit | 71797af540bfa1ccb1ccfe856b42350844531607 (patch) | |
tree | a8ee5316ac6bb371edc2570558da8cc149352920 /OpenSim/Region/Framework/Scenes | |
parent | refactor: move user inventory side of RezSingleAttachment to module (diff) | |
download | opensim-SC_OLD-71797af540bfa1ccb1ccfe856b42350844531607.zip opensim-SC_OLD-71797af540bfa1ccb1ccfe856b42350844531607.tar.gz opensim-SC_OLD-71797af540bfa1ccb1ccfe856b42350844531607.tar.bz2 opensim-SC_OLD-71797af540bfa1ccb1ccfe856b42350844531607.tar.xz |
refactor: move another AttachObject method
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6a5dc56..bd3b433 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1874,50 +1874,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1874 | } | 1874 | } |
1875 | } | 1875 | } |
1876 | 1876 | ||
1877 | /// <summary> | ||
1878 | /// This registers the item as attached in a user's inventory | ||
1879 | /// </summary> | ||
1880 | /// <param name="remoteClient"></param> | ||
1881 | /// <param name="AttachmentPt"></param> | ||
1882 | /// <param name="itemID"></param> | ||
1883 | /// <param name="att"></param> | ||
1884 | public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) | ||
1885 | { | ||
1886 | // m_log.DebugFormat( | ||
1887 | // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", | ||
1888 | // att.Name, remoteClient.Name, AttachmentPt, itemID); | ||
1889 | |||
1890 | if (UUID.Zero == itemID) | ||
1891 | { | ||
1892 | m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID."); | ||
1893 | return; | ||
1894 | } | ||
1895 | |||
1896 | if (0 == AttachmentPt) | ||
1897 | { | ||
1898 | m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error attachment point."); | ||
1899 | return; | ||
1900 | } | ||
1901 | |||
1902 | if (null == att.RootPart) | ||
1903 | { | ||
1904 | m_log.Error("[SCENE INVENTORY]: Unable to save attachment for a prim without the rootpart!"); | ||
1905 | return; | ||
1906 | } | ||
1907 | |||
1908 | ScenePresence presence; | ||
1909 | if (TryGetAvatar(remoteClient.AgentId, out presence)) | ||
1910 | { | ||
1911 | // XXYY!! | ||
1912 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | ||
1913 | item = InventoryService.GetItem(item); | ||
1914 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */); | ||
1915 | |||
1916 | if (m_AvatarFactory != null) | ||
1917 | m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | ||
1918 | } | ||
1919 | } | ||
1920 | |||
1921 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) | 1877 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) |
1922 | { | 1878 | { |
1923 | SceneObjectPart part = GetSceneObjectPart(itemID); | 1879 | SceneObjectPart part = GetSceneObjectPart(itemID); |