/// <summary> /// Initializes a new instance of the <see cref="MapAffixViewModel" /> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="selectable">if set to <c>true</c> [selectable].</param> /// <param name="playerViewModel">The player view model.</param> /// <param name="ignored">if set to <c>true</c> [ignored].</param> public MapAffixViewModel(string id, bool selectable, PlayerViewModel playerViewModel, bool ignored = false) { this.Selectable = selectable; switch (id) { case ReflectPhysicalId: this._reflectPhysical = true; break; case ReflectElementalId: this._reflectElemental = true; break; case CannotRegenerateId: this._cannotRegenerate = true; break; case CannotLeechId: this._cannotLeech = true; break; case TemporalChainsId: this._temporalChains = true; break; case AvoidAilmentsId: this._avoidAilments = true; break; } this._id = id; this._playerViewModel = playerViewModel; this._selected = !this._playerViewModel.IgnoredMadMods.Contains(id); this._name = AffixService.GetAffixText(id); this._ignored = ignored; }
/// <summary> /// Initializes a new instance of the <see cref="MapAffixViewModel" /> class. /// </summary> /// <param name="affix">The affix.</param> /// <param name="playerViewModel">The player view model.</param> public MapAffixViewModel(Affix affix, PlayerViewModel playerViewModel) : this(affix.Id, false, playerViewModel) { this._affix = affix; }