Exemple #1
0
        protected override void Parse()
        {
            for (int i = 0; i < m_reader.Row; ++i)
            {
                m_reader.MarkRow(i);

                var meta = new ActorBornAttributeMeta(m_reader.ReadInt());
                meta.ReadDataFromTable(m_reader);
                RaceMetaManager.AddMeta(meta);
            }
        }
Exemple #2
0
        /// <summary>
        /// 根据种族和职业赋值初始化的属性
        /// </summary>
        public void InitAttr(ActorClass actorClass, ActorRace actorRace, float healthRank)
        {
            m_class = actorClass;
            m_race  = actorRace;
            var classMeta = ClassMetaManager.GetMeta((int)m_class);
            var raceMeta  = RaceMetaManager.GetMeta((int)m_race);

            m_primaryAttr = new SwordPrimaryAttributeSet();
            m_primaryAttr.InitFromClassAndRace(classMeta, raceMeta);

            m_powerAttr = new SwordPowerAttributeSet(m_primaryAttr);

            m_armorAttr = new SwordArmorAttributeSet(m_primaryAttr);

            m_resAttr = new SwordResourceAttributeSet(m_primaryAttr);
            m_resAttr.InitClassAndRace(classMeta, raceMeta, healthRank);
        }