示例#1
0
 protected override void OnClone(SQLiteConnection conn)
 {
     Base.Clone(conn);
     ScaledStats.Clone(conn);
     ElementRates.Clone(conn);
     StateRates.Clone(conn);
 }
示例#2
0
        public override string ValidateInputs()
        {
            string err = Base.ValidateInputs();

            err += ScaledStats.ValidateInputs(0, 85);
            err += Skills.ValidateInputs();
            if (UpgradedClass1Input.SelectedIndex == UpgradedClass2Input.SelectedIndex && UpgradedClass1Input.SelectedIndex != 0)
            {
                err += "Upgraded Classes cannot be the same\n";
            }
            if (UsableWeaponType1Input.SelectedIndex == UsableWeaponType2Input.SelectedIndex && UsableWeaponType1Input.SelectedIndex != 0)
            {
                err += "Usable Weapon Type cannot be the same\n";
            }
            if (PassiveSkill1Input.SelectedIndex == PassiveSkill2Input.SelectedIndex && PassiveSkill1Input.SelectedIndex != 0)
            {
                err += "Passive Skills cannot be the same\n";
            }
            if (!Utils.PosInt(PSkillLvlRequired1Input.Text, 100))
            {
                err += "Level Required for Passive Skill 1 must be an integer between 0 and 100\n";
            }
            if (!Utils.PosInt(PSkillLvlRequired2Input.Text, 100))
            {
                err += "Level Required for Passive Skill 2 must be an integer between 0 and 100\n";
            }
            return(err);
        }
示例#3
0
        public override string ValidateInputs()
        {
            string err         = Base.ValidateInputs();
            string scaledStats = "";

            if (EnemyClassInput.SelectedIndex == 0)
            {
                scaledStats = ScaledStats.ValidateInputs(0, 85);
                if (scaledStats != "")
                {
                    scaledStats = "Class is set to 'None': " + scaledStats;
                }
            }
            else
            {
                scaledStats = ScaledStats.ValidateInputs(-3, 3);
                if (scaledStats != "")
                {
                    scaledStats = "Enemy has a class: " + scaledStats;
                }
            }
            err += scaledStats;
            err += ElementRates.ValidateInputs();
            err += StateRates.ValidateInputs();
            if (!Utils.PosInt(ExpInput.Text))
            {
                err += "EXP Gain must be a positive integer";
            }
            if (!Utils.PosInt(GoldInput.Text))
            {
                err += "Gold Gain must be a positive integer";
            }
            return(err);
        }
示例#4
0
 protected override void OnUpdate(SQLiteConnection conn)
 {
     Base.Update(conn);
     ScaledStats.Update(conn);
     ElementRates.Update(conn);
     StateRates.Update(conn);
     SQLUpdate(conn, "EnemyClass=@EnemyClass, ElementRates=@ElementRates, Width=@Width, Height=@Height, BossType=@BossType, Flying=@Flying, Exp=@Exp, Gold=@Gold");
 }
示例#5
0
 protected override void OnUpdate(SQLiteConnection conn)
 {
     Base.Update(conn);
     ScaledStats.Update(conn);
     Skills.Update(conn);
     SQLUpdate(conn, "UpgradedClass1=@UpgradedClass1, UpgradedClass2=@UpgradedClass2, UsableWeaponType1=@UsableWeaponType1, UsableWeaponType2=@UsableWeaponType2, " +
               "PassiveSkill1=@PassiveSkill1, PassiveSkill2=@PassiveSkill2, PSkillLvlRequired1=@PSkillLvlRequired1, PSkillLvlRequired2=@PSkillLvlRequired2");
 }
示例#6
0
 protected override void OnCreate(SQLiteConnection conn)
 {
     Base.Create(conn);
     ScaledStats.Create(conn);
     ElementRates.Create(conn);
     SQLCreate(conn, "BaseObjectID, ScaledStats, EnemyClass, ElementRates, Width, Height, BossType, Flying, Exp, Gold",
               "@BaseObjectID, @ScaledStats, @EnemyClass, @ElementRates, @Width, @Height, @BossType, @Flying, @Exp, @Gold");
     StateRates.Create(conn);
 }
示例#7
0
 protected override void OnCreate(SQLiteConnection conn)
 {
     Base.Create(conn);
     ScaledStats.Create(conn);
     SQLCreate(conn, "BaseObjectID, ScaledStats, UpgradedClass1, UpgradedClass2, UsableWeaponType1, UsableWeaponType2, " +
               "PassiveSkill1, PassiveSkill2, PSkillLvlRequired1, PSkillLvlRequired2",
               "@BaseObjectID, @ScaledStats, @UpgradedClass1, @UpgradedClass2, @UsableWeaponType1, @UsableWeaponType2," +
               "@PassiveSkill1, @PassiveSkill2, @PSkillLvlRequired1, @PSkillLvlRequired2");
     Skills.Create(conn);
 }
 public bool DeepEquals(DestinyStatGroupDefinition?other)
 {
     return(other is not null &&
            MaximumValue == other.MaximumValue &&
            UiPosition == other.UiPosition &&
            ScaledStats.DeepEqualsList(other.ScaledStats) &&
            Overrides.DeepEqualsDictionary(other.Overrides) &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
示例#9
0
 public bool DeepEquals(DestinyStatGroupDefinition other)
 {
     return(other != null &&
            MaximumValue == other.MaximumValue &&
            UiPosition == other.UiPosition &&
            ScaledStats.DeepEqualsReadOnlyCollections(other.ScaledStats) &&
            Overrides.DeepEqualsReadOnlyDictionaryWithSimpleKeyAndEquatableValue(other.Overrides) &&
            Blacklisted == other.Blacklisted &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
示例#10
0
 protected override void OnInitializeNew()
 {
     Base.InitializeNew();
     ScaledStats.InitializeNew(0, "ScaledStats");
     WidthInput.SelectedIndex    = 0;
     HeightInput.SelectedIndex   = 0;
     BossTypeInput.SelectedIndex = 0;
     FlyingInput.IsChecked       = false;
     ExpInput.Text  = "50";
     GoldInput.Text = "10";
     EnemyClassInput.SelectedIndex = 0;
 }
示例#11
0
 protected override void OnInitializeNew()
 {
     Base.InitializeNew();
     ScaledStats.InitializeNew(30, "ScaledStats");
     UpgradedClass1Input.SelectedIndex    = 0;
     UpgradedClass2Input.SelectedIndex    = 0;
     UsableWeaponType1Input.SelectedIndex = 0;
     UsableWeaponType2Input.SelectedIndex = 0;
     PassiveSkill1Input.SelectedIndex     = 0;
     PassiveSkill2Input.SelectedIndex     = 0;
     PSkillLvlRequired1Input.Text         = "1";
     PSkillLvlRequired2Input.Text         = "1";
 }
示例#12
0
 protected override void OnRead(SQLiteDataReader reader)
 {
     Base.Read(reader);
     ScaledStats.Read(reader);
     Skills.Read();
     UpgradedClass1Input.SelectedIndex    = UpgradedClass1Data.FindIndex(reader["UpgradedClass1"]);
     UpgradedClass2Input.SelectedIndex    = UpgradedClass2Data.FindIndex(reader["UpgradedClass2"]);
     UsableWeaponType1Input.SelectedIndex = UsableWeaponType1Data.FindIndex(reader["UsableWeaponType1"]);
     UsableWeaponType2Input.SelectedIndex = UsableWeaponType2Data.FindIndex(reader["UsableWeaponType2"]);
     PassiveSkill1Input.SelectedIndex     = PassiveSkill1Data.FindIndex(reader["PassiveSkill1"]);
     PassiveSkill2Input.SelectedIndex     = PassiveSkill2Data.FindIndex(reader["PassiveSkill2"]);
     PSkillLvlRequired1Input.Text         = reader["PSkillLvlRequired1"].ToString();
     PSkillLvlRequired2Input.Text         = reader["PSkillLvlRequired2"].ToString();
 }
示例#13
0
 protected override void OnRead(SQLiteDataReader reader)
 {
     Base.Read(reader);
     ScaledStats.Read(reader);
     EnemyClassInput.SelectedIndex = EnemyClassData.FindIndex(reader["EnemyClass"]);
     ElementRates.Read();
     StateRates.Read();
     WidthInput.SelectedIndex    = int.Parse(reader["Width"].ToString());
     HeightInput.SelectedIndex   = int.Parse(reader["Height"].ToString());
     BossTypeInput.SelectedIndex = int.Parse(reader["BossType"].ToString());
     FlyingInput.IsChecked       = reader["Flying"].ToString() == "True" ? true : false;
     ExpInput.Text  = reader["Exp"].ToString();
     GoldInput.Text = reader["Gold"].ToString();
 }
 public void Update(DestinyStatGroupDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (MaximumValue != other.MaximumValue)
     {
         MaximumValue = other.MaximumValue;
         OnPropertyChanged(nameof(MaximumValue));
     }
     if (UiPosition != other.UiPosition)
     {
         UiPosition = other.UiPosition;
         OnPropertyChanged(nameof(UiPosition));
     }
     if (!ScaledStats.DeepEqualsList(other.ScaledStats))
     {
         ScaledStats = other.ScaledStats;
         OnPropertyChanged(nameof(ScaledStats));
     }
     if (!Overrides.DeepEqualsDictionary(other.Overrides))
     {
         Overrides = other.Overrides;
         OnPropertyChanged(nameof(Overrides));
     }
     if (Hash != other.Hash)
     {
         Hash = other.Hash;
         OnPropertyChanged(nameof(Hash));
     }
     if (Index != other.Index)
     {
         Index = other.Index;
         OnPropertyChanged(nameof(Index));
     }
     if (Redacted != other.Redacted)
     {
         Redacted = other.Redacted;
         OnPropertyChanged(nameof(Redacted));
     }
 }
        public bool Equals(DestinyStatGroupDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MaximumValue == input.MaximumValue ||
                     (MaximumValue.Equals(input.MaximumValue))
                     ) &&
                 (
                     UiPosition == input.UiPosition ||
                     (UiPosition.Equals(input.UiPosition))
                 ) &&
                 (
                     ScaledStats == input.ScaledStats ||
                     (ScaledStats != null && ScaledStats.SequenceEqual(input.ScaledStats))
                 ) &&
                 (
                     Overrides == input.Overrides ||
                     (Overrides != null && Overrides.SequenceEqual(input.Overrides))
                 ) &&
                 (
                     Hash == input.Hash ||
                     (Hash.Equals(input.Hash))
                 ) &&
                 (
                     Index == input.Index ||
                     (Index.Equals(input.Index))
                 ) &&
                 (
                     Redacted == input.Redacted ||
                     (Redacted != null && Redacted.Equals(input.Redacted))
                 ));
        }
示例#16
0
 protected override void OnDelete(SQLiteConnection conn)
 {
     Base.Delete(conn);
     ScaledStats.Delete(conn);
     Skills.Delete(conn);
 }
示例#17
0
 protected override void OnClone(SQLiteConnection conn)
 {
     Base.Clone(conn);
     ScaledStats.Clone(conn);
     Skills.Clone(conn);
 }