hch
2018-12-03 6cd31ef1136372f735384a9e9422de256bbf813d
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFBHelpBattle.py
@@ -85,7 +85,7 @@
        helpBattlePlayer.playerName = recData.GetStrValue1()
        helpBattlePlayer.todayXianyuanCoin = int(recData.GetStrValue2())
        helpCountDictStr = recData.GetStrValue3()
        if helpCountDictStr.startswith("{") and helpCountDictStr.endswith("{"):
        if helpCountDictStr.startswith("{") and helpCountDictStr.endswith("}"):
            helpBattlePlayer.todayHelpCountDict = eval(helpCountDictStr)
        else:
            GameWorld.ErrLog("LoadCheckInPlayerError: helpCountDictStr=%s" % helpCountDictStr, playerID)
@@ -174,7 +174,7 @@
    if playerID not in PyGameData.g_fbHelpBattleRecord:
        return
    unNotifyRecordList = PyGameData.g_fbHelpBattleRecord.pop(playerID)
    SendMapServer_FBHelpBattleRecord(curPlayer, unNotifyRecordList)
    SendMapServer_FBHelpBattleRecord(curPlayer, unNotifyRecordList, True)
    return
def OnMinuteProcess():
@@ -297,13 +297,14 @@
                  % (curPlayer.GetLV(), fightPower, curPlayer.GetFamilyID(), curPlayer.GetVIPLv(), todayXianyuanCoin, checkInCount + 1, haveViewCache), playerID)
    return [isOK, haveViewCache]
def UpdateCheckInPlayerInfo(playerID, fightPower, familyID):
def UpdateCheckInPlayerInfo(playerID, fightPower, familyID, playerName):
    ## 更新登记的助战玩家等级战力
    if playerID not in PyGameData.g_fbHelpBattleCheckInPlayerDict:
        return
    helpBattlePlayer = PyGameData.g_fbHelpBattleCheckInPlayerDict[playerID]
    helpBattlePlayer.fightPower = fightPower
    helpBattlePlayer.familyID = familyID
    helpBattlePlayer.playerName = playerName
    GameWorld.DebugLog("更新助战玩家等级战力: fightPower=%s,familyID=%s" % (fightPower, familyID), playerID)
    return
@@ -516,7 +517,8 @@
        coinAdd = int((baseHelpPoint + relationAdd) * addCoinRate / 10000.0)
        canAddMax = max(playerXianyuanCoinUpper - todayXianyuanCoin, 0)
        coinAddReal = min(coinAdd, canAddMax) # 实际加仙缘币
        GameWorld.DebugLog("    助战增加仙缘币: coinAddReal=%s, todayMapHelpCount=%s" % (coinAddReal, todayMapHelpCount), calledPlayerID)
        GameWorld.DebugLog("    助战增加仙缘币: todayXianyuanCoin=%s,coinUpper=%s,canAddMax=%s,coinAdd=%s,coinAddReal=%s, todayMapHelpCount=%s"
                           % (todayXianyuanCoin, playerXianyuanCoinUpper, canAddMax, coinAdd, coinAddReal, todayMapHelpCount), calledPlayerID)
        
        # GameServer 直接先加
        helpBattlePlayer.todayXianyuanCoin += coinAddReal
@@ -542,7 +544,7 @@
            
    return
def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList):
def SendMapServer_FBHelpBattleRecord(curPlayer, syncHelpRecordList, isLogin=False):
    if not syncHelpRecordList:
        return
    
@@ -550,7 +552,7 @@
    for record in syncHelpRecordList:
        helpRecordList.append([record.callPlayerID, record.callPlayerName, record.mapID, record.funcLineID, 
                               record.xianyuanCoinAdd, record.relation, record.vipLV, record.recordTime])
    addXianyuanCoinMsg = str(["HelpRecord", helpRecordList])
    addXianyuanCoinMsg = str(["HelpRecord", helpRecordList, isLogin])
    curPlayer.MapServer_QueryPlayerResult(0, 0, 'FBHelpBattle', addXianyuanCoinMsg, len(addXianyuanCoinMsg))
    GameWorld.DebugLog("    MapServer_QueryPlayerResult %s" % addXianyuanCoinMsg, curPlayer.GetPlayerID())
    return