少年修仙传客户端代码仓库
client_Hale
2018-11-16 896f6d58e6af14493a933a5de0a68a7398ea87d2
4129 修复前端战斗NPC初始化失败问题
6个文件已修改
37 ■■■■■ 已修改文件
Fight/Actor/Skill/AttackHandler.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcClientFightNorm.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_NpcSummonFight.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcFight.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/RuntimeLogUtility.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Skill/AttackHandler.cs
@@ -63,8 +63,8 @@
                if (soConfig.hitEffectId != 0)
                {
                    SFXController _controller = SFXPlayUtility.Instance.PlayEffectAsync(soConfig.hitEffectId,
                                                                                         target.MP_Hit.position,
                                                                                         Vector3.forward);
                                                                                        target.MP_Hit.position,
                                                                                        Vector3.forward);
                    _controller.transform.rotation = CameraController.Instance.CameraObject.transform.rotation * Quaternion.Euler(0, 0, Random.Range(0, 360));
                    // 播放受击音效
Fight/GameActor/GAMgr.cs
@@ -571,6 +571,7 @@
        if (_actor != null)
        {
            _actor.InitNpcConfig((int)npcID);
            _actor.Init(serverInstID, m_ClientId.Request(), group, null);
            BuildManagerRelation(_actor, _actorClassType);
Fight/GameActor/GA_NpcClientFightNorm.cs
@@ -108,6 +108,8 @@
    protected override void OnMainModelLoaded()
    {
        base.OnMainModelLoaded();
        if (NpcConfig.NPCID == 1002)
        {
            m_Obstacle = SoMap.CreateImpasse.General(Pos, Root.eulerAngles, new Vector3(3, 10, 1));
Fight/GameActor/GA_NpcSummonFight.cs
@@ -8,8 +8,6 @@
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
        m_H0408 = package as H0408_tagPlayerSummonNPCAppear;
        if (m_H0408 == null)
@@ -22,6 +20,8 @@
        ActorInfo.serverBornPos = new UnityEngine.Vector2(m_H0408.PosX, m_H0408.PosY);
        AdjustPos(m_H0408.PosX, m_H0408.PosY);
        base.OnInit(package);
        GActor _parent = GAMgr.Instance.GetBySID(m_H0408.PlayerID);
        if (_parent != null)
        {
Fight/GameActor/GActorNpcFight.cs
@@ -50,6 +50,19 @@
        }
    }
    public virtual void InitNpcConfig(int npcID)
    {
        if (NpcConfig != null && NpcConfig.NPCID == npcID)
        {
            return;
        }
        if (npcID > 0)
        {
            NpcConfig = Config.Instance.Get<NPCConfig>(npcID);
        }
    }
    protected override void OnInit(GameNetPackBasic package)
    {
        base.OnInit(package);
@@ -64,18 +77,12 @@
        {
            _npcID = (int)(package as H0435_tagPetAppear).NPCID;
        }
        else
        else if (this is GA_NpcFightNorm)
        {
            _npcID = (int)(package as H0406_tagNPCAppear).NPCID;
        }
        if (_npcID == 0)
        {
            Debug.LogError("加载异常....");
            return;
        }
        NpcConfig = Config.Instance.Get<NPCConfig>(_npcID);
        InitNpcConfig(_npcID);
        if (NpcConfig == null)
        {
Utility/RuntimeLogUtility.cs
@@ -224,7 +224,8 @@
        if (GUILayout.Button("酷酷酷"))
        {
            PlayerDatas.Instance.hero.Polymorph(!PlayerDatas.Instance.hero.IsPolyMorph, 0);
            var boss = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(60203001, E_ActorGroup.Enemy);
            boss.Pos = PlayerDatas.Instance.hero.Pos;
        }
        if (GUILayout.Button("直接重连"))