From c2429f09619cbbbbbf82dd676c1fcb2079a7ed75 Mon Sep 17 00:00:00 2001 From: Yuubari Date: Mon, 9 Nov 2015 17:31:50 +0300 Subject: [PATCH] Implement additional stats support in the Ship model --- source/Grabacr07.KanColleWrapper/Models/Ship.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/Grabacr07.KanColleWrapper/Models/Ship.cs b/source/Grabacr07.KanColleWrapper/Models/Ship.cs index 48195c693..381be8df3 100644 --- a/source/Grabacr07.KanColleWrapper/Models/Ship.cs +++ b/source/Grabacr07.KanColleWrapper/Models/Ship.cs @@ -293,6 +293,12 @@ public ShipSlot ExSlot /// public int ViewRange => this.RawData.api_sakuteki.Get(0) ?? 0; + public LimitedValue AntiSub { get; private set; } + + public LimitedValue Evasion { get; private set; } + + public LimitedValue LineOfSight { get; private set; } + /// /// 火力・雷装・対空・装甲のすべてのステータス値が最大値に達しているかどうかを示す値を取得します。 /// @@ -358,6 +364,10 @@ internal void Update(kcsapi_ship2 rawData) } this.UpdateSlots(); + + this.AntiSub = new LimitedValue(this.RawData.api_taisen[0], this.RawData.api_taisen[1], this.RawData.api_taisen[0] - this.EquippedItems.Sum(s => s.Item.Info.RawData.api_tais)); + this.Evasion = new LimitedValue(this.RawData.api_kaihi[0], this.RawData.api_kaihi[1], this.RawData.api_kaihi[0] - this.EquippedItems.Sum(s => s.Item.Info.RawData.api_houk)); + this.LineOfSight = new LimitedValue(this.RawData.api_sakuteki[0], this.RawData.api_sakuteki[1], this.RawData.api_sakuteki[0] - this.EquippedItems.Sum(s => s.Item.Info.RawData.api_saku)); } public void UpdateSlots()