| Fight/Actor/UserInputHandler.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/Bhv_FindEnemy.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/GA_Hero.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/GA_NpcCollect.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/GA_NpcFunc.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/Actor/UserInputHandler.cs
@@ -276,6 +276,8 @@ || _hero.SkillMgr.CurCastSkill.SkillCompelete)) { _hero.Run(); _hero.State = E_ActorState.CtrlRun; } } } @@ -348,7 +350,7 @@ //Send_TagCPlayerStopMove(_hero.Position); } private static byte s_LastStatus = 0; //private static byte s_LastStatus = 0; public static void Send_CB409_tagCMPyMove(byte moveOrStop = 1) { Fight/GameActor/Bhv_FindEnemy.cs
@@ -94,7 +94,14 @@ float _distSqrt = MathUtility.DistanceSqrtXZ(_targetPos, _heroPos); if (_distSqrt > Mathf.Pow(reFindSelectTargetDist, 2)) var _chkDis = reFindSelectTargetDist; if (_hero.SelectTarget is GA_NpcCollect && PlayerDatas.Instance.baseData.MapID == 31340) { _chkDis = reFindSelectTargetDist * 2; } if (_distSqrt > Mathf.Pow(reFindSelectTargetDist, _chkDis)) { _hero.SelectTarget = GAMgr.Instance.FindAtkTarget(_hero.Pos, reSetLockTargetDist); } Fight/GameActor/GA_Hero.cs
@@ -111,7 +111,6 @@ { return; } IOtherSelectable _selectable = base.SelectTarget as IOtherSelectable; if (_selectable != null) { @@ -267,7 +266,7 @@ m_SuitCount = _suitCount; } protected sealed override void OnUnit() { Object.Destroy(m_BhvFindEnemy); @@ -415,14 +414,43 @@ { base.OnFixedUpdate(); if(IsRushing) if (IsRushing) { m_RushTime += Time.deltaTime; if(m_RushTime > 2) if (m_RushTime > 2) { StopRush(); } } if (PlayerDatas.Instance.baseData.MapID == 31340) { if (State == E_ActorState.AutoRun || State == E_ActorState.CtrlRun) { var _list = GAMgr.Instance.GetTypeList(E_ActorClassType.NpcCollect); if (_list != null && _list.Count > 0) { _list.Sort((a1, a2) => { float _d1 = MathUtility.DistanceSqrtXZ(a1.Pos, Pos); float _d2 = MathUtility.DistanceSqrtXZ(a2.Pos, Pos); return _d2 > _d1 ? -1 : 1; }); var _collect = _list[0] as GA_NpcCollect; if (_collect != null) { if ((SelectTarget == null || SelectTarget is GA_NpcCollect) && SelectTarget != _collect) { SelectTarget = _collect; _collect.Arrive(); } } } } } } protected sealed override void OnLateUpdate() Fight/GameActor/GA_NpcCollect.cs
@@ -189,15 +189,19 @@ if (obj is MainInterfaceWin) { m_IsMainWinOpen = true; GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero != null) if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) { float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); GA_Hero _hero = PlayerDatas.Instance.hero; if (_distSqrt < Mathf.Pow(NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2)) if (_hero != null) { Arrive(); float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); if (_distSqrt < Mathf.Pow(NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2)) { Arrive(); } } } } @@ -242,25 +246,28 @@ return; } GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero != null) if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) { float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); GA_Hero _hero = PlayerDatas.Instance.hero; if (_distSqrt < Mathf.Pow(NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2)) if (_hero != null) { Arrive(); } else { if (m_ArrivedList.Contains(ServerInstID)) float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); if (_distSqrt < Mathf.Pow(NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2)) { if (OnLeave != null) Arrive(); } else { if (m_ArrivedList.Contains(ServerInstID)) { OnLeave(ServerInstID, NpcConfig.NPCID); if (OnLeave != null) { OnLeave(ServerInstID, NpcConfig.NPCID); } m_ArrivedList.Remove(ServerInstID); } m_ArrivedList.Remove(ServerInstID); } } } @@ -298,6 +305,28 @@ } } protected override void HandleOnClick() { if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) { base.HandleOnClick(); } else { var _hero = PlayerDatas.Instance.hero; if (_hero != null) { float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); if (_distSqrt < Mathf.Pow(NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2)) { Arrive(); } } } } protected override void OnUnit() { if (m_ReplaceNpcID != -1) Fight/GameActor/GA_NpcFunc.cs
@@ -364,11 +364,24 @@ public override void OnClick() { GA_Hero _hero = PlayerDatas.Instance.hero; _hero.LockTarget = this; _hero.SelectTarget = this; // 这里判断是否要走向此对象 float _distSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, Pos); if (PlayerDatas.Instance.baseData.MapID != 31340) { _hero.LockTarget = this; _hero.SelectTarget = this; } else { if (_distSqrt < Mathf.Pow(GeneralDefine.CloseNpcDist + NpcConfig.ModelRadius + 0.4f, 2)) { _hero.LockTarget = this; _hero.SelectTarget = this; } } if (_distSqrt > Mathf.Pow(GeneralDefine.CloseNpcDist + NpcConfig.ModelRadius + 0.4f, 2)) { MapTransferUtility.Instance.MoveToNPC(NpcConfig.NPCID, (int)ServerInstID); @@ -380,13 +393,16 @@ Vector3 _forward = MathUtility.ForwardXZ(_hero.Pos, Pos); Forward = _forward; } if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ) { NPCInteractProcessor.InvokeEvent(E_NpcType.Func, NpcConfig.NPCID, ServerInstID); } HandleOnClick(); } } protected virtual void HandleOnClick() { NPCInteractProcessor.InvokeEvent(E_NpcType.Func, NpcConfig.NPCID, ServerInstID); } protected override void OnLateUpdate() { } private float m_PlayDanceTime;