This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
forked from Zharay/KanColleViewer
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
7 changed files
with
152 additions
and
2 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
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,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Grabacr07.KanColleWrapper.Models.Raw; | ||
|
||
namespace Grabacr07.KanColleWrapper.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,61 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Grabacr07.KanColleWrapper.Models.Raw; | ||
|
||
namespace Grabacr07.KanColleWrapper.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] ?? 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 | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_maparea.cs
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,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Grabacr07.KanColleWrapper.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; } | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Grabacr07.KanColleWrapper/Models/Raw/kcsapi_mst_mapinfo.cs
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,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Grabacr07.KanColleWrapper.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