| | |
| | | # @param eventParam 事件参数
|
| | | # @param curPlayer
|
| | | # @return None
|
| | | def EventReport(eventActionID, eventParam, curPlayer=None):
|
| | | def EventReport(eventActionID, eventParam, curPlayer=None, OperatorID=""):
|
| | | # 组成例子 eventParam 的格式必须是 xx=yy&zz=cc
|
| | | # "http://192.168.0.249:12000/event_receiver?EventID=3099&OperatorID=test&PlayerCount=102&Time=2018-02-08 18:30:30&ProductID=snxxz&RegionName=s1"
|
| | |
|
| | | OperatorID = GameWorld.GetPlatform()
|
| | | if not OperatorID:
|
| | | if not curPlayer and not OperatorID:
|
| | | return
|
| | |
|
| | | ProductID = ReadChConfig.GetPyMongoConfig("EventReport", "ProductID")
|
| | | ReportUrl = ReadChConfig.GetPyMongoConfig("EventReport", "ReportUrl")
|
| | | RegionName = GameWorld.GetServerSID() # 需考虑合服情况
|
| | | |
| | |
|
| | | playerInfo = ""
|
| | | if curPlayer:
|
| | |
| | | "AccountID": GameWorld.GetPlatformAccID(curPlayer.GetAccID()),
|
| | | "IP": curPlayer.GetIP(),
|
| | | "Level": curPlayer.GetLV()})
|
| | | |
| | | OperatorID = GameWorld.GetPlayerPlatform(curPlayer.GetAccID())
|
| | | RegionName = GameWorld.GetPlayerServerSID(curPlayer)
|
| | | |
| | | else:
|
| | | # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发,没有则取配置主服
|
| | | RegionName = 's%s'%GameWorld.GetPlayerMainServerID(OperatorID) |
| | |
|
| | | if eventParam:
|
| | | eventParam = "&%s"%eventParam
|
| | |
| | | def WriteEvent_session(curPlayer):
|
| | | seconds = 0
|
| | | if PlayerTJG.GetIsTJG(curPlayer):
|
| | | seconds = 0
|
| | | return
|
| | | else:
|
| | | logoffTimeStr = curPlayer.GetLogoffTime().strip()
|
| | | loginTimeStr = curPlayer.GetLoginTime().strip()
|