//遠征バルーンのインスタンス public static BalloonItem GetInstanceMission(int fleetid, long completetime) { DateTime endtime = KancolleInfo.EpochmsToDate(completetime); //バルーンアイテム BalloonItem b = new BalloonItem() { Type = BalloonInfoType.Mission, Message = string.Format("第{0}艦隊が遠征から帰投します", fleetid), ExecuteTime = endtime - new TimeSpan(0, 1, 0), }; return b; }
//入渠ドックのバルーンインスタンスを生成(ちょっと精度落ちるかも) public static BalloonItem GetInstanceNdock(int shipid, int ndockid) { ApiShip ship = APIPort.ShipsDictionary[shipid]; string name = ship.ShipName; int milsec = ship.api_ndock_time; DateTime endtime = DateTime.Now.AddMilliseconds(milsec);//入渠完了時間 //バルーンアイテム BalloonItem b = new BalloonItem() { Type = BalloonInfoType.Ndock, Message = string.Format("{0}(Lv{1})の修理が完了しました", name, ship.api_lv), ExecuteTime = endtime - new TimeSpan(0, 1, 0), NdockID = ndockid, }; return b; }
//入渠ドックのバルーンインスタンス(精度良い) public static BalloonItem GetInstanceNdock(int shipid, long epochs, int ndockid) { ApiShip ship = APIPort.ShipsDictionary[shipid]; string name = ship.ShipName; DateTime endtime = KancolleInfo.EpochmsToDate(epochs);//入渠完了時間 //バルーンアイテム BalloonItem b = new BalloonItem() { Type = BalloonInfoType.Ndock, Message = string.Format("{0}(Lv{1})の修理が完了しました", name, ship.api_lv), ExecuteTime = endtime - new TimeSpan(0, 1, 0), NdockID = ndockid, }; return b; }