diff options
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 50d3cc7..68885e1 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -795,5 +795,41 @@ namespace OpenSim.Data.MySQL | |||
795 | deleteOneFolder(folderID); | 795 | deleteOneFolder(folderID); |
796 | deleteItemsInFolder(folderID); | 796 | deleteItemsInFolder(folderID); |
797 | } | 797 | } |
798 | |||
799 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) | ||
800 | { | ||
801 | MySqlDataReader result = null; | ||
802 | MySqlCommand sqlCmd = null; | ||
803 | lock (database) | ||
804 | { | ||
805 | try | ||
806 | { | ||
807 | database.CheckConnection(); | ||
808 | sqlCmd = new MySqlCommand( | ||
809 | "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", | ||
810 | database.Connection); | ||
811 | sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString()); | ||
812 | sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); | ||
813 | result = sqlCmd.ExecuteReader(); | ||
814 | |||
815 | List<InventoryItemBase> list = new List<InventoryItemBase>(); | ||
816 | while (result.Read()) | ||
817 | list.Add(readInventoryItem(result)); | ||
818 | |||
819 | return list; | ||
820 | } | ||
821 | catch (Exception e) | ||
822 | { | ||
823 | database.Reconnect(); | ||
824 | m_log.Error(e.ToString()); | ||
825 | return null; | ||
826 | } | ||
827 | finally | ||
828 | { | ||
829 | if(result != null) result.Close(); | ||
830 | if(sqlCmd != null) sqlCmd.Dispose(); | ||
831 | } | ||
832 | } | ||
833 | } | ||
798 | } | 834 | } |
799 | } | 835 | } |