389 流向记录(登录、下线、主线任务、主线关卡、副本、货币、物品)
7个文件已修改
145 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Tianzi.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -20,6 +20,7 @@
import ReadChConfig
import PlayerActivity
import ChPyNetSendPack
import DataRecordPack
import NetPackCommon
import IpyGameDataPY
import ShareDefine
@@ -169,6 +170,7 @@
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FBPassLineID % mapID, funcLineID)
    if isNotify:
        Sync_FBPlayerFBInfoData(curPlayer, mapID)
    DataRecordPack.DR_FBPass(curPlayer, mapID, funcLineID)
    return
def CheckCanEnterFBComm(curPlayer, mapID, lineID, fbIpyData, fbLineIpyData, reqEnterCnt=1, isNotify=True, isTeamAsk=False):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
@@ -483,7 +483,7 @@
    moneyTotal = int(round(moneyTotal)) # 四舍五入取整
    GameWorld.DebugLog("moneyTotal=%s,mjExTotal=%s" % (moneyTotal, mjExTotal), playerID)
    
    PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, "DecomposeMainEquip", isSysHint=False)
    PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, isSysHint=False)
    PlayerLLMJ.AddExpDecompose(curPlayer, mjExTotal)
    PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_EquipDecompose, decomposeCnt)
    PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_EquipDecompose, decomposeCnt)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_Tianzi.py
@@ -23,6 +23,7 @@
import PlayerSuccess
import PlayerBillboard
import ChPyNetSendPack
import DataRecordPack
import NetPackCommon
import IpyGameDataPY
import ShareDefine
@@ -196,6 +197,8 @@
    ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Tianzi", False, {}], isNotifyAward=False)
    SyncTianziInfo(curPlayer, lineID, bossID)
    __onFBTianzi(curPlayer)
    DataRecordPack.DR_FBPass(curPlayer, mapID, funcLineID, {"hpNum":hpNum, "totalHurt":totalHurt})
    return
def __getTianziAwardList(todayHurt, bossID, sweepCnt=1):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -483,6 +483,12 @@
    
    itemType = curItem.GetType()
    itemID = curItem.GetItemTypeID()
    if itemType in IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 4) \
        or itemID in IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 5):
        GameWorld.DebugLog("不需要记录的物品类型或ID! itemType=%s,itemID=%s" % (itemType, itemID))
        return False
    itemTypeMinColorDict = IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 1)
    if itemType in itemTypeMinColorDict:
        minColor = itemTypeMinColorDict[itemType]
@@ -496,11 +502,6 @@
        or itemID in IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 3):
        #GameWorld.DebugLog("需要记录的物品类型或ID! itemType=%s,itemID=%s" % (itemType, itemID))
        return True
    if itemType in IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 4) \
        or itemID in IpyGameDataPY.GetFuncEvalCfg("ItemRecordRule", 5):
        #GameWorld.DebugLog("不需要记录的物品类型或ID! itemType=%s,itemID=%s" % (itemType, itemID))
        return False
    
    #if itemType == ChConfig.Def_ItemType_Rune:
    #    return IsRuneItemNeedRecord(curItem, curItem.GetUserAttr(ShareDefine.Def_IudetRuneLV))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -38,7 +38,6 @@
import PlayerPrestigeSys
import FBCommon
import PassiveBuffEffMng
import EventReport
import PlayerSuccess
import ItemControler
import GameFuncComm
@@ -2737,9 +2736,9 @@
        __PayMoneyAfterBySilverPaper(curPlayer, price)
        
    #转盘活动
    PlayerActTurntable.OnPlayerUseGold(curPlayer, type_Price, price)
    #PlayerActTurntable.OnPlayerUseGold(curPlayer, type_Price, price)
    #轮回殿
    PlayerActLunhuidian.AddLunhuidianValue(curPlayer, PlayerActLunhuidian.AwardType_PayMoney, type_Price, price)
    #PlayerActLunhuidian.AddLunhuidianValue(curPlayer, PlayerActLunhuidian.AwardType_PayMoney, type_Price, price)
    if type_Price == ShareDefine.TYPE_Price_Xiantao:
        # 累加未结算战锤 - 经验
        unXiantaoCntExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntExp)
@@ -4211,6 +4210,7 @@
        PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_OSAMainLevel, lvID)
        if OpenServerActivity.GetOSAState(curPlayer, ShareDefine.Def_BT_OSA_MainLevel) == 1:
            PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_OSA_MainLevel, lvID)
        DataRecordPack.DR_MainLevelPass(curPlayer, lvID)
    return value
def GetMainLevelPassInfo(curPlayer):
    ## 获取主线关卡过关进度信息
@@ -4251,6 +4251,10 @@
    wave = value % 100
    return chapterID, levelNum, wave
## 额外记录最后一次接到的主线任务ID,仅接到新任务时更新即可,可方便用于后台统计或其他判断
def GetMainTaskID(curPlayer):return curPlayer.GetExAttr20()
def SetMainTaskID(curPlayer, value): curPlayer.SetExAttr20(value)
## 获取佩戴的称号ID
def GetTitleID(curPlayer): return curPlayer.GetExAttr3()
def SetTitleID(curPlayer, titleID):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -21,6 +21,7 @@
import NetPackCommon
import PlayerGoldRush
import ChPyNetSendPack
import DataRecordPack
import ItemControler
import IPY_GameWorld
import GameFuncComm
@@ -38,11 +39,11 @@
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for index in xrange(ipyDataMgr.GetTaskCount()):
            ipyData = ipyDataMgr.GetTaskByIndex(index)
            taskGroup = ipyData.GetTaskGroup()
            tGroup = ipyData.GetTaskGroup()
            taskID = ipyData.GetTaskID()
            if taskGroup not in taskIDListDict:
                taskIDListDict[taskGroup] = []
            taskIDList = taskIDListDict[taskGroup]
            if tGroup not in taskIDListDict:
                taskIDListDict[tGroup] = []
            taskIDList = taskIDListDict[tGroup]
            if taskID not in taskIDList:
                taskIDList.append(taskID)
        IpyGameDataPY.SetConfigEx(key, taskIDListDict)
@@ -100,8 +101,9 @@
        
    return
def __giveNewTask(curPlayer, taskGroup=ChConfig.TaskGroup_Main):
def __giveNewTask(curPlayer, taskGroup=ChConfig.TaskGroup_Main, preTaskID=0):
    ## 给新任务
    # @param preTaskID: 上一个任务ID
    taskIDList = GetTaskIDList(taskGroup)
    if not taskIDList:
        return
@@ -136,6 +138,12 @@
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, ChConfig.TaskState_Doing)
    GameWorld.DebugLog("接到新任务: taskGroup=%s,newTaskID=%s" % (taskGroup, newTaskID), playerID)
    # 额外记录接到任务
    if taskGroup == ChConfig.TaskGroup_Main:
        PlayerControl.SetMainTaskID(curPlayer, newTaskID)
    DataRecordPack.DR_Task(curPlayer, taskGroup, newTaskID, "new", {"preTaskID":preTaskID})
    return SetTaskValue(curPlayer, ipyData, taskValue)
def __GetTaskValue(curPlayer, ipyData):
@@ -347,7 +355,7 @@
        appointInfo[itemID] = appointID
    ItemControler.NotifyGiveAwardInfo(curPlayer, notifyAwardList, "Task", dataEx={"appointInfo":appointInfo})
    
    if not __giveNewTask(curPlayer, taskGroup):
    if not __giveNewTask(curPlayer, taskGroup, taskID):
        SyncTaskInfo(curPlayer, [taskGroup])
        
    GameFuncComm.DoFuncOpenLogic(curPlayer)