少年修仙传客户端代码仓库
client_linchunjie
2019-06-11 e5e2af18cea18db60c64574ee5908a5886f199b4
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
46 ■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0608_tagNPCDie.cs 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/HeroBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Skill/AttackHandler.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0608_tagNPCDie.cs
@@ -17,10 +17,10 @@
        string _content = string.Format("DTC0608_tagNPCDie => S:{0} 死亡. 死亡原因: {1}, 杀死它的是: {2}", vNetData.ObjID, vNetData.Reason, vNetData.KillerID);
        RuntimeLogUtility.AddLog_Blue(_content, (uint)vNetData.ObjID);
#endif
        GActor _actor = null;
        GActorFight _actor = null;
        if (PersonalEnemy.m_SBindCDict.ContainsKey(vNetData.ObjID))
        {
            _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]);
            _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]) as GActorFight;
            ClientSceneManager.Instance.lastDeadPos = _actor.Pos;
            GAMgr.Instance.ServerDie(_actor.ServerInstID);
            _actor.Die();
@@ -29,7 +29,7 @@
        }
        else
        {
            _actor = GAMgr.Instance.GetBySID(vNetData.ObjID);
            _actor = GAMgr.Instance.GetBySID(vNetData.ObjID) as GActorFight;
        }
        if (_actor == null)
@@ -61,41 +61,40 @@
        _actor.SetAnimatorSpeed(1);
        if (_actor is GActorNpcNoFight
        || !_actor.HasState(GAStaticDefine.State_DeadHash))
        if (!_actor.HasState(GAStaticDefine.State_DeadHash))
        {
            GAMgr.Instance.Release(_actor);
        }
        else if (_actor is GActorNpcFight
              || _actor is GA_NpcFightSgzcZZ)
        {
            if (_targetFight != null)
            if (_actor != null)
            {
                GA_Hero _hero = PlayerDatas.Instance.hero;
                if (_hero != null)
                {
                    if (_hero.SelectTarget != null && _targetFight.ServerInstID == _hero.SelectTarget.ServerInstID)
                    if (_hero.SelectTarget != null && _actor.ServerInstID == _hero.SelectTarget.ServerInstID)
                    {
                        SelectionManager.Release(SelectionManager.E_Type.Red);
                    }
                    if (_hero.LockTarget == _targetFight)
                    if (_hero.LockTarget == _actor)
                    {
                        _hero.LockTarget = null;
                    }
                }
                if (_targetFight.State == E_ActorState.AutoRun)
                if (_actor.State == E_ActorState.AutoRun)
                {
                    _targetFight.StopPathFind();
                    _actor.StopPathFind();
                }
                _targetFight.ActorInfo.serverDie = true;
                _targetFight.ReleaseName();
                _targetFight.ReleaseShadow();
                _targetFight.SkillMgr.Clear();
                GAMgr.Instance.DoDelayDie(_targetFight);
                _actor.ActorInfo.serverDie = true;
                _actor.ReleaseName();
                _actor.ReleaseShadow();
                _actor.SkillMgr.Clear();
                GAMgr.Instance.DoDelayDie(_actor);
                GActorFight _killer = GAMgr.Instance.GetBySID(vNetData.KillerID) as GActorFight;
@@ -116,11 +115,11 @@
                    if (_transToMainUser)
                    {
                        _targetFight.Die(vNetData.KillerID / 10);
                        _actor.Die(vNetData.KillerID / 10);
                    }
                    else
                    {
                        _targetFight.Die(vNetData.KillerID);
                        _actor.Die(vNetData.KillerID);
                    }
                }
                else
@@ -136,17 +135,18 @@
                                _content = string.Format("DTC0608_tagNPCDie => {0} 死亡的时候凶手: {1} 已经将招式: {2} 演示完毕, 这里直接死亡.", vNetData.ObjID, vNetData.KillerID, vNetData.Reason);
                                RuntimeLogUtility.AddLog_Red(_content, (uint)vNetData.ObjID);
#endif
                                _targetFight.Die(vNetData.KillerID);
                                _actor.Die(vNetData.KillerID);
                            }
                        }
                        else
                        {
                            _targetFight.Die(vNetData.KillerID);
                            _actor.Die(vNetData.KillerID);
                        }
                    }
                    else
                    {
                        _targetFight.Die();
                        _actor.Die();
                    }
                }
            }
Fight/Actor/HeroBehaviour.cs
@@ -945,7 +945,7 @@
                if (_target.ActorInfo.RealHp <= _hurtValue && (_clientNpc == null || _clientNpc.lockHp <= 0))
                {
                    if (_clientNpc.NpcConfig.AIType != 198)
                    if (_clientNpc != null && _clientNpc.NpcConfig.AIType != 198)
                    {
                        _target.KillerServerInstID = m_Hero.ServerInstID;
                        _target.ActorInfo.serverDie = true;
Fight/Actor/Skill/AttackHandler.cs
@@ -293,8 +293,10 @@
                target.KillerPos = attacker.Pos;
            }
        }
        if (canDie
         && target.ActorInfo.RealHp == 0)
         && (target.ActorInfo.serverDie || target.ActorInfo.RealHp == 0))
        {
            target.Die(attacker.ServerInstID, soConfig.deadFlyId, (byte)attackType);
        }