1 // Copyright (C) 2014 Kazuhiro Fujieda <fujieda@users.sourceforge.jp>
\r
3 // This program is part of KancolleSniffer.
\r
5 // KancolleSniffer is free software: you can redistribute it and/or modify
\r
6 // it under the terms of the GNU General Public License as published by
\r
7 // the Free Software Foundation, either version 3 of the License, or
\r
8 // (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, see <http://www.gnu.org/licenses/>.
\r
18 namespace KancolleSniffer
\r
20 public class Achievement
\r
23 private int _current;
\r
25 public double Value { get { return (_current - _start) / 1428.0; } }
\r
27 public void InspectBasic(dynamic json)
\r
29 _current = (int)json.api_experience;
\r
39 public void SaveState(Status status)
\r
41 status.ExperiencePoint = _start;
\r
44 public void LoadState(Status status)
\r
46 _start = status.ExperiencePoint;
\r