void ProcessExit_yes()
{
int cn = GetCompanionIndex(GetMainCharacter(),nCurFourNum);
if(cn<0) return;
int Qty = GetCannonCurQuantity(GetCharacter(cn));
int curQty = sti(GetCannonQuantity(GetCharacter(cn))-Qty);
if(curQty>0)
{
ref curChr = GetCharacter(cn);
int ourQty = 0;
ourQty = sti(curChr.ship.Cannons.Borts.cannonf.curqty);
curChr.ship.Cannons.Borts.cannonf.qty = ourQty;
ourQty = sti(curChr.ship.Cannons.Borts.cannonb.curqty);
curChr.ship.Cannons.Borts.cannonb.qty = ourQty;
ourQty = sti(curChr.ship.Cannons.Borts.cannonl.curqty);
curChr.ship.Cannons.Borts.cannonl.qty = ourQty;
ourQty = sti(curChr.ship.Cannons.Borts.cannonr.curqty);
curChr.ship.Cannons.Borts.cannonr.qty = ourQty;
}
DelEventHandler("InterfaceBreak","ProcessCancelExit");
DelEventHandler("frame","ProcessFrame");
DelEventHandler("exitCancel","ProcessCancelExit");
DelEventHandler("ievnt_command","ProcessCommandExecute");
/*DelEventHandler("MaxShipClassYes", "CheckMaxShipClassYes");
DelEventHandler("MaxShipClassNo", "CheckMaxShipClassNo");
DelEventHandler("FleetLevelYes", "CheckFleetLevelYes");
DelEventHandler("FleetLevelNo", "CheckFleetLevelNo");*/
DelEventHandler("InstallPress","ProcessInstall");
//DelEventHandler("BuyPress","ProcessBuy"); // KK
// DelEventHandler("InstallBuyPress","ProcessInstallAndBuy"); // KK // Commented out by LDH 09Feb09
DelEventHandler("installSelect","ProcessInstallSelect");
DelEventHandler("InstallSUPress", "ProcessInstallSU"); // KK
DelEventHandler("RepaintPress", "ProcessRepaint"); // KK
DelEventHandler("ievnt_command","ProcessCommandExecute");
DelEventHandler("CancelPress","ProcessCancel");
//DelEventHandler("RepairNo","ProcessRepair_no");
//DelEventHandler("RepairYes","ProcessRepair_yes");
DelEventHandler("ExitPress","ProcessExit");
DelEventHandler("ExitNo","ProcessExit_no");
DelEventHandler("ExitYes","ProcessExit_yes");
interfaceResultCommand = RC_INTERFACE_SHIPYARD_EXIT;
EndCancelInterface(true);
if(tradeHigh==true) tradeHigh = false; // added by MAXIMUS [possibility to repair your ship by double price]
}