From 1ea73e1885835466265ce788d93556b7030ee0e8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 30 十二月 2018 18:42:00 +0800
Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(GM工具增加子服服务器维护,文字翻译版)

---
 ServerPython/CoreServerGroup/GameServer/Script/EventReport.py |   58 ++++++++++++++++++++++++++++++++--------------------------
 1 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py b/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
index 2f9e7f2..7ff6764 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
@@ -93,7 +93,6 @@
 
     ProductID = ReadChConfig.GetPyMongoConfig("EventReport", "ProductID")
     ReportUrl = ReadChConfig.GetPyMongoConfig("EventReport", "ReportUrl")
-    RegionName = GameWorld.GetServerSID() # 需考虑合服情况
     
     playerInfo = ""
     if curPlayer:
@@ -106,8 +105,13 @@
         #                  "IP": curPlayer.GetIP(),
         #                  "Level": curPlayer.GetLV()}) 
         #=======================================================================
-        OperatorID = GameWorld.GetPlayerPlatform(curPlayer.GetAccID())
-    
+        OperatorID = GameWorld.GetPlayerPlatform(curPlayer)
+        RegionName = GameWorld.GetPlayerServerSID(curPlayer)
+        
+    else:
+        # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发,没有则取配置主服
+        RegionName = 's%s'%GameWorld.GetPlayerMainServerID(OperatorID) 
+        
     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)
@@ -123,7 +127,7 @@
 #  @param eventClass 
 #  @return None
 def WriteEvent(eventClass):
-    if GameWorld.IsMergeServer():
+    if GameWorld.IsCrossServer():
         return
     
     if eventClass.GetScribeEventName() not in ReadChConfig.GetEvalChConfig("EventReportID"):
@@ -330,28 +334,30 @@
 
 def WriteEvent_chat_log(curPlayer, content, cmc_name, tagName="", addinfo=""):
     return
-    '''
-    @todo: 写聊天监控记录
-    @param content: 聊天内容
-    @param cmc_name: 聊天频道标识
-    @param tagName: 私聊对象
-    @param addinfo: 额外信息
-    '''
-    
-    chatlogEvent = chat_log()
-    chatlogEvent.SetEventAgentInfo(GameWorld.GetPlayerPlatform(curPlayer.GetAccID()))
-    chatlogEvent.account_id = GameWorld.GetPlatformAccID(curPlayer.GetAccID())
-    chatlogEvent.chr_name = curPlayer.GetName()
-    chatlogEvent.content = __GetEventChatContent(content)
-    chatlogEvent.cmc_name = cmc_name
-    chatlogEvent.ip = curPlayer.GetIP()
-    chatlogEvent.account_name = chatlogEvent.account_id
-    chatlogEvent.account_type = 0
-    chatlogEvent.chr_level = 0
-    chatlogEvent.object = tagName
-    chatlogEvent.addinfo = addinfo
-    WriteEvent(chatlogEvent)
-    return
+    #===========================================================================
+    # '''
+    # @todo: 写聊天监控记录
+    # @param content: 聊天内容
+    # @param cmc_name: 聊天频道标识
+    # @param tagName: 私聊对象
+    # @param addinfo: 额外信息
+    # '''
+    # 
+    # chatlogEvent = chat_log()
+    # chatlogEvent.SetEventAgentInfo(GameWorld.GetPlayerPlatform(curPlayer))
+    # chatlogEvent.account_id = GameWorld.GetPlatformAccID(curPlayer.GetAccID())
+    # chatlogEvent.chr_name = curPlayer.GetName()
+    # chatlogEvent.content = __GetEventChatContent(content)
+    # chatlogEvent.cmc_name = cmc_name
+    # chatlogEvent.ip = curPlayer.GetIP()
+    # chatlogEvent.account_name = chatlogEvent.account_id
+    # chatlogEvent.account_type = 0
+    # chatlogEvent.chr_level = 0
+    # chatlogEvent.object = tagName
+    # chatlogEvent.addinfo = addinfo
+    # WriteEvent(chatlogEvent)
+    # return
+    #===========================================================================
 
 def __GetEventChatContent(content):
     '''

--
Gitblit v1.8.0