Exemplo n.º 1
0
            public void ReInitialize()
            {
                this.Cleanup();

                this.stateSubscriptionStorage = new StateSubscriptionStorage();

                var groupPublicState = LandClaimAreasGroup.GetPublicState(this.areasGroup);

                groupPublicState.ClientSubscribe(
                    o => o.LastRaidTime,
                    this.RefreshRaidedState,
                    this.stateSubscriptionStorage);

                this.RefreshRaidedState();
            }
            public Controller(
                ILogicObject areasGroup,
                WorldMapController worldMapController)
            {
                this.areasGroup               = areasGroup;
                this.worldMapController       = worldMapController;
                this.stateSubscriptionStorage = new StateSubscriptionStorage();

                var groupPublicState = LandClaimAreasGroup.GetPublicState(areasGroup);

                groupPublicState.ClientSubscribe(
                    o => o.LastRaidTime,
                    this.RefreshRaidedState,
                    this.stateSubscriptionStorage);

                this.RefreshRaidedState();
            }
Exemplo n.º 3
0
        protected override void OnEnable()
        {
            this.Reset();

            this.subscriptionStorage = new StateSubscriptionStorage();

            this.characterPrivateState = ClientCurrentCharacterHelper.PrivateState;
            this.characterPrivateState.ClientSubscribe(_ => _.LastDismountedVehicleMapMark,
                                                       _ => this.Refresh(),
                                                       this.subscriptionStorage);

            this.characterPublicState = ClientCurrentCharacterHelper.PublicState;
            this.characterPublicState.ClientSubscribe(_ => _.CurrentVehicle,
                                                      _ => this.Refresh(),
                                                      this.subscriptionStorage);

            this.Refresh();
        }
Exemplo n.º 4
0
 private void Reset()
 {
     this.subscriptionStorage?.Dispose();
     this.subscriptionStorage = null;
     this.RemoveMarker();
 }