if (nType == -1) nType = 0;
int nUnitType = m_chUnitType.getSelectedIndex();
if (nUnitType == -1) nUnitType = 0;
for (Enumeration<EquipmentType> e = EquipmentType.getAllTypes(); e
.hasMoreElements();) {
EquipmentType et = e.nextElement();
if ((et instanceof WeaponType)
&& ((et.getTechLevel() == nType)
|| ((nType == TechConstants.T_TW_ALL) && ((et
.getTechLevel() == TechConstants.T_INTRO_BOXSET)
|| (et.getTechLevel() == TechConstants.T_IS_TW_NON_BOX) || (et
.getTechLevel() == TechConstants.T_CLAN_TW))) || (((nType == TechConstants.T_IS_TW_ALL) || (nType == TechConstants.T_IS_TW_NON_BOX)) && ((et
.getTechLevel() == TechConstants.T_INTRO_BOXSET) || (et
.getTechLevel() == TechConstants.T_IS_TW_NON_BOX))))) {
if (!(nUnitType == UnitType.SIZE)
&& ((UnitType.getTypeName(nUnitType).equals("Mek") || UnitType
.getTypeName(nUnitType).equals("Tank")) && (et
.hasFlag(WeaponType.F_INFANTRY)))) {
continue;
}
weapons.add(et.getName());
if (et.hasFlag(WeaponType.F_C3M)
&& ((nType == TechConstants.T_TW_ALL)
|| (nType == TechConstants.T_IS_TW_NON_BOX) || (nType == TechConstants.T_IS_TW_ALL))) {
equipment.add(et.getName());
}
}
if ((et instanceof MiscType)
&& ((et.getTechLevel() == nType)
|| ((nType == TechConstants.T_TW_ALL) && ((et
.getTechLevel() == TechConstants.T_INTRO_BOXSET)
|| (et.getTechLevel() == TechConstants.T_IS_TW_NON_BOX) || (et
.getTechLevel() == TechConstants.T_CLAN_TW))) || (((nType == TechConstants.T_IS_TW_ALL) || (nType == TechConstants.T_IS_TW_NON_BOX)) && ((et
.getTechLevel() == TechConstants.T_INTRO_BOXSET) || (et
.getTechLevel() == TechConstants.T_IS_TW_NON_BOX))))) {
equipment.add(et.getName());
}
}
for (String weaponName : weapons) {
m_cWeapons1.addItem(weaponName);
m_cWeapons2.addItem(weaponName);