From 7cc84329c52b6e39cd979eb33a126e059b9bf36c Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期五, 03 八月 2018 21:07:11 +0800
Subject: [PATCH] Merge branch 'master' into leonard

---
 Fight/GameActor/GAStaticDefine.cs |   72 +++++++++++++++++++++++++++++++----
 1 files changed, 63 insertions(+), 9 deletions(-)

diff --git a/Fight/GameActor/GAStaticDefine.cs b/Fight/GameActor/GAStaticDefine.cs
index d75d32c..1783b02 100644
--- a/Fight/GameActor/GAStaticDefine.cs
+++ b/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);

--
Gitblit v1.8.0