Exemplo n.º 1
0
 public EncyclopediaHeroPageVMExtensionVM(EncyclopediaPageArgs args) : base(args)
 {
     this._grantFiefInterface = new GrantFiefInterface();
     _hero = (base.Obj as Hero);
     this.SendMessengerInfluenceCost = (int)DiplomacyCostCalculator.DetermineInfluenceCostForSendingMessenger();
     this.SendMessengerActionName    = new TextObject("{=cXfcwzPp}Send Messenger").ToString();
     this.GrantFiefActionName        = new TextObject("{=LpoyhORp}Grant Fief").ToString();
     this.CanGrantFief = GrantFiefAction.CanGrantFief(this._hero.Clan, out _);
     base.RefreshValues();
 }
 public EncyclopediaHeroPageVMExtensionVM(EncyclopediaPageArgs args) : base(args)
 {
     _grantFiefInterface = new GrantFiefInterface();
     _hero = (Obj as Hero) !;
     _sendMessengerCost      = DiplomacyCostCalculator.DetermineCostForSendingMessenger();
     SendMessengerCost       = (int)_sendMessengerCost.Value;
     SendMessengerActionName = new TextObject("{=cXfcwzPp}Send Messenger").ToString();
     GrantFiefActionName     = new TextObject("{=LpoyhORp}Grant Fief").ToString();
     RefreshValues();
 }
        public KingdomClanVMExtensionVM(Action <TaleWorlds.CampaignSystem.Election.KingdomDecision> forceDecide) : base(forceDecide)
        {
            this._executeExpel   = () => typeof(KingdomClanVM).GetMethod("ExecuteExpelCurrentClan", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(this, new object[] { });
            this._executeSupport = () => typeof(KingdomClanVM).GetMethod("ExecuteSupport", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(this, new object[] { });

            Events.FiefGranted.AddNonSerializedListener(this, this.RefreshCanGrantFief);
            this._grantFiefInterface      = new GrantFiefInterface();
            this.GrantFiefActionName      = new TextObject("{=LpoyhORp}Grant Fief").ToString();
            this.GrantFiefExplanationText = new TextObject("{=98hwXUTp}Grant fiefs to clans in your kingdom").ToString();
            base.PropertyChanged         += new PropertyChangedEventHandler(this.OnPropertyChanged);
            RefreshCanGrantFief();
        }
        public KingdomClanVMExtensionVM(Action <TaleWorlds.CampaignSystem.Election.KingdomDecision> forceDecide) : base(forceDecide)
        {
            Events.FiefGranted.AddNonSerializedListener(this, RefreshCanGrantFief);

            _grantFiefInterface      = new GrantFiefInterface();
            GrantFiefActionName      = new TextObject("{=LpoyhORp}Grant Fief").ToString();
            GrantFiefExplanationText = new TextObject("{=98hwXUTp}Grant fiefs to clans in your kingdom").ToString();

            DonateGoldActionName      = new TextObject("{=Gzq6VHPt}Donate Gold").ToString();
            DonateGoldExplanationText = new TextObject("{=7QvXkcxH}Donate gold to clans in your kingdom").ToString();

            UsurpThroneActionName       = new TextObject("{=N7goPgiq}Usurp Throne").ToString();
            _usurpThroneExplanationText = string.Empty;

            PropertyChangedWithValue += new PropertyChangedWithValueEventHandler(OnPropertyChangedWithValue);

            RefreshCanGrantFief();
            RefreshCanUsurpThrone();
        }