handle diferente number of wearables on getting assets form another appearance

avinationmerge
UbitUmarov 2015-11-15 10:04:35 +00:00
parent f5799ff445
commit 53e0cd5534
1 changed files with 10 additions and 2 deletions

View File

@ -251,9 +251,17 @@ namespace OpenSim.Framework
public void GetAssetsFrom(AvatarAppearance app) public void GetAssetsFrom(AvatarAppearance app)
{ {
for (int i = 0; i < m_wearables.Length; i++) int len = m_wearables.Length;
if(len > app.m_wearables.Length)
len = app.m_wearables.Length;
for (int i = 0; i < len; i++)
{ {
for (int j = 0; j < m_wearables[i].Count; j++) int count = m_wearables[i].Count;
if(count > app.m_wearables[i].Count)
count = app.m_wearables[i].Count;
for (int j = 0; j < count; j++)
{ {
UUID itemID = m_wearables[i][j].ItemID; UUID itemID = m_wearables[i][j].ItemID;
UUID assetID = app.Wearables[i].GetAsset(itemID); UUID assetID = app.Wearables[i].GetAsset(itemID);