-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
178 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Grabacr07.KanColleWrapper.Models; | ||
using EventMapHpViewer.Models.Raw; | ||
|
||
namespace EventMapHpViewer.Models | ||
{ | ||
public class MapArea : RawDataWrapper<kcsapi_mst_maparea>, IIdentifiable | ||
{ | ||
public int Id { get; private set; } | ||
|
||
public string Name { get; private set; } | ||
|
||
public MapArea(kcsapi_mst_maparea maparea) | ||
: base(maparea) | ||
{ | ||
this.Id = maparea.api_id; | ||
this.Name = maparea.api_name; | ||
} | ||
|
||
#region static members | ||
|
||
private static MapArea dummy = new MapArea(new kcsapi_mst_maparea() | ||
{ | ||
api_id = 0, | ||
api_name = "???", | ||
}); | ||
|
||
public static MapArea Dummy | ||
{ | ||
get { return dummy; } | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Grabacr07.KanColleWrapper; | ||
using Grabacr07.KanColleWrapper.Models; | ||
using EventMapHpViewer.Models.Raw; | ||
|
||
namespace EventMapHpViewer.Models | ||
{ | ||
public class MapInfo : RawDataWrapper<kcsapi_mst_mapinfo>, IIdentifiable | ||
{ | ||
public int Id { get; private set; } | ||
|
||
public string Name { get; private set; } | ||
|
||
public int MapAreaId { get; private set; } | ||
|
||
public MapArea MapArea { get; private set; } | ||
|
||
public int IdInEachMapArea { get; private set; } | ||
|
||
public int Level { get; private set; } | ||
|
||
public string OperationName { get; private set; } | ||
|
||
public string OperationSummary { get; private set; } | ||
|
||
public int RequiredDefeatCount { get; private set; } | ||
|
||
public MapInfo(kcsapi_mst_mapinfo mapinfo, MasterTable<MapArea> mapAreas) | ||
: base(mapinfo) | ||
{ | ||
this.Id = mapinfo.api_id; | ||
this.Name = mapinfo.api_name; | ||
this.MapAreaId = mapinfo.api_maparea_id; | ||
this.MapArea = mapAreas[mapinfo.api_maparea_id] ?? Models.MapArea.Dummy; | ||
this.IdInEachMapArea = mapinfo.api_no; | ||
this.Level = mapinfo.api_level; | ||
this.OperationName = mapinfo.api_opetext; | ||
this.OperationSummary = mapinfo.api_infotext; | ||
this.RequiredDefeatCount = mapinfo.api_required_defeat_count ?? 1; | ||
} | ||
|
||
#region static members | ||
|
||
private static MapInfo dummy = new MapInfo(new kcsapi_mst_mapinfo() | ||
{ | ||
api_id = 0, | ||
api_name = "???", | ||
api_maparea_id = 0, | ||
api_no = 0, | ||
api_level = 0, | ||
}, new MasterTable<MapArea>()); | ||
|
||
public static MapInfo Dummy | ||
{ | ||
get { return dummy; } | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace EventMapHpViewer.Models.Raw | ||
{ | ||
public class kcsapi_mst_maparea | ||
{ | ||
public int api_id { get; set; } | ||
public string api_name { get; set; } | ||
public int api_type { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace EventMapHpViewer.Models.Raw | ||
{ | ||
public class kcsapi_mst_mapinfo | ||
{ | ||
public int api_id { get; set; } | ||
public int api_maparea_id { get; set; } | ||
public int api_no { get; set; } | ||
public string api_name { get; set; } | ||
public int api_level { get; set; } | ||
public string api_opetext { get; set; } | ||
public string api_infotext { get; set; } | ||
public int[] api_item { get; set; } | ||
public int? api_max_maphp { get; set; } | ||
public int? api_required_defeat_count { get; set; } | ||
public int[] api_sally_flag { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace EventMapHpViewer.Models.Raw | ||
{ | ||
// ReSharper disable InconsistentNaming | ||
public class kcsapi_start2 | ||
{ | ||
public kcsapi_mst_maparea[] api_mst_maparea { get; set; } | ||
public kcsapi_mst_mapinfo[] api_mst_mapinfo { get; set; } | ||
} | ||
// ReSharper restore InconsistentNaming | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters