X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=KancolleSniffer%2FModel%2FQuestCountList.cs;h=12ea13083f71d06f24b88d7648f7555ffa371f94;hb=0f377e30b207441f57037b55a1412947afa6b1e7;hp=53183f4828cd96968152dd345b465d847fff1402;hpb=90fdecebf7fb39ea9d929155409774cc8ab7e1c0;p=kancollesniffer%2FKancolleSniffer.git diff --git a/KancolleSniffer/Model/QuestCountList.cs b/KancolleSniffer/Model/QuestCountList.cs index 53183f4..12ea130 100644 --- a/KancolleSniffer/Model/QuestCountList.cs +++ b/KancolleSniffer/Model/QuestCountList.cs @@ -26,13 +26,16 @@ namespace KancolleSniffer.Model private const QuestInterval Yearly2 = QuestInterval.Yearly2; private const QuestInterval Yearly3 = QuestInterval.Yearly3; private const QuestInterval Yearly5 = QuestInterval.Yearly5; + private const QuestInterval Yearly8 = QuestInterval.Yearly8; + private const QuestInterval Yearly9 = QuestInterval.Yearly9; + private const QuestInterval Yearly10 = QuestInterval.Yearly10; /// /// このテーブルは七四式電子観測儀を参考に作成した。 /// https://github.com/andanteyk/ElectronicObserver/blob/develop/ElectronicObserver/Data/Quest/QuestProgressManager.cs /// // @formatter:off - private static readonly Dictionary QuestSpecs = new Dictionary + private readonly Dictionary _questSpecs = new Dictionary { {201, new QuestSortie {Interval = Daily, Max = 1, Rank = "B", Material = new[] {0, 0, 1, 0}}}, // 201: 敵艦隊を撃滅せよ! {216, new QuestSortie {Interval = Daily, Max = 1, Rank = "B", Material = new[] {0, 1, 1, 0}}}, // 216: 敵艦隊主力を撃滅せよ! @@ -90,6 +93,8 @@ namespace KancolleSniffer.Model {337, new QuestPractice {Interval = Daily, Max = 3, Rank = "S", Material = new[] {0, 0, 0, 3}, Shift = 2}}, // 337: 「十八駆」演習! {339, new QuestPractice {Interval = Daily, Max = 3, Rank = "S", Material = new[] {0, 0, 8, 3}, Shift = 2}}, // 339: 「十九駆」演習! {342, new QuestPractice {Interval = Quarterly, Max = 4, Rank = "A", Material = new[] {0, 4, 4, 0}, Shift = 1}}, // 342: 小艦艇群演習強化任務 + {345, new QuestPractice {Interval = Yearly10, Max = 4, Rank = "A", Material = new[] {0, 5, 4, 0}, Shift = 1}}, // 345: 演習ティータイム! + {346, new QuestPractice {Interval = Yearly10, Max = 4, Rank = "S", Material = new[] {0, 4, 6, 0}, Shift = 1}}, // 346: 最精鋭!主力オブ主力、演習開始! {402, new QuestMission {Interval = Daily, Max = 3, Material = new[] {0, 0, 1, 0}}}, // 402: 「遠征」を3回成功させよう! {403, new QuestMission {Interval = Daily, Max = 10, Material = new[] {0, 0, 0, 0}}}, // 403: 「遠征」を10回成功させよう! @@ -99,8 +104,12 @@ namespace KancolleSniffer.Model {424, new QuestMission {Interval = Monthly, Max = 4, Shift = 1, Ids = new[] {5}, Material = new[] {0, 0, 0, 0}}}, // 424: 輸送船団護衛を強化せよ! {426, new QuestMission {Interval = Quarterly, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {3, 4, 5, 10}, Material = new[] {0, 0, 4, 0}}}, // 426: 海上通商航路の警戒を厳とせよ! {428, new QuestMission {Interval = Quarterly, MaxArray = new[] {2, 2, 2}, Ids = new[] {4, 101, 102}, Material = new[] {0, 0, 0, 3}}}, // 428: 近海に侵入する敵潜を制圧せよ! - {436, new QuestMission {Interval = Yearly3, MaxArray = new[] {1, 1, 1, 1, 1}, Ids = new[] {1, 2, 3, 4, 10}, Material = new [] {0, 4, 0, 0}}}, // 436: 練習航海及び警備任務を実施せよ! - {437, new QuestMission {Interval = Yearly5, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {4, 104, 105, 110}, Material = new [] {0, 0, 7, 3}, Shift = 1}}, // 437: 小笠原沖哨戒線の強化を実施せよ! + {434, new QuestMission {Interval = Yearly2, MaxArray = new[] {1, 1, 1, 1, 1}, Ids = new[] {3, 5, 100, 101, 9}, Material = new[] {0, 5, 0, 3}}}, // 434: 特設護衛船団司令部、活動開始! + {436, new QuestMission {Interval = Yearly3, MaxArray = new[] {1, 1, 1, 1, 1}, Ids = new[] {1, 2, 3, 4, 10}, Material = new[] {0, 4, 0, 0}}}, // 436: 練習航海及び警備任務を実施せよ! + {437, new QuestMission {Interval = Yearly5, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {4, 104, 105, 110}, Material = new[] {0, 0, 7, 3}, Shift = 1}}, // 437: 小笠原沖哨戒線の強化を実施せよ! + {438, new QuestMission {Interval = Yearly8, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {4, 100, 9, 114}, Material = new[] {0, 0, 5, 4}, Shift = 1}}, // 438: 南西諸島方面の海上護衛を強化せよ! + {439, new QuestMission {Interval = Yearly9, MaxArray = new[] {1, 1, 1, 1}, Ids = new[] {5, 100, 11, 110}, Material = new[] {0, 0, 5, 4}, Shift = 1}}, // 439: 兵站強化遠征任務【基本作戦】 + {440, new QuestMission {Interval = Yearly9, MaxArray = new[] {1, 1, 1, 1, 1}, Ids = new[] {5, 41, 46, 40, 142}, Material = new[] {0, 0, 0, 4}}}, // 440: 兵站強化遠征任務【拡張作戦】 {503, new QuestSpec {Interval = Daily, Max = 5, Material = new[] {0, 2, 0, 0}}}, // 503: 艦隊大整備! {504, new QuestSpec {Interval = Daily, Max = 15, Material = new[] {1, 0, 1, 0}}}, // 504: 艦隊酒保祭り! @@ -135,11 +144,23 @@ namespace KancolleSniffer.Model private readonly Dictionary _countDict = new Dictionary(); + public void SetMissionNames(dynamic json) + { + var dict = new Dictionary(); + foreach (var entry in json) + dict[(int)entry.api_id] = entry.api_name; + foreach (var spec in _questSpecs) + { + if (spec.Value is QuestMission mission && mission.Ids != null) + mission.Names = mission.Ids.Select(id => dict.TryGetValue(id, out var name) ? name : "").ToArray(); + } + } + public QuestCount GetCount(int id) { if (_countDict.TryGetValue(id, out var value)) return value; - if (QuestSpecs.TryGetValue(id, out var spec)) + if (_questSpecs.TryGetValue(id, out var spec)) { var nowArray = spec.MaxArray?.Select(x => 0).ToArray(); return _countDict[id] = new QuestCount @@ -175,7 +196,7 @@ namespace KancolleSniffer.Model return; foreach (var count in questCountList) { - count.Spec = QuestSpecs[count.Id]; + count.Spec = _questSpecs[count.Id]; _countDict[count.Id] = count; } }