From 9c8047eb2dbdea0da2b1840084a7687f5332737a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 09 十月 2020 16:42:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/SnxxServerCode

---
 ServerPython/CoreServerGroup/GameServer/Script/EventReport.py |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py b/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
index 7b6577f..083efde 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
@@ -96,8 +96,8 @@
     
     playerInfo = ""
     if curPlayer:
-        playerInfo = "&AccountID=%s&IP=%s"%(GameWorld.GetPlatformAccID(curPlayer.GetAccID()),
-                                                            curPlayer.GetIP())
+        playerInfo = "&AccountID=%s&IP=%s&DeviceFlag=%s"%(GameWorld.GetPlatformAccID(curPlayer.GetAccID()),
+                                                            curPlayer.GetIP(), curPlayer.GetDeviceFlag())
         #=======================================================================
         # #UTF8 需要转成url编码才可用
         # playerInfo = urllib.urlencode({"RoleID": curPlayer.GetName(),
@@ -109,10 +109,17 @@
         RegionName = GameWorld.GetPlayerServerSID(curPlayer)
         
     else:
-        # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发,没有则取配置主服
-        RegionName = 's%s'%GameWorld.GetPlayerMainServerID(OperatorID) 
+        # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发
+        sid = GameWorld.GetPlayerMainServerID(OperatorID)
+        if not sid:
+            GameWorld.ErrLog("GetPlayerMainServerID: %s-%s"%(OperatorID, sid))
+            return
+        RegionName = 's%s'%sid
         
-    getUrl = "%s?ProductID=%s&OperatorID=%s&RegionName=%s&EventID=%s%s&Time=%s&%s"%(\
+    if eventParam:
+        eventParam = "&%s"%eventParam
+        
+    getUrl = "%s?ProductID=%s&OperatorID=%s&RegionName=%s&EventID=%s%s&Time=%s%s"%(\
              ReportUrl, ProductID, OperatorID, RegionName, eventActionID, playerInfo,
              str(datetime.datetime.today()).split('.')[0], eventParam)
     GameWorld.DebugLog("EventReport: %s"%getUrl)
@@ -127,7 +134,7 @@
 #  @param eventClass 
 #  @return None
 def WriteEvent(eventClass):
-    if GameWorld.IsMergeServer():
+    if GameWorld.IsCrossServer():
         return
     
     if eventClass.GetScribeEventName() not in ReadChConfig.GetEvalChConfig("EventReportID"):

--
Gitblit v1.8.0