Merge branch 'master' into 5302【前端】【1.3.200】仙盟宴会传功
| | |
| | | || _hero.SkillMgr.CurCastSkill.SkillCompelete))
|
| | | {
|
| | | _hero.Run();
|
| | |
|
| | | _hero.State = E_ActorState.CtrlRun;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //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)
|
| | | {
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | IOtherSelectable _selectable = base.SelectTarget as IOtherSelectable;
|
| | | if (_selectable != null)
|
| | | {
|
| | |
| | |
|
| | | m_SuitCount = _suitCount;
|
| | | }
|
| | | |
| | |
|
| | | protected sealed override void OnUnit()
|
| | | {
|
| | | Object.Destroy(m_BhvFindEnemy);
|
| | |
| | | {
|
| | | 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()
|
| | |
| | | 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();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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)
|
| | |
| | | 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);
|
| | |
| | | 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;
|
| | |
| | | }
|
| | | ChatFriendData chatData = new ChatFriendData(vNetData.Content, (int)vNetData.PlayerID, vNetData.SrcName, vNetData.Extras, vNetData.ToName, vNetData.TalkType, vNetData.ToPlayerID);
|
| | | FitterChat(chatData);
|
| | | AddPteChat(chatData);
|
| | | AddPteChat(chatData, false);
|
| | | LocalChatHistory.Save(chatData as ChatUeseData);
|
| | | if (chatData.player == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | |
| | | chatCenter.CheckAutoPlayVoice(chatData);
|
| | | }
|
| | | }
|
| | | private void AddPteChat(ChatFriendData chatData)
|
| | | private void AddPteChat(ChatFriendData chatData, bool isLocal)
|
| | | {
|
| | | List<ChatFriendData> list = null;
|
| | | pteChatDics.TryGetValue(chatData.player + chatData.toPlayer, out list);
|
| | |
| | | list.Add(chatData);
|
| | | pteChatDics.Add(chatData.player + chatData.toPlayer, list);
|
| | | }
|
| | | if (OnRefreshPteChat != null)
|
| | | if (OnRefreshPteChat != null && !isLocal)
|
| | | {
|
| | | OnRefreshPteChat(chatData);
|
| | | }
|
| | | }
|
| | | /// <summary>
|
| | | /// 队伍频道
|
| | |
| | | if (chat.type == ChatInfoType.Friend)
|
| | | {
|
| | | FitterChat(chat);
|
| | | AddPteChat(chat as ChatFriendData);
|
| | | AddPteChat(chat as ChatFriendData, true);
|
| | | }
|
| | | else
|
| | | {
|