From 532b9f45735b9a1b04667afb83b3fe3203d74ffb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 08 六月 2021 11:49:58 +0800
Subject: [PATCH] 8972 【主干】【BT】【BT2】 GM工具增加激活删除称号命令

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
index 92d8712..3c8eaf7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
@@ -32,6 +32,7 @@
 #"""Version = 2017-07-04 15:00"""
 #---------------------------------------------------------------------
 
+import IpyGameDataPY
 import IPY_GameWorld
 import DataRecordPack
 import PlayerControl
@@ -109,6 +110,10 @@
     # 组成例子 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"
     
+    if eventActionID in IpyGameDataPY.GetFuncEvalCfg("EventReport", 1):
+        #GameWorld.DebugLog("不需要汇报的事件! %s" % eventActionID)
+        return
+    
     if not curPlayer and not OperatorID:
         return
 
@@ -122,20 +127,26 @@
         playerInfo = urllib.urlencode({"RoleID": curPlayer.GetName(),
                           "AccountID": GameWorld.GetPlatformAccID(curPlayer.GetAccID()),
                           "IP": curPlayer.GetIP(),
-                          "Level": curPlayer.GetLV()}) 
+                          "Level": curPlayer.GetLV(),
+                          "DeviceFlag": curPlayer.GetAccountData().GetDeviceFlag()}) 
         
         OperatorID = GameWorld.GetPlayerPlatform(curPlayer)
         RegionName = GameWorld.GetPlayerServerSID(curPlayer)
+        playerInfo = "&%s"%playerInfo
         
     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
 
     if eventParam:
         eventParam = "&%s"%eventParam
     
     
-    getUrl = "%s?ProductID=%s&OperatorID=%s&RegionName=%s&EventID=%s&%s&Time=%s%s"%(\
+    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)
@@ -150,7 +161,7 @@
 #  @return None
 def WriteEvent(eventClass):
     return
-    if GameWorld.IsMergeServer():
+    if GameWorld.IsCrossServer():
         return
     
     if eventClass.GetScribeEventName() not in ReadChConfig.GetEvalChConfig("EventReportID"):
@@ -570,7 +581,9 @@
 def WriteEvent_login(curPlayer):
     if curPlayer.GetIP() == "127.0.0.1":
         return
-    EventReport(ShareDefine.Def_UserAction_Login, "Job=%s&SessionID=%s"%(curPlayer.GetJob(), GameWorld.GetSessionID(curPlayer)), curPlayer)
+    EventReport(ShareDefine.Def_UserAction_Login, "Job=%s&SessionID=%s&Version=%s"%(
+                                curPlayer.GetJob(), GameWorld.GetSessionID(curPlayer),
+                                curPlayer.GetAccountData().GetClientVersion()), curPlayer)
 
     return
 
@@ -660,6 +673,9 @@
     #避免记录太多信息
     if type_name in [IPY_GameWorld.TYPE_Price_Silver_Money] and abs(quantity * price) < ChConfig.Def_DRRecord_Min_Silver:
         return
+    if type_name not in IpyGameDataPY.GetFuncEvalCfg("EventReport", 2):
+        #GameWorld.DebugLog("该货币类型不需要汇报! type_name=%s" % type_name)
+        return
     # 标识此货币是否是一级货币(充值)
     Recharged = 1 if type_name == IPY_GameWorld.TYPE_Price_Gold_Money else 0
     #===========================================================================
@@ -681,7 +697,7 @@
     EventReport(ShareDefine.Def_UserAction_VirtualResource, 
                 "Price=%s&Quantity=%s&OperateType=%s&CurrencyType=%s&Recharged=%s&Flow=%s&Balance=%s&OperatorExtra=%s"%(
                 price, quantity, reason_name, type_name, Recharged, flow, 
-                PlayerControl.GetMoney(curPlayer, type_name), json.dumps(extraDict, ensure_ascii=False)), curPlayer)
+                PlayerControl.GetMoneyReal(curPlayer, type_name), json.dumps(extraDict, ensure_ascii=False)), curPlayer)
     return
 
 ## 写任务事件记录
@@ -1734,6 +1750,6 @@
     EventReport(ShareDefine.Def_UserAction_VIPLvUP, "VIPLevel=%s"%curPlayer.GetVIPLv(), curPlayer)
     
 def WriteEvent_FightPower(curPlayer):
-    EventReport(ShareDefine.Def_UserAction_FightPower, "FightPower=%s"%curPlayer.GetFightPower(), curPlayer)
+    EventReport(ShareDefine.Def_UserAction_FightPower, "FightPower=%s"%PlayerControl.GetFightPower(curPlayer), curPlayer)
     
     

--
Gitblit v1.8.0