Beispiel #1
0
        /// <summary>
        /// 更新充能技能
        /// </summary>
        private void UpdateChargeSkill(CCreature m_caster, int hurtVal)
        {
            if (m_caster == null || m_caster.m_cmdFspSendSkill == null)
            {
                return;
            }

            CSkillInfo cInfo = m_caster.GetSkillByIndex(m_caster.m_cmdFspSendSkill.m_skillIndex);

            if (cInfo == null)
            {
                return;
            }

            // 如果施法者,当前是放的蓄能大招,则不进行充能
            if (cInfo.GetCDType() == (int)eSkillCdType.Charge)
            {
                return;
            }

            foreach (KeyValuePair <int, CSkillInfo> item in m_caster.m_dicSkill)
            {
                CSkillInfo info = item.Value;
                if (info.GetCDType() == (int)eSkillCdType.Charge)
                {
                    info.AddCharge(hurtVal);
                    // 更新界面
                    m_caster.UpdateUI_Charge(info.GetSkillIndex(), info.GetChargePct());
                }
            }
        }