// Copyright (C) 2014, 2015 Kazuhiro Fujieda <fujieda@users.osdn.me>\r
// \r
-// This program is part of KancolleSniffer.\r
+// Licensed under the Apache License, Version 2.0 (the "License");\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
//\r
-// KancolleSniffer is free software: you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation, either version 3 of the License, or\r
-// (at your option) any later version.\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
//\r
-// This program is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
\r
using System;\r
using System.Collections.Generic;\r
+using System.Xml.Serialization;\r
\r
namespace KancolleSniffer\r
{\r
public DateTime LastReset { get; set; }\r
public DateTime LastResetOfMonth { get; set; }\r
\r
- private const double ExpPerAch = 1428.0;\r
- public double Value { get { return (_current - Start) / ExpPerAch; } }\r
- public double ValueOfMonth { get { return (_current - StartOfMonth) / ExpPerAch; } }\r
- public List<int> ResetHours { get; set; }\r
+ private const double ExpPerAch = 10000 / 7.0;\r
+ public double Value => (_current - Start) / ExpPerAch;\r
+ public double ValueOfMonth => (_current - StartOfMonth) / ExpPerAch;\r
+\r
+ [XmlIgnore]\r
+ public List<int> ResetHours { private get; set; }\r
+\r
+ [XmlIgnore]\r
public bool NeedSave { get; private set; }\r
\r
public Achievement()\r
{\r
var ac = status.Achievement;\r
if (ac == null)\r
- {\r
- Start = status.ExperiencePoint;\r
- LastReset = status.LastResetTime;\r
- }\r
- else\r
- {\r
- Start = ac.Start;\r
- StartOfMonth = ac.StartOfMonth;\r
- LastReset = ac.LastReset;\r
- LastResetOfMonth = ac.LastResetOfMonth;\r
- }\r
+ return;\r
+ Start = ac.Start;\r
+ StartOfMonth = ac.StartOfMonth;\r
+ LastReset = ac.LastReset;\r
+ LastResetOfMonth = ac.LastResetOfMonth;\r
}\r
}\r
}
\ No newline at end of file