コミットメタ情報

リビジョンf859de8defac7517e81add9402471c5001824f38 (tree)
日時2018-12-09 19:54:31
作者Kazuhiro Fujieda <fujieda@user...>
コミッターKazuhiro Fujieda

ログメッセージ

IncrementNowArrayを使う

変更サマリ

差分

--- a/KancolleSniffer/Model/QuestInfo.cs
+++ b/KancolleSniffer/Model/QuestInfo.cs
@@ -613,19 +613,15 @@ namespace KancolleSniffer.Model
613613 }
614614 if (_quests.TryGetValue(214, out var ago))
615615 {
616- var array = ago.Count.NowArray;
616+ var count = ago.Count;
617617 if (_boss)
618618 {
619- array[2]++;
619+ IncrementNowArray(count, 2);
620620 if (QuestSortie.CompareRank(rank, "B") <= 0)
621- array[3]++;
622- NeedSave = true;
621+ IncrementNowArray(count, 3);
623622 }
624623 if (rank == "S")
625- {
626- array[1]++;
627- NeedSave = true;
628- }
624+ IncrementNowArray(count, 1);
629625 }
630626 if (_quests.TryGetValue(249, out var q249))
631627 {
@@ -690,24 +686,21 @@ namespace KancolleSniffer.Model
690686 }
691687 if (_quests.TryGetValue(854, out var opz) && _boss)
692688 {
693- var array = opz.Count.NowArray;
689+ var count = opz.Count;
694690 switch (_map)
695691 {
696692 case 24 when QuestSortie.CompareRank(rank, "A") <= 0:
697- array[0]++;
698- NeedSave = true;
693+ IncrementNowArray(count, 0);
699694 break;
700695 case 61 when QuestSortie.CompareRank(rank, "A") <= 0:
701- array[1]++;
702- NeedSave = true;
696+ IncrementNowArray(count, 1);
703697 break;
704698 case 63 when QuestSortie.CompareRank(rank, "A") <= 0:
705- array[2]++;
699+ IncrementNowArray(count, 2);
706700 NeedSave = true;
707701 break;
708702 case 64 when QuestSortie.CompareRank(rank, "S") <= 0:
709- array[3]++;
710- NeedSave = true;
703+ IncrementNowArray(count, 3);
711704 break;
712705 }
713706 }
@@ -726,20 +719,17 @@ namespace KancolleSniffer.Model
726719 if (_battleInfo.Result.Friend.Main.Count(s => s.NowHp > 0 && s.Spec.ShipType == 3) >= 1 &&
727720 _boss && QuestSortie.CompareRank(rank, "A") <= 0)
728721 {
729- var array = q873.Count.NowArray;
722+ var count = q873.Count;
730723 switch (_map)
731724 {
732725 case 31:
733- array[0]++;
734- NeedSave = true;
726+ IncrementNowArray(count, 0);
735727 break;
736728 case 32:
737- array[1]++;
738- NeedSave = true;
729+ IncrementNowArray(count, 1);
739730 break;
740731 case 33:
741- array[2]++;
742- NeedSave = true;
732+ IncrementNowArray(count, 2);
743733 break;
744734 }
745735 }
@@ -770,20 +760,17 @@ namespace KancolleSniffer.Model
770760 };
771761 if (fleet.Intersect(member).Count() < 4)
772762 return;
773- var array = q888.Count.NowArray;
763+ var count = q888.Count;
774764 switch (_map)
775765 {
776766 case 51:
777- array[0]++;
778- NeedSave = true;
767+ IncrementNowArray(count, 0);
779768 break;
780769 case 53:
781- array[1]++;
782- NeedSave = true;
770+ IncrementNowArray(count, 1);
783771 break;
784772 case 54:
785- array[2]++;
786- NeedSave = true;
773+ IncrementNowArray(count, 2);
787774 break;
788775 }
789776 }
@@ -791,29 +778,25 @@ namespace KancolleSniffer.Model
791778 {
792779 if (QuestSortie.CompareRank(rank, "S") != 0)
793780 return;
794- var array = q893.Count.NowArray;
781+ var count = q893.Count;
795782 if (!_boss)
796783 {
797784 if (_map == 72 && _cell == 9)
798785 {
799- array[2]++;
800- NeedSave = true;
786+ IncrementNowArray(count, 2);
801787 }
802788 return;
803789 }
804790 switch (_map)
805791 {
806792 case 15:
807- array[0]++;
808- NeedSave = true;
793+ IncrementNowArray(count, 0);
809794 break;
810795 case 71:
811- array[1]++;
812- NeedSave = true;
796+ IncrementNowArray(count, 1);
813797 break;
814798 case 72:
815- array[3]++;
816- NeedSave = true;
799+ IncrementNowArray(count, 3);
817800 break;
818801 }
819802 }
@@ -902,16 +885,16 @@ namespace KancolleSniffer.Model
902885 switch (mid)
903886 {
904887 case 3:
905- count.NowArray[0]++;
888+ IncrementNowArray(count, 0);
906889 break;
907890 case 4:
908- count.NowArray[1]++;
891+ IncrementNowArray(count, 1);
909892 break;
910893 case 5:
911- count.NowArray[2]++;
894+ IncrementNowArray(count, 2);
912895 break;
913896 case 10:
914- count.NowArray[3]++;
897+ IncrementNowArray(count, 3);
915898 break;
916899 }
917900 }
@@ -921,13 +904,13 @@ namespace KancolleSniffer.Model
921904 switch (mid)
922905 {
923906 case 4:
924- count.NowArray[0]++;
907+ IncrementNowArray(count, 0);
925908 break;
926909 case 101:
927- count.NowArray[1]++;
910+ IncrementNowArray(count, 1);
928911 break;
929912 case 102:
930- count.NowArray[2]++;
913+ IncrementNowArray(count, 2);
931914 break;
932915 }
933916 }
旧リポジトリブラウザで表示