示例#1
0
        public override void ToggleSoul(SoulType soul)
        {
            var maxPowerSoulCount = SoulCollection.PowerSoulsCount;

            if (maxPowerSoulCount == 0)
            {
                return;
            }

            if (ActiveSouls.Contains(soul))
            {
                RemoveSoul(soul);
            }
            else if (ActiveSouls.Count < maxPowerSoulCount)
            {
                AddSoul(soul);
            }
            else
            {
                RemoveFirst();
                AddSoul(soul);
            }

            OnPropertyChanged(nameof(PowerSoulsCount));
            OnPropertyChanged(nameof(TotalUniques));
            LoadoutSouls.RefreshPropertyBinding("PowerSoul1");
            LoadoutSouls.RefreshPropertyBinding("PowerSoul2");
            HasChanges = true;
        }
示例#2
0
        void RemoveSoul(SoulType soulType)
        {
            ActiveSouls.Remove(soulType);
            var soul = Soul.New(soulType, LoadoutSouls);

            soul.DeactivateUniqueEffect();
            LoadoutSouls.DeregisterChild(soul);
        }
示例#3
0
        private void AddSoul(SoulType soulType)
        {
            ActiveSouls.Add(soulType);
            var soul = Soul.New(soulType, LoadoutSouls);

            soul.ActivateUniqueEffect();
            LoadoutSouls.DeregisterChild(soul);
        }
示例#4
0
 public override void OnLoaded()
 {
     foreach (var soulType in ActiveSouls)
     {
         var soul = Soul.New(soulType, LoadoutSouls);
         soul.ActivateUniqueEffect();
         LoadoutSouls.DeregisterChild(soul);
     }
     base.OnLoaded();
 }