Пример #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));
            }
        }
Пример #2
0
        /// <summary>
        /// 恢复怪物数据
        /// </summary>
        private void RestoreMonsterForceDb()
        {
            if (!Entity || m_MountsForceDb == null)
            {
                return;
            }

            Entity.SetAttribute(AttribType.CampID, m_MountsForceDb._campID);
            Entity.SetAttribute(AttribType.DamageID, m_MountsForceDb._damageID);
            Entity.SetAttribute(AttribType.DefaultPlayerID, m_MountsForceDb._defaultPlyerID);

            //清除仇恨列表
            Entity.target.ClearEnemy();

            m_MountsForceDb = null;
        }
Пример #3
0
    public void RefreshData()
    {
        if (_monster == null)
        {
            return;
        }

        _curPostion = _monster.peTrans.position;
        _rotation   = _monster.peTrans.rotation;
        _scale      = _monster.peTrans.scale;
        _hp         = _monster.HPPercent;
        _protoId    = _monster.ProtoID;
        _eCtrltype  = _monster.monstermountCtrl.ctrlType;

        _mountsForce = _monster.monstermountCtrl.m_MountsForceDb.Copy();
        _mountsSkill = _monster.monstermountCtrl.m_SkillData.CopyTo();
    }
Пример #4
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);
        }
Пример #5
0
 public MountMonsterData()
 {
     _mountsForce = new Pathea.ForceData();
     _mountsSkill = new Pathea.BaseSkillData();
 }