少年修仙传客户端代码仓库
client_Hale
2019-05-06 1883b1e5c3ea5f6c12911b54be15bf39cde15023
382 地图编辑器相关逻辑,刷怪增加朝向
9个文件已修改
53 ■■■■ 已修改文件
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Data/Event/MonsterData.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/HeroBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientCollect.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientFunc.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcCollect.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcFightNorm.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActor.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/MapEditor/Behavior/Bhv_Evt_RefreshMonster.cs
@@ -275,7 +275,7 @@
                        monsterList[i].npcID = (uint)EditorGUILayout.IntField((int)monsterList[i].npcID, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70));
                        EditorGUILayout.LabelField("模型名", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50));
                        monsterList[i].resName = EditorGUILayout.TextField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70));
                        EditorGUILayout.LabelField("朝向", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(50));
                        EditorGUILayout.LabelField("朝向", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(30));
                        monsterList[i].faceDir = EditorGUILayout.IntField(monsterList[i].faceDir, guiSkin.textField, GUILayout.Height(22), GUILayout.Width(70));
                        if (GUILayout.Button("定高", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20)))
                        {
Core/MapEditor/Data/Event/MonsterData.cs
@@ -9,11 +9,13 @@
        public uint npcID;
        public Vector3 position;
        public int ai;
        public int faceDir;
        public void Load(BinaryReader br)
        {
            npcID = br.ReadUInt32();
            ai = br.ReadByte();
            faceDir = br.ReadInt32();
            float _x = br.ReadSingle();
            float _y = br.ReadSingle();
            float _z = br.ReadSingle();
Fight/Actor/HeroBehaviour.cs
@@ -207,7 +207,7 @@
            int _configID = _dataMapID * 10 + _dgModel.mission.lineID;
            DungeonConfig _dgConfig = DungeonConfig.Get(_configID);
            if (_dgConfig.AutomaticATK > 1)
            if (_dgConfig != null && _dgConfig.AutomaticATK > 1)
            {
                m_Hero.aiHandler.currentType = (E_HeroAIType)_dgConfig.AutomaticATK;
            }
Fight/GameActor/GA_NpcClientCollect.cs
@@ -40,7 +40,7 @@
        // 这里判断是否要走向此对象
        if (_chkDistSqrt > 4)
        {
            _hero.MoveToPosition(Pos, 1.5f);
            _hero.MoveToPosition(Pos, 2f);
        }
    }
Fight/GameActor/GA_NpcClientFunc.cs
@@ -152,8 +152,11 @@
        Vector3 _forward = MathUtility.ForwardXZ(Pos, _hero.Pos);
        _hero.Forward = _forward;
        _forward = MathUtility.ForwardXZ(_hero.Pos, Pos);
        Forward = _forward;
        if (NpcConfig.AutomaticFace == 1)
        {
            _forward = MathUtility.ForwardXZ(_hero.Pos, Pos);
            Forward = _forward;
        }
    }
    public override void OnUnSelect()
Fight/GameActor/GA_NpcCollect.cs
@@ -413,14 +413,18 @@
    private void CheckCanCollect()
    {
        if (PlayerDatas.Instance.baseData.MapID == 31230)
        if (PlayerDatas.Instance.baseData.MapID == 31230)// 仙盟宴会
        {
            FuncConfigConfig _funcConfig = FuncConfigConfig.Get("FamilyPartyDeskNpcID");
            m_CanCollect = int.Parse(_funcConfig.Numerical1) == NpcConfig.NPCID && !xmlsCollectFinished;
        }
        else
        {
            if (NpcConfig.NPCID == GeneralDefine.GatherSoulDZ)
            if (NpcConfig.NPCID == GeneralDefine.GatherSoulDZ)// 聚魂副本
            {
                m_CanCollect = true;
            }
            else if (ModelCenter.Instance.GetModel<HazyGrassModel>().IsInDungeon)
            {
                m_CanCollect = true;
            }
@@ -430,7 +434,6 @@
                m_CanCollect = _model.IsGather(NpcConfig.NPCID);
            }
        }
        if (!m_CanCollect)
        {
            if (m_ArrivedList.Contains(ServerInstID))
Fight/GameActor/GA_NpcFightNorm.cs
@@ -25,6 +25,7 @@
        if (CanBeSelected())
        {
            m_NPCInteractProcessor = Root.AddMissingComponent<NPCInteractProcessor>();
            m_NPCInteractProcessor.npcIntergactEvent -= OnClick;
            m_NPCInteractProcessor.npcIntergactEvent += OnClick;
        }
Fight/GameActor/GActor.cs
@@ -58,6 +58,22 @@
        }
    }
    private float m_EulerAngles;
    public float EulerAngles
    {
        get { return m_EulerAngles; }
        set
        {
            m_EulerAngles = value;
            if (m_Root)
            {
                m_Root.eulerAngles = new Vector3(0, m_EulerAngles, 0);
                m_Forward = m_Root.forward;
                m_Rotation = Quaternion.LookRotation(m_Forward, Vector3.up);
            }
        }
    }
    private Vector3 m_Forward;
    public Vector3 Forward
    {
@@ -428,10 +444,10 @@
        if (NavMesh.CalculatePath(_curPos, position, NavMesh.AllAreas, m_Path))
        {
            // if (this is GA_Hero)
            // {
            //     Debug.LogFormat("调用了 {0} 的寻路, 目标点: {1}", ServerInstID, position);
            // }
            if (this is GA_Hero)
            {
                Debug.LogFormat("调用了 {0} 的寻路, 目标点: {1}", ServerInstID, position);
            }
            m_CornerIndex = 0;
            m_KeepDist = keepDist;
            PathFindStatus = E_PathFindStatus.Moving;
Fight/Stage/MapEditor/Game/EventRefreshNPCHandler.cs
@@ -99,6 +99,10 @@
            }
            _npc.BornPos = _npc.Pos = _data.position;
            _npc.belongEventID = m_Evt.id;
            if (_data.faceDir != 0)
            {
                _npc.EulerAngles = _data.faceDir;
            }
            ClientSceneManager.Instance.NpcBorn(m_Evt.id, _npc);
        }
    }