public new void OnFinalize() { base.OnFinalize(); if (null != this._selectedCharacter) { this._selectedCharacter.OnFinalize(); } this._selectedCharacter = null; }
public void OnSelectedSpouse(SpouseServiceItemVM spouseItemVM) { if (spouseItemVM != this._currentSpouseView) { if (null != _currentSpouseView) { this._currentSpouseView.IsSelected = false; } this._currentSpouseView = spouseItemVM; this._selectedHero = spouseItemVM.Hero; if (null == this.SelectedCharacter) { this.SelectedCharacter = new SpouseCharacterVM(SpouseCharacterVM.StanceTypes.None); } this.SelectedCharacter.FillFrom(_selectedHero.CharacterObject, -1); this.CanGetPregnancy = !this._selectedHero.IsPregnant; this.IsNotPrimarySpouse = this._selectedHero != Hero.MainHero.Spouse; } }