Beispiel #1
0
        //学习武学逻辑,对应kyscpp int Role::learnMagic(int magic_id)
        public int LearnMagic(int magicId)
        {
            if (magicId <= 0)
            {
                return(-1);
            }

            foreach (var skill in Wugongs)
            {
                if (skill.Key == magicId)
                {
                    if (skill.GetLevel() < Jyx2Consts.MAX_SKILL_LEVEL)
                    {
                        skill.Level += 100;
                        return(0);
                    }
                    else
                    {
                        return(-2); //已经满级
                    }
                }
            }

            if (Wugongs.Count >= Jyx2Consts.MAX_SKILL_COUNT)
            {
                return(-3); //武学已满
            }
            WugongInstance w = new WugongInstance(magicId);

            Wugongs.Add(w);
            ResetZhaoshis();
            return(0);
        }
Beispiel #2
0
        public void SwitchAnimationToSkill(WugongInstance skill)
        {
            if (skill == null || _currentSkill == skill)
            {
                return;
            }

            //切换武功
            //View.ChangeWeaponTo(skill.GetWeaponCode(), Sex);

            //切换武学待机动作
            View.SwitchSkillTo(skill);

            _currentSkill = skill;
        }
Beispiel #3
0
 public AnqiZhaoshiInstance(int lv, Jyx2Item item)
 {
     _level = lv;
     Anqi   = item;
     Data   = new WugongInstance(item);
 }
Beispiel #4
0
 public HealZhaoshiInstance(int lv)
 {
     _level = lv;
     Data   = new WugongInstance(95);
 }
Beispiel #5
0
 public DePoisonZhaoshiInstance(int lv)
 {
     _level = lv;
     Data   = new WugongInstance(94);
 }
Beispiel #6
0
 public BattleZhaoshiInstance(WugongInstance wugong)
 {
     Data  = wugong;
     level = wugong.GetLevel();
     Key   = wugong.Key.ToString();
 }