Beispiel #1
0
        public BuffInfo(CharacterEntity character, CharacterEntity target, SkillInfo skillInfo, MechanicsData mechanics, BuffType buffType, SkillLevelBuffAddType skillLevelBuffAddType, BuffAddType buffAddType, int count, uint targetSkillId, float value, uint level, int judgeType)
        {
            this.mechanics   = mechanics;
            this.character   = character;
            this.target      = target;
            this.skillInfo   = skillInfo;
            this.buffType    = buffType;
            this.buffAddType = buffAddType;
            this.judgeType   = judgeType;
#if UNITY_EDITOR
            this.skillLevelBuffAddType = skillLevelBuffAddType;
#endif
            this.targetSkillId = targetSkillId;
            this.count         = count;
            switch (skillLevelBuffAddType)
            {
            case SkillLevelBuffAddType.Time:

                break;

            case SkillLevelBuffAddType.Value:
            {
                float result = Skill.SkillUtil.GetMechanicsValueByAdvanceLevel(value, character.characterInfo.dlevel);
                result     = BuffUtil.GetBuffValue(result, level);
                this.value = result;
            }
            break;
            }
            kindness      = BuffUtil.Judge(this.buffType, this.value);
            originalValue = this.value;
            interval      = 1;
        }
Beispiel #2
0
        public BuffInfo(CharacterEntity character, CharacterEntity target, SkillInfo skillInfo, MechanicsData mechanics, BuffType buffType, SkillLevelBuffAddType skillLevelBuffAddType, BuffAddType buffAddType, float time, float value, uint level, int judgeType)
        {
            this.mechanics   = mechanics;
            this.character   = character;
            this.target      = target;
            this.skillInfo   = skillInfo;
            this.buffType    = buffType;
            this.buffAddType = buffAddType;
            this.judgeType   = judgeType;
#if UNITY_EDITOR
            this.skillLevelBuffAddType = skillLevelBuffAddType;
#endif
            switch (skillLevelBuffAddType)
            {
            case SkillLevelBuffAddType.Time:
            {
                float result = Skill.SkillUtil.GetMechanicsValueByAdvanceLevel(time, character.characterInfo.dlevel);
                result     = BuffUtil.GetBuffValue(result, level);
                this.time  = TimeController.instance.fightSkillTime + result;
                this.value = value;
                break;
            }

            case SkillLevelBuffAddType.Value:
            {
                float result = Skill.SkillUtil.GetMechanicsValueByAdvanceLevel(value, character.characterInfo.dlevel);
                result     = BuffUtil.GetBuffValue(result, level);
                this.value = result;
                this.time  = TimeController.instance.fightSkillTime + time;
                break;
            }

            default:
                this.time  = TimeController.instance.fightSkillTime + time;
                this.value = value;
                break;
            }
            kindness      = BuffUtil.Judge(this.buffType, this.value);
            originalValue = this.value;
            interval      = 1;
        }