diff options
Diffstat (limited to 'OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs')
-rw-r--r-- | OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 1608039..8269d36 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -137,59 +137,6 @@ namespace OpenSim.Services.HypergridService | |||
137 | return folders; | 137 | return folders; |
138 | } | 138 | } |
139 | 139 | ||
140 | public override InventoryCollection GetUserInventory(UUID userID) | ||
141 | { | ||
142 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID); | ||
143 | |||
144 | InventoryCollection userInventory = new InventoryCollection(); | ||
145 | userInventory.UserID = userID; | ||
146 | userInventory.Folders = new List<InventoryFolderBase>(); | ||
147 | userInventory.Items = new List<InventoryItemBase>(); | ||
148 | |||
149 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); | ||
150 | |||
151 | if (suitcase == null) | ||
152 | { | ||
153 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for user inventory", userID); | ||
154 | return null; | ||
155 | } | ||
156 | |||
157 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); | ||
158 | if (tree == null || (tree != null && tree.Count == 0)) | ||
159 | { | ||
160 | SetAsNormalFolder(suitcase); | ||
161 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | ||
162 | return userInventory; | ||
163 | } | ||
164 | |||
165 | List<InventoryItemBase> items; | ||
166 | foreach (XInventoryFolder f in tree) | ||
167 | { | ||
168 | // Add the items of this subfolder | ||
169 | items = GetFolderItems(userID, f.folderID); | ||
170 | if (items != null && items.Count > 0) | ||
171 | { | ||
172 | userInventory.Items.AddRange(items); | ||
173 | } | ||
174 | |||
175 | // Add the folder itself | ||
176 | userInventory.Folders.Add(ConvertToOpenSim(f)); | ||
177 | } | ||
178 | |||
179 | items = GetFolderItems(userID, suitcase.folderID); | ||
180 | if (items != null && items.Count > 0) | ||
181 | { | ||
182 | userInventory.Items.AddRange(items); | ||
183 | } | ||
184 | |||
185 | SetAsNormalFolder(suitcase); | ||
186 | userInventory.Folders.Add(ConvertToOpenSim(suitcase)); | ||
187 | |||
188 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetUserInventory for user {0} returning {1} folders and {2} items", | ||
189 | userID, userInventory.Folders.Count, userInventory.Items.Count); | ||
190 | return userInventory; | ||
191 | } | ||
192 | |||
193 | public override InventoryFolderBase GetRootFolder(UUID principalID) | 140 | public override InventoryFolderBase GetRootFolder(UUID principalID) |
194 | { | 141 | { |
195 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); | 142 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); |