Beispiel #1
0
        /// <summary>
        /// 初始化驯服数据
        /// </summary>
        private void InitTameData(PeEntity master)
        {
            if (!Entity)
            {
                return;
            }

            m_Move   = Entity.motionMove as Motion_Move_Motor;
            m_Master = master;
            SetctrlType(ECtrlType.Free);

            if (!m_SkillData.canUse())
            {
                m_SkillData.Reset(MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_L),
                                  MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_Space),
                                  MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_pounce)
                                  );
            }

            m_PlayerForceDb = new ForceData((int)m_Master.GetAttribute(AttribType.CampID), (int)m_Master.GetAttribute(AttribType.DamageID), (int)m_Master.GetAttribute(AttribType.DefaultPlayerID));
            if (m_MountsForceDb == null)
            {
                m_MountsForceDb = new ForceData((int)Entity.GetAttribute(AttribType.CampID), (int)Entity.GetAttribute(AttribType.DamageID), (int)Entity.GetAttribute(AttribType.DefaultPlayerID));
            }
        }
Beispiel #2
0
        public void Jump(AccomplishMove callback)
        {
            int _rskill = MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_tame);

            if (_rskill == 0)
            {
                return;
            }

            //暂停移动
            m_Move.Stop();

            Entity.StartSkill(null, _rskill);
            m_TameSkill = _rskill;
            m_CallBack  = callback;
        }
Beispiel #3
0
        /// <summary>
        /// 初始化坐骑数据(被驯服后数据)
        /// </summary>
        private bool InitMountData()
        {
            if (!Entity)
            {
                return(false);
            }

            m_Move = Entity.motionMove as Motion_Move_Motor;
            m_Move.Stop();

            SetctrlType(ECtrlType.Mount);
            Pathea.FastTravelMgr.Instance.OnFastTravel += OnFastTravel;

            m_PlayerForceDb = new ForceData((int)m_Master.GetAttribute(AttribType.CampID), (int)m_Master.GetAttribute(AttribType.DamageID), (int)m_Master.GetAttribute(AttribType.DefaultPlayerID));

            if (m_MountsForceDb == null)
            {
                m_MountsForceDb = new ForceData((int)Entity.GetAttribute(AttribType.CampID), (int)Entity.GetAttribute(AttribType.DamageID), (int)Entity.GetAttribute(AttribType.DefaultPlayerID));
            }

            if (!m_SkillData.canUse())
            {
                m_SkillData.Reset(MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_L),
                                  MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_Space),
                                  MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_pounce)
                                  );
            }

            StartMountsForceDb();
            DispatchEvent(Entity);

            //lw:2017.3.13:读档后如果在晚上,怪物不能结束睡觉动作
            if (Entity.animCmpt != null)
            {
                Entity.animCmpt.SetBool("Sleep", false);
            }

            m_Init = true;
            return(true);
        }
Beispiel #4
0
 public bool HasJump()
 {
     return(MountsSkillDb.GetRandomSkill(Entity.ProtoID, MountsSkillKey.Mskill_tame) != 0);//m_SkillData != null && m_SkillData.canSpace();
 }