diff options
author | Justin Clark-Casey (justincc) | 2010-10-30 03:07:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-10-30 03:07:45 +0100 |
commit | f9227977f8190ff1cf094e4adb025a822645371f (patch) | |
tree | 5afbce81eb5359f8beaeaef3f7c30518e689f4f6 /OpenSim/Region/CoreModules/Avatar | |
parent | minor: remove some old commented out code (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-f9227977f8190ff1cf094e4adb025a822645371f.zip opensim-SC-f9227977f8190ff1cf094e4adb025a822645371f.tar.gz opensim-SC-f9227977f8190ff1cf094e4adb025a822645371f.tar.bz2 opensim-SC-f9227977f8190ff1cf094e4adb025a822645371f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-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 e2755c8..6cbd8bd 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -382,27 +382,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
382 | { | 382 | { |
383 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 383 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
384 | { | 384 | { |
385 | if (appearance.Wearables[i].ItemID == UUID.Zero) | 385 | for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) |
386 | { | 386 | { |
387 | appearance.Wearables[i].AssetID = UUID.Zero; | 387 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); |
388 | } | ||
389 | else | ||
390 | { | ||
391 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); | ||
392 | baseItem = invService.GetItem(baseItem); | 388 | baseItem = invService.GetItem(baseItem); |
393 | 389 | ||
394 | if (baseItem != null) | 390 | if (baseItem != null) |
395 | { | 391 | { |
396 | appearance.Wearables[i].AssetID = baseItem.AssetID; | 392 | appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); |
397 | } | 393 | } |
398 | else | 394 | else |
399 | { | 395 | { |
400 | m_log.ErrorFormat( | 396 | m_log.ErrorFormat( |
401 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", | 397 | "[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default", |
402 | appearance.Wearables[i].ItemID, (WearableType)i); | 398 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
403 | 399 | ||
404 | appearance.Wearables[i].ItemID = UUID.Zero; | 400 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
405 | appearance.Wearables[i].AssetID = UUID.Zero; | ||
406 | } | 401 | } |
407 | } | 402 | } |
408 | } | 403 | } |