ARKBreedingStats.Creature.recalculateAncestorGenerations C# (CSharp) Method

recalculateAncestorGenerations() public method

public recalculateAncestorGenerations ( ) : void
return void
        public void recalculateAncestorGenerations()
        {
            generation = ancestorGenerations();
        }

Usage Example

Exemplo n.º 1
0
        private void closeSettings(bool save)
        {
            panel1.Visible = false;
            if (save)
            {
                SuspendLayout();
                creature.name   = textBoxName.Text;
                creature.gender = sex;
                creature.owner  = textBoxOwner.Text;
                Creature parent = null;
                if (checkBoxIsBred.Checked)
                {
                    parent = parentComboBoxMother.SelectedParent;
                }
                creature.motherGuid = (parent != null ? parent.guid : Guid.Empty);
                bool parentsChanged = false;
                if (creature.Mother != parent)
                {
                    creature.Mother = parent;
                    parentsChanged  = true;
                }
                parent = null;
                if (checkBoxIsBred.Checked)
                {
                    parent = parentComboBoxFather.SelectedParent;
                }
                creature.fatherGuid = (parent != null ? parent.guid : Guid.Empty);
                if (creature.Father != parent)
                {
                    creature.Father = parent;
                    parentsChanged  = true;
                }
                if (parentsChanged)
                {
                    creature.recalculateAncestorGenerations();
                }

                creature.isBred = checkBoxIsBred.Checked;

                for (int s = 0; s < 7; s++)
                {
                    creature.levelsDom[s] = (int)numUDLevelsDom[s].Value;
                }
                creature.note = textBoxNote.Text;
                bool creatureStatusChanged = (creature.status != status);
                creature.status = status;

                Changed(creature, creatureStatusChanged);
                updateLabel();
                ResumeLayout();
            }
        }
All Usage Examples Of ARKBreedingStats.Creature::recalculateAncestorGenerations