母港を表します。
Inheritance: Livet.NotificationObject
Example #1
0
        public Organization(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.Ships = new MemberTable<Ship>();
            this.Fleets = new MemberTable<Fleet>();

            proxy.api_get_member_ship.TryParse<kcsapi_ship2[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship2.TryParse<kcsapi_ship2[]>().Subscribe(x =>
            {
                this.Update(x.Data);
                this.Update(x.Fleets);
            });
            proxy.api_get_member_ship3.TryParse<kcsapi_ship3>().Subscribe(x =>
            {
                this.Update(x.Data.api_ship_data);
                this.Update(x.Data.api_deck_data);
            });

            proxy.api_get_member_deck.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_deck_port.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship_deck.TryParse<kcsapi_ship_deck>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
            proxy.api_req_hokyu_charge.TryParse<kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
            proxy.api_req_kaisou_powerup.TryParse<kcsapi_powerup>().Subscribe(this.Powerup);
            proxy.api_req_kousyou_getship.TryParse<kcsapi_kdock_getship>().Subscribe(x => this.GetShip(x.Data));
            proxy.api_req_kousyou_destroyship.TryParse<kcsapi_destroyship>().Subscribe(this.DestoryShip);
            proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName);

            proxy.api_req_hensei_combined.TryParse<kcsapi_hensei_combined>()
                .Subscribe(x => this.Combined = x.Data.api_combined != 0);

            this.SubscribeSortieSessions(proxy);
        }
        public Organization(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.Ships  = new MemberTable <Ship>();
            this.Fleets = new MemberTable <Fleet>();

            proxy.api_get_member_ship.TryParse <kcsapi_ship2[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship2.TryParse <kcsapi_ship2[]>().Subscribe(x =>
            {
                this.Update(x.Data);
                this.Update(x.Fleets);
            });
            proxy.api_get_member_ship3.TryParse <kcsapi_ship3>().Subscribe(x =>
            {
                this.Update(x.Data.api_ship_data);
                this.Update(x.Data.api_deck_data);
            });

            proxy.api_get_member_deck.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_deck_port.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
            proxy.api_req_hokyu_charge.TryParse <kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
            proxy.api_req_kaisou_powerup.TryParse <kcsapi_powerup>().Subscribe(this.Powerup);
            proxy.api_req_kousyou_getship.TryParse <kcsapi_kdock_getship>().Subscribe(x => this.GetShip(x.Data));
            proxy.api_req_kousyou_destroyship.TryParse <kcsapi_destroyship>().Subscribe(this.DestoryShip);
            proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName);

            proxy.api_req_hensei_combined.TryParse <kcsapi_hensei_combined>()
            .Subscribe(x => this.Combined = x.Data.api_combined != 0);

            this.SubscribeSortieSessions(proxy);
        }
Example #3
0
        internal Repairyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;
            this.Docks    = new MemberTable <RepairingDock>();

            proxy.api_get_member_ndock.TryParse <kcsapi_ndock[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_nyukyo_start.TryParse().Subscribe(this.Start);
            proxy.api_req_nyukyo_speedchange.TryParse().Subscribe(this.ChangeSpeed);
        }
Example #4
0
        internal Repairyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;
            this.Docks    = new MemberTable <RepairingDock>();

            proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_get_member/ndock")
            .TryParse <kcsapi_ndock[]>()
            .Subscribe(this.Update);
        }
Example #5
0
        internal Repairyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;
            this.Docks = new MemberTable<RepairingDock>();

            proxy.api_get_member_ndock.TryParse<kcsapi_ndock[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_nyukyo_start.TryParse().Subscribe(this.Start);
            proxy.api_req_nyukyo_speedchange.TryParse().Subscribe(this.ChangeSpeed);
        }
Example #6
0
        internal Repairyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;
            this.Docks = new MemberTable<RepairingDock>();

            proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_get_member/ndock")
                .TryParse<kcsapi_ndock[]>()
                .Subscribe(this.Update);
        }
Example #7
0
		public void Initialieze()
		{
			var proxy = this.Proxy ?? (this.Proxy = new KanColleProxy());

            proxy.Synchronize = true;
            Homeport = new Homeport(proxy);

            IDisposable disposable = null;
            disposable = proxy.api_start2.TryParse<kcsapi_start2>().Subscribe(svd => {
                this.Master = new Master(svd.Data);
                this.IsStarted = true;
                disposable.Dispose();
                proxy.Synchronize = false;
            });
		}
Example #8
0
        internal Itemyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.SlotItems = new MemberTable<SlotItem>();
            this.UseItems = new MemberTable<UseItem>();

            proxy.api_get_member_slot_item.TryParse<kcsapi_slotitem[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_kousyou_createitem.TryParse<kcsapi_createitem>().Subscribe(x => this.CreateItem(x.Data));
            proxy.api_req_kousyou_destroyitem2.TryParse<kcsapi_destroyitem2>().Subscribe(this.DestroyItem);
            proxy.api_req_sortie_battleresult.TryParse<kcsapi_battleresult>().Subscribe(x => this.DropShip(x.Data));

            proxy.api_get_member_useitem.TryParse<kcsapi_useitem[]>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_kousyou_remodel_slot.TryParse<kcsapi_remodel_slot>().Subscribe(x =>
            {
                this.RemoveFromRemodel(x.Data);
                this.RemodelSlotItem(x.Data);
            });
        }
Example #9
0
        internal Itemyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.SlotItems = new MemberTable <SlotItem>();
            this.UseItems  = new MemberTable <UseItem>();

            proxy.api_get_member_slot_item.TryParse <kcsapi_slotitem[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_kousyou_createitem.TryParse <kcsapi_createitem>().Subscribe(x => this.CreateItem(x.Data));
            proxy.api_req_kousyou_destroyitem2.TryParse <kcsapi_destroyitem2>().Subscribe(this.DestroyItem);
            proxy.api_req_sortie_battleresult.TryParse <kcsapi_battleresult>().Subscribe(x => this.DropShip(x.Data));

            proxy.api_get_member_useitem.TryParse <kcsapi_useitem[]>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_kousyou_remodel_slot.TryParse <kcsapi_remodel_slot>().Subscribe(x =>
            {
                this.RemoveFromRemodel(x.Data);
                this.RemodelSlotItem(x.Data);
            });
        }
Example #10
0
        public Organization(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.Ships  = new MemberTable <Ship>();
            this.Fleets = new MemberTable <Fleet>();

            proxy.api_get_member_ship.TryParse <kcsapi_ship2[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship2.TryParse <kcsapi_ship2[]>().Subscribe(x =>
            {
                this.Update(x.Data);
                this.Update(x.Fleets);
            });
            proxy.api_get_member_ship3.TryParse <kcsapi_ship3>().Subscribe(x =>
            {
                this.Update(x.Data.api_ship_data);
                this.Update(x.Data.api_deck_data);
            });

            proxy.api_get_member_deck.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_deck_port.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
            proxy.api_req_hokyu_charge.TryParse <kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
            proxy.api_req_kaisou_powerup.TryParse <kcsapi_powerup>().Subscribe(this.Powerup);
            proxy.api_req_kousyou_getship.TryParse <kcsapi_kdock_getship>().Subscribe(x => this.GetShip(x.Data));
            proxy.api_req_kousyou_destroyship.TryParse <kcsapi_destroyship>().Subscribe(this.DestoryShip);
            proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName);

            proxy.api_req_sortie_battleresult.TryParse <kcsapi_battleresult>().Subscribe(x => this.DropShip(x.Data));

            proxy.api_req_hensei_combined.TryParse <kcsapi_hensei_combined>()
            .Subscribe(x => this.Combined = x.Data.api_combined == 1);

            proxy.ApiSessionSource
            .SkipUntil(proxy.api_req_map_start.TryParse().Do(this.Sortie))
            .TakeUntil(proxy.api_port)
            .Finally(this.Homing)
            .Repeat()
            .Subscribe();
        }
Example #11
0
		public Organization(Homeport parent, KanColleProxy proxy)
		{
			this.homeport = parent;

			this.Ships = new MemberTable<Ship>();
			this.Fleets = new MemberTable<Fleet>();

			proxy.api_get_member_ship.TryParse<kcsapi_ship2[]>().Subscribe(x => this.Update(x.Data));
			proxy.api_get_member_ship2.TryParse<kcsapi_ship2[]>().Subscribe(x =>
			{
				this.Update(x.Data);
				this.Update(x.Fleets);
			});
			proxy.api_get_member_ship3.TryParse<kcsapi_ship3>().Subscribe(x =>
			{
				this.Update(x.Data.api_ship_data);
				this.Update(x.Data.api_deck_data);
			});

			proxy.api_get_member_deck.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
			proxy.api_get_member_deck_port.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));

			proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
			proxy.api_req_hokyu_charge.TryParse<kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
			proxy.api_req_kaisou_powerup.TryParse<kcsapi_powerup>().Subscribe(this.Powerup);
			proxy.api_req_kousyou_getship.TryParse<kcsapi_kdock_getship>().Subscribe(x => this.GetShip(x.Data));
			proxy.api_req_kousyou_destroyship.TryParse<kcsapi_destroyship>().Subscribe(this.DestoryShip);
			proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName);

			proxy.api_req_hensei_combined.TryParse<kcsapi_hensei_combined>()
				.Subscribe(x => this.Combined = x.Data.api_combined == 1);

			proxy.ApiSessionSource
				.SkipUntil(proxy.api_req_map_start.TryParse().Do(this.Sortie))
				.TakeUntil(proxy.api_port)
				.Finally(this.Homing)
				.Repeat()
				.Subscribe();
		}
Example #12
0
        internal Itemyard(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.SlotItems = new MemberTable <SlotItem>();
            this.UseItems  = new MemberTable <UseItem>();

            proxy.api_get_member_slot_item.TryParse <kcsapi_slotitem[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_kousyou_createitem.TryParse <kcsapi_createitem>().Subscribe(x => this.CreateItem(x.Data));
            proxy.api_req_kousyou_destroyitem2.TryParse <kcsapi_destroyitem2>().Subscribe(this.DestroyItem);
            // 出撃中の装備数調整は諦め!

            proxy.api_req_kaisou_lock.TryParse <kcsapi_slotitem>().Subscribe(x => this.UpdateLock(x.Request["api_slotitem_id"], x.Data));

            proxy.api_get_member_useitem.TryParse <kcsapi_useitem[]>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_kousyou_remodel_slot.TryParse <kcsapi_remodel_slot>().Subscribe(x =>
            {
                this.RemoveFromRemodel(x.Data);
                this.RemodelSlotItem(x.Data);
            });
        }
		private void UpdateMode()
		{
			if (!this.Initialised)
			{
				this.Initialised = true;
				this.homeport = KanColleClient.Current.Homeport;
				this.CompositeDisposable.Add(new PropertyChangedEventListener(this.homeport.Organization)
				{
					{ () => this.homeport.Organization.Ships, (sender, args) => this.Update() },
				});
			}
		}
Example #14
0
        public void Initialieze()
        {
            var proxy = this.Proxy ?? (this.Proxy = new KanColleProxy());

            proxy.Synchronize = true;
            Homeport = new Homeport(proxy);

            IDisposable disposable = null;
            disposable = proxy.api_start2.TryParse<kcsapi_start2>().Subscribe(svd => {
                this.Master = new Master(svd.Data);
                this.IsStarted = true;
                disposable.Dispose();
                proxy.Synchronize = false;
            });
        }
Example #15
0
        public Organization(Homeport parent, KanColleProxy proxy)
        {
            this.homeport = parent;

            this.Ships  = new MemberTable <Ship>();
            this.Fleets = new MemberTable <Fleet>();

            proxy.api_get_member_ship.TryParse <kcsapi_ship2[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship2.TryParse <kcsapi_ship2[]>().Subscribe(x =>
            {
                this.Update(x.Data);
                this.Update(x.Fleets);
            });
            proxy.api_get_member_ship3.TryParse <kcsapi_ship3>().Subscribe(x =>
            {
                this.Update(x.Data.api_ship_data);
                this.Update(x.Data.api_deck_data);
            });

            proxy.api_get_member_deck.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_deck_port.TryParse <kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
            proxy.api_get_member_ship_deck.TryParse <kcsapi_ship_deck>().Subscribe(x => this.Update(x.Data));
            proxy.api_req_hensei_preset_select.TryParse <kcsapi_deck>().Subscribe(x => this.Update(x.Data));

            proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
            proxy.api_req_hokyu_charge.TryParse <kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
            proxy.api_req_kaisou_powerup.TryParse <kcsapi_powerup>().Subscribe(this.Powerup);
            proxy.api_req_kaisou_slot_exchange_index.TryParse <kcsapi_slot_exchange_index>().Subscribe(this.ExchangeSlot);
            proxy.api_req_kaisou_slot_deprive.TryParse <kcsapi_slot_deprive>().Subscribe(x => this.DepriveSlotItem(x.Data));

            proxy.api_req_kousyou_getship.TryParse <kcsapi_kdock_getship>().Subscribe(x => this.GetShip(x.Data));
            proxy.api_req_kousyou_destroyship.TryParse <kcsapi_destroyship>().Subscribe(this.DestoryShip);
            proxy.api_req_member_updatedeckname.TryParse().Subscribe(this.UpdateFleetName);

            proxy.api_req_hensei_combined.TryParse <kcsapi_hensei_combined>()
            .Subscribe(x =>
            {
                this.Combined = x.Data.api_combined != 0;

                int type;
                if (int.TryParse(x.Request["api_combined_type"], out type))
                {
                    this.CombinedType = (CombinedFleetType)type;
                }
            });

            proxy.api_req_mission_result.TryParse <kcsapi_mission_result>()
            .Subscribe(x => {
                var mission = KanColleClient.Current.Master.Missions
                              .Select(y => y.Value)
                              .FirstOrDefault(y => y.JPTitle == x.Data.api_quest_name);

                if (mission != null)
                {
                    var fleet = this.Fleets
                                .Select(y => y.Value)
                                .FirstOrDefault(y => y.Expedition.Id == mission.Id);

                    if (fleet != null)
                    {
                        fleet.Expedition.Done(x.Data);
                    }
                }
            });

            this.SubscribeSortieSessions(proxy);
        }