Beispiel #1
0
        public void RequestUseSkill(eSkillSlotType slotType)
        {
            InputModel.instance.SendStopMove(null, false);
            if (slotType == eSkillSlotType.SLOT_SKILL_0)
            {
                CSkillButtonManager skillButtonManager = CBattleSystem.instance.GetSkillButtonManager();
                skillButtonManager.SendUseCommonAttack(0, 0u);
                skillButtonManager.SendUseCommonAttack(1, 0u);
            }
            else if (slotType == eSkillSlotType.SLOT_SKILL_4)
            {
                CSkillButtonManager skillButtonManager = CBattleSystem.instance.GetSkillButtonManager();
                skillButtonManager.RequestUseSkillSlot(slotType, 1);
            }
            else
            {
                SkillSlot slot = m_wrapper.actor.pSkillCtrl.GetSkillSlot(slotType);
                if (slot.SkillObj.AppointType == SkillRangeAppointType.Pos)
                {
                    slot.skillIndicator.SetRobotSkillUsePosition();
                }
                m_wrapper.actor.pSkillCtrl.RequestUseSkillSlot(slotType);
            }

            //             RealUseSkill(slotType);
        }
Beispiel #2
0
        public RES_SUMMONERSKILL_TYPE GetSummonerSkillType(eSkillSlotType InSlot)
        {
            Skill skill = m_wrapper.GetSkill(InSlot);

            if (skill != null && skill.cfgData != null)
            {
                return((RES_SUMMONERSKILL_TYPE)skill.cfgData.bSkillType);
            }
            return((RES_SUMMONERSKILL_TYPE)2);
        }
Beispiel #3
0
        public SkillTargetRule GetSkillTargetRule(eSkillSlotType InSlot)
        {
            Skill skill = m_wrapper.GetSkill(InSlot);

            if (skill != null && skill.cfgData != null)
            {
                return((SkillTargetRule)skill.cfgData.dwSkillTargetRule);
            }
            return((SkillTargetRule)1);
        }
Beispiel #4
0
        public int GetSkillAttackRange(eSkillSlotType InSlot)
        {
            Skill skill = m_wrapper.GetSkill(InSlot);

            if (skill != null && skill.cfgData != null)
            {
                return(skill.cfgData.iMaxAttackDistance);
            }
            return(0);
        }
Beispiel #5
0
        public EBTStatus CanUseSkill(eSkillSlotType InSlot)
        {
            bool flag = m_wrapper.CanUseSkill(InSlot);

            if (flag)
            {
                return(EBTStatus.BT_SUCCESS);
            }
            return(EBTStatus.BT_FAILURE);
        }
Beispiel #6
0
        public EBTStatus SetSkill(eSkillSlotType InSlot)
        {
            bool flag = m_wrapper.SetSkill(InSlot, false);

            if (flag)
            {
                return(EBTStatus.BT_SUCCESS);
            }
            return(EBTStatus.BT_FAILURE);
        }
Beispiel #7
0
        public EBTStatus CheckSkillFilter(eSkillSlotType InSlot, uint objID)
        {
            Skill        skill = m_wrapper.GetSkill(InSlot);
            uint         dwSkillTargetFilter = skill.cfgData.dwSkillTargetFilter;
            CharHandle_t actor = GameCharMgr.instance.GetActor(objID);

            if (((ulong)dwSkillTargetFilter & (ulong)(1L << (int)(actor.handle.pCharMeta.ActorType & (eCharTypeDef)31))) > 0uL)
            {
                return(EBTStatus.BT_FAILURE);
            }
            return(EBTStatus.BT_SUCCESS);
        }
Beispiel #8
0
        public void LearnSkillCommand(eSkillSlotType slot)
        {
            int  index     = (int)slot;
            byte bSkillLvl = 0;

            if (m_wrapper.actor.pSkillCtrl != null && m_wrapper.actor.pSkillCtrl.SkillSlotArray[index] != null)
            {
                bSkillLvl = (byte)m_wrapper.actor.pSkillCtrl.SkillSlotArray[index].GetSkillLevel();
            }
            // only available skill point > 0 , send learn skill command
            if (m_wrapper.actor.pSkillCtrl.m_iSkillPoint > 0)
            {
                MGSendMsgHelper.SendLearnSkillCommand(m_wrapper.actorPtr, slot, bSkillLvl);
            }
        }
Beispiel #9
0
        public uint GetLowHpFriendChar(int srchR, int HPRate, eSkillSlotType InSlot)
        {
            uint  filter = 0u;
            Skill skill  = m_wrapper.GetSkill(InSlot);

            if (skill != null && skill.cfgData != null)
            {
                filter = skill.cfgData.dwSkillTargetFilter;
            }
            CCChar lowHpTeamMember = TargetSearcher.instance.GetLowHpTeamMember(m_wrapper.actorPtr, srchR, HPRate, filter);

            if (lowHpTeamMember != null)
            {
                return(lowHpTeamMember.ObjID);
            }
            return(0u);
        }