少年修仙传客户端代码仓库
client_Hale
2019-04-18 d59a1aaa52dffe6aec8a1f2b69e645b570e106cb
382 增加主角被攻击回调
5个文件已修改
90 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Skill/FlyObject/FlyObjectManager.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/Status/Status_Base.cs 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs
@@ -201,13 +201,14 @@
                    if (_cTarget.ServerInstID == PlayerDatas.Instance.PlayerId)
                    {
                        if (GAMgr.Instance.otherPlayerAtkHeroDict.ContainsKey(_cTarget.ServerInstID))
                        if (GAMgr.Instance.otherPlayerAtkHeroDict.ContainsKey(_attacker.ServerInstID))
                        {
                            GAMgr.Instance.otherPlayerAtkHeroDict[_cTarget.ServerInstID] = Time.realtimeSinceStartup;
                            GAMgr.Instance.otherPlayerAtkHeroDict[_attacker.ServerInstID] = Time.realtimeSinceStartup;
                        }
                        else
                        {
                            GAMgr.Instance.otherPlayerAtkHeroDict.Add(_cTarget.ServerInstID, Time.realtimeSinceStartup);
                            GAMgr.Instance.otherPlayerAtkHeroDict.Add(_attacker.ServerInstID, Time.realtimeSinceStartup);
                            GA_Hero.CallOnStartBeAttacked(_attacker.ServerInstID);
                        }
                        if (!_attacker.ShowOrHide)
Fight/Actor/Skill/FlyObject/FlyObjectManager.cs
@@ -48,7 +48,6 @@
        }
        else if (_so.type == SoFlyObject.E_FlyObjectType.Transmit)
        {
            if (_pool.inactivedCount == 0)
            {
                _pool.Add(new FoTransmit());
Fight/Actor/Status/Status_Base.cs
@@ -78,43 +78,45 @@
        if (data.BuffType == (int)E_BuffType.bfActionBuff)
        {
            GActorPlayerBase _player = _target as GActorPlayerBase;
            if (!CanMove())
            if (_player != null)
            {
                if (_target is GActorPlayerBase)
                if (!CanMove())
                {
                    _player = _target as GActorPlayerBase;
                    _player.OnHorse(0);
                    _player.StopRush();
                    if (_target is GActorPlayerBase)
                    {
                        _player = _target as GActorPlayerBase;
                        _player.OnHorse(0);
                        _player.StopRush();
                    }
                    if (_target.State == E_ActorState.AutoRun)
                    {
                        _target.StopPathFind();
                    }
                    if (_target is GA_Player)
                    {
                        GA_Player _otherPlayer = _target as GA_Player;
                        _otherPlayer.StopMoveToPosition();
                    }
                    _player.IdleImmediate();
                }
                if (_target.State == E_ActorState.AutoRun)
                // 调用动作
                if (m_SkillConfig.CtrlActionID != 0)
                {
                    _target.StopPathFind();
                }
                    if (_player != null)
                    {
                        _player = _target as GActorPlayerBase;
                        _player.OnHorse(0);
                    }
                if (_target is GA_Player)
                {
                    GA_Player _otherPlayer = _target as GA_Player;
                    _otherPlayer.StopMoveToPosition();
                }
                _player.IdleImmediate();
            }
                    _target.NextAction = m_SkillConfig.CtrlActionID;
            // 调用动作
            if (m_SkillConfig.CtrlActionID != 0)
            {
                if (_player != null)
                {
                    _player = _target as GActorPlayerBase;
                    _player.OnHorse(0);
                }
                _target.NextAction = m_SkillConfig.CtrlActionID;
                if (_target.SkillMgr.CurCastSkill != null)
                {
                    _target.SkillMgr.CurCastSkill.SkillCompelete = true;
                    if (_target.SkillMgr.CurCastSkill != null)
                    {
                        _target.SkillMgr.CurCastSkill.SkillCompelete = true;
                    }
                }
            }
        }
Fight/GameActor/GAMgr.cs
@@ -1161,6 +1161,7 @@
        {
            if (otherPlayerAtkHeroDict.ContainsKey(_removeIdList[i]))
            {
                GA_Hero.CallOnStopBeAttacked(_removeIdList[i]);
                otherPlayerAtkHeroDict.Remove(_removeIdList[i]);
            }
        }
Fight/GameActor/GA_Hero.cs
@@ -22,6 +22,25 @@
    //    }
    //}
    public static event UnityAction<uint> OnStartBeAttacked;
    public static event UnityAction<uint> OnStopBeAttacked;
    public static void CallOnStartBeAttacked(uint sid)
    {
        if (OnStartBeAttacked != null)
        {
            OnStartBeAttacked(sid);
        }
    }
    public static void CallOnStopBeAttacked(uint sid)
    {
        if (OnStopBeAttacked != null)
        {
            OnStopBeAttacked(sid);
        }
    }
    public static event UnityAction<float> OnStateEnter;
    public static event UnityAction OnStateEnd;