| | |
| | | var _nextForawrd = Random.rotation * m_Owner.Forward; |
| | | var _randomDis = Random.Range(0, m_Owner.NpcConfig.Sight * .5f); |
| | | m_Dest = m_Owner.BornPos + _nextForawrd * _randomDis; |
| | | GActor.TryGetValidPos(m_Dest, ref m_Dest); |
| | | m_RunAwayStep = 1; |
| | | break; |
| | | case 1: |
| | |
| | |
|
| | | if (_target.ActorInfo.RealHp <= _hurtValue)
|
| | | {
|
| | | if (_clientNpc.NpcConfig.AIType != 198)
|
| | | {
|
| | | _target.KillerServerInstID = m_Hero.ServerInstID;
|
| | | _target.ActorInfo.serverDie = true;
|
| | | GAMgr.Instance.ServerDie(_target.ServerInstID);
|
| | |
| | | {
|
| | | ClientSceneManager.Instance.NpcDead(_clientNpc.belongEventID, _clientNpc, _clientNpc.NpcConfig.NPCID);
|
| | | }
|
| | | }
|
| | | // 前期战斗只发送石头人的
|
| | | //if (1000 == _target.NpcConfig.NPCID)
|
| | | //{
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | bool _doReduceHp = true;
|
| | |
|
| | | if (attacker is GA_NpcClientFightNorm)
|
| | | {
|
| | | if (target.ActorInfo.RealHp <= (target.ActorInfo.RealMaxHp * .5f))
|
| | |
| | | hurtValue = 0;
|
| | | }
|
| | | }
|
| | | else if (target is GA_NpcClientFightNorm)
|
| | | {
|
| | | if ((target as GA_NpcClientFightNorm).NpcConfig.AIType == 198)
|
| | | {
|
| | | _doReduceHp = false;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_doReduceHp)
|
| | | {
|
| | | target.ActorInfo.ReduceHp((uint)hurtValue);
|
| | | }
|
| | |
|
| | | if (target.ServerInstID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|