Exemple #1
0
        /// <summary>
        /// Sets the reader to object.
        /// </summary>
        /// <param name="objForcePower">The object force power.</param>
        /// <param name="result">The result.</param>
        private void SetReaderToObject(ref ForcePower objForcePower, ref SqlDataReader result)
        {
            if (result.HasRows)
            {
                objForcePower.ForcePowerID          = (int)result.GetValue(result.GetOrdinal("ForcePowerID"));
                objForcePower.ForcePowerName        = result.GetValue(result.GetOrdinal("ForcePowerName")).ToString();
                objForcePower.ForcePowerDescription = result.GetValue(result.GetOrdinal("ForcePowerDescription")).ToString();
                //objForcePower.ForcePowerDescriptorID = (int)result.GetValue(result.GetOrdinal("ForcePowerDescriptorID"));
                objForcePower.TurnSegmentID     = (int)result.GetValue(result.GetOrdinal("TurnSegmentID"));
                objForcePower.ForcePowerTarget  = result.GetValue(result.GetOrdinal("ForcePowerTarget")).ToString();
                objForcePower.ForcePowerSpecial = result.GetValue(result.GetOrdinal("ForcePowerSpecial")).ToString();


                ForcePowerDescriptor FPD = new ForcePowerDescriptor();
                objForcePower.objForcePowerDescriptors = FPD.GetForcePowerForcePowerDescriptors(" ForcePowerID=" + objForcePower.ForcePowerID.ToString(), " ForcePowerDescriptorName ");



                if (objForcePower.TurnSegmentID != 0)
                {
                    TurnSegment TS = new TurnSegment();

                    objForcePower.objTurnSegment = TS.GetTurnSegment(objForcePower.TurnSegmentID);
                }

                objForcePower._objComboBoxData.Add(objForcePower.ForcePowerID, objForcePower.ForcePowerName);
            }
        }
Exemple #2
0
        /// <summary>
        /// Sets the reader to object.
        /// </summary>
        /// <param name="result">The result.</param>
        private void SetReaderToObject(ref SqlDataReader result)
        {
            if (result.HasRows)
            {
                this.TalentID          = (int)result.GetValue(result.GetOrdinal("TalentID"));
                this.TalentName        = result.GetValue(result.GetOrdinal("TalentName")).ToString();
                this.TalentDescription = result.GetValue(result.GetOrdinal("TalentDescription")).ToString();
                this.TalentTreeID      = (int)result.GetValue(result.GetOrdinal("TalentTreeID"));
                this.MultipleSelection = (int)result.GetValue(result.GetOrdinal("MultipleSelection"));
                this.BookID            = (int)result.GetValue(result.GetOrdinal("BookID"));
                this.TalentSpecial     = result.GetValue(result.GetOrdinal("TalentSpecial")).ToString();

                this._objComboBoxData.Add(this.TalentID, this.TalentName);

                TurnSegment objTurnSegment = new TurnSegment();
                if (!(this.TurnSegmentID == 0))
                {
                    objTurnSegment.GetTurnSegment(this.TurnSegmentID);
                }
                this.objTurnSegment = objTurnSegment;


                Talent objPreTalent = new Talent();
                this.objPrerequsiteTalent = objPreTalent.GetPrerequisteTalents(" otmTalentPrerequisteTalent.TalentID=" + this.TalentID.ToString(), "TalentName");

                //List<Ability> objPrerequisteAbility
                TalentPrerequisteAbility objTalentPrerequisteAbility = new TalentPrerequisteAbility();
                this.objTalentPrerequisteAbility = objTalentPrerequisteAbility.GetTalentPrerequisteAbilities("TalentID=" + this.TalentID.ToString(), "");

                Skill objSkill = new Skill();
                this.objTalentPrerequsiteSkill = objSkill.GetTalentRequiredSkills("TalentID=" + this.TalentID.ToString(), "");

                Feat objFeat = new Feat();
                this.objTalentPrerequsiteFeat = objFeat.GetTalentPrerequisiteFeats("TalentID=" + this.TalentID.ToString(), "");

                ForcePower objPreForcePower = new ForcePower();
                this.objTalentPrerequisteForcePower = objPreForcePower.GetTalentPrequisteForcePowers("TalentID=" + this.TalentID.ToString(), "");

                BaseAttack objBaseAttack = new BaseAttack();
                this.objBaseAttackPrerequisite = objBaseAttack.GetFeatPrequisiteBaseAttackBonus(this.TalentID);
            }
        }