client.mechD.wPan.selectWeapon(selectedWeapon);
client.mechD.wPan.selectWeapon(nextWeapon);
    private void fire() {        int wn = client.mechD.wPan.getSelectedWeaponNum();        if (ce() == null || target == null || ce().getEquipment(wn) == null         || !(ce().getEquipment(wn).getType() instanceof WeaponType)) {            throw new IllegalArgumentException("current fire parameters are invalid");        }        Mounted m = ce().getEquipment(wn);                WeaponAttackAction waa = new WeaponAttackAction(cen, target.getTargetType(),                 target.getTargetId(), wn);                if (((WeaponType)m.getType()).getAmmoType() != AmmoType.T_NA) {            waa.setAmmoId(ce().getEquipmentNum(m.getLinked()));        }            attacks.addElement(waa);            ce().getEquipment(wn).setUsedThisRound(true);        selectedWeapon = ce().getNextWeapon(wn);        // check; if there are no ready weapons, you're done.        if(selectedWeapon == -1 && Settings.autoEndFiring) {            ready();            return;        }        client.mechD.wPan.displayMech(ce());        client.mechD.wPan.selectWeapon(selectedWeapon);        updateTarget();        butNext.setEnabled(false);    }