Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.

This commit is contained in:
Kamron Batman 2018-09-15 23:16:45 -07:00
parent 8da55d6043
commit f93c3b992e
62 changed files with 318 additions and 634 deletions

View file

@ -452,9 +452,7 @@ namespace Server.Gumps
private static bool HasAttribute(Type type, Type check, bool inherit)
{
object[] objs = type.GetCustomAttributes(check, inherit);
return objs != null && objs.Length > 0;
return type.GetCustomAttributes(check, inherit).Length > 0;
}
private static bool IsType(Type type, Type check)