diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 930af81..7e3c192 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -91,6 +91,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | { | 91 | { |
92 | GetWearableAssetUuids(assetUuid, assetUuids); | 92 | GetWearableAssetUuids(assetUuid, assetUuids); |
93 | } | 93 | } |
94 | else if (AssetType.Gesture == assetType) | ||
95 | { | ||
96 | GetGestureAssetUuids(assetUuid, assetUuids); | ||
97 | } | ||
94 | else if (AssetType.LSLText == assetType) | 98 | else if (AssetType.LSLText == assetType) |
95 | { | 99 | { |
96 | GetScriptAssetUuids(assetUuid, assetUuids); | 100 | GetScriptAssetUuids(assetUuid, assetUuids); |
@@ -278,5 +282,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
278 | GatherAssetUuids(sog, assetUuids); | 282 | GatherAssetUuids(sog, assetUuids); |
279 | } | 283 | } |
280 | } | 284 | } |
285 | |||
286 | protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, int> assetUuids) | ||
287 | { | ||
288 | AssetBase assetBase = GetAsset(gestureUuid); | ||
289 | |||
290 | MemoryStream ms = new MemoryStream(assetBase.Data); | ||
291 | StreamReader sr = new StreamReader(ms); | ||
292 | |||
293 | sr.ReadLine(); // Unknown (Version?) | ||
294 | sr.ReadLine(); // Unknown | ||
295 | sr.ReadLine(); // Unknown | ||
296 | sr.ReadLine(); // Name | ||
297 | sr.ReadLine(); // Comment ? | ||
298 | int count = Convert.ToInt32(sr.ReadLine()); // Item count | ||
299 | |||
300 | for (int i = 0 ; i < count ; i++) | ||
301 | { | ||
302 | string type = sr.ReadLine(); | ||
303 | if (type == null) | ||
304 | break; | ||
305 | string name = sr.ReadLine(); | ||
306 | if (name == null) | ||
307 | break; | ||
308 | string id = sr.ReadLine(); | ||
309 | if (id == null) | ||
310 | break; | ||
311 | string unknown = sr.ReadLine(); | ||
312 | if (unknown == null) | ||
313 | break; | ||
314 | |||
315 | // If it can be parsed as a UUID, it is an asset ID | ||
316 | UUID uuid; | ||
317 | if (UUID.Parse(id, out uuid)) | ||
318 | assetUuids[uuid] = 1; | ||
319 | } | ||
320 | } | ||
281 | } | 321 | } |
282 | } \ No newline at end of file | 322 | } |