/// <summary> /// 一括編集の個別処理 /// </summary> /// <param name="leader">対象指揮官</param> /// <param name="args">一括編集のパラメータ</param> private static void BatchEditLeader(Leader leader, LeaderBatchEditArgs args) { // 理想階級 if (args.Items[(int) LeaderBatchItemId.IdealRank]) { if (leader.IdealRank != args.IdealRank) { leader.IdealRank = args.IdealRank; leader.SetDirty(LeaderItemId.IdealRank); SetDirty(leader.Country); } } // スキル if (args.Items[(int) LeaderBatchItemId.Skill]) { if (leader.Skill != args.Skill) { leader.Skill = args.Skill; leader.SetDirty(LeaderItemId.Skill); SetDirty(leader.Country); } } // 最大スキル if (args.Items[(int) LeaderBatchItemId.MaxSkill]) { if (leader.MaxSkill != args.MaxSkill) { leader.MaxSkill = args.MaxSkill; leader.SetDirty(LeaderItemId.MaxSkill); SetDirty(leader.Country); } } // 経験値 if (args.Items[(int) LeaderBatchItemId.Experience]) { if (leader.Experience != args.Experience) { leader.Experience = args.Experience; leader.SetDirty(LeaderItemId.Experience); SetDirty(leader.Country); } } // 忠誠度 if (args.Items[(int) LeaderBatchItemId.Loyalty]) { if (leader.Loyalty != args.Loyalty) { leader.Loyalty = args.Loyalty; leader.SetDirty(LeaderItemId.Loyalty); SetDirty(leader.Country); } } // 開始年 if (args.Items[(int) LeaderBatchItemId.StartYear]) { if (leader.StartYear != args.StartYear) { leader.StartYear = args.StartYear; leader.SetDirty(LeaderItemId.StartYear); SetDirty(leader.Country); } } // 終了年 if (args.Items[(int) LeaderBatchItemId.EndYear]) { if (leader.EndYear != args.EndYear) { leader.EndYear = args.EndYear; leader.SetDirty(LeaderItemId.EndYear); SetDirty(leader.Country); } } // 引退年 if (args.Items[(int) LeaderBatchItemId.RetirementYear]) { if (leader.RetirementYear != args.RetirementYear) { leader.RetirementYear = args.RetirementYear; leader.SetDirty(LeaderItemId.RetirementYear); SetDirty(leader.Country); } } // 少将任官年 if (args.Items[(int) LeaderBatchItemId.Rank3Year]) { if (leader.RankYear[0] != args.RankYear[0]) { leader.RankYear[0] = args.RankYear[0]; leader.SetDirty(LeaderItemId.Rank3Year); SetDirty(leader.Country); } } // 中将任官年 if (args.Items[(int) LeaderBatchItemId.Rank2Year]) { if (leader.RankYear[1] != args.RankYear[1]) { leader.RankYear[1] = args.RankYear[1]; leader.SetDirty(LeaderItemId.Rank2Year); SetDirty(leader.Country); } } // 大将任官年 if (args.Items[(int) LeaderBatchItemId.Rank1Year]) { if (leader.RankYear[2] != args.RankYear[2]) { leader.RankYear[2] = args.RankYear[2]; leader.SetDirty(LeaderItemId.Rank1Year); SetDirty(leader.Country); } } // 元帥任官年 if (args.Items[(int) LeaderBatchItemId.Rank0Year]) { if (leader.RankYear[3] != args.RankYear[3]) { leader.RankYear[3] = args.RankYear[3]; leader.SetDirty(LeaderItemId.Rank0Year); SetDirty(leader.Country); } } }