@ -969,14 +969,16 @@ public class ItemBase {
@@ -969,14 +969,16 @@ public class ItemBase {
}
public Boolean ValidClass ( Enum . ClassType base , Enum . ClassType profession ) {
if ( this . requiredClasses . isEmpty ( ) & & this . restrictedClasses . isEmpty ( ) )
boolean requiredEmpty = this . requiredClasses = = null | | this . requiredClasses . isEmpty ( ) ;
boolean restrictedEmpty = this . restrictedClasses = = null | | this . restrictedClasses . isEmpty ( ) ;
if ( requiredEmpty & & restrictedEmpty )
return true ;
if ( this . requiredClasses . isEmpty ( ) = = false )
if ( this . requiredClasses ! = null & & this . requiredClasses . isEmpty ( ) = = false )
if ( this . requiredClasses . contains ( base ) | | this . requiredClasses . contains ( profession ) )
return true ;
if ( this . restrictedClasses . isEmpty ( ) = = false )
if ( this . restrictedClasses ! = null & & this . restrictedClasses . isEmpty ( ) = = false )
if ( this . restrictedClasses . contains ( base ) = = false & & this . restrictedClasses . contains ( profession ) = = false )
return true ;
@ -984,7 +986,9 @@ public class ItemBase {
@@ -984,7 +986,9 @@ public class ItemBase {
}
public Boolean ValidDiscipline ( EnumSet < Enum . DisciplineType > discs ) {
if ( this . requiredDiscs . isEmpty ( ) & & this . restrictedDiscs . isEmpty ( ) )
boolean requiredEmpty = this . requiredDiscs = = null | | this . requiredDiscs . isEmpty ( ) ;
boolean restrictedEmpty = this . restrictedDiscs = = null | | this . restrictedDiscs . isEmpty ( ) ;
if ( requiredEmpty & & restrictedEmpty )
return true ;
for ( Enum . DisciplineType disc : discs ) {