示例#1
0
        public AttackState(GameClient player, Robot owner, FinishStateMachine FSM)
        {
            this.owner            = owner;
            this.FSM              = FSM;
            this.target           = player;
            this.owner.LockObject = player.GetObjectID();
            EMagicSwordTowardType eMagicSwordType = GameManager.MagicSwordMgr.GetMagicSwordTypeByWeapon(owner.getRoleDataMini().Occupation, owner.getRoleDataMini().GoodsDataList, null);

            this.fiveComboSkillList = JingJiChangConstants.getJingJiChangeFiveCombatSkillList(owner.getRoleDataMini().Occupation, eMagicSwordType);
        }
示例#2
0
        public AttackState(GameClient player, Robot owner, FinishStateMachine FSM)
        {
            this.owner            = owner;
            this.FSM              = FSM;
            this.target           = player;
            this.owner.LockObject = player.GetObjectID();
            //fiveComboSkillList = owner.MonsterInfo.ToOccupation == 0 ? JingJiChangConstants.ZhanShiFiveCombotSkillList : owner.MonsterInfo.ToOccupation == 1 ? JingJiChangConstants.FaShiFiveCombotSkillList : JingJiChangConstants.GongJianShouFiveCombotSkillList;

            // 魔剑士分支类型
            EMagicSwordTowardType eMagicSwordType = GameManager.MagicSwordMgr.GetMagicSwordTypeByWeapon(owner.getRoleDataMini().Occupation, owner.getRoleDataMini().GoodsDataList);

            // 竞技场5连击技能列表,魔剑士需根据武器 判断 分支 [XSea 2015/5/19]
            fiveComboSkillList = JingJiChangConstants.getJingJiChangeFiveCombatSkillList(owner.getRoleDataMini().Occupation, eMagicSwordType);
        }
示例#3
0
 private void selectSkill(out bool isFiveCombo)
 {
     this.skillId = -1;
     isFiveCombo  = false;
     if (null != this.owner.MonsterInfo.SkillIDs)
     {
         int nNextSkillID = Global.GetNextSkillID(this.prevSkillID);
         if (nNextSkillID > 0)
         {
             this.skillId     = nNextSkillID;
             this.prevSkillID = nNextSkillID;
         }
         else
         {
             int index = Global.GetRandomNumber(0, this.owner.MonsterInfo.SkillIDs.Length);
             for (int i = index; i < this.owner.MonsterInfo.SkillIDs.Length; i++)
             {
                 if (this.owner.MyMagicCoolDownMgr.SkillCoolDown(this.owner.MonsterInfo.SkillIDs[i]))
                 {
                     if (this.SkillNeedMagicVOk(this.owner.MonsterInfo.SkillIDs[i]))
                     {
                         this.skillId = this.owner.MonsterInfo.SkillIDs[i];
                         break;
                     }
                 }
             }
             if (this.skillId == -1)
             {
                 for (int i = index - 1; i >= 0; i--)
                 {
                     if (this.owner.MyMagicCoolDownMgr.SkillCoolDown(this.owner.MonsterInfo.SkillIDs[i]))
                     {
                         if (this.SkillNeedMagicVOk(this.owner.MonsterInfo.SkillIDs[i]))
                         {
                             this.skillId = this.owner.MonsterInfo.SkillIDs[i];
                         }
                     }
                 }
             }
             if (!this.isTryHighPrioritySkill)
             {
                 EMagicSwordTowardType eMagicSwordType = GameManager.MagicSwordMgr.GetMagicSwordTypeByWeapon(this.owner.getRoleDataMini().Occupation, this.owner.getRoleDataMini().GoodsDataList, null);
                 int nFirstSkill = JingJiChangConstants.GetJingJiChangeHighPrioritySkill(this.owner.getRoleDataMini().Occupation, eMagicSwordType);
                 if (nFirstSkill != -1)
                 {
                     if (this.owner.MyMagicCoolDownMgr.SkillCoolDown(nFirstSkill) && this.SkillNeedMagicVOk(nFirstSkill))
                     {
                         this.skillId = nFirstSkill;
                     }
                 }
                 this.isTryHighPrioritySkill = true;
             }
             this.prevSkillID = this.skillId;
             for (int i = 0; i < this.fiveComboSkillList.Length; i++)
             {
                 if (this.fiveComboSkillList[i] == this.skillId)
                 {
                     isFiveCombo = true;
                     break;
                 }
             }
         }
     }
 }