@ -301,23 +301,23 @@ public enum NPCManager {
@@ -301,23 +301,23 @@ public enum NPCManager {
if ( guard . equip . containsKey ( 1 ) ) {
//has main hand weapon
ItemBase weapon = guard . equip . get ( 1 ) . getItemBase ( ) ;
if ( weapon . isStrBased ( ) )
if ( weapon . isStrBased ( ) )
primaryStat = guard . getStatStrCurrent ( ) ;
else
primaryStat = guard . getStatDexCurrent ( ) ;
guard . minDamageHandOne = ( int ) ( ( guard . mobBase . getDamageMin ( ) + weapon . getMinDamage ( ) ) * rankModifier ) + primaryStat ;
guard . maxDamageHandOne = ( int ) ( ( guard . mobBase . getDamageMax ( ) + weapon . getMaxDamage ( ) ) * rankModifier ) + primaryStat ;
guard . minDamageHandOne = ( int ) ( ( guard . mobBase . getDamageMin ( ) + weapon . getMinDamage ( ) ) * rankModifier ) + primaryStat ;
guard . maxDamageHandOne = ( int ) ( ( guard . mobBase . getDamageMax ( ) + weapon . getMaxDamage ( ) ) * rankModifier ) + primaryStat ;
guard . speedHandOne = weapon . getSpeed ( ) ;
guard . rangeHandOne = weapon . getRange ( ) ;
} else if ( guard . equip . containsKey ( 2 ) & & ! guard . equip . get ( 2 ) . getItemBase ( ) . isShield ( ) ) {
} else if ( guard . equip . containsKey ( 2 ) & & ! ItemTemplate . isShield ( guard . equip . get ( 2 ) . template ) ) {
//has off hand weapon
ItemBase weapon = guard . equip . get ( 2 ) . getItemBase ( ) ;
if ( weapon . isStrBased ( ) )
if ( weapon . isStrBased ( ) )
primaryStat = guard . getStatStrCurrent ( ) ;
else
primaryStat = guard . getStatDexCurrent ( ) ;
guard . minDamageHandTwo = ( int ) ( ( guard . mobBase . getDamageMin ( ) + weapon . getMinDamage ( ) ) * rankModifier ) + primaryStat ;
guard . maxDamageHandTwo = ( int ) ( ( guard . mobBase . getDamageMax ( ) + weapon . getMaxDamage ( ) ) * rankModifier ) + primaryStat ;
guard . minDamageHandTwo = ( int ) ( ( guard . mobBase . getDamageMin ( ) + weapon . getMinDamage ( ) ) * rankModifier ) + primaryStat ;
guard . maxDamageHandTwo = ( int ) ( ( guard . mobBase . getDamageMax ( ) + weapon . getMaxDamage ( ) ) * rankModifier ) + primaryStat ;
guard . speedHandTwo = weapon . getSpeed ( ) ;
guard . rangeHandTwo = weapon . getRange ( ) ;
} else {
@ -337,7 +337,7 @@ public enum NPCManager {
@@ -337,7 +337,7 @@ public enum NPCManager {
int baseDef = guard . mobBase . getDefenseRating ( ) ;
int armorDefense = 0 ;
for ( MobEquipment equipped : guard . equip . values ( ) )
if ( equipped . getItemBase ( ) . isArmor ( ) | | equipped . getItemBase ( ) . isShield ( ) )
if ( equipped . getItemBase ( ) . isArmor ( ) | | ItemTemplate . isShield ( equipped . template ) )
armorDefense + = equipped . getItemBase ( ) . getDefense ( ) ;
guard . defenseRating = dexterity + baseDef + armorDefense ;
}
@ -347,7 +347,7 @@ public enum NPCManager {
@@ -347,7 +347,7 @@ public enum NPCManager {
int baseAtr = guard . mobBase . getAttackRating ( ) ;
if ( guard . equip . get ( 1 ) ! = null )
guard . atrHandOne = baseAtr + ( int ) ( ( strength * 0 . 5f ) + ( guard . equip . get ( 1 ) . getItemBase ( ) . getPercentRequired ( ) * 4 ) + ( guard . equip . get ( 1 ) . getItemBase ( ) . getPercentRequired ( ) * 3 ) ) ;
else if ( guard . equip . get ( 2 ) ! = null & & ! guard . equip . get ( 2 ) . getItemBase ( ) . isShield ( ) )
else if ( guard . equip . get ( 2 ) ! = null & & ! ItemTemplate . isShield ( guard . equip . get ( 2 ) . template ) )
guard . atrHandTwo = baseAtr + ( int ) ( ( strength * 0 . 5f ) + ( guard . equip . get ( 2 ) . getItemBase ( ) . getPercentRequired ( ) * 4 ) + ( guard . equip . get ( 2 ) . getItemBase ( ) . getPercentRequired ( ) * 3 ) ) ;
else
guard . atrHandOne = baseAtr ;