diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bfbbcf8..4d27ea4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -393,27 +393,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
393 | { | 393 | { |
394 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 394 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
395 | { | 395 | { |
396 | if (appearance.Wearables[i].ItemID == UUID.Zero) | 396 | for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) |
397 | { | 397 | { |
398 | appearance.Wearables[i].AssetID = UUID.Zero; | 398 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); |
399 | } | ||
400 | else | ||
401 | { | ||
402 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); | ||
403 | baseItem = invService.GetItem(baseItem); | 399 | baseItem = invService.GetItem(baseItem); |
404 | 400 | ||
405 | if (baseItem != null) | 401 | if (baseItem != null) |
406 | { | 402 | { |
407 | appearance.Wearables[i].AssetID = baseItem.AssetID; | 403 | appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); |
408 | } | 404 | } |
409 | else | 405 | else |
410 | { | 406 | { |
411 | m_log.ErrorFormat( | 407 | m_log.ErrorFormat( |
412 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", | 408 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", |
413 | appearance.Wearables[i].ItemID, (WearableType)i); | 409 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
414 | 410 | ||
415 | appearance.Wearables[i].ItemID = UUID.Zero; | 411 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
416 | appearance.Wearables[i].AssetID = UUID.Zero; | ||
417 | } | 412 | } |
418 | } | 413 | } |
419 | } | 414 | } |