From 303a03f56c01092ce7a7194e994dea2089b4728d Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 11 七月 2019 14:24:45 +0800
Subject: [PATCH] 7982 【后端】【主干】渡劫条件调整
---
ServerPython/CoreServerGroup/GameServer/Script/EventReport.py | 67 +++++++++++++++++++--------------
1 files changed, 38 insertions(+), 29 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py b/ServerPython/CoreServerGroup/GameServer/Script/EventReport.py
index fcb35c6..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(),
@@ -105,14 +105,21 @@
# "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)
+ # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发
+ 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"):
@@ -334,28 +341,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