少年修仙传客户端代码仓库
client_Hale
2019-04-18 d59a1aaa52dffe6aec8a1f2b69e645b570e106cb
382 增加主角被攻击回调
5个文件已修改
32 ■■■■ 已修改文件
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 4 ●●● 补丁 | 查看 | 原始文档 | 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,7 +78,8 @@
        if (data.BuffType == (int)E_BuffType.bfActionBuff)
        {
            GActorPlayerBase _player = _target as GActorPlayerBase;
            if (_player != null)
            {
            if (!CanMove())
            {
                if (_target is GActorPlayerBase)
@@ -119,6 +120,7 @@
            }
        }
    }
    }
    public abstract void Update();
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;