Fixes bug with props gump (#10)

This commit is contained in:
Kamron Batman 2018-12-06 12:41:44 -08:00 • committed by GitHub
parent 647d6c0fd0
commit 82856df610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 57 deletions

View file

@ -572,12 +572,14 @@ namespace Server.Gumps
if (baseType == typeofObject || baseType?.GetProperty(prop.Name, prop.PropertyType) == null)
break;
type = baseType;
}
if (type != null && !groups.ContainsKey(type))
groups[type] = new List<PropertyInfo>{ prop };
else
groups[type].Add(prop);
}
}
}
@ -657,13 +659,13 @@ namespace Server.Gumps
return 0;
if (x == null)
return -1;
return y == null ? 1 : x.Name.CompareTo(x.Name);
}
}
private class GroupComparer : IComparer<KeyValuePair<Type, List<PropertyInfo>>>
{
{
private Type m_Start;
public GroupComparer(Type start)
@ -689,4 +691,4 @@ namespace Server.Gumps
}
}
}
}
}