Пример #1
0
        public float GetOneEquipmentBasePower(int equipmentId, int level, int breakthrough)
        {
            Equipment equipmentById = this.GetEquipmentById(equipmentId);

            if (equipmentById == null)
            {
                Logger.Warn("Invalid Equipment Id : {0:X}", new object[] { equipmentId });
                return(0f);
            }
            EquipBreakthrough breakthroughByTimes = equipmentById.GetBreakthroughByTimes(breakthrough);

            if (breakthroughByTimes == null)
            {
                Logger.Warn("Invalid Equipment Breakthrough : {0:X}", new object[] { breakthrough });
                return(0f);
            }
            PowerAttribute powerAttributes = breakthroughByTimes.powerAttributes;

            if (powerAttributes == null)
            {
                Logger.Warn("Invalid Equipment Breakthrough PowerBuffer is Not Find!", new object[0]);
                return(0f);
            }
            return(powerAttributes.GetValue(level));
        }
Пример #2
0
        public float GetOneSkillBasePower(int skillId, int level)
        {
            Skill skillById = this.GetSkillById(skillId);

            if (skillById == null)
            {
                Logger.Warn("Invalid Skill Id :{0:X}", new object[] { skillId });
                return(0f);
            }
            PowerAttribute powerAttributes = skillById.powerAttributes;

            if (powerAttributes == null)
            {
                Logger.Warn("Skill PowerBuffer is Not Find!", new object[0]);
                return(0f);
            }
            return(powerAttributes.GetValue(level));
        }