Example #1
0
        public override bool SendOffEscapes()
        {
            ShipModel[] escapeCandidate = base.GetEscapeCandidate();
            if (escapeCandidate.Length != 2)
            {
                return(false);
            }
            ShipModel escapeShip = escapeCandidate[1];
            ShipModel towShip    = escapeCandidate[0];

            if (escapeShip == null || towShip == null)
            {
                return(false);
            }
            bool flag = this._reqBattle.GoBackPort(escapeShip.MemId, towShip.MemId);

            if (flag)
            {
                ShipModel_BattleAll shipModel_BattleAll = this._ships_f.Find((ShipModel_BattleAll item) => item != null && item.TmpId == towShip.MemId);
                if (shipModel_BattleAll != null)
                {
                    shipModel_BattleAll.__UpdateEscapeStatus__(true);
                }
                ShipModel_BattleAll shipModel_BattleAll2 = this._ships_f.Find((ShipModel_BattleAll item) => item != null && item.TmpId == escapeShip.MemId);
                if (shipModel_BattleAll2 != null)
                {
                    shipModel_BattleAll2.__UpdateEscapeStatus__(true);
                }
            }
            return(flag);
        }