ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -113,6 +113,7 @@
import ShareDefine
import PlayerControl
import PyGameData
import IpyGameDataPY
#===============================================================================
##发送事件记录给EventShell
# @param eventTypeStr: 事件类型标识
@@ -124,6 +125,7 @@
        if not GameWorld.IsNormalPlayer(curPlayer):
            return
        pid = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PlayerFromPID)
        if pid:
        dataDict["pid"] = pid
        dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
        dataDict["PlayerLV"] = curPlayer.GetLV()
@@ -143,11 +145,12 @@
    loginTime = curPlayer.GetLoginTime()
    name = curPlayer.GetName()
    mapID = GameWorld.GetMap().GetMapID()
    lineID = GameWorld.GetGameWorld().GetLineID()
    #lineID = GameWorld.GetGameWorld().GetLineID()
    lv = curPlayer.GetLV()
    gold = curPlayer.GetGold()
    
    dataDict = {'Type':'login', 'IP':str(ip), 'AccID':accID, 'mapID':mapID, 'lineID':lineID,
                'Name':name, 'LoginTime':str(loginTime), 'LogoutTime':'', 'MFPFightPower':GetMFPFightPowerInfo(curPlayer),
                'LV':curPlayer.GetLV(), 'TotalExp':PlayerControl.GetPlayerTotalExp(curPlayer)}
    dataDict = {'Type':'login', 'IP':str(ip), 'AccID':accID, 'MapID':mapID, 'Name':name, 'LV':lv, 'Gold':gold,
                'LoginTime':str(loginTime), 'LogoutTime':''}
    
    if GameWorld.IsCrossServer():
        regCrossZoneID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBZoneID)
@@ -170,37 +173,13 @@
    logoutTime = curPlayer.GetLogoffTime()
    loginTime = curPlayer.GetLoginTime()
    lv = curPlayer.GetLV()
    vipLV = curPlayer.GetVIPLv()
    gold = curPlayer.GetGold()
    goldPaper = curPlayer.GetGoldPaper()
    dataDict = {'Type':'logout', 'IP':ip, 'AccID':accID, 'LV':lv, 'VipLV':vipLV,
                  'Name':name, 'LoginTime':str(loginTime), 'Gold':gold, 'GoldPaper':goldPaper,
                  'LogoutTime':str(logoutTime), 'MFPFightPower':GetMFPFightPowerInfo(curPlayer),
                  'TotalExp':PlayerControl.GetPlayerTotalExp(curPlayer)}
    mapID = GameWorld.GetMap().GetMapID()
    dataDict = {'Type':'logout', 'IP':ip, 'AccID':accID, 'MapID':mapID, 'Name':name, 'LV':lv, 'Gold':gold,
                'LoginTime':str(loginTime), 'LogoutTime':str(logoutTime)}
    #发送封包
    SendEventPack("LogInOut", dataDict, curPlayer)
    return
def GetMFPFightPowerInfo(curPlayer):
    #记录模块战力
    dataDict = {}
    for mfpType in ShareDefine.ModuleFightPowerTypeList:
        fightPower = PlayerControl.GetMFPFightPower(curPlayer, mfpType)
        dataDict[mfpType] = fightPower
    return dataDict
## 新增有效登陆
#  @param accID: 账号ID
#  @param ip: ip
#  @return: None
def DR_LoginValid(accID, ip, curPlayer):
    dataDict = {'AccID':accID, 'IP':ip}
    #发送封包
    SendEventPack("LoginValid", dataDict, curPlayer)
    return
## 新增第一次登陆
#  @param accID: 账号ID
@@ -257,19 +236,6 @@
    SendEventPack("CTGOK", dataDict, curPlayer)
    return
## 功能流向信息
#  @param curPlayer: 玩家实例
#  @return: {}
def __GetFuncDRDict(curPlayer):
    drDict = {}
    # 官爵阶级、祝福值
    offBlessValue = 0
    offRank = curPlayer.GetOfficialRank()
    drDict["Official"] = [offRank, offBlessValue]
    return drDict
## 玩家升级
#  @param curPlayer: 玩家实例
#  @param playerLV: 玩家等级
@@ -284,6 +250,29 @@
    #发送封包
    SendEventPack("PlayerUpgrade", dataDict, curPlayer)
    return
def DR_Task(curPlayer, taskGroup, taskID, eventName="", drDict={}):
    ## 任务流向
    dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
                'AccID':curPlayer.GetAccID(), 'TaskID':taskID, 'TaskGroup':taskGroup, 'eventName':eventName}
    dataDict.update(drDict)
    SendEventPack("Task_%s" % taskGroup, dataDict, curPlayer)
    return
def DR_MainLevelPass(curPlayer, lvID):
    ## 主线关卡过关
    dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
                'AccID':curPlayer.GetAccID(), 'lvID':lvID}
    SendEventPack("MainLevelPass", dataDict, curPlayer)
    return
def DR_FBPass(curPlayer, mapID, funcLineID, drDict={}):
    ## 副本过关
    dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
                'AccID':curPlayer.GetAccID(), 'MapID':mapID, 'LineID':funcLineID}
    dataDict.update(drDict)
    SendEventPack("FBPass_%s" % mapID, dataDict, curPlayer)
    return
##累计登陆礼包
@@ -411,7 +400,14 @@
        return
    
    #避免记录太多信息
    if moneyType in [IPY_GameWorld.TYPE_Price_Silver_Money] and moneyCount < ChConfig.Def_DRRecord_Min_Silver:
    if moneyType in IpyGameDataPY.GetFuncEvalCfg("MoneyRecord", 3):
        #GameWorld.DebugLogEx("消耗不记录的货币类型: %s", moneyType)
        return
    moneyRecordDict = IpyGameDataPY.GetFuncEvalCfg("MoneyRecord", 4, {})
    if moneyType in moneyRecordDict:
        recordSet = moneyRecordDict[moneyType]
        if moneyCount < recordSet:
            #GameWorld.DebugLogEx("消耗过少不记录的货币类型: %s,moneyCount=%s < %s", moneyType, moneyCount, recordSet)
        return
    
    dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), 
@@ -421,7 +417,6 @@
                'VIPLV':curPlayer.GetVIPLv(), 'PlayerLV':curPlayer.GetLV()}
    
    dataDict.update(addDataDict)
    dataDict.update(__GetFuncDRDict(curPlayer))
    
    #金子
    if moneyType == IPY_GameWorld.TYPE_Price_Gold_Money:
@@ -465,7 +460,14 @@
        return
    
    #避免记录太多信息
    if moneyType in [IPY_GameWorld.TYPE_Price_Silver_Money] and moneyCount < ChConfig.Def_DRRecord_Min_Silver:
    if moneyType in IpyGameDataPY.GetFuncEvalCfg("MoneyRecord", 1):
        #GameWorld.DebugLogEx("获得不记录的货币类型: %s", moneyType)
        return
    moneyRecordDict = IpyGameDataPY.GetFuncEvalCfg("MoneyRecord", 2, {})
    if moneyType in moneyRecordDict:
        recordSet = moneyRecordDict[moneyType]
        if moneyCount < recordSet:
            #GameWorld.DebugLogEx("获得过少不记录的货币类型: %s,moneyCount=%s < %s", moneyType, moneyCount, recordSet)
        return
    
    dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), 
@@ -475,7 +477,6 @@
                'VIPLV':curPlayer.GetVIPLv(), 'PlayerLV':curPlayer.GetLV()}
    
    dataDict.update(addDataDict)
    dataDict.update(__GetFuncDRDict(curPlayer))
    
    #金子
    if moneyType == IPY_GameWorld.TYPE_Price_Gold_Money: