Skip to content

Commit

Permalink
Merge branch 'hotfix_0717'
Browse files Browse the repository at this point in the history
  • Loading branch information
andanteyk committed Jul 18, 2015
2 parents c89683a + e4a7032 commit 82a758e
Show file tree
Hide file tree
Showing 16 changed files with 281 additions and 129 deletions.
22 changes: 12 additions & 10 deletions ElectronicObserver/Data/Battle/BattleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,18 @@ public override void LoadFromResponse( string apiname, dynamic data ) {
private void BattleFinished() {

//敵編成記録
switch ( BattleMode & BattleModes.BattlePhaseMask ) {
case BattleModes.Normal:
case BattleModes.AirBattle:
RecordManager.Instance.EnemyFleet.Update( new EnemyFleetRecord.EnemyFleetElement( Compass.EnemyFleetID, Result.EnemyFleetName, BattleDay.Searching.FormationEnemy, BattleDay.Initial.EnemyMembers ) );
break;

case BattleModes.NightOnly:
case BattleModes.NightDay:
RecordManager.Instance.EnemyFleet.Update( new EnemyFleetRecord.EnemyFleetElement( Compass.EnemyFleetID, Result.EnemyFleetName, BattleNight.Searching.FormationEnemy, BattleNight.Initial.EnemyMembers ) );
break;
if ( Compass.EnemyFleetID != -1 ) {
switch ( BattleMode & BattleModes.BattlePhaseMask ) {
case BattleModes.Normal:
case BattleModes.AirBattle:
RecordManager.Instance.EnemyFleet.Update( new EnemyFleetRecord.EnemyFleetElement( Compass.EnemyFleetID, Result.EnemyFleetName, BattleDay.Searching.FormationEnemy, BattleDay.Initial.EnemyMembers ) );
break;

case BattleModes.NightOnly:
case BattleModes.NightDay:
RecordManager.Instance.EnemyFleet.Update( new EnemyFleetRecord.EnemyFleetElement( Compass.EnemyFleetID, Result.EnemyFleetName, BattleNight.Searching.FormationEnemy, BattleNight.Initial.EnemyMembers ) );
break;
}
}


Expand Down
32 changes: 32 additions & 0 deletions ElectronicObserver/Data/CompassData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,38 @@ public ReadOnlyCollection<int> RouteChoices {
}
}
}


/// <summary>
/// 航空偵察の航空機
/// 0=なし, 1=大型飛行艇, 2=水上偵察機
/// </summary>
public int AirReconnaissancePlane {
get {
if ( RawData.api_airsearch() ) {
return (int)RawData.api_airsearch.api_plane_type;
} else {
return 0;
}
}
}


/// <summary>
/// 航空偵察結果
/// 0=失敗, 1=成功, 2=大成功
/// </summary>
public int AirReconnaissanceResult {
get {
if ( RawData.api_airsearch() ) {
return (int)RawData.api_airsearch.api_result;
} else {
return 0;
}
}
}


}


Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Data/ShipData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ElectronicObserver.Data {
/// <summary>
/// 個別の艦娘データを保持します。
/// </summary>
[DebuggerDisplay( "[{ID}] : {KCDatabase.Instance.MasterShips[ShipID].NameWithClass} Lv. {Level}" )]
[DebuggerDisplay( "[{ID}] {KCDatabase.Instance.MasterShips[ShipID].NameWithClass} Lv. {Level}" )]
public class ShipData : APIWrapper, IIdentifiable {


Expand Down
68 changes: 34 additions & 34 deletions ElectronicObserver/Data/ShipDataMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace ElectronicObserver.Data {
/// <summary>
/// 艦船のマスターデータを保持します。
/// </summary>
[DebuggerDisplay( "[{ID}] : {NameWithClass}" )]
[DebuggerDisplay( "[{ID}] {NameWithClass}" )]
public class ShipDataMaster : ResponseWrapper, IIdentifiable {

/// <summary>
Expand All @@ -27,7 +27,7 @@ public int ShipID {
/// 図鑑番号
/// </summary>
public int AlbumNo {
get { return (int)RawData.api_sortno; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_sortno; }
}

/// <summary>
Expand Down Expand Up @@ -56,15 +56,15 @@ public int ShipType {
/// 改装Lv.
/// </summary>
public int RemodelAfterLevel {
get { return (int)RawData.api_afterlv; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_afterlv; }
}

/// <summary>
/// 改装後の艦船ID
/// 0=なし
/// </summary>
public int RemodelAfterShipID {
get { return int.Parse( (string)RawData.api_aftershipid ); }
get { return IsAbyssalShip ? 0 : int.Parse( (string)RawData.api_aftershipid ); }
}

/// <summary>
Expand All @@ -88,19 +88,19 @@ public ShipDataMaster RemodelBeforeShip {
get { return RemodelBeforeShipID > 0 ? KCDatabase.Instance.MasterShips[RemodelBeforeShipID] : null; }
}


/// <summary>
/// 改装に必要な弾薬
/// </summary>
public int RemodelAmmo {
get { return (int)RawData.api_afterfuel; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_afterfuel; }
}

/// <summary>
/// 改装に必要な鋼材
/// </summary>
public int RemodelSteel {
get { return (int)RawData.api_afterbull; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_afterbull; }
}

/// <summary>
Expand All @@ -110,75 +110,75 @@ public int RemodelSteel {


#region Parameters

/// <summary>
/// 耐久初期値
/// </summary>
public int HPMin {
get { return (int)RawData.api_taik[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_taik[0]; }
}

/// <summary>
/// 耐久最大値
/// </summary>
public int HPMax {
get { return (int)RawData.api_taik[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_taik[1]; }
}

/// <summary>
/// 装甲初期値
/// </summary>
public int ArmorMin {
get { return (int)RawData.api_souk[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_souk[0]; }
}

/// <summary>
/// 装甲最大値
/// </summary>
public int ArmorMax {
get { return (int)RawData.api_souk[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_souk[1]; }
}

/// <summary>
/// 火力初期値
/// </summary>
public int FirepowerMin {
get { return (int)RawData.api_houg[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_houg[0]; }
}

/// <summary>
/// 火力最大値
/// </summary>
public int FirepowerMax {
get { return (int)RawData.api_houg[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_houg[1]; }
}

/// <summary>
/// 雷装初期値
/// </summary>
public int TorpedoMin {
get { return (int)RawData.api_raig[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_raig[0]; }
}

/// <summary>
/// 雷装最大値
/// </summary>
public int TorpedoMax {
get { return (int)RawData.api_raig[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_raig[1]; }
}

/// <summary>
/// 対空初期値
/// </summary>
public int AAMin {
get { return (int)RawData.api_tyku[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_tyku[0]; }
}

/// <summary>
/// 対空最大値
/// </summary>
public int AAMax {
get { return (int)RawData.api_tyku[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_tyku[1]; }
}


Expand Down Expand Up @@ -226,14 +226,14 @@ public ShipParameterRecord.Parameter LOS {
/// 運初期値
/// </summary>
public int LuckMin {
get { return (int)RawData.api_luck[0]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_luck[0]; }
}

/// <summary>
/// 運最大値
/// </summary>
public int LuckMax {
get { return (int)RawData.api_luck[1]; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_luck[1]; }
}

/// <summary>
Expand All @@ -248,7 +248,7 @@ public int Speed {
/// 射程
/// </summary>
public int Range {
get { return (int)RawData.api_leng; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_leng; }
}
#endregion

Expand All @@ -264,7 +264,7 @@ public int SlotSize {
/// 各スロットの航空機搭載数
/// </summary>
public ReadOnlyCollection<int> Aircraft {
get { return Array.AsReadOnly<int>( (int[])RawData.api_maxeq ); }
get { return Array.AsReadOnly<int>( IsAbyssalShip ? new[] { 0, 0, 0, 0, 0 } : (int[])RawData.api_maxeq ); }
}

/// <summary>
Expand All @@ -285,36 +285,36 @@ public ReadOnlyCollection<int> DefaultSlot {
/// 建造時間(分)
/// </summary>
public int BuildingTime {
get { return (int)RawData.api_buildtime; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_buildtime; }
}


/// <summary>
/// 解体資材
/// </summary>
public ReadOnlyCollection<int> Material {
get { return Array.AsReadOnly<int>( (int[])RawData.api_broken ); }
get { return Array.AsReadOnly<int>( IsAbyssalShip ? new[] { 0, 0, 0, 0 } : (int[])RawData.api_broken ); }
}

/// <summary>
/// 近代化改修の素材にしたとき上昇するパラメータの量
/// </summary>
public ReadOnlyCollection<int> PowerUp {
get { return Array.AsReadOnly<int>( (int[])RawData.api_powup ); }
get { return Array.AsReadOnly<int>( IsAbyssalShip ? new[] { 0, 0, 0, 0 } : (int[])RawData.api_powup ); }
}

/// <summary>
/// レアリティ
/// </summary>
public int Rarity {
get { return (int)RawData.api_backs; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_backs; }
}

/// <summary>
/// ドロップ/ログイン時のメッセージ
/// </summary>
public string MessageGet {
get { return ( (string)RawData.api_getmes ).Replace( "<br>", "\n" ); }
get { return IsAbyssalShip ? "" : ( (string)RawData.api_getmes ).Replace( "<br>", "\n" ); }
}

/// <summary>
Expand All @@ -334,22 +334,22 @@ public string MessageAlbum {
/// 搭載燃料
/// </summary>
public int Fuel {
get { return (int)RawData.api_fuel_max; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_fuel_max; }
}

/// <summary>
/// 搭載弾薬
/// </summary>
public int Ammo {
get { return (int)RawData.api_bull_max; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_bull_max; }
}


/// <summary>
/// ボイス再生フラグ
/// </summary>
public int VoiceFlag {
get { return (int)RawData.api_voicef; }
get { return IsAbyssalShip ? 0 : (int)RawData.api_voicef; }
}


Expand Down Expand Up @@ -440,7 +440,7 @@ public bool IsLandBase {
/// 図鑑に載っているか
/// </summary>
public bool IsListedInAlbum {
get { return 0 < AlbumNo && AlbumNo <= 300; }
get { return 0 < AlbumNo && AlbumNo <= 350; }
}


Expand All @@ -464,9 +464,9 @@ public int ID {


public override string ToString() {
return string.Format( "[{0}] : {1}", ShipID, NameWithClass );
return string.Format( "[{0}] {1}", ShipID, NameWithClass );
}

}

}
2 changes: 2 additions & 0 deletions ElectronicObserver/Observer/kcsapi/api_start2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public override void OnResponseReceived( dynamic data ) {
}

//api_mst_slotitemgraph
/*
foreach ( var elem in data.api_mst_slotitemgraph ) {
int id = (int)elem.api_id;
Expand All @@ -102,6 +103,7 @@ public override void OnResponseReceived( dynamic data ) {
eq.ResourceVersion = elem.api_version;
}
}
*/

//api_mst_useitem
foreach ( var elem in data.api_mst_useitem ) {
Expand Down
Loading

0 comments on commit 82a758e

Please sign in to comment.