private ShipModel_Battle _GetFirstActionShip(ICommandAction cmdAction) { HougekiListModel hougekiListModel = cmdAction as HougekiListModel; if (hougekiListModel != null && hougekiListModel.Count > 0) { return(hougekiListModel.GetData(0).Attacker); } RaigekiModel raigekiModel = cmdAction as RaigekiModel; if (raigekiModel != null) { return(raigekiModel.GetFirstActionShip()); } return(null); }
public CmdActionPhaseModel(FromMiddleBattleDayData data, Dictionary <int, ShipModel_BattleAll> ships) { if (data.Production != null) { _eff = new __EffectModel__(data.Production); } if (data.F_BattleData != null) { if (data.F_BattleData.FmtType == 1) { HougekiDayBattleFmt hougekiDayBattleFmt = data.F_BattleData as HougekiDayBattleFmt; _data_f = new HougekiListModel(hougekiDayBattleFmt.AttackData, ships); } else if (data.F_BattleData.FmtType == 2) { Raigeki data2 = data.F_BattleData as Raigeki; RaigekiModel raigekiModel = new RaigekiModel(data2, ships); if (raigekiModel.Count_f > 0 || raigekiModel.Count_e > 0) { _data_f = raigekiModel; } } } if (data.E_BattleData == null) { return; } if (data.E_BattleData.FmtType == 1) { HougekiDayBattleFmt hougekiDayBattleFmt2 = data.E_BattleData as HougekiDayBattleFmt; _data_e = new HougekiListModel(hougekiDayBattleFmt2.AttackData, ships); } else if (data.E_BattleData.FmtType == 2) { Raigeki data3 = data.E_BattleData as Raigeki; RaigekiModel raigekiModel2 = new RaigekiModel(data3, ships); if (raigekiModel2.Count_f > 0 || raigekiModel2.Count_e > 0) { _data_e = raigekiModel2; } } }