少年修仙传客户端代码仓库
leonard Wu
2018-08-03 c2d2d5d3a840bf50968b3f95e304929bc62a7b70
Fight/GameActor/GAStaticDefine.cs
@@ -335,18 +335,72 @@
            var damageNum = value;
            var camera = CameraController.Instance.CameraObject;
            var mountPoint= (target is GA_NpcFightBoss || target is GA_NpcClientFightBoss) ? target.MP_Stun : target.MP_Name;
            var realmSuppress = false;
            var mountPoint = (target is GA_NpcFightBoss || target is GA_NpcClientFightBoss) ? target.MP_Stun : target.MP_Name;
            var _casterRealm = 0;
            var _targetRealm = 0;
            if (caster is GA_Hero)
            {
                if (target is GActorPlayerBase)
                {
                    int[] _grounp = GeneralConfig.Instance.RealmGroup;
                    for (int i = 0; i < _grounp.Length; ++i)
                    {
                        if (PlayerDatas.Instance.baseData.realmLevel > _grounp[i])
                        {
                            _casterRealm = i + 1;
                        }
                        if (target.ActorInfo.realm > _grounp[i])
                        {
                            _targetRealm = i + 1;
                        }
                    }
                }
                else if (target is GA_NpcFightNorm)
                {
                    _casterRealm = PlayerDatas.Instance.baseData.realmLevel;
                    _targetRealm = (int)target.ActorInfo.realm;
                }
            }
            else if (target is GA_Hero)
            {
                if (caster is GActorPlayerBase)
                {
                    int[] _grounp = GeneralConfig.Instance.RealmGroup;
                    for (int i = 0; i < _grounp.Length; ++i)
                    {
                        if (caster.ActorInfo.realm > _grounp[i])
                        {
                            _casterRealm = i + 1;
                        }
                        if (PlayerDatas.Instance.baseData.realmLevel > _grounp[i])
                        {
                            _targetRealm = i + 1;
                        }
                    }
                }
                else if (caster is GA_NpcFightNorm)
                {
                    _casterRealm = (int)caster.ActorInfo.realm;
                    _targetRealm = PlayerDatas.Instance.baseData.realmLevel;
                }
            }
            //Debug.LogFormat("{0} 攻击 {1}, 境界: {2} <=> {3}, 是否产生了压制: {4}",
            //    caster.ServerInstID, target.ServerInstID, _casterRealm, _targetRealm, _casterRealm > _targetRealm);
            var popupInfo = new PopUpNum.PopupInfo()
            {
               pattern= _pattern+_base,
               num=damageNum,
               camera=camera,
               direction=direction,
               target=mountPoint,
               isPlayer=target is GA_Hero,
                realmSuppress= realmSuppress,
                pattern = _pattern + _base,
                num = damageNum,
                camera = camera,
                direction = direction,
                target = mountPoint,
                isPlayer = target is GA_Hero,
                realmSuppress = _casterRealm > _targetRealm
            };
            PopUpNum.RecordPopup(popupInfo);