if ( null != mounted.getLinked() && ((WeaponType)mounted.getType()).getAmmoType() != AmmoType.T_NA ) { Mounted ammoMount = mounted.getLinked(); waa.setAmmoId(ce().getEquipmentNum(ammoMount)); if (((AmmoType)(ammoMount.getType())).getMunitionType() == AmmoType.M_VIBRABOMB_IV) { VibrabombSettingDialog vsd = new VibrabombSettingDialog(clientgui.frame); vsd.show(); waa.setOtherAttackInfo(vsd.getSetting()); } }
    private void fire() {        // get the sepected weaponnum        int weaponNum = clientgui.mechD.wPan.getSelectedWeaponNum();        Mounted mounted = ce().getEquipment(weaponNum);        // validate        if (ce() == null || target == null || mounted == null        || !(mounted.getType() instanceof WeaponType)) {            throw new IllegalArgumentException("current fire parameters are invalid");        }        WeaponAttackAction waa = new WeaponAttackAction(cen, target.getTargetType(),                target.getTargetId(), weaponNum);        // add the attack to our temporary queue        attacks.addElement(waa);        // and add it into the game, temporarily        client.game.addAction(waa);        clientgui.bv.addAttack(waa);        clientgui.bv.repaint(100);        clientgui.minimap.drawMap();        // set the weapon as used        mounted.setUsedThisRound(true);        // find the next available weapon        int nextWeapon = ce().getNextWeapon(weaponNum);        // check; if there are no ready weapons, you're done.        if (nextWeapon == -1 && Settings.autoEndFiring) {            ready();            return;        }        // otherwise, display firing info for the next weapon        clientgui.mechD.wPan.displayMech(ce());        clientgui.mechD.wPan.selectWeapon(nextWeapon);        updateTarget();    }