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 |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
index 5d80b9a..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,10 +127,12 @@
         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:
         # 合服情况,玩家取自己服发送,非玩家数据按指定平台配置发
@@ -139,9 +146,9 @@
         eventParam = "&%s"%eventParam
     
     
-    getUrl = "%s?ProductID=%s&OperatorID=%s&RegionName=%s&EventID=%s&%s&Time=%s&DeviceFlag=%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], curPlayer.GetAccountData().GetDeviceFlag(), eventParam)
+             str(datetime.datetime.today()).split('.')[0], eventParam)
     GameWorld.DebugLog("EventReport: %s"%getUrl)
     
     # 第五个参数0代表get发送  1代表post
@@ -574,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
 
@@ -664,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
     #===========================================================================
@@ -685,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
 
 ## 写任务事件记录
@@ -1738,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