ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py
@@ -847,7 +847,7 @@
    
    opInfo = ""
    # 结算自己
    addScore = __CalcBattleAddScore(curScore, tagScore, isWin)
    addScore = __CalcBattleAddScore(playerID, curScore, tagScore, isWin)
    updScore = max(0, playerScore + addScore)
    GameWorld.DebugLog("    更新自身积分: addScore=%s,updScore=%s" % (addScore, updScore), playerID)
    
@@ -860,11 +860,14 @@
        randItemList = IpyGameDataPY.GetFuncEvalCfg("ArenaBattleAward", 3)
        awardItemInfo = GameWorld.GetResultByRandomList(randItemList)
        if awardItemInfo:
            awardItemList.append(awardItemInfo)
            awardItemList.append(awardItemInfo[:3])
            isWorldNotify = awardItemInfo[3] if len(awardItemInfo) > 3 else 0
            if isWorldNotify:
                PlayerControl.WorldNotify(0, "ArenaWinerItem", [curPlayer.GetName(), awardItemInfo[0], "", awardItemInfo[1]])
            
    # 结算对手,仅玩家时结算,机器人不处理
    if tagPlayerID > MaxRobotID:
        tagAddScore = __CalcBattleAddScore(tagScore, curScore, not isWin)
        tagAddScore = __CalcBattleAddScore(tagPlayerID, tagScore, curScore, not isWin)
        updTagScore = max(0, tagScore + tagAddScore)
        GameWorld.DebugLog("    更新对手积分: tagAddScore=%s,updTagScore=%s" % (tagAddScore, updTagScore), playerID)
        tagCache = PlayerViewCache.FindViewCache(tagPlayerID)
@@ -943,26 +946,28 @@
                                                       cmdStr, len(cmdStr), curPlayer.GetRouteServerIndex())
    return
def __CalcBattleAddScore(curScore, tagScore, isWin):
def __CalcBattleAddScore(playerID, curScore, tagScore, isWin):
    ## 计算对战增加积分
    diffScore = curScore - tagScore # 积分差,有正负
    calcScoreFormatDict = IpyGameDataPY.GetFuncEvalCfg("ArenaBattleAward", 1) if isWin else IpyGameDataPY.GetFuncEvalCfg("ArenaBattleAward", 2)
    scoreKeyList = calcScoreFormatDict.keys()
    scoreKeyList.sort()
    calcKey = ""
    calcKey = None
    for scoreKey in scoreKeyList:
        if diffScore <= scoreKey:
            calcKey = scoreKey
            break
        
    if not calcKey:
    if calcKey == None:
        GameWorld.ErrLog("    计算得分公式: playerID=%s,diffScore=%s,scoreKeyList=%s,isWin=%s 找不到对应key公式"
                           % (playerID, diffScore, scoreKeyList, isWin))
        return 0
    
    compileKey = "ArenaBattleScore_%s_%s" % (int(isWin), str(calcKey))
    formatStr = calcScoreFormatDict[calcKey]
    addScore = eval(FormulaControl.GetCompileFormula(compileKey, formatStr))
    GameWorld.DebugLog("    计算得分公式: diffScore=%s,isWin=%s,compileKey=%s,formatStr=%s,addScore=%s"
                       % (diffScore, isWin, compileKey, formatStr, addScore))
    GameWorld.DebugLog("    计算得分公式: playerID=%s,diffScore=%s,scoreKeyList=%s,isWin=%s,compileKey=%s,formatStr=%s,addScore=%s"
                       % (playerID, diffScore, scoreKeyList, isWin, compileKey, formatStr, addScore))
    return addScore
#// A9 A8 查看竞技场对战记录 #tagCGQueryArenaBattleRecord