Exemple #1
0
        /// <summary>
        /// 更新属性数据
        /// 升级 或者 换装时调用 。或者 有任务属性变动时 调用
        /// </summary>
        public void UpdateValue()
        {
            attachAttack.UpdateValue(Level);
            strength.UpdateValue(Level);
            intelligence.UpdateValue(Level);
            enargy.UpdateValue(Level);
            spirit.UpdateValue(Level);
            shield.UpdateValue(Level);
            spellResistance.UpdateValue(Level);
            ignoreDamage.UpdateValue(Level);
            defensive.UpdateValue(Level, () => shield.CurrValue * PropertyConstParam.ShieldToDefen);
            magicDefensive.UpdateValue(Level, () => spellResistance.CurrValue * PropertyConstParam.SpellResToMDefen);

            critical.UpdateValue(Level);
            criticalDemage.UpdateValue(Level);
            attackSpeed.UpdateValue(Level);
            magicSpeed.UpdateValue(Level);
            moveSpeed.UpdateValue(Level);
            deBuff.UpdateValue(Level);

            hp.UpdateValue(Level, () => enargy.MaxValue * PropertyConstParam.EnargyToHP);
            hp.Recovery = hp.MaxValue / PropertyConstParam.LimitHPRecSec + enargy.MaxValue * PropertyConstParam.EnartyToHPRec;

            mp.UpdateValue(Level, () => spirit.MaxValue * PropertyConstParam.SpiritToMP);
            mp.Recovery = mp.MaxValue / PropertyConstParam.LimitMPRecSec + spirit.MaxValue * PropertyConstParam.SpiritToMPRec;


            attack.UpdateValue(Level, () => strength.MaxValue * PropertyConstParam.StrengthToAttack);
            magicAttack.UpdateValue(Level, () => intelligence.MaxValue * PropertyConstParam.IntelligenceToAttack);
        }